html,
body {
    overflow-x: hidden;
}

.section,
.container,
#focus.section-dark,
#focus .container {
    max-width: 100%;
    box-sizing: border-box;
}

.cards,
.kpis {
    max-width: 100%;
    box-sizing: border-box;
}

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    background: transparent;
    border-bottom: none;
}

header.bg-white,
.navbar.bg-white {
    background: #fff !important;
}

header.bg-white .navbar,
.navbar.bg-white,
.navbar.bg-white .nav-links,
.navbar.bg-white .nav-links a {
    color: #222 !important;
}

header.bg-white .nav-links a,
.navbar.bg-white .nav-links a {
    color: #222 !important;
}

header.bg-white .nav-links a:hover,
.navbar.bg-white .nav-links a:hover {
    color: var(--color-primary) !important;
}

.navbar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding-left: 1.5rem;
    /* Bootstrap px-4 */
    padding-right: 1.5rem;
    padding-top: 1.2rem;
    /* reduced from 3rem */
    padding-bottom: 1.8rem;
    /* reduced from 3rem */
    color: #fff !important;
    font-size: 1.25rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: inherit;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.brand img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-links {
    margin-left: auto;
    display: flex;
    gap: var(--space-4);
    color: #fff !important;
    font-size: 1.25rem;
}

.nav-links a {
    text-decoration: none;
    color: #fff !important;
    font-weight: 600;
    opacity: 0.9;
    font-size: 1.25rem;
}

.nav-links a:hover {
    color: var(--color-accent) !important;
}

.nav-toggle {
    display: none;
    margin-left: auto;
}

@media (max-width: 800px) {
    .nav-toggle {
        display: inline-flex;
        background: transparent;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 14px 18px;
        /* larger touch area */
        font-size: 1.6rem;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        min-height: 48px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        right: 4%;
        width: 92%;
        flex-direction: column;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        box-shadow: var(--shadow-md);
        padding: var(--space-4);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links.open a {
        color: #222 !important;
        font-size: 1.25rem;
        font-weight: 700;
        padding: 12px 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .nav-links.open a:last-child {
        border-bottom: none;
    }

    .navbar {
        padding-left: 1rem;
        /* px-3 */
        padding-right: 1rem;
        padding-top: 0.7rem;
        /* reduced from 2rem */
        padding-bottom: 1.2rem;
        /* reduced from 2rem */
    }
}

.hero {
    display: grid;
    gap: var(--space-6);
    align-items: center;
    padding: var(--space-10) 0;
}

.hero h1 {
    font-size: clamp(2rem, 3vw + 1rem, 3rem);
    line-height: 1.2;
    margin: 0;
}

.hero p.lead {
    font-size: 1.125rem;
    opacity: 0.9;
}

.hero .actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.hero .hero-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-md);
}

/* Full-bleed hero with blurred background image and bottom-left content */
.hero-full {
    position: relative;
    min-height: 100vh;
    display: grid;
    align-content: end;
    color: #fff;
}

/* Hero background image variants */
.hero-full.hero-home {
    --hero-img: url('../images/CSAD Logo Final.jpg');
}

.hero-full.hero-services {
    --hero-img: url('../images/cage clean compettion.png');
}

.hero-full.hero-about {
    --hero-img: url('../images/raised hands fair play.png');
}

.hero-full.hero-contact {
    --hero-img: url('../images/winner_blur.png');
}

.hero-full::before {
    /* Background image layer */
    content: "";
    position: absolute;
    inset: 0;
    background: var(--hero-img, url('../images/placeholder.jpg')) center / cover no-repeat;
    filter: blur(10px);
    transform: scale(1);
}

.hero-full.hero-services::before {
    filter: none !important;
}

.hero-full::after {
    /* Dark filter overlay layer for hero image */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.35));
}

.hero-full>.container {
    position: relative;
    z-index: 1;
    padding-left: 2rem;
    /* Move content more to the left/start */
    padding-right: 1.5rem;
    padding-bottom: 3rem;
    padding-top: 3rem;
    max-width: 1200px;
    /* Constrain width to keep content on left side */
    margin-left: 0;
    /* Ensure container stays at left edge */
    margin-right: auto;
    /* Push any extra space to the right */
}

/* Hero mobile and alignment tweaks */
.hero-full>.container {
    display: grid;
    justify-items: start;
}

.hero-full h1 {
    font-size: clamp(1.8rem, 2.4vw + 1rem, 3rem);
}

.hero-full .actions {
    flex-wrap: wrap;
    gap: var(--space-3);
}

.hero-full .lead {
    max-width: 48ch;
}

@media (max-width: 640px) {
    .hero-full {
        min-height: 100vh;
    }

    .hero-full>.container {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 2rem;
        padding-top: 2rem;
        max-width: 100%;
        /* Full width on mobile */
    }

    .navbar {
        padding-left: 1rem;
        /* px-3 */
        padding-right: 1rem;
        padding-top: 0.7rem;
        /* reduced from 2rem */
        padding-bottom: 1.2rem;
        /* reduced from 2rem */
    }

    .hero-full .lead {
        font-size: 1rem;
    }
}

.hero-full h1 {
    color: #fff;
    font-size: clamp(1.8rem, 2.4vw + 1rem, 3rem);
    font-weight: 900;
    letter-spacing: 0.5px;
    margin: 0 0 var(--space-3) 0;
}

.hero-full .lead {
    color: #f1f5f9;
    max-width: 60ch;
    font-size: 1.35rem;
    line-height: 1.6;
}

.hero-full .badge {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-full .actions {
    margin-top: var(--space-4);
}

/* Dynamic text accent in hero */
.dynamic-text {
    color: var(--color-accent);
    font-weight: 800;
}

/* Scroll cue */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
    font-size: 0.9rem;
}

.scroll-cue .dot {
    display: block;
    width: 10px;
    height: 10px;
    margin: 6px auto 0;
    border-radius: 50%;
    background: #fff;
    opacity: 0.85;
    animation: bounce 1.6s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card h3 {
    margin-top: 0;
    font-size: 1.35rem;
    font-weight: 800;
}

.card p {
    font-size: 1.15rem;
    font-weight: 500;
}

.card .thumb {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
    margin-bottom: var(--space-3);
}

.card .mini {
    padding-left: 1.1rem;
    margin: 0.5rem 0 0.75rem;
    color: var(--color-muted);
    display: grid;
    gap: 4px;
    font-size: 1.05rem;
}

.card .mini li {
    list-style: disc;
}

/* Background image card variant for zig-zag sections */
.card-bg {
    --img: url('../images/placeholder.jpg');
    /* fallback */
    padding: 0;
    min-height: 320px;
    background: var(--img) center / cover no-repeat;
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.card-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0));
    pointer-events: none;
}

@media (max-width: 1000px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

.kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    max-width: 900px;
    margin: 0 auto;
}

.kpi {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    text-align: center;
    border: 1px solid #e5e7eb;
    min-height: 320px;
    width: 80%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Dark section variant */
.section-dark {
    background: #0b0b0b;
    color: #fff;
}

.section-dark .section-title {
    color: #cbd5e1;
}

.section-dark a {
    color: #fff;
}

.section-dark .kpi {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.section-dark .kpi .num {
    color: var(--color-accent);
}

#focus.section-dark {
    min-height: 50vh;
    display: flex;
    align-items: center;
}

#focus .container {
    width: 100%;
}

#focus .kpis {
    align-items: stretch;
    height: 100%;
}

#focus .kpi {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

footer {
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

footer .footer-inner {
    padding: var(--space-6) 0;
    display: grid;
    gap: var(--space-4);
}

footer .small {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.form {
    display: grid;
    gap: var(--space-4);
    max-width: 700px;
}

.input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font: inherit;
}

.input:focus {
    outline: 2px solid color-mix(in oklab, var(--color-primary), white 70%);
    border-color: var(--color-primary);
}

.textarea {
    min-height: 140px;
    resize: vertical;
}

/* Stack helper for text + card in a column */
.stack {
    display: grid;
    gap: var(--space-4);
    align-content: start;
}

/* Deliverables list spacing */
.deliverables {
    padding-left: 1.1rem;
    margin: 0;
    display: grid;
    gap: 8px;
}

.deliverables li {
    list-style: disc;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.8rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--color-primary), white 80%);
    color: var(--color-primary-600);
    font-weight: 700;
}

.section-title {
    margin: 0 0 var(--space-4);
    font-size: 2rem;
    color: var(--color-muted);
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 800;
    text-align: center;
}

.section-lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--color-text);
    max-width: 80ch;
    margin: 0 auto var(--space-6);
    text-align: center;
}

.section-img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-4);
}

/* Optional site-wide background image */
body.bg-image {
    background-image: url('../images/placeholder.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    background: #fff;
    color: var(--color-text);
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--color-surface);
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.btn.btn-primary {
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn.btn-primary:hover {
    background: var(--color-primary-600);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: #fff;
    color: #eab308;
    border: 2px solid #eab308;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
    background: #eab308;
    color: #fff;
    border-color: #eab308;
}

.btn-outline {
    background: #fff;
    color: #222;
    border: 2px solid #222;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    background: #222;
    color: #fff;
    border-color: #222;
}

.btn-blue {
    background: #2563eb;
    color: #fff;
    border: 2px solid #2563eb;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.btn-blue:hover {
    background: #1e40af;
    color: #fff;
    border-color: #1e40af;
}

/* Partners section */
.partners .partner-logos {
    display: grid;
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    gap: var(--space-6);
    align-items: center;
    justify-items: center;
}

.partners .partner-logos img {
    max-height: 48px;
    width: auto;
    height: auto;
    filter: grayscale(100%) opacity(0.9);
    transition: filter .2s ease, transform .2s ease;
}

.partners .partner-logos img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.04);
}

@media (max-width: 900px) {
    .partners .partner-logos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 520px) {
    .partners .partner-logos {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Results Management Section */
.section-results-management {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    padding: 4rem 0;
}

.container-results {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.section-title-alt {
    font-size: 2rem;
    color: #fff;
    font-weight: 800;
    margin: 0 0 1.5rem 0;
    letter-spacing: 0.02em;
    text-align: left;
}

.section-text-large {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e2e8f0;
    margin: 0 0 2rem 0;
    font-weight: 400;
}

.btn-success {
    background: #10b981;
    color: #fff;
    border: 2px solid #10b981;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-success:hover {
    background: #059669;
    color: #fff;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .section-results-management {
        padding: 3rem 0;
    }

    .section-title-alt {
        font-size: 1.5rem;
    }

    .section-text-large {
        font-size: 1rem;
    }
}

/* Importance of Testing Section */
.section-importance {
    background: #fff;
    padding: 5rem 0;
}

.importance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    margin-top: var(--space-6);
}

.importance-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: var(--space-5);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.importance-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background: #fff;
}

.importance-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 var(--space-2) 0;
}

.card-underline {
    width: 60px;
    height: 3px;
    background: #eab308;
    margin: 0 auto var(--space-3);
}

.importance-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-muted);
    margin: 0;
}

@media (max-width: 900px) {
    .importance-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
}

@media (max-width: 600px) {
    .importance-grid {
        grid-template-columns: 1fr;
    }

    .section-importance {
        padding: 3rem 0;
    }
}

/* What We Do Section - Two Column Layout */
.section-what-we-do {
    background: #f9fafb;
}

.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-top: var(--space-6);
}

.wide-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.wide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Accordion Styles */
.accordion-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.accordion-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.accordion-item:hover {
    box-shadow: var(--shadow-lg);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--color-accent);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    text-align: left;
    transition: background 0.2s ease;
}

.accordion-header:hover {
    background: #f9fafb;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}

.accordion-content p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.6;
}

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

    .wide-card {
        max-height: 300px;
    }
}

@media (max-width: 900px) {
    .partners .partner-logos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 520px) {
    .partners .partner-logos {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Parallax background for services page */
body.services-parallax {
    background-image: url('../images/cage clean compettion.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Services page - disable hero background to show parallax */
body.services-parallax .hero-full.hero-services::before {
    display: none;
}

/* Services page - adjust overlay for better readability */
body.services-parallax .hero-full.hero-services::after {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 50%, rgba(234, 179, 8, 0.3) 100%);
}

/* Services page sections - semi-transparent backgrounds */
body.services-parallax .section {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

body.services-parallax .section.bg-white {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Parallax background styles for services page only */
body.services-parallax {
    background-image: url('../images/cage clean compettion.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.services-parallax .section {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

body.services-parallax .hero-full::before {
    filter: none !important;
}

body.services-parallax .hero-full::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
}

/* Dark theme for homepage sections */
body.bg-image {
    background: #0a0a0a;
}

.section.section-dark-theme {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
}

.section.section-dark-theme .section-title {
    color: #fff;
}

.section.section-dark-theme .section-lead {
    color: #cbd5e1;
}

.section.section-dark-theme .card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.3);
    backdrop-filter: blur(10px);
}

.section.section-dark-theme .card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(234, 179, 8, 0.4);
    transform: translateY(-4px);
}

.section.section-dark-theme .card h3 {
    color: #fff;
}

.section.section-dark-theme .card p {
    color: #cbd5e1;
}

/* Dark What We Do Section */
.section-what-we-do.section-dark-theme {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.section-what-we-do.section-dark-theme .wide-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.section-what-we-do.section-dark-theme .accordion-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.section-what-we-do.section-dark-theme .accordion-header {
    background: rgba(234, 179, 8, 0.1);
    color: #fff;
}

.section-what-we-do.section-dark-theme .accordion-header:hover {
    background: rgba(234, 179, 8, 0.2);
}

.section-what-we-do.section-dark-theme .accordion-content {
    color: #cbd5e1;
}

.section-what-we-do.section-dark-theme .accordion-content p {
    color: #cbd5e1;
}

/* Dark Importance Section */
.section-importance.section-dark-theme {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.section-importance.section-dark-theme .importance-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.3);
    backdrop-filter: blur(10px);
}

.section-importance.section-dark-theme .importance-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(234, 179, 8, 0.4);
}

.section-importance.section-dark-theme .importance-card h3 {
    color: #fff;
}

.section-importance.section-dark-theme .importance-card p {
    color: #cbd5e1;
}

/* Dark Partners Section */
.partners.section-dark-theme {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.partners.section-dark-theme .partners-bg {
    display: none;
}

.partners.section-dark-theme .section-title {
    color: #fff;
}

/* Dark CTA Section */
.section-cta.section-dark-theme {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 4rem 0;
}

.section-cta.section-dark-theme h2 {
    color: #eab308;
}

.section-cta.section-dark-theme p {
    color: #cbd5e1;
}