/* Timeline Container */
.timeline-container {
    max-width: 1080px;
    margin: 50px auto;
    padding: 0 20px 50px 20px;
    position: relative;
}

.timeline-container .center-line {
    position: absolute;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #0F74A3, #1D9798);
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
}

.timeline-container .timeline-row {
    display: flex;
    margin-bottom: 40px;
}

.timeline-container .timeline-row.first {
    justify-content: flex-start;
}

.timeline-container .timeline-row.second {
    justify-content: flex-end;
}

.timeline-container .timeline-row > section {
    background: #fff;
    border-radius: 15px;
    width: calc(50% - 60px);
    padding: 25px;
    position: relative;
    box-shadow: 0 5px 20px rgba(45, 61, 78, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-container .timeline-row > section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(45, 61, 78, 0.2);
}

.timeline-container .timeline-row > section::before {
    position: absolute;
    content: "";
    height: 15px;
    width: 15px;
    background: #fff;
    top: 28px;
    z-index: -1;
    transform: rotate(45deg);
}

.timeline-container .timeline-row.first > section::before {
    right: -27px;
}

.timeline-container .timeline-row.second > section::before {
    left: -27px;
}

.timeline-container .timeline-icon {
    position: absolute;
    background: #fff;
    height: 50px;
    width: 50px;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #0F74A3, 0 3px 10px rgba(15, 116, 163, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid;
    color: linear-gradient(135deg, #0F74A3, #1D9798) 1;
    border-image: linear-gradient(135deg, #0F74A3, #1D9798) 0;
}

.timeline-container .timeline-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.timeline-container .timeline-icon.fa-icon {
    background: linear-gradient(135deg, #0F74A3, #1D9798);
    color: #fff;
    font-size: 17px;
    text-align: center;
    line-height: 44px;
}

.timeline-container .timeline-row.first .timeline-icon {
    top: 15px;
    right: -85px;
}

.timeline-container .timeline-row.second .timeline-icon {
    top: 15px;
    left: -85px;
}

.timeline-container .ahhh {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #1D9798, #0F74A3);
    box-shadow: 0 4px 15px rgba(29, 151, 152, 0.3);
}

.timeline-container .ahhh img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.timeline-container .timeline-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.timeline-container .timeline-title {
    font-size: 22px;
    font-weight: 600;
    color: #2c4c5c;
}

.timeline-container .timeline-details span:last-child {
    color: #1D9798;
    font-size: 14px;
    font-weight: 500;
}

.timeline-container section p {
    margin: 10px 0 17px 0;
    color: #4A6E8C;
    line-height: 1.6;
}

.timeline-container .timeline-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timeline-container .timeline-bottom a {
    text-decoration: none;
    background: linear-gradient(135deg, #1D9798, #0F74A3);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.timeline-container .timeline-bottom a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
}

.timeline-container .timeline-bottom a:hover::before {
    width: 300px;
    height: 300px;
}

.timeline-container .timeline-bottom a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 151, 152, 0.5);
}

.timeline-container .timeline-bottom i {
    color: #A8ABAD;
    font-style: italic;
    font-size: 14px;
}

.section-title-container {
    display: flex;
    justify-content: center;
    margin: 60px 0 40px 0;
    position: relative;
    z-index: 10;
    color: white;
}

.section-title-card {
    background: linear-gradient(135deg, #2c4c5c 0%, #2d9596 50%, #0f74a3 100%);
    color: white;
    padding: 20px 40px;
    border-radius: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 30px rgba(44, 76, 92, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 300px;
}

.section-title-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
}

.section-title-card:hover::before {
    opacity: 1;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.section-title-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 45px rgba(44, 76, 92, 0.4);
}

.section-title-card .section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
}

.section-title-card .section-subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
    position: relative;
    z-index: 2;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 61, 78, 0.9);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.popup-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-content {
    background: linear-gradient(135deg, #fff 0%, #EFF3F4 100%);
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-header {
    background: linear-gradient(135deg, #0F74A3, #1D9798);
    color: #fff;
    padding: 25px;
    position: relative;
}

.popup-header h2 {
    font-size: 28px;
    margin-bottom: 5px;
    margin-top: 0;
}

.popup-date {
    font-size: 14px;
    opacity: 0.9;
}

.popup-close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.popup-body {
    padding: 30px;
}

.popup-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.popup-body h3 {
    position: relative;
    color: #2c4c5c;
    width: fit-content;
    font-size: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1D9798;
    margin-top: 0;
    left: 8.5em;
}

.popup-body p {
    color: #4A6E8C;
    line-height: 1.8;
    margin-bottom: 15px;
}

.popup-body ul {
    color: #4A6E8C;
    line-height: 1.8;
    margin-bottom: 15px;
    padding-left: 20px;
}

.popup-body li {
    margin-bottom: 8px;
}

.popup-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.popup-tag {
    background: linear-gradient(135deg, #1D9798, #0F74A3);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.popup-body img {
    position: relative;
    width: 100%;
    height: auto;
    margin: 10px;
    border: 5px solid #2c4c5c;
    border-radius: 10px;
}

/* HP Event Showcase Styles */
.hp-event-showcase {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(44, 76, 92, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 1000px;
    width: 100%;
    position: relative;
    border: 3px solid transparent;
    background-clip: padding-box;
    z-index: 100;
    margin: 20px auto;
}

.hp-event-showcase::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #2c4c5c, #2d9596, #0f74a3);
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hp-event-showcase:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 35px 70px rgba(44, 76, 92, 0.25);
}

.hp-event-showcase:hover::before {
    opacity: 1;
}

.hp-showcase-wrapper {
    display: flex;
    min-height: 450px;
    position: relative;
    z-index: 101;
}

.hp-gallery-zone {
    flex: 1.2;
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    z-index: 102;
}

.hp-image-rotator {
    position: relative;
    height: 100%;
    width: 100%;
}

.hp-rotator-track {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 0;
}

.hp-image-frames {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.hp-frame-item {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hp-frame-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.hp-frame-item:hover img {
    transform: scale(1.1);
}

.hp-gallery-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 110;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hp-gallery-controls:hover {
    background: #2d9596;
    color: white;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 8px 30px rgba(45, 149, 150, 0.4);
}

.hp-prev-control {
    left: 20px;
}

.hp-next-control {
    right: 20px;
}

.hp-gallery-controls::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
}

.hp-prev-control::before {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.hp-next-control::before {
    transform: rotate(45deg);
    margin-right: 3px;
}

.hp-gallery-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 110;
}

.hp-indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hp-indicator-dot.hp-active {
    background: #2d9596;
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(45, 149, 150, 0.6);
}

.hp-indicator-dot:hover:not(.hp-active) {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.hp-content-zone {
    flex: 1;
    padding: 45px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #2c4c5c 0%, #2d9596 50%, #0f74a3 100%);
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 102;
}

.hp-content-zone::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.hp-content-zone:hover::before {
    opacity: 1;
}

.hp-event-header {
    position: relative;
    z-index: 103;
}

.hp-event-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hp-event-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    font-weight: 300;
}

.hp-event-description {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 103;
}

.hp-tag-collection {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 103;
}

.hp-event-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hp-event-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hp-action-button {
    background: #ffffff;
    color: #2c4c5c;
    padding: 16px 30px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    align-self: flex-start;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 103;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hp-action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.hp-action-button:hover::before {
    left: 100%;
}

.hp-button-icon {
    width: 24px;
    height: 24px;
    background: #2d9596;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    position: relative;
}

.hp-button-icon::after {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid white;
    border-right: 2px solid white;
    transform: rotate(45deg);
    margin-left: 1px;
}

.hp-action-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(44, 76, 92, 0.3);
    background: #f8f9fa;
}

.hp-action-button:hover .hp-button-icon {
    transform: rotate(360deg) scale(1.2);
    background: #0f74a3;
}

/* FIXED: Modal Styles - Changed display approach */
.hp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex; /* Changed from display: none */
    align-items: center;
    justify-content: center;
    z-index: 8000;
    opacity: 0; /* Start hidden with opacity */
    visibility: hidden; /* Start hidden with visibility */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

/* FIXED: Active state now just changes opacity and visibility */
.hp-modal-overlay.hp-modal-active {
    opacity: 1;
    visibility: visible;
}

.hp-modal-container {
    background: white;
    border-radius: 24px;
    padding: 50px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8) translateY(50px);
    transition: all 0.3s ease;
    z-index: 8001;
}

.hp-modal-overlay.hp-modal-active .hp-modal-container {
    transform: scale(1) translateY(0);
}

.hp-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 8002;
}

.hp-modal-close:hover {
    background: #f8f9fa;
    color: #2c4c5c;
    transform: scale(1.1);
}

.hp-modal-content h2 {
    color: #2c4c5c;
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hp-modal-content .hp-modal-subtitle {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 18px;
}

.hp-modal-image {
    width: 100%;
    height: 300px;
    border-radius: 20px;
    object-fit: cover;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(44, 76, 92, 0.15);
}

.hp-modal-content p {
    color: #495057;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 25px;
}

/* Responsive Design */
@media screen and (max-width: 790px) {
    .timeline-container .center-line {
        left: 40px;
    }
    
    .timeline-container .timeline-row {
        margin: 30px 0 3px 60px;
    }
    
    .timeline-container .timeline-row section {
        width: 100%;
    }
    
    .timeline-container .timeline-row.first .timeline-icon {
        left: -85px;
    }
    
    .timeline-container .timeline-row.first section::before {
        left: -27px;
    }
}

@media (max-width: 920px) {
    .hp-showcase-wrapper {
        flex-direction: column;
        min-height: auto;
    }
    
    .hp-gallery-zone {
        height: 350px;
    }
    
    .hp-content-zone {
        padding: 35px;
    }
    
    .hp-event-header h2 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    h1.page-title {
        font-size: 2rem;
    }
    
    .hp-event-showcase {
        border-radius: 16px;
        margin: 10px;
    }
    
    .hp-gallery-zone {
        height: 280px;
    }
    
    .hp-content-zone {
        padding: 25px;
    }
    
    .hp-event-header h2 {
        font-size: 24px;
    }
    
    .hp-event-description {
        font-size: 15px;
    }
    
    .hp-modal-container {
        padding: 30px;
        margin: 10px;
    }
    
    .hp-modal-content h2 {
        font-size: 28px;
    }
}

@media screen and (max-width: 440px) {
    .section-title-card {
        min-width: 200px;
        padding: 12px 20px;
    }

    .section-title-card .section-title {
        font-size: 18px;
    }

    .section-title-card .section-subtitle {
        font-size: 13px;
    }
    
    .timeline-container .center-line,
    .timeline-container .timeline-row section::before,
    .timeline-container .timeline-row .timeline-icon {
        display: none;
    }
    
    .timeline-container .timeline-row {
        margin: 10px 0;
    }
    
    .hp-content-zone {
        padding: 20px;
    }
    
    .hp-action-button {
        padding: 14px 24px;
        font-size: 14px;
    }
    
    .hp-gallery-controls {
        width: 40px;
        height: 40px;
    }
    
    .hp-prev-control {
        left: 10px;
    }
    
    .hp-next-control {
        right: 10px;
    }
    
    .hp-modal-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    h1.page-title {
        font-size: 1.5rem;
    }
}