/* =========================================
   Certification Page Styles
   ========================================= */

/* 1. Behind-the-Scenes Video Hero */
.video-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
}

.video-hero .video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.mobile-img {
    display: none;
}

@media (max-width: 992px) {
    .desktop-img {
        display: none;
    }
    .mobile-img {
        display: block !important;
    }
}

.video-hero .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Neutral dark overlay */
    z-index: 2;
}

.video-hero .video-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 2rem;
    padding-top: 100px;
    animation: fadeIn 1s ease-out;
}

.video-hero .video-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #ffffff !important;
    /* Force white color */
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.video-hero .video-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 400;
    color: #ffffff !important;
    /* Force white color */
    opacity: 0.9;
}


/* 2. Visual Certificate Gallery */
.cert-gallery-section {
    padding: 4rem 0 1rem;
    background: #fcf8ed;
    /* Same as footer background */
}

.cert-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cert-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.cert-card img {
    width: 100%;
    height: 350px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    transition: transform 0.4s ease;
    border-radius: 8px;
    /* Slight rounding for smoother look */
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    /* Add subtle shadow to the certificate itself */
}

.cert-card:hover img {
    transform: scale(1.05);
}

.cert-card h4 {
    color: var(--heritage-green);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.cert-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}


/* 3. Sticky Scroll Storytelling Section */
.sticky-process-section {
    padding: 5rem 0;
    background: #fcf8ed;
    /* Matching the previous background */
}

.sticky-process-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
    position: relative;
    padding-bottom: 2rem;
    margin-top: 4rem;
}

.sticky-visuals {
    position: sticky;
    top: 30vh;
    /* Perfectly vertically centers a 60vh element (100-60)/2 */
    width: 50%;
    height: 60vh;
    min-height: 400px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.visual-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.process-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(1.05);
}

.process-img.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.scrolling-content {
    width: 50%;
    padding-top: 20vh;
    /* Aligns the first card with the top of the sticky image */
    padding-bottom: 40vh;
    /* Allows the last card to scroll fully to the center before the section ends */
    display: flex;
    flex-direction: column;
    gap: 40vh;
    /* Increased gap so only one card is prominent in the center at a time */
}

.process-step-card {
    background: #fff;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    opacity: 0.3;
    transform: translateY(40px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.process-step-card.active-step {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.step-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(181, 131, 35, 0.3);
}

.step-text h3 {
    color: grey;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.step-text h4 {
    color: var(--secondary-color);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step-text p {
    color: var(--text-light);
    /* Or #555 if undefined */
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 0;
}

@media (max-width: 992px) {
    .sticky-process-wrapper {
        flex-direction: column;
        gap: 2rem;
        padding-bottom: 0;
    }

    .sticky-visuals {
        position: relative;
        top: 0;
        width: 100%;
        height: 40vh;
        border-radius: 16px;
    }

    .scrolling-content {
        width: 100%;
        padding: 0;
        gap: 1.5rem;
    }

    .process-step-card {
        padding: 2rem;
        opacity: 1;
        transform: none;
        border-color: rgba(0, 0, 0, 0.05);
    }

    .process-step-card.active-step {
        border-color: var(--secondary-color);
    }
}


/* 4. Trust Metrics with Animated Counters */
.trust-metrics-section {
    padding: 2rem 0 5rem;
    background: #fcf8ed;
    /* Same as footer background */
    color: var(--heritage-green);
    /* Changed to dark for contrast on light bg */
    text-align: center;
}

.metrics-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.metric-item {
    flex: 1;
    min-width: 200px;
}

.metric-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    /* Dark green */
    margin-bottom: 0.5rem;
    font-family: 'Outfit', 'DM Sans', sans-serif;
    display: inline-block;
}

.metric-suffix {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    /* Dark green */
}

.metric-label {
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Override light green headings to dark green */
.cert-gallery-section .section-title h2.main-title,
.quality-reveal-section .section-title h2.main-title,
.sticky-process-section .section-title h2.main-title,
.trust-metrics-section h2 {
    color: var(--secondary-color);
}