/* Water Advisor - Base Styles */

:root {
    /* Water Advisor Color Palette */
    --wa-primary: #1A5276;
    --wa-secondary: #148a9e;
    --wa-cta: #FF9900;
    --wa-cta-hover: #E68A00;
    --wa-success: #27AE60;
    --wa-warning: #E74C3C;
    --wa-bg-main: #FFFFFF;
    --wa-bg-alt: #F8F9FA;
    --wa-text-primary: #2D3436;
    --wa-text-secondary: #555F63;
    --wa-border: #E0E0E0;
    --wa-primary-light: #2471A3;

    /* Astra color overrides */
    --ast-global-color-0: var(--wa-primary);     /* Primary accent */
    --ast-global-color-1: var(--wa-secondary);    /* Secondary accent */
    --ast-global-color-2: var(--wa-primary);      /* Heading color */
    --ast-global-color-3: var(--wa-text-primary); /* Body text */
    --ast-global-color-4: var(--wa-bg-main);      /* Primary background */
    --ast-global-color-5: var(--wa-bg-alt);       /* Secondary background */

    /* Layout */
    --wa-content-width: 780px;
    --wa-header-height: 70px;

    /* Typography */
    --wa-font-stack: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", sans-serif;
}

/* Typography — Poppins everywhere */
body,
button, input, select, textarea,
.ast-button, .ast-custom-button {
    font-family: var(--wa-font-stack);
    font-size: 18px;
    line-height: 1.7;
    color: var(--wa-text-primary);
}

h1, h2, h3, h4, h5, h6,
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6,
.site-title, .site-title a {
    font-family: var(--wa-font-stack);
    line-height: 1.3;
    color: var(--wa-primary);
}

/* Content width for articles */
.single .entry-content,
.page .entry-content {
    max-width: var(--wa-content-width);
}

/* Link styling */
a {
    color: var(--wa-secondary);
}

a:hover {
    color: var(--wa-primary);
}

/* ===================== */
/* Header — Global       */
/* ===================== */

.ast-primary-header-bar {
    background-color: var(--wa-primary);
    border-bottom: none !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}

/* Constrain logo size */
.site-logo-img img,
.custom-logo-link img,
.ast-site-identity img {
    max-height: 44px;
    width: auto;
}

/* Branding: logo + site title side by side */
.ast-site-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ast-site-identity .site-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    clip: unset !important;
    position: static !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
}

.ast-site-identity .site-title a {
    color: #FFFFFF !important;
    text-decoration: none;
}

.ast-site-identity .site-title a:hover {
    opacity: 0.9;
}

/* Nav links */
.ast-primary-header-bar .ast-builder-menu a {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition: color 0.2s;
}

.ast-primary-header-bar .ast-builder-menu a:hover {
    color: #FFFFFF !important;
}

/* Active menu item accent */
.ast-primary-header-bar .current-menu-item > a,
.ast-primary-header-bar .current-menu-ancestor > a {
    color: #FFFFFF !important;
    position: relative;
}

.ast-primary-header-bar .current-menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background-color: var(--wa-cta);
    border-radius: 1px;
}

/* Dropdown submenus — lighter blue to contrast with hero overlay */
.ast-primary-header-bar .sub-menu {
    background-color: var(--wa-primary-light) !important;
    border: none !important;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.ast-primary-header-bar .sub-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ast-primary-header-bar .sub-menu li:last-child {
    border-bottom: none;
}

.ast-primary-header-bar .sub-menu a {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 10px 16px !important;
    font-size: 14px;
}

.ast-primary-header-bar .sub-menu a:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
}

/* Prevent header nav wrapping */
.ast-primary-header-bar .main-header-menu {
    flex-wrap: nowrap;
}

.ast-primary-header-bar .main-header-menu > .menu-item > a {
    font-size: 14px;
    padding: 0 14px;
    white-space: nowrap;
}

/* Intermediate breakpoint: hide site title when nav is tight */
@media (max-width: 1100px) and (min-width: 922px) {
    .ast-site-identity .site-title {
        display: none !important;
    }

    .ast-primary-header-bar .main-header-menu > .menu-item > a {
        padding: 0 10px;
        font-size: 13px;
    }

    .site-logo-img img,
    .custom-logo-link img,
    .ast-site-identity img {
        max-height: 36px;
        min-width: 36px;
        width: auto;
    }
}

/* Dropdown toggle arrows */
.ast-primary-header-bar .ast-header-break-point .menu-toggle .ast-mobile-svg,
.ast-primary-header-bar .sub-menu-toggle .ast-mobile-svg {
    fill: rgba(255, 255, 255, 0.8);
}

/* ===================== */
/* Header — Homepage     */
/* ===================== */

.wa-homepage .site-header,
.home .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.wa-homepage .ast-primary-header-bar,
.home .ast-primary-header-bar {
    background: linear-gradient(to bottom, rgba(8, 30, 50, 0.7), transparent);
    box-shadow: none;
}

/* Footer */
.ast-footer-overlay,
.site-footer,
.site-below-footer-wrap {
    background-color: var(--wa-primary);
    color: #FFFFFF;
}

.site-footer a,
.site-below-footer-wrap a {
    color: rgba(255,255,255,0.8);
}

.site-footer a:hover,
.site-below-footer-wrap a:hover {
    color: #FFFFFF;
}

.site-below-footer-wrap {
    background-color: var(--wa-primary) !important;
    color: #FFFFFF !important;
    border-top: none !important;
}

.site-below-footer-wrap p,
.site-below-footer-wrap span,
.site-below-footer-wrap div {
    color: rgba(255, 255, 255, 0.7) !important;
}

.site-below-footer-wrap a {
    color: rgba(255, 255, 255, 0.85) !important;
}

.site-below-footer-wrap a:hover {
    color: #FFFFFF !important;
}

/* Alternating section backgrounds */
.wa-section-alt {
    background-color: var(--wa-bg-alt);
}

/* ===================== */
/* Mobile Header & Menu  */
/* ===================== */

/* Hamburger icon — white on the navy/gradient header */
.ast-mobile-menu-trigger-minimal,
.menu-toggle.ast-mobile-menu-trigger-minimal {
    color: #FFFFFF !important;
}

.ast-mobile-svg {
    fill: #FFFFFF !important;
}

/* Mobile menu panel */
.ast-mobile-header-content,
.ast-mobile-header-wrap .ast-mobile-header-content {
    background-color: var(--wa-primary) !important;
}

.ast-mobile-header-content .main-header-menu,
.ast-mobile-header-content ul {
    background-color: var(--wa-primary) !important;
}

.ast-mobile-header-content .main-header-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ast-mobile-header-content .main-header-menu a,
.ast-mobile-header-content .main-header-menu .menu-link {
    color: rgba(255, 255, 255, 0.92) !important;
    background-color: transparent !important;
    font-size: 16px;
    font-weight: 500;
    padding: 14px 20px !important;
}

.ast-mobile-header-content .main-header-menu a:hover,
.ast-mobile-header-content .main-header-menu .menu-link:hover {
    color: #FFFFFF !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.ast-mobile-header-content .main-header-menu .current-menu-item > a {
    color: var(--wa-cta) !important;
}

/* Mobile submenu toggle arrows */
.ast-mobile-header-content .ast-menu-toggle,
.ast-mobile-header-content .sub-menu-toggle {
    color: rgba(255, 255, 255, 0.7) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.ast-mobile-header-content .ast-menu-toggle .ast-icon,
.ast-mobile-header-content .sub-menu-toggle .ast-icon,
.ast-mobile-header-content .ast-arrow-svg {
    fill: rgba(255, 255, 255, 0.7) !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Mobile submenu items — slightly indented */
.ast-mobile-header-content .sub-menu {
    background-color: rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.ast-mobile-header-content .sub-menu a {
    font-size: 15px !important;
    padding-left: 36px !important;
}

@media (max-width: 921px) {
    :root {
        --wa-header-height: 60px;
    }
}

/* ===================== */
/* Homepage Styles       */
/* ===================== */

.wa-homepage {
    overflow: hidden;
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
}

/* Override Astra's ast-container flex layout inside homepage sections */
.wa-homepage .ast-container {
    display: block;
}

.wa-hero {
    background: linear-gradient(rgba(26, 82, 118, 0.78), rgba(26, 82, 118, 0.88)),
                url('../images/hero-bg.jpg') center/cover no-repeat;
    color: #FFFFFF;
    text-align: center;
    padding: 120px 20px 80px;
}

.wa-hero h1 {
    color: #FFFFFF;
    font-size: 42px;
    margin-bottom: 16px;
}

.wa-hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
}

.wa-hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.wa-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    min-height: 48px;
    transition: background-color 0.2s;
}

.wa-btn-primary {
    background-color: var(--wa-cta);
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.wa-btn-primary:hover {
    background-color: var(--wa-cta-hover);
    color: #FFFFFF;
}

.wa-btn-secondary {
    background-color: transparent;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
}

.wa-btn-secondary:hover {
    background-color: rgba(255,255,255,0.1);
    color: #FFFFFF;
}

/* Category Cards */
.wa-categories {
    padding: 60px 20px;
    text-align: center;
}

.wa-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.wa-category-card {
    background: var(--wa-bg-main);
    border: 1px solid var(--wa-border);
    border-radius: 8px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.wa-category-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-color: var(--wa-secondary);
}

.wa-category-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.wa-category-card p {
    font-size: 15px;
    color: var(--wa-text-secondary);
    margin: 0;
}

/* Post Grids (homepage featured + latest) */
.wa-featured,
.wa-latest {
    padding: 60px 20px;
}

.wa-featured h2,
.wa-latest h2 {
    text-align: center;
    margin-bottom: 32px;
}

.wa-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.wa-post-card {
    background: var(--wa-bg-main);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
}

.wa-post-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.wa-post-card-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.wa-post-card-thumb-placeholder {
    height: 200px;
    background-color: var(--wa-primary);
}

.wa-post-card-content {
    padding: 16px;
}

.wa-post-card-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.wa-post-card-content p {
    font-size: 14px;
    color: var(--wa-text-secondary);
    margin: 0;
}

/* Trust Bar */
.wa-trust-bar {
    background-color: var(--wa-primary);
    color: #FFFFFF;
    padding: 40px 20px;
}

.wa-trust-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    text-align: center;
}

.wa-trust-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
}

.wa-trust-label {
    font-size: 14px;
    opacity: 0.8;
}

/* Footer CTA */
.wa-footer-cta {
    text-align: center;
    padding: 60px 20px;
}

.wa-footer-cta h2 {
    margin-bottom: 12px;
}

.wa-footer-cta p {
    color: var(--wa-text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================== */
/* Mobile Responsive     */
/* ===================== */

@media (max-width: 768px) {
    .wa-hero {
        padding: 100px 16px 48px;
    }

    .wa-hero h1 {
        font-size: 28px;
    }

    .wa-hero-subtitle {
        font-size: 16px;
    }

    .wa-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wa-post-grid {
        grid-template-columns: 1fr;
    }

    .wa-trust-stats {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .wa-category-grid {
        grid-template-columns: 1fr;
    }
}
