/* ============================================================================
   MILLS RENOVATION - Global Theme Styles
   Anthropic × McAlister aesthetic: Clean, spacious, precise
   ============================================================================ */

/* ---------- Smooth scroll & base ---------- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(26, 86, 219, 0.12);
    color: #0f172a;
}

/* ---------- Focus ring (accessibility) ---------- */
*:focus-visible {
    outline: 2px solid #1a56db;
    outline-offset: 2px;
}

/* ---------- Images ---------- */
img {
    max-width: 100%;
    height: auto;
}

/* ---------- Navigation polish ---------- */
.wp-block-navigation a {
    transition: color 0.2s ease;
}

.wp-block-navigation a:hover {
    color: #1a56db !important;
}

/* ---------- Button hover transitions ---------- */
.wp-block-button__link {
    transition: all 0.2s ease;
}

.wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.2);
}

.is-style-outline .wp-block-button__link:hover {
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.1);
}

/* ---------- Service cards hover ---------- */
.wp-block-group[style*="border-radius: 12px"],
.wp-block-group[style*="border-radius:12px"] {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wp-block-group[style*="border-radius: 12px"]:hover,
.wp-block-group[style*="border-radius:12px"]:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* ---------- Cover block overlay smoothing ---------- */
.wp-block-cover {
    overflow: hidden;
}

.wp-block-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
    z-index: 1;
}

.wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
}

/* ---------- Separator refinement ---------- */
.wp-block-separator {
    opacity: 1;
}

/* ---------- List style cleanup ---------- */
.wp-block-list {
    padding-left: 0;
    list-style: none;
}

.wp-block-list li::before {
    content: none;
}

/* ---------- Footer link hover ---------- */
footer .wp-block-list li,
[class*="footer"] .wp-block-list li {
    transition: color 0.15s ease;
}

footer .wp-block-list li:hover,
[class*="footer"] .wp-block-list li:hover {
    color: #ffffff;
}

/* ---------- Header phone number ---------- */
.mills-header-phone {
    transition: color 0.15s ease;
}

.mills-header-phone:hover {
    color: #1a56db !important;
}

/* ---------- Stat number styling (used in why-mills pattern) ---------- */
h2[style*="font-size:42px"] {
    font-variant-numeric: tabular-nums;
}

/* ---------- Subtle page entrance animation ---------- */
@keyframes millsFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-block-post-content > *:first-child,
.entry-content > *:first-child {
    animation: millsFadeIn 0.4s ease;
}

/* ---------- Responsive nav fixes ---------- */
@media (max-width: 781px) {
    .mills-header-phone {
        display: none;
    }

    .wp-block-navigation__responsive-container.is-menu-open {
        padding: 24px !important;
    }

    .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
        gap: 0;
        align-items: center;
    }

    .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
        font-size: 18px;
        padding: 12px 0;
    }
}

@media (max-width: 599px) {
    /* Stack footer columns */
    footer .wp-block-columns,
    [class*="footer"] .wp-block-columns {
        text-align: center;
    }

    footer .wp-block-columns .wp-block-column,
    [class*="footer"] .wp-block-columns .wp-block-column {
        margin-bottom: 24px;
    }
}

/* ---------- Print styles ---------- */
@media print {
    header,
    footer,
    .wp-block-navigation,
    .wp-block-buttons {
        display: none !important;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
