/* Root Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gold-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background: #0a0a0f;
}

/* Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(7, 11, 43, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.1);
}

.nav-logo {
    display: block;
    width: 180px;
    height: auto;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 15px rgba(212, 175, 55, 0.4));
}

.nav-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.timelines-nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.timelines-nav-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.download-nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border-radius: 50px;
    color: #000;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.download-nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* Loading Spinner */
#loading {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(2) {
    border-top-color: #764ba2;
    animation-delay: 0.2s;
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
}

.spinner-ring:nth-child(3) {
    border-top-color: #f093fb;
    animation-delay: 0.4s;
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 1s ease;
}

.hero-section.visible {
    opacity: 1 !important;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-gradient);
    top: -250px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-gradient);
    bottom: -200px;
    left: -100px;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--secondary-gradient);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 30px) scale(1.05); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.5) 0%, rgba(10, 10, 15, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-badge {
    display: inline-block;
    padding: 10px 28px;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.5);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    color: #667eea;
    font-weight: 600;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, #ffffff 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-description {
    color: #cbd5e0;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.scroll-indicator {
    margin-top: 3rem;
    animation: bounce 2s infinite, fadeInUp 0.8s ease 0.8s backwards;
}

.scroll-indicator i {
    font-size: 2rem;
    color: #667eea;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Categories Container */
.categories-container {
    position: relative;
    background: #0a0a0f;
}

/* Category Section */
.category-section {
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.category-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.category-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.view-more-btn {
    padding: 12px 32px;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.5);
    border-radius: 50px;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.view-more-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.view-more-btn i {
    transition: transform 0.3s ease;
}

.view-more-btn:hover i {
    transform: translateX(5px);
}

/* Timelines Grid */
.category-timelines {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .category-timelines {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Timeline Card */
.timeline-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.timeline-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.timeline-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 30px 80px rgba(102, 126, 234, 0.3);
}

.timeline-card:hover::before {
    opacity: 0.08;
}

/* Card Image */
.card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

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

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

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(10, 10, 15, 0.9) 100%);
}

/* Card Badge */
.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #667eea;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Card Content */
.card-content {
    position: relative;
    padding: 1.5rem;
    z-index: 1;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timeline-card:hover .card-title {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-description {
    color: #cbd5e0;
    line-height: 1.7;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.event-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a0aec0;
    font-size: 0.85rem;
}

.event-count i {
    color: #667eea;
}

.card-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    color: #667eea;
    transition: all 0.3s ease;
}

.timeline-card:hover .card-arrow {
    background: var(--primary-gradient);
    color: white;
    transform: translateX(5px);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .category-title {
        font-size: 1.8rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .card-content {
        padding: 1.25rem;
    }
}
