/*
Theme Name: DFW Solar Services
Theme URI: https://dfwsolarservices.com
Author: DFW Solar Services LLC
Description: Custom block theme for DFW Solar Services. Solar maintenance and repair in Dallas-Fort Worth. On activation it creates the Home, Services, About, FAQ and Contact pages and adds the photos to the Media Library.
Version: 1.0.2
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dfw-solar
*/

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
main.wp-block-group { margin-top: 0; }
.entry-content > * + *, .wp-block-post-content > * + * { margin-block-start: 0; }
h1, h2, h3, h4 { margin-top: 0; margin-bottom: 0; }
img { max-width: 100%; height: auto; }

/* ---------- Sections ---------- */
.dfw-section { padding-top: 80px; padding-bottom: 80px; }
.dfw-section-tight { padding-top: 56px; padding-bottom: 56px; }
.dfw-hero { padding-top: 64px; padding-bottom: 72px; }
@media (max-width: 781px) {
	.dfw-section { padding-top: 48px; padding-bottom: 48px; }
	.dfw-hero { padding-top: 36px; padding-bottom: 44px; }
}
.dfw-stack > * + * { margin-block-start: 16px; }
.dfw-section > .wp-block-group, .dfw-section > .wp-block-columns { margin-block-start: 0; }
.dfw-section > * + * { margin-block-start: 36px !important; }
.dfw-section > .dfw-head + * { margin-block-start: 36px !important; }

/* Eyebrow labels */
.dfw-eyebrow { font-weight: 700; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wp--preset--color--red); margin: 0 0 10px !important; }
.has-black-background-color .dfw-eyebrow { color: var(--wp--preset--color--accent); }
.dfw-lead { font-size: 19px; max-width: 40em; }
.has-black-background-color .dfw-lead, .has-black-background-color .dfw-soft { color: var(--wp--preset--color--soft); }
.dfw-muted { color: var(--wp--preset--color--muted); }
.has-black-background-color { color: #FFFFFF; }
.has-black-background-color a:not(.wp-block-button__link) { color: #FFFFFF; }
.has-black-background-color h1, .has-black-background-color h2, .has-black-background-color h3 { color: #FFFFFF; }
.dfw-head { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: flex-end; }
.dfw-head > * { margin: 0 !important; }

/* Text link with arrow */
.dfw-link a, a.dfw-link { font-weight: 700; }
.has-black-background-color .dfw-link a { color: var(--wp--preset--color--accent); }

/* Pills / badges */
.dfw-pill { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: 0.06em; padding: 6px 12px; border-radius: 999px; background: #1B1B1B; border: 1px solid #333333; color: var(--wp--preset--color--accent); margin: 0 !important; }
.dfw-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.dfw-pills > * { margin: 0 !important; }
.dfw-pill.is-light { color: #FFFFFF; }
.dfw-pill a { color: inherit !important; text-decoration: none; }

/* ---------- Buttons ---------- */
.wp-block-buttons { gap: 12px; }
.wp-block-button__link { text-decoration: none; }
.dfw-btn-dark .wp-block-button__link { background: var(--wp--preset--color--black); color: #FFFFFF; }
.dfw-btn-dark .wp-block-button__link:hover { background: #2A2A2A; color: #FFFFFF; }
.dfw-btn-ghost .wp-block-button__link { background: transparent; color: #FFFFFF; border: 2px solid #4A4A4A; padding: 13px 24px; }
.dfw-btn-ghost .wp-block-button__link:hover { border-color: var(--wp--preset--color--accent); background: transparent; color: #FFFFFF; }
.dfw-btn-ghost-dark .wp-block-button__link { background: transparent; color: var(--wp--preset--color--black); border: 2px solid var(--wp--preset--color--black); padding: 13px 24px; }
.dfw-btn-ghost-dark .wp-block-button__link:hover { background: var(--wp--preset--color--black); color: #FFFFFF; }
.dfw-btn-small .wp-block-button__link { padding: 11px 18px; font-size: 16px; }

/* ---------- Header ---------- */
.dfw-header { background: var(--wp--preset--color--black); border-bottom: 1px solid #2A2A2A; }
.dfw-header-inner { padding-top: 10px; padding-bottom: 10px; gap: 12px 32px; }
.dfw-header .wp-block-site-logo img, .dfw-header .dfw-logo img { height: 72px; width: auto; border-radius: 0; }
.dfw-header .wp-block-image { margin: 0; }
.dfw-header .wp-block-navigation { font-weight: 600; font-size: 16px; color: #F7F7F7; gap: 4px 26px; }
.dfw-header .wp-block-navigation a { color: #F7F7F7; text-decoration: none; padding: 10px 0; }
.dfw-header .wp-block-navigation a:hover, .dfw-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--accent); }
.dfw-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--black); color: #FFFFFF; padding: 24px; }
.dfw-header .wp-block-navigation__responsive-container.is-menu-open a { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 20px; }
.dfw-header .wp-block-navigation__responsive-container-open, .dfw-header .wp-block-navigation__responsive-container-close { color: #FFFFFF; }
.dfw-header .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }
.dfw-phone { margin: 0 !important; }
.dfw-phone a { color: #FFFFFF !important; font-weight: 700; text-decoration: none; padding: 10px 4px; display: inline-block; }
.dfw-phone a::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; background: var(--wp--preset--color--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8.1 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8.1 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (max-width: 781px) {
	.dfw-header .wp-block-site-logo img, .dfw-header .dfw-logo img { height: 56px; }
	.dfw-header-actions { display: none !important; }
}

/* Sticky phone action bar (phones only) */
.wp-block-buttons.dfw-mobile-bar { display: none !important; }
@media (max-width: 781px) {
	.wp-block-buttons.dfw-mobile-bar { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; position: sticky; bottom: 0; z-index: 50; background: var(--wp--preset--color--black); border-top: 1px solid #2A2A2A; padding: 10px 12px; margin: 0 !important; }
	.dfw-mobile-bar .wp-block-button { width: 100%; }
	.dfw-mobile-bar .wp-block-button__link { width: 100%; text-align: center; padding: 13px 10px; }
}

/* ---------- Cards ---------- */
.dfw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.dfw-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.dfw-grid > *, .dfw-grid-4 > * { margin: 0 !important; }
.dfw-card { background: #FFFFFF; border: 1px solid var(--wp--preset--color--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.dfw-card > * { margin: 0 !important; }
.dfw-card .wp-block-image, .dfw-card .wp-block-image img { border-radius: 0; margin: 0; }
.dfw-card .wp-block-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.dfw-card-body { padding: 24px; }
.dfw-card-body > * + * { margin-block-start: 8px !important; }
.dfw-card-body h3 { font-size: 20px; }
.dfw-card-body p { color: var(--wp--preset--color--muted); margin: 0; }
.dfw-tile { background: #FFFFFF; border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: 28px; }
.dfw-tile > * + * { margin-block-start: 8px !important; }
.dfw-tile p { margin: 0; }
.has-sand-background-color .dfw-tile.is-sand, .dfw-tile.is-sand { background: var(--wp--preset--color--sand); border: 0; border-radius: 12px; padding: 18px; }
.dfw-tile.is-dark { background: var(--wp--preset--color--black); border-color: var(--wp--preset--color--black); color: #FFFFFF; }
.dfw-tile.is-dark h3, .dfw-tile.is-dark a:not(.wp-block-button__link) { color: #FFFFFF; }
.dfw-tile.is-dark .dfw-eyebrow { color: var(--wp--preset--color--accent); }
.dfw-tile.is-ink { background: #1B1B1B; border: 1px solid #2A2A2A; color: #FFFFFF; }
.dfw-tile.is-ink .dfw-quote { font-size: 19px; }

/* Step badge */
.dfw-step { display: inline-block; background: var(--wp--preset--color--black); color: var(--wp--preset--color--accent); font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; margin: 0 !important; }

/* Photo coming soon placeholder */
.dfw-coming-soon { position: relative; background: var(--wp--preset--color--black); color: #FFFFFF; aspect-ratio: 16 / 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.dfw-row .dfw-coming-soon { aspect-ratio: 4 / 3; border-radius: 16px; }
.dfw-coming-soon > * { margin: 0 !important; }
.dfw-coming-soon .dfw-tag { position: absolute; top: 14px; left: 14px; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--black); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; padding: 5px 10px; border-radius: 999px; }
.dfw-coming-soon .dfw-soon { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 15px; letter-spacing: 0.12em; border: 1px solid #4A4A4A; border-radius: 999px; padding: 6px 14px; }
.dfw-coming-soon .dfw-icon { width: 88px; height: 88px; font-size: 0; line-height: 0; background: var(--wp--preset--color--accent); }
.dfw-icon-battery { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='3' width='12' height='18' rx='2.5'/%3E%3Cpath d='M10 1.5h4'/%3E%3Cpath d='m12.8 8-2.3 4h3l-2.3 4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='3' width='12' height='18' rx='2.5'/%3E%3Cpath d='M10 1.5h4'/%3E%3Cpath d='m12.8 8-2.3 4h3l-2.3 4'/%3E%3C/svg%3E") center / contain no-repeat; }
.dfw-icon-panel { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2.5' width='16' height='19' rx='2'/%3E%3Cpath d='M8 7h3M13 7h3M8 11h3M13 11h3M8 15h3M13 15h3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2.5' width='16' height='19' rx='2'/%3E%3Cpath d='M8 7h3M13 7h3M8 11h3M13 11h3M8 15h3M13 15h3'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (max-width: 781px) { .dfw-hero-logo { display: none; } }
.dfw-hero-logo img { border-radius: 16px; max-width: 440px; margin-left: auto; }

/* ---------- Service rows (Services page) ---------- */
.dfw-rows > * + * { margin-block-start: 72px !important; }
.dfw-row { gap: 40px !important; align-items: center !important; margin-bottom: 0; }
.dfw-row .wp-block-image { margin: 0; }
.dfw-row .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; display: block; }
@media (min-width: 782px) { .dfw-row.dfw-reverse { flex-direction: row-reverse; } }
.dfw-row h2 { font-size: 30px; line-height: 1.15; }
.dfw-row .wp-block-column > * + * { margin-block-start: 14px; }
.dfw-row .dfw-book { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 16px; }

/* ---------- Lists ---------- */
ul.dfw-bullets, ul.dfw-checks, ul.dfw-dots, ul.dfw-chips { list-style: none; padding-left: 0; margin: 0; }
ul.dfw-bullets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 8px 20px; }
ul.dfw-bullets li { position: relative; padding-left: 18px; }
ul.dfw-bullets li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 2px; background: var(--wp--preset--color--red); }
ul.dfw-checks li { position: relative; padding-left: 36px; margin-bottom: 12px; }
ul.dfw-checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 999px; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--black); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
ul.dfw-dots li { position: relative; padding-left: 24px; margin-bottom: 12px; }
ul.dfw-dots li::before { content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; border-radius: 999px; background: var(--wp--preset--color--accent); }
ul.dfw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
ul.dfw-chips li { background: #FFFFFF; border: 1px solid var(--wp--preset--color--line); border-radius: 999px; padding: 6px 12px; font-size: 15px; }
.has-white-background-color ul.dfw-chips li { background: var(--wp--preset--color--sand); border-color: var(--wp--preset--color--sand); }

/* ---------- Gallery ---------- */
.dfw-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.dfw-gallery > * { margin: 0 !important; }
.dfw-gallery .wp-block-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; display: block; }

/* ---------- Reviews ---------- */
.dfw-rating { display: flex; align-items: center; gap: 14px; }
.dfw-rating > * { margin: 0 !important; }
.dfw-score { font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: 48px; line-height: 1; }
.dfw-stars { color: var(--wp--preset--color--accent); font-size: 22px; letter-spacing: 2px; line-height: 1.2; }

/* ---------- FAQ ---------- */
.dfw-faq > * + * { margin-block-start: 12px !important; }
.wp-block-details summary { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 18px; cursor: pointer; }
.wp-block-details > p { color: var(--wp--preset--color--muted); margin-top: 12px; }
.wp-block-details strong { color: var(--wp--preset--color--ink); }

/* ---------- Sidebar layouts ---------- */
.dfw-split { gap: 32px !important; align-items: flex-start !important; }
.dfw-aside { border-radius: 20px; padding: 30px; }
.dfw-aside > * + * { margin-block-start: 16px !important; }
.dfw-hours { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #2A2A2A; padding-bottom: 8px; margin: 0 !important; }
.dfw-hours + .dfw-hours { border-bottom: 0; margin-top: 8px !important; }

/* ---------- Footer ---------- */
.dfw-footer { background: #000000; color: var(--wp--preset--color--soft); font-size: 15px; }
.dfw-footer a { color: var(--wp--preset--color--soft); }
.dfw-footer a:hover { color: var(--wp--preset--color--accent); }
.dfw-footer h4 { color: #FFFFFF; font-size: 17px; }
.dfw-footer .wp-block-column > * { margin: 0 0 8px !important; }
.dfw-footer .dfw-logo img { height: 110px; width: auto; border-radius: 0; }
.dfw-footer .dfw-accent-link a { color: var(--wp--preset--color--accent); font-weight: 700; }
.dfw-footer-bottom { border-top: 1px solid #2A2A2A; font-size: 14px; gap: 8px 24px; }
.dfw-footer-bottom p { margin: 0; }

/* Accessibility: visible focus */
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px; }

/* Spacing between stacked groups inside one column */
.dfw-stack > .dfw-eyebrow:not(:first-child) { margin-top: 32px !important; }
.dfw-aside h3 { margin-bottom: 8px !important; }
.dfw-section-tight h2 + p { margin-top: 10px; }
.dfw-faq + .dfw-faq { margin-top: 36px; }
.dfw-faq h3 { margin-bottom: 4px; }

/* ---------- GoDaddy contrast helper compatibility ----------
   GoDaddy's built-in "contrast fallback" forces text inside colored sections to
   var(--dsgo-text-color, inherit) !important. Setting that variable on our own
   colored text keeps the intended colors (eyebrows, step badges, stars, etc.). */
.wp-site-blocks .dfw-eyebrow { --dsgo-text-color: var(--wp--preset--color--red); }
.wp-site-blocks .has-black-background-color .dfw-eyebrow,
.wp-site-blocks .dfw-tile.is-dark .dfw-eyebrow { --dsgo-text-color: var(--wp--preset--color--accent); }
.wp-site-blocks .dfw-step { --dsgo-text-color: var(--wp--preset--color--accent); }
.wp-site-blocks .dfw-coming-soon { --dsgo-text-color: #FFFFFF; }
.wp-site-blocks .dfw-coming-soon .dfw-tag { --dsgo-text-color: var(--wp--preset--color--black); }
.wp-site-blocks .dfw-coming-soon .dfw-soon { --dsgo-text-color: #FFFFFF; }
.wp-site-blocks .dfw-pill { --dsgo-text-color: var(--wp--preset--color--accent); }
.wp-site-blocks .dfw-pill.is-light { --dsgo-text-color: #FFFFFF; }
.wp-site-blocks .dfw-stars { --dsgo-text-color: var(--wp--preset--color--accent); }
.wp-site-blocks .dfw-muted, .wp-site-blocks .dfw-card-body p { --dsgo-text-color: var(--wp--preset--color--muted); }
.wp-site-blocks .has-black-background-color .dfw-soft,
.wp-site-blocks .has-black-background-color .dfw-lead,
.wp-site-blocks .dfw-tile.is-dark .dfw-soft,
.wp-site-blocks .dfw-tile.is-ink .dfw-soft { --dsgo-text-color: var(--wp--preset--color--soft); }
.wp-site-blocks .has-black-background-color .dfw-link a,
.wp-site-blocks .dfw-tile.is-ink .dfw-link a { --dsgo-text-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); }
.wp-site-blocks .dfw-tile.is-dark, .wp-site-blocks .dfw-tile.is-dark > *, .wp-site-blocks .dfw-tile.is-dark h3, .wp-site-blocks .dfw-tile.is-dark h3 a { --dsgo-text-color: #FFFFFF; }
.wp-site-blocks .dfw-tile.is-ink, .wp-site-blocks .dfw-tile.is-ink > * { --dsgo-text-color: #FFFFFF; }
.wp-site-blocks .dfw-tile.is-dark .dfw-eyebrow { --dsgo-text-color: var(--wp--preset--color--accent); }
.wp-site-blocks .dfw-tile.is-dark .dfw-soft { --dsgo-text-color: var(--wp--preset--color--soft); }
.wp-site-blocks .dfw-hours strong, .wp-site-blocks .dfw-hours span { --dsgo-text-color: #FFFFFF; }
.wp-site-blocks .dfw-score { --dsgo-text-color: inherit; }
