/* ============================================================
   BizPortal — Frontend Design System
   Palette: deep harbor navy + teal signal + amber flag
   Type: Space Grotesk (display) / Inter (body)
   ============================================================ */

/* Fonts are loaded via <link> in includes/header.php.
   They used to be @import-ed here, which forced the browser to download
   style.css, parse it, THEN discover and fetch the fonts — a serial chain
   that delayed first paint by a full round-trip. */

:root {
    --navy-950: #0F1B2D;
    --navy-800: #1B2A41;
    --navy-700: #24374F;
    --teal-500: #2A9D8F;
    --teal-600: #22857A;
    --amber-500: #F4A261;
    --amber-600: #E38B44;
    --paper: #F7F9FB;
    --paper-dim: #EEF2F6;
    --ink: #1F2937;
    --ink-soft: #5A6472;
    --line: #E2E8F0;
    --danger: #D64545;
    --success: #2E9E6B;
    --radius: 10px;
    --shadow: 0 4px 16px rgba(15, 27, 45, 0.08);
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --header-icon-color: #FFFFFF;
    --header-bg: var(--navy-950);
    --header-bg-light: var(--navy-800);
}

/* ---------------- Lightweight motion system ---------------- */
/* Respect users who've asked for less motion — disable everything below for them */
@media (prefers-reduced-motion: no-preference) {
    body { animation: pageFadeIn 0.35s ease; }

    .reveal {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }
    .reveal.is-visible { opacity: 1; transform: translateY(0); }

    .category-card, .business-card, .stat-card, .info-card {
        transition: transform var(--transition-base), box-shadow var(--transition-base);
    }

    .btn { transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast); }
    .btn:active { transform: scale(0.96); }

    .navbar-brand, .navbar-links a { transition: opacity var(--transition-fast); }

    a, .sidebar-link, .icon-btn { transition: color var(--transition-fast); }
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes fadeSlideUp {
        from { opacity: 0; transform: translateY(18px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .hero-eyebrow, .hero h1, .hero p, .hero .search-box {
        animation: fadeSlideUp 0.6s ease both;
    }
    .hero h1 { animation-delay: 0.08s; }
    .hero p { animation-delay: 0.16s; }
    .hero .search-box { animation-delay: 0.24s; }

    .hero-badge, .hero-home h1, .hero-home p, .hero-search-pill, .hero-chips {
        animation: fadeSlideUp 0.6s ease both;
    }
    .hero-home h1 { animation-delay: 0.08s; }
    .hero-home p { animation-delay: 0.16s; }
    .hero-search-pill { animation-delay: 0.24s; }
    .hero-chips { animation-delay: 0.32s; }

    .section-head { animation: fadeSlideUp 0.5s ease both; }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    color: var(--navy-950);
    line-height: 1.2;
    margin: 0 0 0.5em;
}

a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--navy-800); }

img { max-width: 100%; display: block; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

:focus-visible {
    outline: 3px solid var(--amber-500);
    outline-offset: 2px;
}

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal-500); color: #fff; }
.btn-primary:hover { background: var(--teal-600); color: #fff; }
.btn-amber { background: var(--amber-500); color: var(--navy-950); }
.btn-amber:hover { background: var(--amber-600); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--navy-800); }
.btn-outline:hover { border-color: var(--teal-500); color: var(--teal-600); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------------- Navbar ---------------- */
.navbar {
    background: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: transform 0.25s ease, box-shadow var(--transition-base);
}
.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.28);
}
@media (max-width: 760px) {
    .navbar.nav-hidden {
        transform: translateY(-100%);
    }
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--header-icon-color) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-brand i { color: var(--amber-500); }
.site-logo-img { max-height: 40px; max-width: 180px; display: block; }
.navbar-links {
    display: flex;
    align-items: center;
    gap: 26px;
}
.navbar-links a {
    color: var(--header-icon-color);
    opacity: 0.82;
    font-weight: 500;
    font-size: 0.95rem;
}
.navbar-links a:hover { opacity: 1; }
.btn-nav-solid {
    background: var(--teal-500);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: var(--radius);
}
.btn-nav-outline {
    border: 1px solid rgba(255,255,255,0.25);
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--header-icon-color) !important;
}
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--header-icon-color);
    font-size: 1.3rem;
    cursor: pointer;
}

/* ---------------- Dynamic navigation dropdown (Admin > Menus) ---------------- */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 5px; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 6px;
    min-width: 170px;
    z-index: 150;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: 9px 12px;
    color: var(--ink) !important;
    opacity: 1 !important;
    font-size: 0.88rem;
    border-radius: 6px;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--paper-dim); }

@media (max-width: 860px) {
    .navbar-toggle { display: block; }
    .navbar-links {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--header-bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px 24px;
        gap: 16px;
        display: none;
    }
    .navbar-links.open { display: flex; }

    .nav-dropdown { width: 100%; }
    .nav-dropdown-menu {
        display: block;
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 4px 0 4px 16px;
        min-width: 0;
    }
    .nav-dropdown-menu a {
        color: var(--header-icon-color) !important;
        opacity: 0.82;
        padding: 6px 0;
        font-size: 0.9rem;
    }
    .nav-dropdown-menu a:hover { background: none; opacity: 1; }
}

/* ---------------- Hero ---------------- */
.hero {
    background: linear-gradient(135deg, var(--header-bg) 0%, var(--header-bg-light) 55%, var(--teal-600) 140%);
    color: #fff;
    padding: 76px 0 90px;
    position: relative;
    overflow: hidden;
}
.hero-eyebrow {
    color: var(--amber-500);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.8rem;
}
.hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.1rem);
    max-width: 720px;
    margin: 10px 0 16px;
}
.hero p { color: #CBD5E1; max-width: 560px; font-size: 1.1rem; }

.search-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 10px;
    display: flex;
    gap: 8px;
    margin-top: 30px;
    max-width: 720px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}
.search-box input, .search-box select {
    border: none;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    flex: 1;
    min-width: 140px;
}
.search-box input:focus, .search-box select:focus { outline: none; }

/* ---------------- Homepage hero v2 (centered, pill search, chips) ---------------- */
.hero-home {
    background: var(--header-bg);
    text-align: center;
}
.hero-home .hero-glow {
    position: absolute;
    top: -160px;
    left: 50%;
    transform: translateX(-50%);
    width: 620px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--teal-500) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}
.hero-home .container { position: relative; z-index: 1; max-width: 680px; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    color: #D8DEE6;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
}
.hero-home h1 {
    max-width: none;
    margin: 0 0 12px;
}
.hero-home p { max-width: none; margin: 0 auto 26px; font-size: 0.98rem; }

.hero-search-pill {
    background: #fff;
    border-radius: 100px;
    padding: 6px 6px 6px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    margin-bottom: 18px;
}
.hero-search-pill i.fa-magnifying-glass { color: #8A94A3; flex-shrink: 0; }
.hero-search-pill input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.9rem;
    padding: 10px 0;
    color: var(--ink);
    background: transparent;
    min-width: 0;
    font-family: var(--font-body);
}
.hero-search-pill button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--teal-500);
    color: #fff;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 100px;
    cursor: pointer;
    flex-shrink: 0;
    font-family: var(--font-body);
}
.hero-search-pill button:hover { background: var(--teal-600); }

.hero-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.hero-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    color: #D8DEE6;
    font-size: 0.8rem;
    padding: 7px 14px;
    border-radius: 20px;
}
.hero-chip:hover { background: rgba(255,255,255,0.12); color: #fff; }
.hero-chip.hero-chip-more {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.25);
    color: var(--amber-500);
    font-weight: 600;
}

@media (max-width: 600px) {
    .hero-search-pill { flex-wrap: wrap; border-radius: 20px; padding: 14px; }
    .hero-search-pill input { flex-basis: 100%; order: 1; padding: 8px 0; }
    .hero-search-pill i.fa-magnifying-glass { order: 0; }
    .hero-search-pill button { order: 2; width: 100%; justify-content: center; margin-top: 6px; }
}

/* ---------------- Cards / Grid ---------------- */
.section { padding: 60px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; }
.section-head p { color: var(--ink-soft); margin-top: 6px; }

.grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.category-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 24px;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.category-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.category-card i {
    font-size: 1.8rem;
    color: var(--teal-500);
    background: var(--paper-dim);
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
}
.category-card h4 { margin-bottom: 4px; font-size: 1.05rem; }
.category-card span { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------------- Category tiles (gradient, homepage + categories page) ---------------- */
.category-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 26px;
    position: relative;
}
.category-section-head .accent-square {
    position: absolute;
    top: -8px;
    left: -14px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--amber-500);
    opacity: 0.25;
    transform: rotate(-8deg);
    z-index: 0;
}
.category-section-head h2, .category-section-head p { position: relative; z-index: 1; }

.category-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 16px;
    padding: 18px 16px;
    min-height: 132px;
    color: #fff !important;
    transition: transform var(--transition-base);
}
.category-tile:hover { transform: translateY(-5px); }
.category-tile-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
}
.category-tile-name { font-size: 0.92rem; font-weight: 600; color: #fff; margin: 0 0 2px; }
.category-tile-count { font-size: 0.75rem; color: rgba(255,255,255,0.8); margin: 0; }
.category-tile-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* ---------------- Tool cards (shared by /tools and the homepage tools section) ---------------- */
.tools-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.tool-card {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 18px;
    padding: 26px 22px 22px;
    min-height: 260px;
    text-decoration: none;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
    animation: toolsRise .6s ease both;
}
.tool-card:nth-child(2) { animation-delay: .12s; }
.tool-card:nth-child(3) { animation-delay: .24s; }
.tool-card:nth-child(4) { animation-delay: .36s; }
.tool-card:nth-child(5) { animation-delay: .48s; }
.tool-card:nth-child(6) { animation-delay: .6s; }
.tool-card:nth-child(7) { animation-delay: .72s; }
.tool-card:nth-child(8) { animation-delay: .84s; }
.tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,.22);
    background: rgba(255,255,255,.07);
}
.tool-orb-wrap { position: relative; width: 60px; height: 60px; margin-bottom: 16px; animation: toolsFloat 3.4s ease-in-out infinite; }
.tool-card:nth-child(2) .tool-orb-wrap { animation-delay: .5s; }
.tool-card:nth-child(3) .tool-orb-wrap { animation-delay: 1s; }
.tool-card:nth-child(4) .tool-orb-wrap { animation-delay: 1.5s; }
.tool-card:nth-child(5) .tool-orb-wrap { animation-delay: 2s; }
.tool-card:nth-child(6) .tool-orb-wrap { animation-delay: 2.5s; }
.tool-card:nth-child(7) .tool-orb-wrap { animation-delay: 3s; }
.tool-card:nth-child(8) .tool-orb-wrap { animation-delay: 3.5s; }
.tool-orb-glow { position: absolute; inset: -14px; border-radius: 50%; filter: blur(4px); opacity: .38; animation: toolsGlow 2.8s ease-in-out infinite; }
.tool-orb {
    position: relative;
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(0,0,0,.35);
    color: #fff; font-size: 1.45rem;
}
.tool-card-title { font-family: var(--font-display); color: #fff; font-size: 1.1rem; font-weight: 600; line-height: 1.3; margin: 0 0 8px; }
.tool-card-desc { color: #9AA8BA; font-size: .86rem; line-height: 1.55; margin: 0; flex: 1; }
.tool-card-btn {
    align-self: flex-start;
    font-size: .84rem; font-weight: 700;
    border: 1.5px solid;
    padding: 8px 15px;
    border-radius: 999px;
    margin-top: 16px;
    transition: transform .2s ease;
}
.tool-card-btn i { transition: transform .2s ease; }
.tool-card:hover .tool-card-btn i { transform: translateX(4px); }

@keyframes toolsRise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toolsFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes toolsGlow { 0%,100% { opacity: .3; } 50% { opacity: .5; } }
@keyframes toolsBadgePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(126,232,207,.25); } 50% { box-shadow: 0 0 14px 2px rgba(126,232,207,.18); } }

/* Dark glow section wrapper — used by the homepage tools showcase (and shares the look of /tools) */
.tools-glow-section {
    background:
        radial-gradient(600px 320px at 12% -8%, rgba(42,157,143,.28), transparent 65%),
        radial-gradient(560px 300px at 96% 108%, rgba(244,162,97,.22), transparent 65%),
        var(--navy-950);
    padding: 56px 0 60px;
}
.tools-glow-section .section-head h2, .tools-glow-section .section-head p { color: #fff; }
.tools-glow-section .section-head p { color: #9AA8BA; }
.tools-glow-badge {
    display: inline-block;
    font-size: .72rem;
    letter-spacing: 1.4px;
    font-weight: 700;
    color: #7EE8CF;
    border: 1px solid rgba(126,232,207,.45);
    background: rgba(42,157,143,.14);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
    animation: toolsBadgePulse 2.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .tool-card, .tool-orb-wrap, .tool-orb-glow, .tools-glow-badge { animation: none; }
}

.tools-glow-section .btn-outline {
    border-color: rgba(255,255,255,.28);
    color: #fff;
}
.tools-glow-section .btn-outline:hover {
    border-color: #7EE8CF;
    color: #7EE8CF;
}

/* ---------------- Homepage shortcut cards ---------------- */
.shortcuts-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.shortcut-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.shortcut-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(20,30,50,0.08);
    border-color: rgba(42,157,143,0.3);
}
.shortcut-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
}
.shortcut-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.shortcut-title { font-family: var(--font-display); font-weight: 600; color: var(--navy-950); font-size: 1rem; }
.shortcut-stat { font-size: 0.82rem; color: var(--ink-soft); }
.shortcut-arrow { color: var(--ink-soft); font-size: 0.85rem; transition: transform 0.2s ease; }
.shortcut-card:hover .shortcut-arrow { transform: translateX(4px); color: var(--teal-600); }

/* ---------------- Homepage CTA redesign ---------------- */
.cta-redesign { max-width: 720px; }
.cta-redesign h2 { font-size: 1.9rem; }
.cta-highlight {
    background: #E1F5EE;
    color: var(--teal-600);
    padding: 2px 10px;
    border-radius: 6px;
}
.cta-main-btn {
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 10px;
    margin-bottom: 34px;
}
.cta-stats-bar {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--line);
    padding-top: 26px;
}
.cta-stat {
    padding: 0 28px;
    text-align: center;
    border-left: 1px solid var(--line);
}
.cta-stat:first-child { border-left: none; }
.cta-stat-num { font-size: 1.5rem; font-weight: 700; color: var(--navy-950); margin: 0; font-family: var(--font-display); }
.cta-stat-label { font-size: 0.72rem; color: var(--ink-soft); margin: 2px 0 0; }
@media (max-width: 500px) {
    .cta-stats-bar { flex-wrap: wrap; gap: 16px 0; }
    .cta-stat { flex: 1 1 45%; border-left: none; }
}

.cta-dual-buttons { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }

/* ---------------- About page redesign ---------------- */
.about-stats-row {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 26px;
}
.about-stat { padding: 0 26px; text-align: center; border-left: 1px solid var(--line); }
.about-stat:first-child { border-left: none; }
.about-stat-num { font-size: 1.4rem; font-weight: 700; color: var(--navy-950); margin: 0; font-family: var(--font-display); }
.about-stat-label { font-size: 0.72rem; color: var(--ink-soft); margin: 2px 0 0; }
@media (max-width: 500px) {
    .about-stats-row { flex-wrap: wrap; gap: 14px 0; }
    .about-stat { flex: 1 1 40%; border-left: none; }
}

.about-pillar-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}
.about-pillar-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.about-pillar-card h4 { font-size: 0.95rem; margin: 0 0 6px; }
.about-pillar-card p { font-size: 0.83rem; color: var(--ink-soft); margin: 0; line-height: 1.5; }

.why-choose-list { display: flex; flex-direction: column; gap: 12px; }
.why-choose-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}
.why-choose-item i { font-size: 1.2rem; color: var(--teal-600); margin-top: 3px; flex-shrink: 0; }
.why-choose-item h4 { font-size: 0.9rem; margin: 0 0 4px; }
.why-choose-item p { font-size: 0.82rem; margin: 0; line-height: 1.5; }

.about-cta-card {
    background: var(--header-bg);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    margin-top: 36px;
}
.about-cta-card h3 { color: #fff; font-size: 1.15rem; margin: 0 0 6px; }
.about-cta-card p { color: #B9C2CF; font-size: 0.85rem; margin: 0 0 18px; }

/* ---------------- Contact page redesign ---------------- */
.contact-email-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    margin-top: 8px;
}
.contact-email-link { display: flex; align-items: center; gap: 10px; color: var(--navy-950) !important; }
.contact-email-link i { color: var(--teal-600); font-size: 1.1rem; }
.contact-email-link span { font-size: 1rem; font-weight: 700; }
.contact-email-divider { width: 1px; height: 18px; background: var(--line); }
.contact-email-pill button {
    background: none; border: none; cursor: pointer;
    color: var(--ink-soft); font-size: 1.05rem; padding: 2px;
}
.contact-email-pill button:hover { color: var(--teal-600); }

.contact-reason-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 12px;
    text-align: center;
}
.contact-reason-card p { font-size: 0.82rem; font-weight: 600; color: var(--navy-800); margin: 0; }

.contact-social-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff !important;
    font-size: 1.05rem;
    transition: transform var(--transition-fast);
}
.contact-social-icon:hover { transform: translateY(-3px); }

.business-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.business-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.business-card .thumb {
    height: 170px;
    background: var(--paper-dim);
    position: relative;
    overflow: hidden;
}
.business-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.business-card .thumb.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-800), var(--teal-600));
}
.business-card .thumb.no-image i {
    font-size: 2.6rem;
    color: rgba(255,255,255,0.85);
}
.business-card .badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--amber-500); color: var(--navy-950);
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 10px; border-radius: 999px;
}
.business-card .body { padding: 18px; }
.business-card h4 { margin-bottom: 6px; font-size: 1.05rem; }
.business-card .cat { color: var(--teal-600); font-size: 0.82rem; font-weight: 600; }
.business-card .loc { color: var(--ink-soft); font-size: 0.85rem; margin-top: 6px; }
.business-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

/* ---------------- Star rating ---------------- */
.star-rating i { color: #D8DEE6; }
.star-rating i.filled { color: var(--amber-500); }

.rating-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}
.rating-input input { display: none; }
.rating-input label {
    cursor: pointer;
    color: #D8DEE6;
    font-size: 1.9rem;
    transition: color 0.15s ease, transform 0.1s ease;
}
.rating-input label:hover { transform: scale(1.1); }
.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
    color: var(--amber-500);
}

/* ---------------- Forms ---------------- */
.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px;
    max-width: 460px;
    margin: 50px auto;
    box-shadow: var(--shadow);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--navy-800); }
.form-control {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: #fff;
    color: var(--ink);
}
.form-control:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(42,157,143,0.15); }
textarea.form-control { resize: vertical; min-height: 110px; }
.form-hint { color: var(--ink-soft); font-size: 0.8rem; margin-top: 4px; }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 4px; }

/* ---------------- Alerts ---------------- */
.alert {
    padding: 13px 18px;
    border-radius: 8px;
    margin: 14px auto;
    max-width: 1180px;
    font-size: 0.92rem;
    font-weight: 500;
}
.alert-success { background: #E4F6EE; color: var(--success); border: 1px solid #BFE9D4; }
.alert-error   { background: #FDEAEA; color: var(--danger);  border: 1px solid #F6C7C7; }
.alert-info    { background: #E7F1FB; color: #2563AB; border: 1px solid #C6DEF5; }
.alert-warning { background: #FFF4E3; color: #A9660B; border: 1px solid #F5D9A6; }

/* ---------------- Tables (used in dashboards too) ---------------- */
table.data-table { width: 100%; border-collapse: collapse; background: #fff; }
table.data-table th, table.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 0.9rem;
}
table.data-table th { background: var(--paper-dim); font-family: var(--font-display); color: var(--navy-800); }
table.data-table tr:hover td { background: #FBFCFD; }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 30px 0; }
.pagination a, .pagination span {
    padding: 8px 13px;
    border-radius: 6px;
    border: 1px solid var(--line);
    color: var(--navy-800);
    font-size: 0.88rem;
}
.pagination .active { background: var(--teal-500); color: #fff; border-color: var(--teal-500); }
.pagination .disabled { color: var(--navy-800); opacity: 0.35; cursor: default; }

/* ---------------- Footer ---------------- */
/* Columns are <details> elements. They render as plain columns on desktop and
   as tap-to-open dropdowns on phones — see the script at the end of
   includes/footer.php, which strips the `open` attribute below 760px. */
.site-footer { background: var(--header-bg); color: #A9B4C4; margin-top: 60px; }
.footer-inner {
    display: grid;
    /* auto-fit, not a fixed count: columns were hard-coded to 5 while the markup
       had 6, so the last one dropped onto a second row on its own. */
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 30px;
    padding: 50px 0 30px;
}
@media (max-width: 900px) {
    .footer-inner { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
}
.footer-brand-line { color: #C6D2E1; margin-bottom: 6px; font-size: 0.9rem; }
.footer-col h3 { color: #fff; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin: 0 0 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #A9B4C4; font-size: 0.9rem; }
.footer-col a:hover { color: var(--amber-500); }

/* Strip the native disclosure triangle; the caret below replaces it. */
.footer-col > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.footer-col > summary::-webkit-details-marker { display: none; }
.footer-col > summary::marker { content: ''; }
.footer-caret { display: none; font-size: 0.72rem; color: #7C8CA3; transition: transform 0.2s ease; }

@media (min-width: 761px) {
    /* Desktop keeps every column open — clicking a heading shouldn't collapse it. */
    .footer-col > summary { pointer-events: none; }
}

.footer-bottom {
    border-top: 1px solid #24374F;
    text-align: center;
    padding: 18px 0;
    font-size: 0.82rem;
}

@media (max-width: 760px) {
    /* The footer used to be display:none here, with the bottom nav bar standing in
       for it. That hid every module link from mobile users — and mobile-first
       indexing means it was the hidden version Google rendered. It is now a
       stack of collapsed dropdowns instead, which costs one screen of height. */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 26px 0 14px;
    }
    .footer-col { border-bottom: 1px solid #24374F; }
    .footer-col:first-child { border-top: 1px solid #24374F; }
    .footer-col > summary { padding: 14px 2px; cursor: pointer; }
    .footer-col > summary h4 { margin: 0; }
    .footer-caret { display: inline-block; }
    .footer-col[open] > summary .footer-caret { transform: rotate(180deg); }
    .footer-col ul { padding: 2px 2px 16px; }
    .footer-col li { margin-bottom: 12px; }
    .footer-col a { font-size: 0.92rem; }
    /* body.has-bottom-nav already carries padding-bottom:64px, so the copyright
       line clears the fixed nav without any extra spacing here. */
}

/* ---------------- Detail page ---------------- */
.biz-hero {
    background: var(--header-bg);
    color: #fff;
    padding: 40px 0;
}
.biz-hero h1 { color: #fff; }
.biz-hero .biz-meta { color: #CBD5E1; display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 0.92rem; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; margin-top: 30px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.product-group-heading {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-soft);
    margin: 18px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.product-group-heading:first-child { margin-top: 0; }

.review-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.review-item:last-child { border-bottom: none; }
.review-item .reviewer { font-weight: 600; color: var(--navy-800); }
.review-item .date { color: var(--ink-soft); font-size: 0.8rem; }
.owner-reply { background: var(--paper-dim); border-radius: 8px; padding: 12px 16px; margin-top: 10px; font-size: 0.9rem; }
.owner-reply b { color: var(--teal-600); }

/* ---------------- Social links, services, FAQ (business details) ---------------- */
.social-links {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.social-links a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 1rem;
    transition: transform 0.15s ease;
}
.social-links a:hover { transform: translateY(-2px); }

.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.service-tag {
    background: var(--paper-dim);
    color: var(--navy-800);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.service-tag i { color: var(--teal-500); font-size: 0.8rem; }

.facility-tag i { color: var(--blue-500, #2563eb); }

.price-range-badge {
    display: inline-flex;
    align-items: center;
    background: var(--paper-dim);
    color: var(--teal-600);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
.price-range-badge-sm { font-size: 0.72rem; padding: 1px 8px; margin-left: 6px; }

/* ---------------- Breadcrumbs ---------------- */
.breadcrumbs { margin: 14px 0 6px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li { font-size: 0.82rem; color: var(--ink-soft); }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--teal-600); }
.breadcrumbs span[aria-current] { color: var(--navy-800); font-weight: 600; }
.breadcrumb-sep { color: var(--line); }

/* Contextual auto-links inserted into blog body text (see auto_link_content()) */
.page-content a {
    color: var(--teal-600);
    text-decoration: underline;
    text-decoration-color: var(--teal-200, #99e6d9);
    text-underline-offset: 2px;
}
.page-content a:hover { text-decoration-color: currentColor; }

/* Light variant for breadcrumbs sitting on a dark hero background */
.biz-hero .breadcrumbs li,
.biz-hero .breadcrumbs a { color: #CBD5E1; }
.biz-hero .breadcrumbs a:hover { color: #fff; }
.biz-hero .breadcrumbs span[aria-current] { color: #fff; }
.biz-hero .breadcrumb-sep { color: #64748B; }

.faq-item {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--navy-800);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--teal-500);
    margin-left: 12px;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 10px 0 0; color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
    .faq-item[open] p { animation: fadeSlideUp 0.3s ease both; }
}

/* ---------------- Custom page content (admin CMS pages) ---------------- */
.page-content { line-height: 1.75; color: var(--ink); margin-top: 20px; }
.info-card .page-content { margin-top: 0; }
.page-content h2, .page-content h3 { margin-top: 1.4em; }
.page-content p { margin: 0 0 1em; }
.page-content ul, .page-content ol { margin: 0 0 1em 1.4em; }
.page-content a { text-decoration: underline; }

/* ---------------- Responsive utility grids (Phase 8) ---------------- */
/* Inline style="grid-template-columns:..." can never be overridden by a
   stylesheet media query (inline specificity always wins), so any layout
   that needs to collapse on mobile must use one of these classes instead. */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.filter-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 12px; margin-bottom: 24px; }

@media (max-width: 700px) {
    .form-grid-2, .form-grid-3, .filter-grid { grid-template-columns: 1fr; }
}

.messages-layout { grid-template-columns: 1fr 1.6fr; }
@media (max-width: 900px) {
    .messages-layout { grid-template-columns: 1fr; }
}

/* ---------------- Mobile-app vs desktop dual markup ---------------- */
/* Some templates render two versions of the same content: a desktop
   version (.desktop-only, always shown by default) and a mobile
   "app-style" version (.mobile-only, hidden by default). The mobile
   version only appears if mobile-app.css is loaded and its media
   query flips this — meaning removing mobile-app.css safely reverts
   everything to the desktop-style responsive behavior. */
.mobile-only { display: none; }

/* ---------------- Blog listing ---------------- */
.blog-category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.blog-pill {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--navy-800) !important;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.blog-pill:hover { border-color: var(--teal-500); color: var(--teal-600) !important; }
.blog-pill.active {
    background: var(--teal-500);
    border-color: var(--teal-500);
    color: #fff !important;
}
.blog-pill.active .muted { color: rgba(255,255,255,0.8) !important; }

.blog-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.blog-card {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    color: inherit;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.blog-card-thumb { height: 160px; background: var(--paper-dim); overflow: hidden; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.blog-card:hover .blog-card-thumb img { transform: scale(1.05); }
.blog-card-thumb.no-image {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--header-bg), var(--teal-600));
}
.blog-card-thumb.no-image i { font-size: 2rem; color: rgba(255,255,255,0.85); }
.blog-card-body { padding: 16px; }
.blog-card-cat { color: var(--teal-600); font-size: 0.78rem; font-weight: 600; }
.blog-card-body h4 { font-size: 1rem; margin: 6px 0 4px; line-height: 1.35; }
.blog-card-body p { font-size: 0.85rem; margin: 0; }
.blog-card-date { display: block; color: var(--ink-soft); font-size: 0.75rem; margin-top: 10px; }

/* ---------------- Single blog post page ---------------- */
.blog-post-container { max-width: 780px; }
.blog-post-hero-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 10px;
}
.blog-post-hero-image img { width: 100%; height: 320px; object-fit: cover; display: block; }
.blog-post-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--teal-500);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
}

.blog-share-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px 0 26px;
}
.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff !important;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 9px 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    font-family: var(--font-body);
}
.blog-share-btn:hover { transform: translateY(-2px); opacity: 0.92; }
.blog-share-btn-outline {
    background: #fff !important;
    color: var(--navy-800) !important;
    border: 1px solid var(--line);
}

.blog-related-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: inherit;
}
.blog-related-row span { color: var(--teal-600); font-weight: 600; font-size: 0.9rem; }
.blog-related-row:hover span { text-decoration: underline; }
.blog-related-row img {
    width: 56px; height: 44px; object-fit: cover; border-radius: 6px; flex-shrink: 0;
}
.blog-related-thumb-empty {
    width: 56px; height: 44px; border-radius: 6px; flex-shrink: 0;
    background: var(--paper-dim); display: flex; align-items: center; justify-content: center;
    color: var(--ink-soft);
}

/* ---------------- Blog post: sidebar layout, rating, comments, CTA ---------------- */
.blog-post-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 10px;
}
@media (max-width: 900px) {
    .blog-post-layout { grid-template-columns: 1fr; }
}

.blog-rating-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.blog-rating-label { font-size: 0.9rem; font-weight: 600; color: var(--navy-800); }
.blog-rating-box .rating-input label { font-size: 1.3rem; }

.blog-comment-row {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.blog-comment-row:last-of-type { border-bottom: none; }
.blog-comment-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--teal-500); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 600; flex-shrink: 0;
}
.blog-comment-name { font-size: 0.88rem; font-weight: 600; color: var(--navy-800); }

.blog-cta-card {
    background: var(--header-bg);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.blog-cta-title { color: #fff; font-weight: 700; font-size: 0.95rem; margin: 0 0 4px; }
.blog-cta-text { color: #B9C2CF; font-size: 0.8rem; margin: 0 0 14px; }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--ink-soft); }

/* ---------------- Mobile bottom nav bar (app-like) ---------------- */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 760px) {
    body.has-bottom-nav { padding-bottom: 64px; }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 300;
        background: #fff;
        border-top: 1px solid var(--line);
        box-shadow: 0 -4px 16px rgba(15,27,45,0.08);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .mobile-bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 9px 4px 8px;
        color: var(--ink-soft) !important;
        font-size: 0.68rem;
        font-weight: 600;
        position: relative;
    }
    .mobile-bottom-nav a i {
        font-size: 1.15rem;
        transition: transform var(--transition-fast);
    }
    .mobile-bottom-nav a.active {
        color: var(--teal-600) !important;
    }
    .mobile-bottom-nav a.active i {
        transform: translateY(-2px);
    }
    .mobile-bottom-nav a.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 26px;
        height: 3px;
        border-radius: 0 0 4px 4px;
        background: var(--teal-500);
    }

    /* The navbar's own hamburger menu still exists for secondary links
       (About, Contact, Search, etc.) — the bottom bar covers the 4 most
       common actions so it feels native without duplicating navigation. */
}

/* Inline brand icons (replaces the Font Awesome brands webfont) */
.bi { fill: currentColor; vertical-align: -0.125em; display: inline-block; }
