/* Modern Professional Timeline - The Journey of Excellence */

:root {
    --timeline-primary: #003c34;
    --timeline-secondary: #f6630c;
    --timeline-accent: #00cca6;
    --timeline-text: #2d3436;
    --timeline-bg: #ffffff;
    --card-shadow: none;
    --card-shadow-hover: none;
}

.modern-timeline-section {
    background: linear-gradient(to bottom, 
        #ffffff 0%, 
        #f0f8f6 150px, 
        #f0f8f6 calc(100% - 150px), 
        #ffffff 100%
    );
    overflow: hidden;
    padding-top: 0;
    margin-bottom: 0 !important;
    padding-bottom: 130px !important;
    scroll-margin-top: 100px; /* Accounts for sticky header */
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
    padding-top: 80px; /* Added padding to give top elements more room */
}

.section-header .sub-title {
    display: inline-block;
    color: var(--timeline-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.section-header h2 {
    margin-top: 0;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--timeline-primary);
    font-weight: 700;
    margin-bottom: 20px;
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
    color: #003c34;
    font-size: 1.1rem;
    line-height: 1.6;
}

.timeline-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px;
}

/* The Central Vertical Line Base - REMOVED GHOST LINE */
.timeline-container::after {
    display: none;
}

.timeline-progress-bar {
    position: absolute;
    width: 2px;
    background: var(--timeline-secondary);
    top: 0;
    left: 50%;
    margin-left: -1px;
    z-index: 2;
    height: 0; /* Updated by JS */
    transition: height 0.1s ease-out;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 15px 60px;
    box-sizing: border-box;
    z-index: 1;
}

/* Alternating Sides */
.timeline-item:nth-child(even) {
    left: 50%;
}

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

/* The Dots on the Line */
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 2px solid #ebebeb;
    border-radius: 50%;
    top: 30px;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-dot.active {
    background-color: var(--timeline-secondary);
    border: 2px solid var(--timeline-secondary); /* Ensure border is also orange */
    box-shadow: none;
    
}

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

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

/* The Date/Year */
.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background: var(--timeline-primary);
    color: white;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    letter-spacing: .5px;
}

[dir="rtl"] .timeline-date {
    direction: rtl;
}

/* The Card */
.timeline-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s ease;
    border: 1.5px solid #ebebeb;
    text-align: start;
}

.timeline-item:hover .timeline-card {
    border: 1.5px solid #e3e3e3;
    box-shadow: 0px 0px 10px 0px #00000021;
}

.timeline-item:hover .timeline-dot.active {
    transform: scale(1.1);
}

.timeline-image {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: relative;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.timeline-item:hover .timeline-image img {
    transform: scale(1.1);
}

.timeline-body {
    padding: 20px;
}

[dir="rtl"] .timeline-body {
    direction: rtl;
    text-align: right;
}

.timeline-tag {
    color: var(--timeline-accent);
    font-size: 0.8rem;
    font-weight: 700;
   
    letter-spacing: 1px;
    
    display: block;
}

.timeline-body h3 {
    color: var(--timeline-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.timeline-body p {
    color: #003c34;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-weight: 400;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .timeline-container::after,
    .timeline-progress-bar {
        display: none;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding: 30px 15px;
        text-align: center !important;
    }

    .timeline-dot {
        display: none;
    }

    .timeline-card {
        max-width: 100%;
        margin: 0 auto;
        text-align: start;
    }

    .timeline-date {
        margin: 0 auto 15px auto;
    }

    /* Prevent horizontal overflow from side reveals */
    .reveal-left, .reveal-right {
        transform: translateY(30px) !important;
        opacity: 0;
    }
    
    .reveal-left.active, .reveal-right.active {
        transform: translateY(0) !important;
        opacity: 1;
    }
}

@media (max-width: 576px) {
  

    .timeline-item {
        padding: 20px 10px;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .timeline-body h3 {
        font-size: 1.2rem;
    }
}

/* Modern Mission & Vision Section */
.modern-mv-section {
    position: relative;
    
}

.modern-mv-card {
    position: relative;
    border-radius: 8px;
    padding: 3.5rem 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-sizing: border-box;
    overflow: hidden;
    border: none;
    color: white;
}

.modern-mv-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 0;
}

.modern-mv-card::after {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 60, 52, 0.45) 0%, rgba(0, 30, 26, 0.65) 100%);
    z-index: 1;
    transition: opacity 0.4s ease;
}

.mv-card-vision::before {
    background-image: url('../images/hero/vision.webp');
}

.mv-card-mission::before {
    background-image: url('../images/hero/rigs.webp');
}

.modern-mv-card:hover::before {
    transform: scale(1.1);
}

.modern-mv-card:hover::after {
    opacity: 0.9;
}

.mv-content-box {
    position: relative;
    z-index: 2;
}

.mv-title {
    font-size: 2.2rem;
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mv-title span {
    color: var(--timeline-secondary);
}

.mv-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
}

@media (max-width: 991px) {
    .modern-mv-card {
        padding: 2rem;
    }
    
    .mv-title {
        font-size: 1.5rem;
    }
}
