/* Start of carousel */
.hero-carousel {
    height: 80vh;
    overflow: hidden;
    position: relative;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-position: center 25%;
    object-fit: cover;
    display: block;
}

.carousel-item:nth-child(3) .hero-image {
    object-position: center 100%;
}

.carousel-inner,
.carousel-item {
    height: 100%;
}

.carousel-item {
    background-size: cover;
    background-position: center;
}

.carousel-caption {
    bottom: 30%;
    background: transparent;
    border-radius: 15px;
    padding: 30px;
    padding-left: 50px;
    max-width: 700px;
    margin: 0;
    left: 15%;
    right: auto;
    backdrop-filter: none;
    animation: fadeInUp 1s ease;
    border-left: 5px solid #ffffff;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block;
}

/* Text gradient (copied from tool_equipment.css to match header look) */
.text-gradient {
    background: linear-gradient(135deg, #2D5AA0, #4A90E2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Badge */
.section-badge {
    display: inline-block;
}

.badge-text {
    background: linear-gradient(135deg, #2D5AA0, #4A90E2);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.badge-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2D5AA0, #4A90E2);
    margin: 1rem auto 2rem;
    border-radius: 2px;
    position: relative;
}

.title-underline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Carousel Caption Responsive Adjustments */
@media (max-width: 1536px) {
    .hero-title {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 1366px) {
    .carousel-caption {
        bottom: 25%;
        left: 12%;
        max-width: 650px;
        padding: 25px;
        padding-left: 40px;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    .hero-subtitle {
        font-size: 1.15rem;
        margin-bottom: 25px;
    }
}

@media (max-width: 992px) {
    .carousel-caption {
        bottom: 20%;
        left: 10%;
        max-width: 80%;
        padding: 20px;
        padding-left: 30px;
        border-left-width: 4px;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .carousel-caption {
        top: 50%;
        bottom: auto;
        left: 5%;
        right: 5%;
        transform: translateY(-50%);
        max-width: 90%;
        padding: 15px;
        padding-left: 20px;
        border-left-width: 3px;
        animation: none;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .btn-outline-custom {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .carousel-caption {
        top: 50%;
        bottom: auto;
        left: 3%;
        right: 3%;
        transform: translateY(-50%);
        max-width: 94%;
        padding: 12px;
        padding-left: 15px;
        border-left-width: 2px;
        animation: none;
    }

    .hero-title {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .btn-outline-custom {
        padding: 6px 16px;
        font-size: 0.85rem;
    }
}

.btn-outline-custom {
    background: var(--dark-gray);
    border: 2px solid var(--dark-gray);
    color: var(--bg-white);
    padding: 10px 30px;
    font-weight: 700;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-outline-custom:hover {
    background: var(--dark-gray);
    color: var(--bg-white);
    transform: translateY(-3px);
}

/* Carousel arrows */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.5);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 70%;
}
/*End of carousel*/
/* Quality management Page Styles */
.practice-card {
    background-color: var(--bs-body-bg);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

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

.practice-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 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: 2.5rem;
    margin-bottom: 15px;
    color: var(--bs-primary);
    transition: transform 0.3s ease;
}

.practice-card:hover .practice-icon {
    transform: rotate(360deg);
}

.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: 3rem 0;
    }

    .machine-item {
        margin-bottom: 30px;
        position: relative;
        overflow: hidden;
        border-radius: 10px;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.4s ease;
        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: 220px;
    }

    .machine-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        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: 20px;
        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-item:hover .machine-title::after {
        width: 80px;
    }

    .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 */
