/* ============================================================
   SOS Business Search — Site Styles
   Stack: Bootstrap 5 CDN + custom CSS
   Fonts: Libre Baskerville (headings), Source Sans 3 (body)
   ============================================================ */

/* --- Tokens ------------------------------------------------- */
:root {
    --navy:        #0d2137;
    --navy-dark:   #081623;
    --navy-mid:    #143352;
    --cream:       #fdf9f3;
    --cream-warm:  #f5efe4;
    --copper:      #b06c2a;
    --copper-light:#d4893f;
    --copper-pale: #f5e6d0;
    --slate:       #4a5e72;
    --slate-light: #7a90a4;
    --text-main:   #1c2e3e;
    --text-muted:  #5c717f;
    --border:      #dde4ec;
    --shadow-sm:   0 1px 3px rgba(13,33,55,.08);
    --shadow-md:   0 4px 16px rgba(13,33,55,.12);
    --shadow-lg:   0 8px 32px rgba(13,33,55,.16);
    --radius:      6px;
    --radius-lg:   12px;
}

/* --- Base --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-main);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.font-serif {
    font-family: 'Libre Baskerville', Georgia, serif;
    line-height: 1.25;
    color: var(--navy);
}

a { color: var(--copper); text-decoration: none; }
a:hover { color: var(--copper-light); text-decoration: underline; }

/* --- Site Header ------------------------------------------- */
.site-header {
    background: var(--navy-dark);
    border-bottom: 3px solid var(--copper);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.site-header .navbar-brand {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.35rem;
    color: #fff;
    letter-spacing: normal;
    word-spacing: normal;
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    text-decoration: none;
}
.site-header .navbar-brand:hover { text-decoration: none; }

.brand-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: block;
}

.site-header .brand-icon {
    transform: translateY(-3px);
}

.site-header .navbar-brand span {
    color: var(--copper-light);
}

.site-header .nav-link {
    color: rgba(255,255,255,.82) !important;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .5rem 1rem !important;
    border-radius: var(--radius);
    transition: color .2s, background .2s;
}

.site-header .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,.08);
}

.navbar-toggler {
    border-color: rgba(255,255,255,.3);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,.7%29' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Hero -------------------------------------------------- */
.site-hero {
    background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy-mid) 60%, #1c4a72 100%);
    color: #fff;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.site-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(176,108,42,.12) 0%, transparent 70%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 60px,
            rgba(255,255,255,.015) 60px,
            rgba(255,255,255,.015) 61px
        );
    pointer-events: none;
}

.site-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.site-hero .lead {
    color: rgba(255,255,255,.8);
    font-size: 1.15rem;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: var(--copper);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .25rem .75rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}

/* --- Section headings -------------------------------------- */
.section-eyebrow {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: .5rem;
}

.section-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--navy);
    margin-bottom: 2rem;
}

.section-divider {
    width: 48px;
    height: 3px;
    background: var(--copper);
    margin: 1rem 0 2rem;
    border-radius: 2px;
}

/* --- State Grid -------------------------------------------- */
.state-grid-section {
    padding: 4rem 0;
    background: var(--cream);
}

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

.state-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: var(--shadow-sm);
}

.state-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--copper-light);
    color: var(--navy);
    text-decoration: none;
}

.state-card .abbr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .02em;
    margin-bottom: .2rem;
    flex-shrink: 0;
}

.state-card .state-name {
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--navy);
}

.state-card .state-links {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: .3rem;
}

.state-card .state-link-pill {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    background: var(--cream-warm);
    color: var(--slate);
    padding: .15rem .5rem;
    border-radius: 100px;
    transition: background .15s, color .15s;
}

.state-card:hover .state-link-pill {
    background: var(--copper-pale);
    color: var(--copper);
}

/* --- Content area ------------------------------------------ */
.content-section {
    padding: 3rem 0 4rem;
}

.page-header-bar {
    background: var(--navy);
    color: #fff;
    padding: 2.5rem 0;
}

.page-header-bar h1 {
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    margin: 0;
}

.page-header-bar .breadcrumb {
    background: transparent;
    padding: 0;
    margin: .5rem 0 0;
    font-size: .85rem;
}

.page-header-bar .breadcrumb-item a { color: rgba(255,255,255,.65); }
.page-header-bar .breadcrumb-item.active { color: rgba(255,255,255,.9); }
.page-header-bar .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* State page status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .3rem .75rem;
    border-radius: 100px;
}

.status-badge.pending  { background: #fef3c7; color: #92400e; }
.status-badge.verified { background: #d1fae5; color: #065f46; }
.status-badge.flagged  { background: #fee2e2; color: #991b1b; }

.status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: .7;
}

/* Prose body */
.prose {
    max-width: 720px;
    color: var(--text-main);
}
.prose h2 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: .75rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--border);
}
.prose h3 { font-size: 1.15rem; margin-top: 1.75rem; }
.prose p  { margin-bottom: 1.1rem; }
.prose ol, .prose ul { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.prose li { margin-bottom: .4rem; }

/* Placeholder content box */
.content-placeholder {
    background: var(--cream-warm);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}
.content-placeholder p { margin: 0; font-size: .95rem; }

/* --- Info sidebar cards ------------------------------------ */
.info-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.info-card-header {
    background: var(--navy);
    color: #fff;
    padding: .85rem 1.25rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: .95rem;
    font-weight: 700;
}

.info-card-body {
    padding: 1.25rem;
}

/* Internal links widget */
.internal-links-widget .link-item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    text-decoration: none;
    font-size: .9rem;
    transition: color .15s;
}
.internal-links-widget .link-item:last-child { border-bottom: 0; }
.internal-links-widget .link-item:hover { color: var(--copper); }
.internal-links-widget .link-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--copper-light);
    margin-top: 2px;
}

/* Featured states in internal-links widget */
.featured-states-section {
    border-top: 1px solid var(--border);
    padding: .75rem 1.25rem .9rem;
}

.featured-states-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--slate-light);
    margin-bottom: .5rem;
}

.featured-states-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .3rem;
}

.featured-state-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    padding: .35rem .45rem;
    border-radius: var(--radius);
    transition: color .15s, background .15s;
    line-height: 1.25;
}

.featured-state-link:hover {
    color: var(--copper);
    background: var(--copper-pale);
    text-decoration: none;
}

.featured-abbr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--navy);
    color: #fff;
    border-radius: 50%;
    font-size: .6rem;
    font-weight: 700;
    font-family: 'Libre Baskerville', Georgia, serif;
    flex-shrink: 0;
}

/* --- State Filter ------------------------------------------ */
.state-filter-wrap {
    margin-bottom: 1.75rem;
}

.state-filter-field {
    position: relative;
    max-width: 400px;
}

.state-filter-field .filter-icon {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-light);
    font-size: 1rem;
    pointer-events: none;
    line-height: 1;
}

.state-filter-input {
    width: 100%;
    padding: .6rem .9rem .6rem 2.35rem;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-size: .95rem;
    color: var(--text-main);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.state-filter-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.state-filter-input:focus {
    outline: none;
    border-color: var(--copper-light);
    box-shadow: 0 0 0 3px rgba(176,108,42,.15);
}

.state-filter-input::-webkit-search-cancel-button { display: none; }

.state-filter-empty {
    margin-top: 1.5rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: .95rem;
    background: var(--cream-warm);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

/* --- Hub page list ----------------------------------------- */
.state-list-hub {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .5rem;
}

.state-list-hub li a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .85rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-main);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, color .15s, box-shadow .15s;
}
.state-list-hub li a:hover {
    border-color: var(--copper-light);
    color: var(--copper);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
.state-list-hub .abbr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--navy);
    color: #fff;
    border-radius: 50%;
    font-size: .7rem;
    font-weight: 700;
    font-family: 'Libre Baskerville', Georgia, serif;
    flex-shrink: 0;
}

/* --- Contact form ------------------------------------------ */
.contact-form-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.form-label { font-weight: 600; font-size: .9rem; color: var(--navy); }

.form-control, .form-select {
    border-color: var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--copper-light);
    box-shadow: 0 0 0 3px rgba(176,108,42,.15);
}

.btn-primary-custom {
    background: var(--copper);
    border: none;
    color: #fff;
    font-weight: 700;
    letter-spacing: .03em;
    padding: .65rem 2rem;
    border-radius: var(--radius);
    transition: background .2s, transform .1s;
}
.btn-primary-custom:hover {
    background: var(--copper-light);
    color: #fff;
    transform: translateY(-1px);
}
.btn-primary-custom:active { transform: none; }

/* --- Footer ------------------------------------------------ */
.site-footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,.7);
    padding: 3rem 0 2rem;
    border-top: 3px solid var(--copper);
    margin-top: auto;
}

.site-footer h6 {
    color: #fff;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: .95rem;
    margin-bottom: 1rem;
    letter-spacing: .02em;
}

.site-footer a {
    color: rgba(255,255,255,.65);
    font-size: .9rem;
    text-decoration: none;
    display: block;
    margin-bottom: .4rem;
    transition: color .15s;
}
.site-footer a:hover { color: var(--copper-light); }

.footer-disclaimer {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: .8rem;
    color: rgba(255,255,255,.5);
    margin-top: 2rem;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    font-size: .82rem;
    color: rgba(255,255,255,.4);
}

/* --- Utilities --------------------------------------------- */
.bg-cream      { background: var(--cream); }
.bg-cream-warm { background: var(--cream-warm); }
.text-copper   { color: var(--copper) !important; }
.text-navy     { color: var(--navy) !important; }
.text-slate    { color: var(--slate) !important; }
.border-copper { border-color: var(--copper) !important; }

.copper-rule {
    border: none;
    height: 2px;
    background: linear-gradient(to right, var(--copper), transparent);
    margin: 2rem 0;
}

/* --- Mobile Off-Canvas Navigation -------------------------- */

/* Hamburger trigger button */
.nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius);
    cursor: pointer;
    color: rgba(255,255,255,.85);
    font-size: 1.4rem;
    line-height: 1;
    transition: border-color .2s, background .2s, color .2s;
}
.nav-hamburger:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.4);
    color: var(--copper-light);
}
.nav-hamburger:focus-visible {
    outline: 2px solid var(--copper);
    outline-offset: 2px;
    color: var(--copper-light);
}

/* Offcanvas panel */
#mobileNav {
    --bs-offcanvas-width: 288px;
    --bs-offcanvas-bg: var(--navy-dark);
    --bs-offcanvas-border-color: transparent;
}

/* Premium slide easing */
.offcanvas.offcanvas-start {
    transition: transform .26s cubic-bezier(.4, 0, .2, 1) !important;
}

/* Backdrop — navy-tinted with blur */
.offcanvas-backdrop {
    --bs-backdrop-bg: #081623;
    --bs-backdrop-opacity: .72;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Offcanvas header */
.offcanvas-nav .offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem 0.875rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.offcanvas-brand {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: .95rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: normal;
    word-spacing: normal;
    display: inline-flex;
    align-items: center;
    gap: .15rem;
}
.offcanvas-brand .brand-icon {
    width: 22px;
    height: 22px;
    transform: translateY(-2px);
}
.offcanvas-brand span { color: var(--copper-light); }
.offcanvas-brand:hover { color: #fff; text-decoration: none; }

/* Close button — flex centers icon by layout, no line-height hacks */
.offcanvas-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    color: rgba(255,255,255,.7);
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .18s, color .18s, border-color .18s;
}
.offcanvas-close-btn:hover {
    background: rgba(176,108,42,.18);
    border-color: var(--copper);
    color: var(--copper-light);
}
.offcanvas-close-btn:focus-visible {
    outline: 2px solid var(--copper);
    outline-offset: 2px;
}

/* Offcanvas body */
.offcanvas-nav .offcanvas-body {
    padding: 1rem 0 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Section labels */
.onc-section-label {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--copper);
    padding: .65rem 1.5rem .25rem;
    margin: 0;
    opacity: .9;
}

/* Nav item links */
.onc-nav-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .7rem 1.5rem;
    min-height: 44px;
    color: rgba(255,255,255,.78);
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: color .18s, background .18s, border-left-color .18s;
    letter-spacing: .01em;
}
.onc-nav-link:hover,
.onc-nav-link:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.055);
    border-left-color: var(--copper);
    text-decoration: none;
    outline: none;
}
.onc-nav-link:active {
    background: rgba(176,108,42,.1);
}

/* Icon inside primary nav links */
.onc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--copper-light);
    opacity: .85;
}
.onc-icon svg { width: 18px; height: 18px; }
.onc-nav-link:hover .onc-icon { opacity: 1; }

/* State abbreviation badge */
.onc-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--navy-mid);
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.9);
    border-radius: 50%;
    font-size: .58rem;
    font-weight: 700;
    font-family: 'Libre Baskerville', Georgia, serif;
    letter-spacing: .03em;
    flex-shrink: 0;
    transition: background .18s, border-color .18s;
}
.onc-state-link:hover .onc-state-badge {
    background: var(--copper);
    border-color: var(--copper);
    color: #fff;
}

/* Section dividers */
.onc-divider {
    margin: .4rem 0;
    border: none;
    height: 1px;
    background: rgba(255,255,255,.07);
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 767px) {
    .site-hero { padding: 3rem 0 2.5rem; }
    .state-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .65rem; }
    .state-card { padding: 1rem .75rem; }
    .state-list-hub { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .state-grid { grid-template-columns: repeat(3, 1fr); }
    .state-list-hub { grid-template-columns: 1fr; }
}
