/* footer-widgets.css - Footer widget areas (inc/widgets.php)
 * Loaded after home.min.css. Values mirror home.min.css:1463-1511 so widgets match the built-in columns.
 * !important is required: competing rules (e.g. body h2 { font-size: 2.7rem !important }) are !important too.
 */

/* Columns & widgets (spacing only between widgets, so fallback columns keep their 18px heading gap) */
.site-footer__col--widgets { min-width: 0; }
.site-footer__widget { margin: 0 !important; min-width: 0; }
.site-footer__col--widgets > .site-footer__widget + .site-footer__widget { margin-top: 28px !important; }

/* Titles: legacy widget-title + any block heading level */
.site-footer__widget :is(h1, h2, h3, h4, h5, h6),
.site-footer__widget .widget-title {
    color: #fff !important;
    font-size: .88rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
}

/* Heading-only widget directly above its list widget: only the heading's own 18px margin */
.site-footer__col--widgets > .site-footer__widget:has(> :is(h1, h2, h3, h4, h5, h6):only-child) + .site-footer__widget { margin-top: 0 !important; }

/* Group block (default/stack layout only; Row & Grid groups keep core's layout): flow margins -> flex gap */
.site-footer__widget .wp-block-group:not(.is-layout-flex):not(.is-layout-grid) { display: flex !important; flex-direction: column !important; gap: 12px !important; margin: 0 !important; }
.site-footer__widget .wp-block-group:not(.is-layout-flex):not(.is-layout-grid) > * { margin: 0 !important; }
.site-footer__widget .wp-block-group:not(.is-layout-flex):not(.is-layout-grid) > :is(h1, h2, h3, h4, h5, h6) { margin-bottom: 6px !important; } /* 12 + 6 = 18px */

/* Lists: core/list, categories, archives, latest posts, legacy menu */
.site-footer__widget ul:not(.wp-block-social-links):not(.site-footer__contact-list) {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.site-footer__widget ol { list-style: decimal !important; padding-left: 1.2em !important; margin: 0 !important; }
.site-footer__widget li { margin: 0 !important; padding: 0 !important; } /* no color here: it would grey out Social Icons */
.site-footer__widget li :is(ul.children, ul.sub-menu) { margin-top: 12px !important; padding-left: 14px !important; }

/* Links: skip theme classes (WhatsApp/contact links keep their accent), buttons and social icons */
.site-footer__widget a:not([class*="site-footer__"], .wp-block-button__link, .wp-block-social-link-anchor) {
    color: #94a3b8 !important;
    font-size: .92rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color .2s ease, transform .2s ease !important;
}
.site-footer__widget a:not([class*="site-footer__"], .wp-block-button__link, .wp-block-social-link-anchor):hover { color: #38bdf8 !important; }
.site-footer__widget li > a:not([class*="site-footer__"], .wp-block-button__link, .wp-block-social-link-anchor) { display: inline-flex !important; align-items: center !important; }
.site-footer__widget li > a:not([class*="site-footer__"], .wp-block-button__link, .wp-block-social-link-anchor):hover { transform: translateX(4px) !important; }
.site-footer__widget p a:not([class]) { color: #38bdf8 !important; font-weight: 600 !important; }
/* Buttons: .site-footer a (grey) beats core's white button text; keep admin-picked colors */
.site-footer__widget .wp-block-button__link:not(.has-text-color) { color: #fff !important; }
.site-footer__widget a:focus-visible { outline: 2px solid #38bdf8 !important; outline-offset: 2px !important; border-radius: 2px; }

/* Paragraphs / text */
.site-footer__widget :is(p, .textwidget) { color: #94a3b8 !important; font-size: .92rem !important; line-height: 1.65 !important; margin: 0 !important; }
.site-footer__widget p + p { margin-top: 12px !important; }
.site-footer__widget :is(.post-date, .wp-block-latest-posts__post-date) { display: block !important; color: #64748b !important; font-size: .8rem !important; }
.site-footer__widget img { max-width: 100% !important; height: auto !important; }

/* Search block on the dark footer */
.site-footer__widget .wp-block-search__label { color: #fff !important; font-size: .88rem !important; font-weight: 700 !important; text-transform: uppercase !important; }
.site-footer__widget .wp-block-search__input { background: rgba(255, 255, 255, .06) !important; border: 1px solid rgba(255, 255, 255, .12) !important; color: #e2e8f0 !important; border-radius: 6px !important; }
.site-footer__widget .wp-block-search__button { background: #1688f8 !important; color: #fff !important; border: 0 !important; border-radius: 6px !important; }

/* Navigation block: always static, no hamburger + white overlay */
.site-footer__widget .wp-block-navigation__responsive-container-open { display: none !important; }
.site-footer__widget .wp-block-navigation__responsive-container { display: block !important; position: static !important; background: none !important; }
.site-footer__widget .wp-block-navigation__container { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }

/* Tablet layout: brand on its own row, then the 3 columns evenly (was 4 tracks with one empty / 2+1 with an empty cell) */
@media (min-width: 761px) and (max-width: 1200px) {
    .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 36px !important; }
    .site-footer__brand { grid-column: 1 / -1 !important; max-width: 520px !important; }
}
@media (min-width: 601px) and (max-width: 760px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr !important; }
    .site-footer__brand { grid-column: 1 / -1 !important; }
    .site-footer__col--widgets:last-child { grid-column: 1 / -1 !important; }
}
