/*--------------------------------------------------------------
# History Section - Modern Premium Design
--------------------------------------------------------------*/
.history-section-modern {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    overflow: hidden;
    padding: 60px 0 80px;
}

/* Hero Section */
.history-hero {
    position: relative;
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(6, 60, 173, 0.03) 0%, rgba(99, 102, 241, 0.03) 100%);
    border-radius: 24px;
}

.history-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, rgba(6, 60, 173, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(6, 60, 173, 0.2);
    border-radius: 50px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.history-badge:hover {
    background: linear-gradient(135deg, rgba(6, 60, 173, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 60, 173, 0.15);
}

.history-badge i {
    font-size: 16px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.history-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--heading-color);
    line-height: 1.2;
    margin-bottom: 16px;
}

.history-title .text-gradient {
    background: linear-gradient(135deg, var(--accent-color) 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.history-subtitle {
    font-size: 18px;
    color: color-mix(in srgb, var(--default-color), transparent 30%);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Timeline Container */
.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Timeline Line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-color) 0%, #6366f1 50%, var(--accent-color) 100%);
    transform: translateX(-50%);
    border-radius: 2px;
    opacity: 0.3;
}

/* Timeline Item */
.timeline-item {
    position: relative;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(4) {
    animation-delay: 0.4s;
}

.timeline-item:nth-child(5) {
    animation-delay: 0.5s;
}

.timeline-item:nth-child(n+6) {
    animation-delay: 0.6s;
}

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

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

/* Timeline Item - Left */
.timeline-item.left .timeline-content {
    margin-right: 55%;
    text-align: right;
}

.timeline-item.left .timeline-marker {
    right: 50%;
    transform: translateX(50%);
}

/* Timeline Item - Right */
.timeline-item.right .timeline-content {
    margin-left: 55%;
    text-align: left;
}

.timeline-item.right .timeline-marker {
    left: 50%;
    transform: translateX(-50%);
}

/* Timeline Marker */
.timeline-marker {
    position: absolute;
    top: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color) 0%, #6366f1 100%);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(6, 60, 173, 0.3);
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-marker::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #6366f1 100%);
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    transform: translateX(50%) scale(1.15) rotate(5deg);
    box-shadow: 0 12px 32px rgba(6, 60, 173, 0.4);
}

.timeline-item.left:hover .timeline-marker {
    transform: translateX(50%) scale(1.15) rotate(5deg);
}

.timeline-item:hover .timeline-marker::before {
    opacity: 0.3;
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.timeline-marker-inner {
    position: relative;
    z-index: 1;
}

.timeline-year {
    font-size: 20px;
    font-weight: 800;
    color: var(--contrast-color);
    line-height: 1;
}

.timeline-icon {
    font-size: 32px;
    color: var(--contrast-color);
}

/* Timeline Content */
.timeline-content {
    position: relative;
    background: var(--surface-color);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 30px rgba(3, 40, 123, 0.1);
    border: 1px solid rgba(3, 40, 123, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color) 0%, #6366f1 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(3, 40, 123, 0.15);
    border-color: rgba(6, 60, 173, 0.2);
}

.timeline-item:hover .timeline-content::before {
    opacity: 1;
}

/* Timeline Content - Arrow */
.timeline-content::after {
    content: '';
    position: absolute;
    top: 30px;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item.left .timeline-content::after {
    right: -15px;
    border-width: 15px 0 15px 15px;
    border-color: transparent transparent transparent var(--surface-color);
}

.timeline-item.right .timeline-content::after {
    left: -15px;
    border-width: 15px 15px 15px 0;
    border-color: transparent var(--surface-color) transparent transparent;
}

/* Content Elements */
.timeline-content-header {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(3, 40, 123, 0.08);
}

.timeline-content-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

.timeline-content-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(6, 60, 173, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border-radius: 20px;
}

.timeline-content-date i {
    font-size: 14px;
}

.timeline-content-body {
    font-size: 16px;
    line-height: 1.8;
    color: color-mix(in srgb, var(--default-color), transparent 20%);
}

.timeline-content-body p {
    margin-bottom: 16px;
}

.timeline-content-body p:last-child {
    margin-bottom: 0;
}

.timeline-content-body strong {
    color: var(--heading-color);
    font-weight: 600;
}

/* Decorative Corner */
.timeline-decorative-corner {
    position: absolute;
    bottom: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 0%, rgba(6, 60, 173, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.timeline-item.left .timeline-decorative-corner {
    left: 0;
    border-radius: 0 100% 0 20px;
}

.timeline-item.right .timeline-decorative-corner {
    right: 0;
    border-radius: 100% 0 20px 0;
}

.timeline-item:hover .timeline-decorative-corner {
    opacity: 1;
}

/* Simple Content Card (Fallback for non-timeline) */
.history-content-card {
    position: relative;
    background: var(--surface-color);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 10px 40px rgba(3, 40, 123, 0.1);
    border: 1px solid rgba(3, 40, 123, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.history-content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color) 0%, #6366f1 100%);
}

.history-content-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(3, 40, 123, 0.15);
    border-color: rgba(6, 60, 173, 0.2);
}

.history-content-body {
    font-size: 16px;
    line-height: 1.8;
    color: color-mix(in srgb, var(--default-color), transparent 20%);
}

.history-content-body p {
    margin-bottom: 20px;
}

.history-content-body p:last-child {
    margin-bottom: 0;
}

.history-content-body strong {
    color: var(--heading-color);
    font-weight: 600;
}

/* Background Wave */
.history-wave-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(180deg, transparent 0%, rgba(3, 40, 123, 0.03) 100%);
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 991px) {
    .history-title {
        font-size: 36px;
    }

    .history-subtitle {
        font-size: 16px;
    }

    .timeline-line {
        left: 40px;
    }

    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        margin-left: 100px;
        margin-right: 0;
        text-align: left;
    }

    .timeline-item.left .timeline-marker,
    .timeline-item.right .timeline-marker {
        left: 40px;
        transform: translateX(-50%);
    }

    .timeline-item.left:hover .timeline-marker,
    .timeline-item.right:hover .timeline-marker {
        transform: translateX(-50%) scale(1.15);
    }

    .timeline-item.left .timeline-content::after {
        left: -15px;
        right: auto;
        border-width: 15px 15px 15px 0;
        border-color: transparent var(--surface-color) transparent transparent;
    }

    .timeline-marker {
        width: 70px;
        height: 70px;
    }

    .timeline-year {
        font-size: 18px;
    }

    .timeline-icon {
        font-size: 28px;
    }

    .history-content-card {
        padding: 36px;
    }
}

@media (max-width: 768px) {
    .history-section-modern {
        padding: 50px 0 60px;
    }

    .history-hero {
        margin-bottom: 40px;
        padding: 32px 16px;
    }

    .history-title {
        font-size: 32px;
    }

    .history-subtitle {
        font-size: 15px;
    }

    .history-badge {
        font-size: 12px;
        padding: 8px 18px;
    }

    .timeline-container {
        padding: 20px 0;
    }

    .timeline-item {
        margin-bottom: 40px;
    }

    .timeline-content {
        padding: 24px;
    }

    .timeline-content-title {
        font-size: 20px;
    }

    .timeline-content-body {
        font-size: 15px;
    }

    .history-content-card {
        padding: 28px;
    }

    .history-content-body {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .history-section-modern {
        padding: 40px 0 50px;
    }

    .history-hero {
        margin-bottom: 32px;
        padding: 24px 12px;
        border-radius: 20px;
    }

    .history-title {
        font-size: 28px;
    }

    .history-subtitle {
        font-size: 14px;
    }

    .history-badge {
        font-size: 11px;
        padding: 6px 14px;
    }

    .timeline-line {
        left: 30px;
    }

    .timeline-item.left .timeline-marker,
    .timeline-item.right .timeline-marker {
        left: 30px;
    }

    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        margin-left: 80px;
    }

    .timeline-marker {
        width: 60px;
        height: 60px;
    }

    .timeline-year {
        font-size: 16px;
    }

    .timeline-icon {
        font-size: 24px;
    }

    .timeline-content {
        padding: 20px;
        border-radius: 16px;
    }

    .timeline-content-title {
        font-size: 18px;
    }

    .timeline-content-date {
        font-size: 12px;
        padding: 4px 12px;
    }

    .timeline-content-body {
        font-size: 14px;
        line-height: 1.7;
    }

    .history-content-card {
        padding: 24px;
        border-radius: 20px;
    }

    .history-content-body {
        font-size: 14px;
        line-height: 1.7;
    }

    .history-wave-bg {
        height: 150px;
    }
}

/* Print Styles */
@media print {
    .history-section-modern {
        background: white;
    }

    .timeline-line,
    .timeline-marker,
    .history-wave-bg {
        display: none;
    }

    .timeline-content,
    .history-content-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .timeline-item {
        animation: none;
        opacity: 1;
    }
}