/* ====================================================
   Making of Statue of Unity (SOU) Timeline Styles
   Navy & Saffron Modern Design System
   ==================================================== */

#team.team {
    background: linear-gradient(180deg, #f4f8fc 0%, #ffffff 50%, #f8fbfd 100%) !important;
    position: relative;
    overflow: hidden;
    padding-top: 40px;
    padding-bottom: 60px;
}

/* Ambient decorative backdrop glows */
#team.team::before {
    content: '';
    position: absolute;
    top: 5%;
    right: -120px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(242, 140, 40, 0.09) 0%, rgba(242, 140, 40, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

#team.team::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -120px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(11, 31, 58, 0.06) 0%, rgba(11, 31, 58, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ================================
   1. Top 2 Buttons (Matches Bharat Parv 2026)
   ================================ */
.register-section {
    margin: -25px auto 35px;
    position: relative;
    z-index: 10;
}

.register-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f35c2b !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.3px;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(243, 92, 43, 0.3) !important;
    border: 5px solid #ffffff !important;
    text-decoration: none;
}

.register-btn:hover {
    background: #8e351b !important;
    color: #ffffff !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(142, 53, 27, 0.4) !important;
}

.register-btn:active {
    transform: translateY(-1px);
}

/* ================================
   Timeline Spine & Structure
   ================================ */
.timeline {
    margin-top: 30px;
    position: relative;
    padding-bottom: 25px;
}

/* Glowing vertical timeline spine */
.timeline::before {
    position: absolute;
    content: '';
    width: 4px;
    height: calc(100% - 20px);
    background: linear-gradient(180deg, #f28c28 0%, #ff9800 25%, #0b1f3a 80%, rgba(11, 31, 58, 0.2) 100%);
    left: 14px;
    top: 15px;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(242, 140, 40, 0.45);
}

/* ================================
   Timeline Month / Header Badge
   ================================ */
.timeline-month {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 24px 10px 46px;
    background: linear-gradient(135deg, #0b1f3a 0%, #15325b 100%);
    border-radius: 40px;
    border: 2px solid rgba(242, 140, 40, 0.7);
    margin-bottom: 40px;
    color: #ffffff;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 24px rgba(11, 31, 58, 0.22), 0 0 18px rgba(242, 140, 40, 0.25);
    animation: souPopIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.timeline-month::before {
    position: absolute;
    content: '';
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #ffb347, #e87518);
    border-radius: 50%;
    border: 3.5px solid #ffffff;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 2px #f28c28, 0 0 10px rgba(242, 140, 40, 0.55);
}

.timeline-month span {
    display: inline-block;
    margin-left: 14px;
    background: linear-gradient(135deg, #f28c28, #d95e00);
    color: #ffffff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(242, 140, 40, 0.4);
}

/* ================================
   Timeline Section & Pop-up Animation
   ================================ */
.timeline-section {
    padding-left: 40px;
    display: block;
    position: relative;
    margin-bottom: 45px;
    opacity: 0;
    transform: translateY(40px) scale(0.93);
    transition: opacity 0.65s ease-out, transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: opacity, transform;
}

/* Active state on scroll / load */
.timeline-section.sou-in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Horizontal connector */
.timeline-section::before {
    content: '';
    position: absolute;
    width: 28px;
    height: 3px;
    background: linear-gradient(90deg, #f28c28, #ff9e3b);
    top: 18px;
    left: 16px;
    border-radius: 3px;
}

/* Milestone dot */
.timeline-section::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #f28c28;
    top: 11px;
    left: 8px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #f28c28, 0 3px 10px rgba(242, 140, 40, 0.45);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.timeline-section:hover::after {
    transform: scale(1.3);
    background: #ff7700;
    box-shadow: 0 0 0 4px #ff7700, 0 0 16px rgba(255, 119, 0, 0.6);
}

/* ================================
   Timeline Date Badge
   ================================ */
.timeline-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 22px;
    background: linear-gradient(135deg, #f28c28 0%, #e06700 100%);
    border-radius: 30px;
    color: #ffffff;
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 18px rgba(242, 101, 10, 0.32);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    opacity: 0;
    transform: scale(0.75) translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-section.sou-in-view .timeline-date {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition-delay: 0.08s;
}

/* ================================
   Timeline Box (Base)
   ================================ */
.timeline-section .col-sm-6 {
    margin-bottom: 22px;
}

.timeline-box {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 8px 24px -3px rgba(11, 31, 58, 0.08), 0 2px 6px -1px rgba(11, 31, 58, 0.04);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s ease;
}

/* Left text card pop-up */
.timeline-section .col-sm-6:first-child .timeline-box {
    opacity: 0;
    transform: scale(0.86) translateY(35px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

.timeline-section.sou-in-view .col-sm-6:first-child .timeline-box {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition-delay: 0.18s;
}

/* Right image carousel card pop-up */
.timeline-section .col-sm-6:last-child .timeline-box {
    opacity: 0;
    transform: scale(0.86) translateY(35px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

.timeline-section.sou-in-view .col-sm-6:last-child .timeline-box {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition-delay: 0.32s;
}

/* Card hover lift */
.timeline-box:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(242, 140, 40, 0.5);
    box-shadow: 0 20px 42px -8px rgba(242, 140, 40, 0.2), 0 8px 20px -4px rgba(11, 31, 58, 0.12) !important;
}

/* ========================================================
   3. Equal Height & Width Architecture for Image & Content Tabs
   Smooth up-down scrolling if text content exceeds limit
   ======================================================== */
@media (min-width: 768px) {
    /* Both cards have exact same matching height */
    .timeline-section .timeline-box {
        height: 480px;
    }
}

/* --- Left Column: Content Tab --- */
.timeline-section .col-sm-6:first-child .timeline-box {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.box-title {
    padding: 13px 20px;
    background: linear-gradient(135deg, #0b1f3a 0%, #15345d 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 3px solid #f28c28;
    display: flex;
    align-items: center;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}

.box-title i {
    margin-right: 10px;
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.timeline-section .col-sm-6:first-child .box-content {
    flex: 1 1 auto;
    min-height: 0; /* Required for flex container overflow scrolling */
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 24px 24px;
    background: #ffffff;
    color: #334155;
    font-size: 15.5px;
    line-height: 1.85;
    display: block;
}

.timeline-section .col-sm-6:first-child .box-content p {
    margin-bottom: 14px;
    text-align: justify;
    color: #374151;
}

.timeline-section .col-sm-6:first-child .box-content p:last-child {
    margin-bottom: 0;
}

/* Smooth sleek custom scrollbar for content tab */
.timeline-section .col-sm-6:first-child .box-content::-webkit-scrollbar {
    width: 6px;
}

.timeline-section .col-sm-6:first-child .box-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
    margin: 6px 0;
}

.timeline-section .col-sm-6:first-child .box-content::-webkit-scrollbar-thumb {
    background: #f35c2b;
    border-radius: 6px;
}

.timeline-section .col-sm-6:first-child .box-content::-webkit-scrollbar-thumb:hover {
    background: #8e351b;
}

.timeline-section .col-sm-6:first-child .box-content {
    scrollbar-width: thin;
    scrollbar-color: #f35c2b #f1f5f9;
}

/* --- Right Column: Image Carousel Tab --- */
.timeline-section .col-sm-6:last-child .timeline-box {
    overflow: hidden;
    padding: 0;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.timeline-section .col-sm-6:last-child .box-content {
    padding: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    width: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: block !important;
    flex: 1 1 auto;
}

.timeline-section .col-sm-6:last-child .carousel,
.timeline-section .col-sm-6:last-child .carousel-inner,
.timeline-section .col-sm-6:last-child .carousel-item {
    height: 100% !important;
    width: 100% !important;
    overflow: hidden;
}

.timeline-section .col-sm-6:last-child .carousel-item img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 16px !important;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-section .col-sm-6:last-child .carousel:hover .carousel-item img {
    transform: scale(1.03);
}

/* Carousel Prev/Next Buttons */
.timeline-section .col-sm-6:last-child .carousel-control-prev,
.timeline-section .col-sm-6:last-child .carousel-control-next {
    width: 44px;
    height: 44px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 31, 58, 0.65);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    margin: 0 12px;
    opacity: 0.85;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-section .col-sm-6:last-child .carousel-control-prev:hover,
.timeline-section .col-sm-6:last-child .carousel-control-next:hover {
    background: #f35c2b;
    opacity: 1;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 4px 14px rgba(243, 92, 43, 0.45);
}

/* ================================
   Keyframe Animations
   ================================ */
@keyframes souPopIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(25px);
    }
    65% {
        opacity: 1;
        transform: scale(1.03) translateY(-3px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ================================
   Responsive Adjustments (Mobile)
   ================================ */
@media (max-width: 767px) {
    .timeline {
        margin-top: 20px;
    }

    .timeline::before {
        left: 12px;
    }

    .timeline-month {
        padding-left: 36px;
        padding-right: 18px;
        font-size: 14.5px;
        margin-bottom: 25px;
    }

    .timeline-month::before {
        width: 18px;
        height: 18px;
        left: 6px;
    }

    .timeline-section {
        padding-left: 30px;
        margin-bottom: 30px;
    }

    .timeline-section::before {
        width: 22px;
        left: 15px;
        top: 15px;
    }

    .timeline-section::after {
        left: 6px;
        top: 8px;
        width: 14px;
        height: 14px;
    }

    .timeline-date {
        font-size: 13.5px;
        padding: 6px 16px;
        margin-bottom: 15px;
    }

    .box-title {
        padding: 11px 15px;
        font-size: 14.5px;
    }

    .timeline-section .timeline-box {
        height: auto !important;
    }

    .timeline-section .col-sm-6:first-child .box-content {
        padding: 16px 14px;
        font-size: 14.5px;
        max-height: 320px;
    }

    .timeline-section .col-sm-6:last-child .timeline-box {
        height: 280px !important;
    }

    .timeline-section .col-sm-6:last-child .carousel-item img {
        height: 280px !important;
    }

    .timeline-section .col-sm-6 {
        margin-bottom: 20px;
    }
}
