/* =============================================
   BASE FRAMEWORK — auto-injected, do not edit
   ============================================= */

/* ── THEME VARIABLES ──
   Override these in your :root {} block to theme the entire site.
   SAFE = change freely. CONTRAST-CRITICAL = keep dark/light as labeled. */
:root {
    /* SAFE — Brand colors (any hue, medium-to-dark for buttons/links) */
    --bs-primary: #0d6efd;
    --brand-accent: #0d6efd;

    /* SAFE — Layout & decoration */
    --radius: 18px;
    --shadow: 0 10px 30px rgba(0,0,0,.10);
    --section-pad-y: 5rem;

    /* SAFE — Section backgrounds */
    --section-light-bg: #ffffff;
    --section-alt-bg: #f8f9fa;

    /* CONTRAST-CRITICAL — dark backgrounds (MUST stay very dark, near-black) */
    --ink-950: #0f172a;

    /* CONTRAST-CRITICAL — text colors (do NOT make text-dark light or text-light dark) */
    --text-dark: #0f172a;
    --text-light: rgba(255,255,255,.88);
    --text-light-muted: rgba(255,255,255,.68);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { color: var(--text-dark); background: var(--section-light-bg); min-height: 100dvh; overflow-x: clip; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background-color: var(--bs-primary); color: #fff; }
img, picture, video { max-width: 100%; height: auto; }
img { image-orientation: from-image; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
.row > * { min-width: 0; }
table { border-collapse: collapse; }
a { text-decoration: none; }
p a, .content a { text-decoration: underline; text-underline-offset: 2px; }
.navbar a, footer a, .card a, .btn, .nav-link { text-decoration: none !important; }
.shadow-soft { box-shadow: var(--shadow); }
.section-pad { padding-top: var(--section-pad-y); padding-bottom: var(--section-pad-y); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--bs-primary) 70%, white); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Skip link */
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 12px; top: 12px; z-index: 9999; padding: 10px 12px; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.15); }

/* Screen-reader only — hides visually, remains accessible to assistive tech */
.visually-hidden:not(:focus):not(:active), .sr-only:not(:focus):not(:active) {
    clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; width: 1px;
    overflow: hidden; position: absolute; white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* Safety: prevent gap-* from breaking Bootstrap rows */
.row[class*="gap-"] { gap: 0 !important; }

/* Section contrast contract — text AND background enforced */
.section-light { color: var(--text-dark); background-color: var(--section-light-bg); }
.section-light h1, .section-light h2, .section-light h3, .section-light h4, .section-light h5, .section-light h6 { color: var(--text-dark); }
.section-light p, .section-light li, .section-light small, .section-light label { color: var(--text-dark); }
.section-light a:not(.btn) { color: var(--bs-primary); }

.section-dark { color: var(--text-light); background-color: var(--ink-950); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4, .section-dark h5, .section-dark h6 { color: #fff !important; }
.section-dark p, .section-dark li, .section-dark small, .section-dark label, .section-dark .lead { color: var(--text-light); }
.section-dark .text-muted, .section-dark .text-secondary { color: var(--text-light-muted) !important; }
.section-dark a:not(.btn) { color: rgba(255,255,255,.88); }
.section-dark a:not(.btn):hover { color: #fff; }
.section-dark .border, .section-dark hr { border-color: rgba(255,255,255,.15) !important; }

/* Buttons */
.btn-primary { background-color: var(--bs-primary); border-color: var(--bs-primary); color: #fff !important; }
.btn-primary:hover { filter: brightness(.92); color: #fff !important; }
.btn-outline-primary { color: var(--bs-primary); border-color: var(--bs-primary); }
.btn-outline-primary:hover { background-color: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
/* Auto-fix outline-primary in dark sections — make it white outline so it's visible */
.section-dark .btn-outline-primary { color: #fff; border-color: rgba(255,255,255,.5); }
.section-dark .btn-outline-primary:hover { background: #fff; color: var(--text-dark); border-color: #fff; }

/* Layout offsets for fixed navbar — !important prevents AI theme overrides */
.page-content { padding-top: 76px !important; }
.hero-section { margin-top: -76px !important; padding: 76px 0 2rem; min-height: 70vh; display: flex; align-items: center; background-size: cover; background-position: center; color: var(--text-light); overflow: visible !important; }
.hero-section h1, .hero-section h2, .hero-section h3 { color: #fff !important; }
.hero-section p, .hero-section .lead { color: var(--text-light); }
.hero-section a:not(.btn) { color: rgba(255,255,255,.88); }
.hero-section .btn-outline-primary { color: #fff; border-color: rgba(255,255,255,.5); }
.hero-section .btn-outline-primary:hover { background: #fff; color: var(--text-dark); border-color: #fff; }
@media (min-width: 992px) { .hero-section { min-height: 75vh; } }

/* Page banner (inner pages) — always dark overlay, enforce all text white */
.page-banner { margin-top: -76px !important; padding: calc(76px + 2.5rem) 0 2.5rem !important; min-height: 220px; max-height: 340px !important; display: flex; align-items: center; position: relative; overflow: hidden; color: var(--text-light); background-size: cover; background-position: center; }
.page-banner h1, .page-banner h2, .page-banner h3 { color: #fff !important; }
.page-banner p, .page-banner .lead { color: var(--text-light); }
.page-banner a:not(.btn) { color: rgba(255,255,255,.8) !important; }
.page-banner a:not(.btn):hover { color: #fff !important; }
.page-banner .breadcrumb { margin-bottom: 0; }
.page-banner .breadcrumb-item, .page-banner .breadcrumb-item a { color: rgba(255,255,255,.65) !important; font-size: .85rem; text-decoration: none; }
.page-banner .breadcrumb-item a:hover { color: rgba(255,255,255,.9) !important; }
.page-banner .breadcrumb-item.active { color: rgba(255,255,255,.5) !important; }
.page-banner .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* Navbar — solid background, never transparent. Default: DARK. AI may use .navbar-light for light variant. */
.navbar { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .3s ease, background-color .3s ease, box-shadow .3s ease; }
.navbar.navbar-dark { background-color: color-mix(in srgb, var(--ink-950) 95%, transparent); }
.navbar.navbar-light { background-color: rgba(255,255,255,.97); }
.navbar-dark.navbar-scrolled { background-color: color-mix(in srgb, var(--ink-950) 98%, transparent); box-shadow: 0 2px 20px rgba(0,0,0,.15); }
.navbar-light.navbar-scrolled { background-color: rgba(255,255,255,.99); box-shadow: 0 2px 20px rgba(0,0,0,.08); }
.navbar-brand img { max-height: 50px; width: auto; object-fit: contain; }
.logo-pill { background: rgba(255,255,255,.92); padding: 4px 10px; border-radius: 10px; }
.logo-pill-dark { background: rgba(15,23,42,.08); padding: 4px 10px; border-radius: 10px; }
.headroom--unpinned { transform: translateY(-100%); }
.headroom--pinned { transform: translateY(0); }

/* Desktop navbar — reset mobile styles, keep standard layout */
@media (min-width: 992px) {
    .navbar .navbar-collapse { display: flex !important; position: static; background: transparent !important; border-radius: 0 !important; padding: 0 !important; margin-top: 0 !important; box-shadow: none !important; backdrop-filter: none !important; opacity: 1; visibility: visible; pointer-events: auto; }
    .mobile-menu-close { display: none !important; }
}
/* Navbar-dark text — light text on dark bg */
.navbar-dark .nav-link { color: rgba(255,255,255,.85) !important; }
.navbar-dark .nav-link:hover, .navbar-dark .nav-link.active, .navbar-dark .nav-link:focus { color: #fff !important; }
.navbar-dark .navbar-brand { color: #fff !important; }
/* Navbar-light text — dark text on light bg */
.navbar-light .nav-link { color: var(--text-dark) !important; }
.navbar-light .nav-link:hover, .navbar-light .nav-link.active, .navbar-light .nav-link:focus { color: var(--bs-primary) !important; }
.navbar-light .navbar-brand { color: var(--text-dark) !important; }
.navbar-light .navbar-toggler-icon{width:24px;height:24px}

.navbar-toggler:focus { box-shadow: none; }

/* Mobile menu — fullscreen overlay, moved to <body> by JS to escape navbar transform/backdrop-filter containing block */
@media (max-width: 991.98px) {
    .navbar-collapse { position: fixed; inset: 0; z-index: 1050; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s ease, visibility .35s ease; }
    .navbar-collapse[data-theme="dark"] { background: color-mix(in srgb, var(--ink-950) 97%, transparent); }
    .navbar-collapse[data-theme="light"] { background: rgba(255,255,255,.97); }
    .navbar-collapse.show { opacity: 1; visibility: visible; pointer-events: auto; }
    .navbar-collapse .navbar-nav { flex-direction: column; align-items: center; gap: .25rem; margin: 0; padding: 0; width: 100%; }
    .navbar-collapse .nav-link { font-size: 1.5rem; font-weight: 600; letter-spacing: .01em; padding: .85rem 1rem; transition: color .2s, transform .2s; text-align: center; }
    .navbar-collapse[data-theme="dark"] .nav-link { color: rgba(255,255,255,.85) !important; }
    .navbar-collapse[data-theme="dark"] .nav-link:hover, .navbar-collapse[data-theme="dark"] .nav-link.active { color: #fff !important; transform: scale(1.05); }
    .navbar-collapse[data-theme="light"] .nav-link { color: var(--text-dark) !important; }
    .navbar-collapse[data-theme="light"] .nav-link:hover, .navbar-collapse[data-theme="light"] .nav-link.active { color: var(--bs-primary) !important; transform: scale(1.05); }
    .navbar-collapse .btn { margin-top: 1.5rem; min-width: 220px; text-align: center; font-size: 1.1rem; padding: .75rem 2rem; }
    .mobile-menu-close { position: absolute; top: 1.25rem; right: 1.25rem; background: none; border: none; font-size: 1.75rem; cursor: pointer; z-index: 1051; padding: .5rem; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
    .navbar-collapse[data-theme="dark"] .mobile-menu-close { color: #fff; }
    .navbar-collapse[data-theme="light"] .mobile-menu-close { color: var(--text-dark); }
    .mobile-menu-close:hover { opacity: .7; }
    body.mobile-menu-open { overflow: hidden; }
}

/* Media frames */
.media-frame { border-radius: .75rem; overflow: hidden; background: rgba(255,255,255,.04); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.media-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.poster-frame { max-height: 520px; }
.poster-frame img { max-height: 520px; width: 100%; object-fit: contain; background: #fff; }

/* Gallery sizing — !important prevents AI theme overrides from breaking uniform heights */
.gallery-grid img, .portfolio-grid img { width: 100% !important; height: 260px !important; object-fit: cover !important; border-radius: .5rem; }
@media (min-width: 768px) { .gallery-grid img, .portfolio-grid img { height: 300px !important; } }

/* Card image safety — prevent distortion */
.card > img, .card > a > img, .card .card-img-top, .card .card-img { object-fit: cover; width: 100%; }

/* General section image safety — prevent stretching of raw imgs in grid columns */
section .row > [class*="col"] > img:not(.logo-pill),
section .row > [class*="col"] > .ratio img { object-fit: cover; width: 100%; border-radius: .5rem; }

/* Equal-height cards/boxes in grid rows — catches .card, *-card, *-box, *-step */
.row > .col > .card, .row > [class*="col-"] > .card, .row > [class*="col "] > .card,
.row > .col > [class*="-card"], .row > [class*="col-"] > [class*="-card"], .row > [class*="col "] > [class*="-card"],
.row > .col > [class*="-box"]:not(.icon-box), .row > [class*="col-"] > [class*="-box"]:not(.icon-box),
.row > .col > [class*="-step"], .row > [class*="col-"] > [class*="-step"],
.row > .col > .h-100, .row > [class*="col-"] > .h-100 { height: 100%; display: flex; flex-direction: column; }
/* Card-body fills card and becomes a flex column — enables icon-card and buttons to align properly across equal-height cards. */
.row > .col > .card .card-body, .row > [class*="col-"] > .card .card-body { flex: 1; display: flex; flex-direction: column; }
/* Center incomplete last rows in card grids and gallery grids */
[class*="row-cols-"] { justify-content: center; }
.gallery-grid, .portfolio-grid { justify-content: center; }
.gallery-grid .row, .portfolio-grid .row { justify-content: center; }
.row.justify-content-center { justify-content: center; }
/* Auto-center for common card grid patterns with gutters */
.row[class*=" g-"]:has(> [class*="col-"] > .card),
.row[class*=" g-"]:has(> .col > .card),
.row[class*=" g-"]:has(> [class*="col-"] > [class*="-step"]),
.row[class*=" g-"]:has(> [class*="col-"] > [class*="-card"]) { justify-content: center; }

/* Reset <footer> elements inside content (blockquotes, cards, etc.) — prevents site-footer styles from leaking */
blockquote footer, .card footer, .testimonial-card footer,
.blockquote-footer { background: none !important; color: inherit !important; padding: 0; margin: 0; }

/* Footer — always dark */
footer, .site-footer { background: var(--ink-950); color: var(--text-light); }
footer img.footer-logo, footer a > img:first-child { max-height: 45px; width: auto; object-fit: contain; }
footer h1, footer h2, footer h3, footer h4, footer h5, footer h6 { color: #fff !important; }
footer p, footer li, footer small, footer label, footer address { color: var(--text-light); }
footer .text-muted, footer .text-secondary { color: var(--text-light-muted) !important; }
footer a:not(.btn) { color: rgba(255,255,255,.75); text-decoration: none !important; }
footer a:not(.btn):hover { color: #fff; }
footer .border, footer hr { border-color: rgba(255,255,255,.15) !important; }
footer .copyright, footer .bottom-bar { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem; margin-top: 2rem; }
/* White containers inside footer — same reset as section-dark */
footer .bg-white, footer .bg-white * { color: var(--text-dark) !important; }
footer .bg-white .btn-primary { color: #fff !important; }

/* Any light-background container inside a dark section — reset ALL text to dark.
   Exclude bg-opacity-* (Bootstrap modifier makes bg semi-transparent = still dark). */
.section-dark .bg-white:not([class*="bg-opacity-"]), .section-dark .bg-light:not([class*="bg-opacity-"]), .section-dark .bg-light-subtle,
.section-dark .bg-body-secondary, .section-dark .bg-body-tertiary { color: var(--text-dark) !important; }
.section-dark .bg-white:not([class*="bg-opacity-"]) *, .section-dark .bg-light:not([class*="bg-opacity-"]) *, .section-dark .bg-light-subtle *,
.section-dark .bg-body-secondary *, .section-dark .bg-body-tertiary * { color: var(--text-dark) !important; }
.section-dark .bg-white:not([class*="bg-opacity-"]) h1, .section-dark .bg-white:not([class*="bg-opacity-"]) h2, .section-dark .bg-white:not([class*="bg-opacity-"]) h3,
.section-dark .bg-white:not([class*="bg-opacity-"]) h4, .section-dark .bg-white:not([class*="bg-opacity-"]) h5, .section-dark .bg-white:not([class*="bg-opacity-"]) h6,
.section-dark .bg-light:not([class*="bg-opacity-"]) h1, .section-dark .bg-light:not([class*="bg-opacity-"]) h2, .section-dark .bg-light:not([class*="bg-opacity-"]) h3,
.section-dark .bg-light:not([class*="bg-opacity-"]) h4, .section-dark .bg-light:not([class*="bg-opacity-"]) h5, .section-dark .bg-light:not([class*="bg-opacity-"]) h6 { color: var(--text-dark) !important; }
.section-dark .bg-white:not([class*="bg-opacity-"]) .text-muted, .section-dark .bg-light:not([class*="bg-opacity-"]) .text-muted,
.section-dark .bg-white:not([class*="bg-opacity-"]) .text-secondary, .section-dark .bg-light:not([class*="bg-opacity-"]) .text-secondary { color: rgba(15,23,42,.72) !important; }
.section-dark .bg-white:not([class*="bg-opacity-"]) .form-control, .section-dark .bg-light:not([class*="bg-opacity-"]) .form-control,
.section-dark .bg-white:not([class*="bg-opacity-"]) .form-select, .section-dark .bg-light:not([class*="bg-opacity-"]) .form-select,
.section-dark .bg-white:not([class*="bg-opacity-"]) .form-check-label, .section-dark .bg-light:not([class*="bg-opacity-"]) .form-check-label { color: var(--text-dark) !important; }
.section-dark .bg-white:not([class*="bg-opacity-"]) .form-control::placeholder, .section-dark .bg-light:not([class*="bg-opacity-"]) .form-control::placeholder { color: rgba(15,23,42,.55) !important; }
.section-dark .bg-white:not([class*="bg-opacity-"]) a:not(.btn), .section-dark .bg-light:not([class*="bg-opacity-"]) a:not(.btn) { color: var(--bs-primary) !important; }
.section-dark .bg-white:not([class*="bg-opacity-"]) .check-list li::before, .section-dark .bg-light:not([class*="bg-opacity-"]) .check-list li::before { color: var(--bs-primary); }
/* Preserve icon-box brand colors inside white cards in dark sections (overrides the * reset above) */
.section-dark .bg-white:not([class*="bg-opacity-"]) .icon-box,
.section-dark .bg-white:not([class*="bg-opacity-"]) .icon-box-sm,
.section-dark .bg-light:not([class*="bg-opacity-"]) .icon-box,
.section-dark .bg-light:not([class*="bg-opacity-"]) .icon-box-sm { background: color-mix(in srgb, var(--bs-primary) 12%, white) !important; color: var(--bs-primary) !important; }
.section-dark .bg-white:not([class*="bg-opacity-"]) .icon-box i,
.section-dark .bg-white:not([class*="bg-opacity-"]) .icon-box-sm i,
.section-dark .bg-light:not([class*="bg-opacity-"]) .icon-box i,
.section-dark .bg-light:not([class*="bg-opacity-"]) .icon-box-sm i { color: var(--bs-primary) !important; }
/* Preserve filled button text colors (overrides the * reset above) */
.section-dark .bg-white:not([class*="bg-opacity-"]) .btn-primary, .section-dark .bg-white:not([class*="bg-opacity-"]) .btn-secondary,
.section-dark .bg-white:not([class*="bg-opacity-"]) .btn-success, .section-dark .bg-white:not([class*="bg-opacity-"]) .btn-danger,
.section-dark .bg-white:not([class*="bg-opacity-"]) .btn-info, .section-dark .bg-white:not([class*="bg-opacity-"]) .btn-dark,
.section-dark .bg-light:not([class*="bg-opacity-"]) .btn-primary, .section-dark .bg-light:not([class*="bg-opacity-"]) .btn-secondary,
.section-dark .bg-light:not([class*="bg-opacity-"]) .btn-success, .section-dark .bg-light:not([class*="bg-opacity-"]) .btn-danger,
.section-dark .bg-light:not([class*="bg-opacity-"]) .btn-info, .section-dark .bg-light:not([class*="bg-opacity-"]) .btn-dark { color: #fff !important; }
.section-dark .bg-white:not([class*="bg-opacity-"]) .btn-outline-primary, .section-dark .bg-light:not([class*="bg-opacity-"]) .btn-outline-primary { color: var(--bs-primary) !important; }
.section-dark .bg-white:not([class*="bg-opacity-"]) .btn-outline-primary:hover, .section-dark .bg-light:not([class*="bg-opacity-"]) .btn-outline-primary:hover { color: #fff !important; }
/* Light-background buttons in dark sections need dark text */
.section-dark .btn-light { color: var(--text-dark) !important; background-color: #fff !important; }
.section-dark .btn-light:hover { color: var(--text-dark) !important; background-color: #e9ecef !important; }
.section-dark .btn-outline-light { color: rgba(255,255,255,.88) !important; border-color: rgba(255,255,255,.4) !important; }
.section-dark .btn-outline-light:hover { color: var(--text-dark) !important; background-color: #fff !important; }

/* Dark cards/containers inside light sections — reverse contrast safety net */
.section-light .bg-dark, .section-light .text-bg-dark, .section-light .text-bg-primary { color: var(--text-light) !important; }
.section-light .bg-dark *, .section-light .text-bg-dark *, .section-light .text-bg-primary * { color: var(--text-light) !important; }
.section-light .bg-dark h1, .section-light .bg-dark h2, .section-light .bg-dark h3,
.section-light .bg-dark h4, .section-light .bg-dark h5, .section-light .bg-dark h6 { color: #fff !important; }
.section-light .bg-dark a:not(.btn), .section-light .text-bg-dark a:not(.btn) { color: rgba(255,255,255,.85) !important; text-decoration: underline; }
.section-light .bg-dark a:not(.btn):hover, .section-light .text-bg-dark a:not(.btn):hover { color: #fff !important; }
.section-light .bg-dark .btn-primary, .section-light .bg-dark .btn-secondary,
.section-light .bg-dark .btn-success, .section-light .bg-dark .btn-danger { color: #fff !important; }
.section-light .bg-dark .btn-outline-primary { color: rgba(255,255,255,.88) !important; border-color: rgba(255,255,255,.5) !important; }
.section-light .bg-dark .btn-outline-primary:hover { color: var(--text-dark) !important; background: #fff !important; }
.section-light .bg-dark .text-muted, .section-light .bg-dark .text-secondary { color: rgba(255,255,255,.55) !important; }

/* Also handle inline dark backgrounds via style attribute */
.section-light [style*="background"][class*="text-white"] a:not(.btn),
.section-light [style*="background"][class*="text-light"] a:not(.btn) { color: rgba(255,255,255,.85) !important; }

/* Form controls — only dark section contrast, let Bootstrap + AI handle styling */
/* Dark section standalone forms (not inside a white card) */
.section-dark .form-control, .section-dark .form-select { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #fff; }
.section-dark .form-control::placeholder { color: rgba(255,255,255,.45); }
.section-dark .form-control:focus, .section-dark .form-select:focus { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.12); }
.section-dark .form-label, .section-dark .form-check-label { color: var(--text-light); }
/* Light container inside dark section overrides the dark form styles back to normal */
.section-dark .bg-white .form-control, .section-dark .bg-light .form-control,
.section-dark .bg-white .form-select, .section-dark .bg-light .form-select { background: #fff; border-color: #dee2e6; color: var(--text-dark) !important; }
.section-dark .bg-white .form-control::placeholder, .section-dark .bg-light .form-control::placeholder { color: rgba(15,23,42,.55) !important; }
.section-dark .bg-white .form-control:focus, .section-dark .bg-light .form-control:focus,
.section-dark .bg-white .form-select:focus, .section-dark .bg-light .form-select:focus { border-color: var(--bs-primary); background: #fff; }
.section-dark .bg-white .form-check-input, .section-dark .bg-light .form-check-input { background-color: #fff; border-color: #dee2e6; }
.section-dark .bg-white .form-check-input:checked, .section-dark .bg-light .form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }

/* Accordion/FAQ in dark sections */
.section-dark .accordion-item { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.15); }
.section-dark .accordion-button { background: rgba(255,255,255,.06); color: #fff; }
.section-dark .accordion-button:not(.collapsed) { background: rgba(255,255,255,.10); color: #fff; }
.section-dark .accordion-button::after { filter: invert(1) brightness(2); }
.section-dark .accordion-body { color: var(--text-light); }

/* Dark section tables + badges */
.section-dark .table { color: var(--text-light); border-color: rgba(255,255,255,.15); }
.section-dark .table th { color: #fff; }
.section-dark .table td { color: var(--text-light); }
.section-dark .table-striped > tbody > tr:nth-of-type(odd) > * { color: var(--text-light); --bs-table-bg-type: rgba(255,255,255,.03); }
.section-dark .badge { font-weight: 500; }
.section-dark .badge.bg-light { color: var(--text-dark) !important; }
.section-dark .nav-link { color: rgba(255,255,255,.7); }
.section-dark .nav-link.active, .section-dark .nav-link:hover { color: #fff; }
.section-dark .nav-tabs .nav-link.active { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: #fff; }

/* Dark section list-groups */
.section-dark .list-group-item { background: rgba(255,255,255,.06); color: var(--text-light); border-color: rgba(255,255,255,.15); }
.section-dark .list-group-item.active { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }

/* Dark section breadcrumbs (general, outside page-banner) */
.section-dark .breadcrumb-item, .section-dark .breadcrumb-item a { color: rgba(255,255,255,.65); }
.section-dark .breadcrumb-item a:hover { color: #fff; }
.section-dark .breadcrumb-item.active { color: rgba(255,255,255,.5); }
.section-dark .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* Dark section pagination */
.section-dark .page-link { background: rgba(255,255,255,.06); color: var(--text-light); border-color: rgba(255,255,255,.15); }
.section-dark .page-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.section-dark .page-item.active .page-link { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.section-dark .page-item.disabled .page-link { background: rgba(255,255,255,.03); color: rgba(255,255,255,.3); }

/* Dark section progress bars */
.section-dark .progress { background: rgba(255,255,255,.1); border-radius: .5rem; }

/* Dark section alerts — transparent tinted variants */
.section-dark .alert { border: none; }
.section-dark .alert-primary { background: rgba(13,110,253,.15); color: #6ea8fe; }
.section-dark .alert-success { background: rgba(25,135,84,.15); color: #75b798; }
.section-dark .alert-danger { background: rgba(220,53,69,.15); color: #ea868f; }
.section-dark .alert-warning { background: rgba(255,193,7,.15); color: #ffda6a; }
.section-dark .alert-info { background: rgba(13,202,240,.15); color: #6edff6; }

/* Close button in dark sections */
.section-dark .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* Modals + offcanvas always render light (they float above page context) */
.modal-content { background: #fff; color: var(--text-dark); }
.modal-content h1, .modal-content h2, .modal-content h3, .modal-content h4, .modal-content h5, .modal-content h6 { color: var(--text-dark); }
.modal-content p, .modal-content li, .modal-content span, .modal-content label { color: var(--text-dark); }
.modal-header { border-bottom-color: #dee2e6; }
.modal-footer { border-top-color: #dee2e6; }
.offcanvas { background: #fff; color: var(--text-dark); }

/* Dark section form-check inputs (standalone, not inside white container) */
.section-dark .form-check-input { background-color: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); }
.section-dark .form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.section-dark .form-check-label { color: var(--text-light); }
.section-dark .form-switch .form-check-input { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(255,255,255,.6)'/%3e%3c/svg%3e"); }

/* Dropdown menus (navbar + general) */
.navbar .dropdown-menu { background: #fff; border: none; border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem 0; }
.navbar .dropdown-menu .dropdown-item { color: var(--text-dark); padding: .5rem 1.25rem; transition: background .15s; }
.navbar .dropdown-menu .dropdown-item:hover, .navbar .dropdown-menu .dropdown-item:focus { background: #f0f4f8; color: var(--text-dark); }
.navbar .dropdown-menu .dropdown-divider { border-color: #e9ecef; }
.section-dark .dropdown-menu { background: rgba(15,23,42,.95); border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(10px); }
.section-dark .dropdown-menu .dropdown-item { color: var(--text-light); }
.section-dark .dropdown-menu .dropdown-item:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Blockquote contrast in dark sections */
.section-dark blockquote, .section-dark .blockquote { color: var(--text-light); }
.section-dark blockquote footer, .section-dark .blockquote-footer { color: var(--text-light-muted); }

/* Code / pre / kbd — dark section contrast */
.section-dark code { color: #e9b0ff; background: rgba(255,255,255,.08); padding: .15em .4em; border-radius: .25rem; }
.section-dark pre { background: rgba(0,0,0,.4); color: var(--text-light); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 1rem; overflow-x: auto; }
.section-dark pre code { background: none; color: inherit; padding: 0; }
.section-dark kbd { background: rgba(255,255,255,.15); color: #fff; }
/* Code in light sections — ensure readable */
.section-light code { color: #c7254e; background: rgba(0,0,0,.04); padding: .15em .4em; border-radius: .25rem; }
.section-light pre { background: #f8f9fa; color: var(--text-dark); border: 1px solid #e9ecef; border-radius: var(--radius); padding: 1rem; overflow-x: auto; }

/* Mark/del/ins inline elements */
.section-dark mark, .section-dark .mark { background: rgba(255,193,7,.25); color: #fff; padding: .15em .3em; border-radius: .15rem; }
.section-dark del, .section-dark s { color: var(--text-light-muted); }
.section-dark ins { color: var(--text-light); text-decoration-color: rgba(255,255,255,.4); }

/* Input group addons — dark section contrast */
.section-dark .input-group-text { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: var(--text-light); }
.section-dark .bg-white:not([class*="bg-opacity-"]) .input-group-text,
.section-dark .bg-light:not([class*="bg-opacity-"]) .input-group-text { background: #e9ecef; border-color: #dee2e6; color: var(--text-dark); }

/* Form floating labels — dark section contrast */
.section-dark .form-floating > .form-control:not(:placeholder-shown) ~ label,
.section-dark .form-floating > .form-select ~ label { color: var(--text-light-muted); }
.section-dark .form-floating > .form-control:focus ~ label { color: var(--text-light); }

/* Badge completeness — all variants in dark sections */
.section-dark .badge.bg-white { color: var(--text-dark) !important; }
.section-dark .badge.bg-light { color: var(--text-dark) !important; }

/* All outline button variants in dark sections — ensure visibility */
.section-dark .btn-outline-secondary { color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.3); }
.section-dark .btn-outline-secondary:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.5); }
.section-dark .btn-outline-success { color: #75b798; border-color: #75b798; }
.section-dark .btn-outline-danger { color: #ea868f; border-color: #ea868f; }
.section-dark .btn-outline-warning { color: #ffda6a; border-color: #ffda6a; }
.section-dark .btn-outline-info { color: #6edff6; border-color: #6edff6; }
.section-dark .btn-outline-dark { color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.3); }

/* Footer form controls — dark bg needs light inputs */
footer .form-control, footer .form-select { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #fff; }
footer .form-control::placeholder { color: rgba(255,255,255,.45); }
footer .form-control:focus, footer .form-select:focus { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.12); }
footer .form-label { color: var(--text-light); }
footer .form-check-input { background-color: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); }
footer .form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
footer .input-group-text { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: var(--text-light); }

/* Nested containers: .card.bg-white inside another card inside dark section */
.section-dark .card .card.bg-white:not([class*="bg-opacity-"]),
.section-dark .card .bg-white:not([class*="bg-opacity-"]) { color: var(--text-dark) !important; }
.section-dark .card .card.bg-white:not([class*="bg-opacity-"]) *,
.section-dark .card .bg-white:not([class*="bg-opacity-"]) * { color: var(--text-dark) !important; }
.section-dark .card .card.bg-white:not([class*="bg-opacity-"]) .btn-primary,
.section-dark .card .bg-white:not([class*="bg-opacity-"]) .btn-primary { color: #fff !important; }

/* Section utility backgrounds */
.bg-ink { background: var(--ink-950); }
.bg-light-subtle { background: #f8f9fa; }
.bg-accent { background: var(--bs-primary); color: #fff; }
.bg-accent h1, .bg-accent h2, .bg-accent h3, .bg-accent h4, .bg-accent p, .bg-accent li { color: #fff; }
.bg-accent a:not(.btn) { color: #fff; text-decoration: underline; }

/* Alternating section background helper */
.section-alt { background: #f8f9fb; color: var(--text-dark); }

/* Button contrast fixes */
.btn-light { background: #fff; color: var(--text-dark); border-color: #fff; }
.btn-light:hover { background: #f0f0f0; color: var(--text-dark); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { background: #fff; color: var(--text-dark); }

/* Icon boxes (for feature/service sections) */
.icon-box, .icon-box-sm { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-box { width: 60px; height: 60px; border-radius: 16px; font-size: 1.4rem; }
.icon-box-sm { width: 48px; height: 48px; border-radius: 12px; font-size: 1.1rem; }
.section-light .icon-box, .section-light .icon-box-sm { background: color-mix(in srgb, var(--bs-primary) 12%, white); color: var(--bs-primary); }
.section-dark .icon-box, .section-dark .icon-box-sm { background: rgba(255,255,255,.15); color: #fff; }
/* Icon fallback — ensure icon-box never appears empty */
.icon-box i, .icon-box-sm i { min-width: 1em; min-height: 1em; }

/* Icon-card — responsive icon+text layout that adapts to card width automatically.
   Wide cards (2-col grids, >320px): icon LEFT of text (horizontal).
   Narrow cards (3/4-col grids, ≤320px): icon ABOVE text (stacked, centered).
   Breakpoint 320px catches: col-lg-3 at all viewports, col-lg-4 at lg, nested cards. */
.card { container-type: inline-size; }
.icon-card { display: flex; flex-direction: row; align-items: flex-start; gap: 1rem; flex: 1; }
.icon-card > .icon-box + div { flex: 1; min-width: 0; }
.icon-card h3, .icon-card h4, .icon-card h5, .icon-card h6 { margin-bottom: .35rem; }
.icon-card p:last-child { margin-bottom: 0; }

/* Stacked mode — narrow cards get centered vertical layout with cross-card alignment */
@container (max-width: 320px) {
    .icon-card { flex-direction: column; align-items: center; text-align: center; gap: .75rem; }
    .icon-card .icon-box { width: 56px; height: 56px; font-size: 1.3rem; border-radius: 14px; }
    .icon-card > .icon-box + div { display: flex; flex-direction: column; width: 100%; }
    .icon-card h3, .icon-card h4, .icon-card h5, .icon-card h6 { min-height: 2.5em; }
}

/* Horizontal mode — medium-width cards (320px–440px) use compact icon */
@container (min-width: 321px) and (max-width: 440px) {
    .icon-card .icon-box { width: 48px; height: 48px; font-size: 1.1rem; border-radius: 12px; }
    .icon-card { gap: .75rem; }
}

/* Card padding safety net — ensures cards always have usable internal spacing */
.card:not(:has(.card-body)) { padding: 1.5rem; }
.card .card-body { padding: 1.5rem; }

/* Card contrast in dark sections — glass-style cards need visible distinction */
.section-dark .card { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); }
.section-dark .card h3, .section-dark .card h4, .section-dark .card h5 { color: #fff !important; }
.section-dark .card p, .section-dark .card li { color: var(--text-light); }

/* Default list polish — clean spacing and branded markers for both themes */
.section-light ul:not(.list-unstyled):not(.check-list):not(.navbar-nav):not(.breadcrumb):not(.pagination):not(.dropdown-menu):not(.list-group) { padding-left: 0; list-style: none; }
.section-light ul:not(.list-unstyled):not(.check-list):not(.navbar-nav):not(.breadcrumb):not(.pagination):not(.dropdown-menu):not(.list-group) > li { padding-left: 1.5rem; position: relative; margin-bottom: .4rem; }
.section-light ul:not(.list-unstyled):not(.check-list):not(.navbar-nav):not(.breadcrumb):not(.pagination):not(.dropdown-menu):not(.list-group) > li::before { content: ''; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--bs-primary); }
.section-dark ul:not(.list-unstyled):not(.check-list):not(.navbar-nav):not(.breadcrumb):not(.pagination):not(.dropdown-menu):not(.list-group) { padding-left: 0; list-style: none; }
.section-dark ul:not(.list-unstyled):not(.check-list):not(.navbar-nav):not(.breadcrumb):not(.pagination):not(.dropdown-menu):not(.list-group) > li { padding-left: 1.5rem; position: relative; margin-bottom: .4rem; }
.section-dark ul:not(.list-unstyled):not(.check-list):not(.navbar-nav):not(.breadcrumb):not(.pagination):not(.dropdown-menu):not(.list-group) > li::before { content: ''; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); }

/* Check-mark list */
.check-list { list-style: none; padding-left: 0; }
.check-list li { padding-left: 1.75rem; position: relative; margin-bottom: .5rem; }
.check-list li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; color: var(--bs-primary); font-size: .85rem; top: .15em; }
.section-dark .check-list li::before { color: rgba(255,255,255,.7); }

/* Section heading accent */
.section-label { text-transform: uppercase; font-size: .8rem; font-weight: 600; letter-spacing: .08em; color: var(--bs-primary); margin-bottom: .25rem; }
.section-dark .section-label { color: rgba(255,255,255,.6); }

/* CTA section helper */
.cta-section { padding: 4rem 0; text-align: center; }

/* Lead text helper */
.lead { font-size: 1.15rem; line-height: 1.7; }

/* Divider */
div.section-divider, hr.section-divider, span.section-divider { width: 60px; height: 3px; background: var(--bs-primary); border-radius: 3px; display: block; }

/* Back-to-top button */
.back-to-top { position: fixed; bottom: 2rem; right: 2rem; z-index: 1030; width: 44px; height: 44px; border-radius: 50%; background: var(--bs-primary); color: #fff; border: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.18); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, transform .3s; cursor: pointer; }
.back-to-top.show, .back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); filter: brightness(.9); }

/* Responsive table wrapper */
.table-responsive { border-radius: var(--radius); }
.section-dark .table-responsive { border: 1px solid rgba(255,255,255,.15); }

/* Horizontal rule in dark sections */
.section-dark hr { border-top-color: rgba(255,255,255,.15); }

/* Testimonial / review cards */
.testimonial-card { position: relative; padding: 2rem; border-radius: var(--radius); border-left: 3px solid var(--bs-primary); }
.testimonial-card::before { content: '\201c'; font-size: 5rem; line-height: 1; position: absolute; top: .25rem; left: 1.25rem; color: var(--bs-primary); opacity: .15; font-family: Georgia, serif; pointer-events: auto; }
.section-light .testimonial-card { background: var(--section-alt-bg, #f8f9fb); box-shadow: 0 4px 20px rgba(0,0,0,.04); }
.section-dark .testimonial-card { background: rgba(255,255,255,.06); border-left-color: rgba(255,255,255,.3); }
.section-dark .testimonial-card::before { color: rgba(255,255,255,.15); }
.testimonial-card footer, .testimonial-card cite, .testimonial-card .attribution,
blockquote footer, blockquote cite { background: none !important; display: block; font-style: normal; font-size: .9rem; margin-top: .75rem; }
.section-light .testimonial-card footer, .section-light .testimonial-card cite,
.section-light blockquote footer, .section-light blockquote cite { color: var(--text-muted) !important; }
.section-dark .testimonial-card footer, .section-dark .testimonial-card cite,
.section-dark blockquote footer, .section-dark blockquote cite { color: rgba(255,255,255,.65) !important; }

/* Star ratings */
.stars { color: #fbbf24; font-size: 1rem; letter-spacing: .1em; }
.section-dark .stars { color: #fbbf24; }

/* Pricing table highlights */
.pricing-card.featured, .pricing-card.popular { border: 2px solid var(--bs-primary); transform: scale(1.03); }
.pricing-card .price { font-size: 2.5rem; font-weight: 700; line-height: 1.1; }
.pricing-card .price small { font-size: .9rem; font-weight: 400; opacity: .7; }

/* Number counter / stat styling */
.stat-number { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1; }
.section-dark .stat-number { color: #fff; }
.section-light .stat-number { color: var(--bs-primary); }

/* Timeline / process step styling */
.step-number { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.section-light .step-number { background: color-mix(in srgb, var(--bs-primary) 12%, white); color: var(--bs-primary); }
.section-dark .step-number { background: rgba(255,255,255,.12); color: #fff; }

/* ---- Utility classes (opt-in building blocks) ---- */

/* Overlay positioning for image sections */
.overlay { position: absolute; inset: 0; z-index: 1; }
.overlay + .container, .overlay ~ .container, .overlay + .container-fluid, .overlay ~ .container-fluid { position: relative; z-index: 2; }

/* Gradient overlays — AI picks direction, these are ready-to-use */
.gradient-dark { background: linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.3) 100%); }
.gradient-left { background: linear-gradient(90deg, rgba(0,0,0,.7) 0%, transparent 70%); }
.gradient-bottom { background: linear-gradient(0deg, rgba(0,0,0,.7) 0%, transparent 60%); }
.gradient-radial { background: radial-gradient(ellipse at center, rgba(0,0,0,.1) 0%, rgba(0,0,0,.5) 100%); }

/* Text truncation */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Object fit utilities */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* Aspect ratio helpers */
.aspect-square { aspect-ratio: 1; }
.aspect-video { aspect-ratio: 16/9; }
.aspect-portrait { aspect-ratio: 3/4; }

/* Glassmorphism utility */
.glass { background: rgba(255,255,255,.08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.12); }
.glass-light { background: rgba(255,255,255,.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.5); }

/* Hover effects (opt-in) */
.hover-lift { transition: transform .3s ease, box-shadow .3s ease; }
.hover-lift:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.hover-scale { transition: transform .3s ease; }
.hover-scale:hover { transform: scale(1.03); }

/* Gradient text */
.text-gradient { background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Full-width break out of container — overflow-x safe */
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); overflow-x: hidden; }

/* Sticky sidebar helper */
.sticky-aside { position: sticky; top: calc(76px + 2rem); }

/* Spacing between stacked sections */
.section-gap { margin-top: var(--section-pad-y); }

/* Numbered list (ordered) with styled counters */
.numbered-list { list-style: none; padding-left: 0; counter-reset: numbered; }
.numbered-list li { padding-left: 2.5rem; position: relative; margin-bottom: 1rem; counter-increment: numbered; }
.numbered-list li::before { content: counter(numbered); position: absolute; left: 0; top: 0; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: color-mix(in srgb, var(--bs-primary) 12%, white); color: var(--bs-primary); font-weight: 700; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.section-dark .numbered-list li::before { background: rgba(255,255,255,.12); color: #fff; }

/* ---- Animation keyframes (opt-in building blocks) ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.animate-fade-in-up { animation: fadeInUp .6s ease both; }
.animate-fade-in { animation: fadeIn .5s ease both; }
.animate-slide-left { animation: slideInLeft .6s ease both; }
.animate-slide-right { animation: slideInRight .6s ease both; }

/* Skeleton loading placeholder */
.skeleton { background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%); background-size: 200% 100%; animation: shimmer 1.5s ease infinite; border-radius: .5rem; color: transparent !important; }
.section-dark .skeleton { background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.06) 75%); background-size: 200% 100%; }

/* Loading spinner */
.spinner { width: 2rem; height: 2rem; border: 3px solid rgba(0,0,0,.1); border-top-color: var(--bs-primary); border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; }
.section-dark .spinner { border-color: rgba(255,255,255,.15); border-top-color: #fff; }

/* Windows High Contrast / forced-colors mode */
@media (forced-colors: active) {
    .btn { border: 1px solid ButtonText; }
    .card { border: 1px solid CanvasText; }
    .form-control, .form-select { border: 1px solid ButtonText; }
    :focus-visible { outline: 2px solid Highlight; }
    .section-dark, .hero-section, .page-banner, footer { border: 1px solid CanvasText; }
}

/* Touch device minimum target sizes (WCAG 2.5.8) */
@media (pointer: coarse) {
    .btn, .nav-link, .dropdown-item, .page-link { min-height: 44px; display: inline-flex; align-items: center; }
    .form-control, .form-select { min-height: 44px; }
}

/* ── MOBILE RESPONSIVENESS ── */

/* Typography scaling — prevent oversized headings on small screens */
@media (max-width: 575.98px) {
    h1, .h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
    h2, .h2 { font-size: clamp(1.4rem, 5vw, 2rem); }
    h3, .h3 { font-size: clamp(1.2rem, 4vw, 1.75rem); }
    .lead { font-size: 1rem; }
    .stat-number { font-size: clamp(1.75rem, 8vw, 2.5rem); }
    .pricing-card .price { font-size: 2rem; }
}

/* Section padding — reduce vertical space on mobile */
@media (max-width: 767.98px) {
    .section-pad { padding-top: 3rem; padding-bottom: 3rem; }
    .cta-section { padding: 2.5rem 0; }
    .hero-section { padding: 76px 0 1.5rem; min-height: 60vh; }
    .page-banner { padding: calc(76px + 1.5rem) 0 1.5rem !important; max-height: 280px !important; }
}

/* Cards & grids — stack cleanly on mobile */
@media (max-width: 575.98px) {
    .card:not(:has(.card-body)) { padding: 1.25rem; }
    .card .card-body { padding: 1.25rem; }
    .testimonial-card { padding: 1.5rem; }
    .testimonial-card::before { font-size: 3rem; }
}

/* Buttons — full width on mobile when stacked */
@media (max-width: 575.98px) {
    .hero-section .btn, .cta-section .btn, .page-banner .btn { width: 100%; }
    .hero-section .d-flex.gap-3, .cta-section .d-flex.gap-3 { flex-direction: column; width: 100%; }
    .hero-section .d-flex.gap-3 .btn, .cta-section .d-flex.gap-3 .btn { width: 100%; justify-content: center; }
}

/* Two-column text+image sections — ensure proper stacking order */
@media (max-width: 991.98px) {
    .row > [class*="col-lg-"] > .media-frame,
    .row > [class*="col-lg-"] > .ratio,
    .row > [class*="col-lg-"] > img { margin-bottom: 1.5rem; }
}

/* Forms — full width on mobile, proper spacing */
@media (max-width: 575.98px) {
    .form-control, .form-select { font-size: 16px; }
}

/* Tables — force responsive scroll on mobile */
@media (max-width: 767.98px) {
    table:not(.table-responsive *) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Poster/media frames — reduce max height on mobile */
@media (max-width: 575.98px) {
    .poster-frame { max-height: 300px; }
    .poster-frame img { max-height: 300px; }
}

/* Gallery — smaller on mobile */
@media (max-width: 575.98px) {
    .gallery-grid img, .portfolio-grid img { height: 180px !important; }
}

/* Badge/pill groups — allow wrapping with smaller gap on mobile */
@media (max-width: 575.98px) {
    .d-flex.flex-wrap.gap-2 { gap: .4rem !important; }
    .badge { font-size: .75rem; padding: .35em .6em; }
}

/* Footer — stack columns and center on small screens */
@media (max-width: 575.98px) {
    footer .row > [class*="col"] { text-align: center; margin-bottom: 2rem; }
    footer .row > [class*="col"]:last-child { margin-bottom: 0; }
}

/* Sticky aside — unstick on mobile (would cover content) */
@media (max-width: 991.98px) {
    .sticky-aside { position: static; }
}

/* Icon card — ensure text doesn't cramp on very small screens */
@media (max-width: 575.98px) {
    .icon-card { gap: .75rem; }
}

/* Prevent horizontal overflow from any rogue element */
section { overflow-x: clip; }

/* Print stylesheet */
@media print {
    .navbar, footer, .back-to-top, .skip-link { display: none !important; }
    body { color: #000 !important; background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .section-dark { background: #f5f5f5 !important; color: #000 !important; }
    .section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4, .section-dark h5, .section-dark h6,
    .section-dark p, .section-dark li, .section-dark span, .section-dark label { color: #000 !important; }
    .hero-section, .page-banner { background: #f5f5f5 !important; padding: 2rem 0 !important; margin-top: 0 !important; }
    .hero-section h1, .hero-section p, .page-banner h1, .page-banner p { color: #000 !important; }
    .shadow, .shadow-sm, .shadow-soft, .shadow-lg { box-shadow: none !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
    a[href]::after { content: " (" attr(href) ")"; font-size: .8em; color: #666; }
    a.btn::after, .navbar a::after { content: none !important; }
    img { max-width: 100% !important; }
    .page-content { padding-top: 0 !important; }
}

/* ===== THEME CUSTOMIZATIONS BELOW ===== */

/* Theme: Light-Dominant | Primary: #d46325 */

:root {
    --bs-primary: #d46325;
    --brand-accent: #d46325;
    --brand-secondary: #f4524d;
    --ink-950: #0f172a;
    --text-dark: #1e293b;
    --text-light: #f8fafc;
    --text-light-muted: rgba(248,250,252,0.7);
    --section-light-bg: #ffffff;
    --section-alt-bg: #f8f9fb;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

/* Typography */
body {
    font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

/* Links */
a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #b8541e;
}

/* Buttons */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #b8541e;
    border-color: #b8541e;
    filter: brightness(0.9);
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
    font-weight: 600;
    border-radius: var(--radius);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.15);
}

.card-body {
    padding: 1.5rem;
}

/* Service Cards */
.service-card {
    height: 100%;
}

.service-card .card-body {
    padding: 2rem;
}

/* Icon Box Styling */

/* Section Labels */
.section-label {
    color: var(--bs-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
}

/* Hero Section Customization */
.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Page Banner */
.page-banner h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

/* Stats */
.stat-number {
    color: var(--bs-primary);
}

/* Check List */
.check-list li::before {
    color: var(--bs-primary);
}

/* Testimonial Cards */
.testimonial-card {
    border-left: 4px solid var(--bs-primary);
}

/* Form Styling */
.form-control,
.form-select {
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(212, 99, 37, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Blog Cards */
.blog-card .card-img-top {
    border-radius: var(--radius) var(--radius) 0 0;
}

.blog-card .card-body {
    padding: 1.5rem;
}

.blog-date {
    color: var(--bs-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Route Tags */
.route-tag {
    display: inline-block;
    background: rgba(212, 99, 37, 0.1);
    color: var(--bs-primary);
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--ink-950) 0%, #1e3a5f 100%);
}

/* Footer Logo */
.footer-logo {
    max-height: 45px;
    width: auto;
}

/* Navbar Brand */
.navbar-brand img {
    height: 45px;
    width: auto;
}


/* Quote Form */
.quote-form .form-control,
.quote-form .form-select {
    background: #fff;
}

/* Service Area Cards */
.area-card {
    text-align: center;
    padding: 2rem;
}

.area-card h5 {
    color: var(--bs-primary);
}

/* Process Steps */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 2rem;
    right: -50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--bs-primary), transparent);
}

@media (max-width: 768px) {
    .process-step::after {
        display: none;
    }
}

/* Blog Article */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Breadcrumb */
.breadcrumb-item a {
    color: rgba(255,255,255,0.8);
}

.breadcrumb-item a:hover {
    color: #fff;
}

.breadcrumb-item.active {
    color: #fff;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .navbar-brand img {
        height: 40px;
    }
}

@media (max-width: 767px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

/* Animation for cards on scroll */
[data-aos] {
    transition-property: transform, opacity;
}

/* Custom utility classes */
.text-brand {
    color: var(--bs-primary) !important;
}

.bg-brand {
    background-color: var(--bs-primary) !important;
}

.border-brand {
    border-color: var(--bs-primary) !important;
}