/* Hero Video */
.hero-video {
    position: relative;
    height: 95vh;
    min-height: 480px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background: #0b1220;
    overflow: hidden;
}

.hero-video__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-video__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.hero-video__content .btn {
    pointer-events: auto;
}

.hero-video__stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    text-align: center;
    color: #ffffff;
    padding: 0 1.5rem;
    transform: translateY(60px);
    opacity: 0;
    transition: opacity 1.2s ease, transform 1.6s ease;
}

.hero-video__stack.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-video__title {
    margin: 0;
    font-size: clamp(2.4rem, 4vw + 0.8rem, 3.8rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

.hero-video__subtitle {
    margin: 0;
    font-size: clamp(2rem, 3.5vw + 0.6rem, 3rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

.hero-video__cta {
    margin-top: 0.25rem;
    padding: 14px 44px;
    font-size: 1.05rem;
    border-width: 2px;
    border-color: #ffffff;
    color: #ffffff;
    background: rgba(11, 18, 32, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    border-radius: 999px;
    transition: var(--transition);
}

.hero-video__cta:hover {
    background: rgba(11, 18, 32, 0.6);
    color: #ffffff;
    transform: translateY(-3px);
}

.hero-video__scroll {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f7f9fc;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Short viewports: tighten hero and scroll button so it stays visible */
@media (max-height: 750px) {
    .hero-video {
        height: 90vh;
        min-height: 440px;
    }

    .hero-video__scroll {
        bottom: 18px;
        width: 54px;
        height: 54px;
    }
}

.hero-video__scroll:hover {
    transform: translate(-50%, -6px);
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.hero-video__scroll-icon {
    width: 12px;
    height: 12px;
    border-right: 3px solid #0b1220;
    border-bottom: 3px solid #0b1220;
    transform: rotate(45deg);
    display: block;
}

/* Hide scroll down button when not visible */
.hero-video__scroll:not(.is-visible) {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

/* Back-to-top arrow (appears after leaving the hero) */
.hero-video__back-to-top {
    position: fixed;
    bottom: 40px;
    right: 22px;
    /* Adjust this to move the button left/right */
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #f7f9fc;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateX(120%);
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    z-index: 20;
}

.hero-video__back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-video__back-to-top:hover {
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    transform: translateX(0) translateY(-2px);
}

.hero-video__back-to-top-icon {
    width: 14px;
    height: 14px;
    border-right: 3px solid #0b1220;
    border-bottom: 3px solid #0b1220;
    transform: rotate(-135deg);
    /* Points the chevron up */
    display: block;
}

@media (max-width: 768px) {
    .hero-video__back-to-top {
        bottom: 28px;
        right: 16px;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .hero-video {
        height: 95vh;
        min-height: 320px;
    }

    .hero-video__stack {
        gap: 0.9rem;
        padding-bottom: 100px;
        /* Make room for scroll button below text */
    }

    .hero-video__title {
        font-size: clamp(1.8rem, 6vw + 0.4rem, 2.6rem);
    }

    .hero-video__subtitle {
        font-size: clamp(1.5rem, 5vw + 0.3rem, 2.2rem);
    }

    .hero-video__cta {
        padding: 12px 36px;
        font-size: 1rem;
    }

    .hero-video__scroll {
        width: 50px;
        height: 50px;
        bottom: auto;
        top: 65%;
    }
}



/* Quick Links Section */
.quick-links {
    background: rgba(255, 255, 255, 0.95);
    padding: 0;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    height: 20vh;
    display: flex;
    align-items: center;
}

.quick-link {
    text-align: center;
    padding: 0 5px;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.quick-link:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.quick-link i {
    font-size: 1.8rem;
    color: var(--light-blue) !important;
    margin-bottom: 5px;
}

.quick-link h4 {
    color: var(--light-blue) !important;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-link p {
    margin-bottom: 0;
    font-size: 0.75rem;
    color: var(--light-blue) !important;
}

@media (max-width: 768px) {
    .quick-links {
        display: none;
    }
}

/*End Quick Links Section*/

/* Quality management Page Styles */
.practices-container .row {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.practices-container .col-md-4 {
    flex: 0 1 450px;
    max-width: 450px;
}

.practice-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 40px 35px;
    margin-bottom: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(45, 90, 160, 0.1);
}

.practice-card:hover {
    box-shadow: 0 16px 40px rgba(45, 90, 160, 0.25);
    border-color: rgba(45, 90, 160, 0.3);
}

.practice-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2D5AA0 0%, #4A90E2 100%);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s ease;
}

.practice-card:hover::before {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.practice-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #2D5AA0;
    transition: all 0.4s ease;
    display: block;
}

.practice-card:hover .practice-icon {
    color: #4A90E2;
}

.practice-card h4 {
    color: #2D5AA0;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.practice-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.practice-card ul li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    font-size: 1.05rem;
}

.practice-card ul li:last-child {
    border-bottom: none;
}

.practice-card ul li a {
    color: #2D5AA0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.practice-card ul li a:hover {
    color: #4A90E2;
}

.practice-card ul li a::before {
    content: '→';
    margin-left: 8px;
    transition: transform 0.3s ease;
    order: 2;
}

.practice-card ul li a:hover::before {
    color: #4A90E2;
}

.practices-container {
    opacity: 0;
    transform: translateY(20px);
}

.practices-container.fade-in {
    animation: fadeIn 0.8s forwards;
}

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

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

    /* Staggered animation delays for practice cards */
    .timeline-container {
        position: relative;
        padding: 2rem 0;
    }

    .timeline {
        position: relative;
        max-width: 1200px;
        margin: 0 auto;
    }

    .timeline::after {
        content: '';
        position: absolute;
        width: 6px;
        background-color: var(--bs-primary);
        top: 0;
        bottom: 0;
        left: 50%;
        margin-left: -3px;
        border-radius: 5px;
    }

    .timeline-item {
        padding: 10px 40px;
        position: relative;
        width: 50%;
        opacity: 0;
        transform: translateX(-50px);
        transition: all 0.6s ease;
    }

    .timeline-item.visible {
        opacity: 1;
        transform: translateX(0);
    }

    .timeline-item:nth-child(odd) {
        left: 0;
    }

    .timeline-item:nth-child(even) {
        left: 50%;
        transform: translateX(50px);
    }

    .timeline-item:nth-child(even).visible {
        transform: translateX(0);
    }

    .timeline-content {
        padding: 20px 30px;
        background-color: var(--bs-body-bg);
        position: relative;
        border-radius: 10px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    .timeline-content:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        transform: translateY(-5px);
    }

    .timeline-item:nth-child(odd) .timeline-content::after {
        content: '';
        position: absolute;
        top: 24px;
        right: -15px;
        width: 0;
        height: 0;
        border-top: 15px solid transparent;
        border-bottom: 15px solid transparent;
        border-left: 15px solid var(--bs-body-bg);
    }

    .timeline-item:nth-child(even) .timeline-content::after {
        content: '';
        position: absolute;
        top: 24px;
        left: -15px;
        width: 0;
        height: 0;
        border-top: 15px solid transparent;
        border-bottom: 15px solid transparent;
        border-right: 15px solid var(--bs-body-bg);
    }

    .timeline-dot {
        position: absolute;
        width: 25px;
        height: 25px;
        right: -13px;
        background-color: var(--bs-info);
        border: 5px solid var(--bs-primary);
        top: 24px;
        border-radius: 50%;
        z-index: 1;
        transition: all 0.3s ease;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: -13px;
    }

    .timeline-content:hover .timeline-dot {
        transform: scale(1.2);
        background-color: var(--bs-warning);
    }

    .timeline-icon {
        position: absolute;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        text-align: center;
        line-height: 50px;
        font-size: 1.5rem;
        background-color: var(--bs-primary);
        color: white;
        left: -25px;
        top: 0;
        z-index: 1;
        transition: all 0.3s ease;
    }

    .timeline-content:hover .timeline-icon {
        transform: rotate(360deg);
    }

    .timeline-date {
        display: inline-block;
        padding: 5px 15px;
        background-color: var(--bs-primary);
        color: white;
        border-radius: 20px;
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .timeline-title {
        margin: 0;
        color: var(--bs-primary);
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    @media screen and (max-width: 768px) {
        .timeline::after {
            left: 31px;
        }

        .timeline-item {
            width: 100%;
            padding-left: 70px;
            padding-right: 25px;
        }

        .timeline-item:nth-child(odd),
        .timeline-item:nth-child(even) {
            left: 0;
        }

        .timeline-item:nth-child(odd) .timeline-content::after {
            left: -15px;
            border-right: 15px solid var(--bs-body-bg);
            border-left: 0;
        }

        .timeline-item:nth-child(odd) .timeline-dot {
            left: 18px;
            right: auto;
        }

        .timeline-item:nth-child(even) {
            transform: translateX(0);
        }
    }
    /* End Quality management Page Styles */
    .machine-gallery {
        padding: 2.25rem 0;
    }

    .machine-item {
        /* margin-bottom: 24px; */
        position: relative;
        overflow: hidden;
        border-radius: 12px;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.4s ease;
        /* min-height: 380px; */
        height: 100%;
        opacity: 0;
        transform: translateY(20px);
    }

    .machine-item.animate {
        animation: fadeInUp 0.6s forwards;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

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

    .machine-item:hover {
        transform: translateY(-10px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    }

    .machine-image-container {
        position: relative;
        overflow: hidden;
        height: 260px;
    }

    .machine-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        transition: transform 0.6s ease;
    }

    .machine-item:hover .machine-image {
        transform: scale(1.05);
    }

    .machine-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .machine-item:hover .machine-overlay {
        opacity: 1;
    }

    .machine-content {
        padding: 24px;
        background-color: var(--bs-body-bg);
    }

    .machine-title {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 10px;
        color: var(--bs-primary);
        position: relative;
        padding-bottom: 10px;
    }

    .machine-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        /* width: 50px; */
        height: 3px;
        background: var(--bs-primary);
        transition: width 0.3s ease;
    }


    .machine-description {
        font-size: 0.95rem;
        color: var(--bs-body-color);
        margin-bottom: 0.5rem;
    }

    .machine-specs {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid var(--bs-border-color);
        font-size: 0.9rem;
    }

    .machine-specs span {
        display: inline-block;
        margin-right: 15px;
        margin-bottom: 5px;
    }

    .machine-specs i {
        color: var(--bs-primary);
        margin-right: 5px;
    }

    .machine-badge {
        position: absolute;
        top: 15px;
        right: 15px;
        background-color: var(--bs-primary);
        color: white;
        padding: 5px 10px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 500;
        z-index: 1;
        transform: translateY(-20px);
        opacity: 0;
        transition: all 0.4s ease;
    }

    .machine-item:hover .machine-badge {
        transform: translateY(0);
        opacity: 1;
    }
    /* End Machine Gallery Styles */

/* Anchor offset for quality practices section */
.quality-practices-anchor {
    scroll-margin-top: 100px;
}

@media (max-width: 768px) {
    .quality-practices-anchor {
        scroll-margin-top: 120px;
    }
}
