@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
    /* Light Theme (Default) */
    --primary-gold: #D4AF37;
    --primary-gold-hover: #b8962c;
    --bg-gradient-start: #fdfbfb;
    --bg-gradient-end: #ebedee;
    --text-main: #2c3e50;
    --text-light: #596e79;
    --card-bg: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.4);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    /* Dark Theme */
    --primary-gold: #E5C158;
    --primary-gold-hover: #fce18d;
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e293b;
    --text-main: #f8fafc;
    --text-light: #cbd5e1;
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(15, 23, 42, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.25);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 0.5s ease, color 0.5s ease;
}

h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-gold);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-gold);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--card-border);
    transform: rotate(15deg);
}

/* Main Container */
.main-content {
    margin-top: 80px; /* Space for navbar */
    min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    animation: fadeInHero 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.date-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--primary-gold);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

/* Container & Grid */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem 4rem 2rem;
}

/* Timeline / Home View */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 0;
}

.timeline-item {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 10px 30px var(--shadow-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.15);
    border-color: var(--primary-gold);
}

.timeline-date {
    color: var(--primary-gold);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.timeline-title {
    font-size: 2rem;
    margin: 0;
}

.timeline-desc {
    color: var(--text-light);
    line-height: 1.6;
}

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px var(--shadow-color);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.card h2 {
    font-size: 2.2rem;
    color: var(--primary-gold);
    margin-top: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* Specific Layouts */
.participants-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.participant-group h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.participant-group p {
    margin: 0.4rem 0;
    color: var(--text-light);
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.participant-group p::before {
    content: '•';
    color: var(--primary-gold);
    margin-right: 8px;
    font-size: 1.2rem;
}

.academic-quote {
    border-left: 4px solid var(--primary-gold);
    padding-left: 1.5rem;
    font-style: italic;
    color: var(--text-light);
    margin: 2rem 0;
    font-size: 1.1rem;
    line-height: 1.7;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.05) 0%, transparent 100%);
    padding: 1.5rem;
    border-radius: 0 15px 15px 0;
}

.topic-item {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid transparent;
    transition: border 0.3s ease;
}

.topic-item:hover {
    border-color: var(--card-border);
}

.topic-item h3 {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.topic-item p {
    line-height: 1.8;
    color: var(--text-light);
}

/* Photo Styles */
.photo-container {
    margin: 2.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.photo-container img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: block;
}

.photo-container:hover img {
    transform: scale(1.05);
}

/* View Transitions */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
}

/* Utility / Loader */
.loader {
    text-align: center;
    padding: 4rem;
    color: var(--text-light);
    font-style: italic;
}

/* Animations */
@keyframes fadeInHero {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-link {
        font-size: 0.9rem;
    }
    .main-content {
        margin-top: 160px;
    }
    .hero h1 { font-size: 2.5rem; }
    .card { padding: 1.5rem; }
    .timeline-item { padding: 1.5rem; }
}

/* --- New Features Styles --- */

/* Stats Container */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-box {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary-gold);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-gold);
    font-family: 'Cormorant Garamond', serif;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filter Container */
.filter-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
}

.search-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-gold);
}

.year-select {
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

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

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 2rem 1rem 1rem 1rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.gallery-date {
    font-size: 0.8rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
    }
}

/* --- Modal & Toast Styles (Seva) --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 3rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-gold);
}

.modal-title {
    font-size: 2.2rem;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.seva-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.seva-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 2rem;
}

.seva-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.seva-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.seva-list {
    list-style: none;
    padding: 0;
}

.seva-list li {
    margin-bottom: 0.8rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    font-size: 1.05rem;
}

.kaspi-block {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px dashed var(--primary-gold);
}

.kaspi-name {
    font-weight: 600;
    margin-bottom: 1rem !important;
    font-size: 1.1rem;
}

.copy-btn {
    background: var(--primary-gold);
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.copy-btn:hover {
    background: var(--primary-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-main);
    color: var(--bg-gradient-start);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 3000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .seva-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        padding: 2rem 1.5rem;
    }
}

/* --- Upcoming Events Styles --- */

.section-title {
    font-size: 2rem;
    color: var(--primary-gold);
    margin: 2rem 0 1.5rem 0;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-gold);
    margin: 0.5rem auto 0 auto;
    border-radius: 3px;
}

.upcoming-item {
    border: 1px solid var(--primary-gold);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(212, 175, 55, 0.05) 100%);
    position: relative;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
}

.upcoming-item:hover {
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2);
}

.upcoming-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary-gold);
    color: #fff;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- Article Button Styles --- */
.article-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-btn:hover {
    background: var(--primary-gold);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

/* --- Premium Footer --- */
.premium-footer {
    background-color: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 1.5rem;
    text-align: center;
}

.premium-footer-container {
    max-width: 56rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.premium-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.premium-footer-link:hover {
    color: #ffffff;
}

.premium-footer-text {
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    font-weight: 300;
    text-transform: uppercase;
}

.premium-footer-arrow {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.premium-footer-link:hover .premium-footer-arrow {
    opacity: 1;
    transform: translateX(4px);
}

.premium-footer-branding {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.75rem;
    font-family: monospace;
    color: #64748b;
    letter-spacing: 0.15em;
}

.premium-separator {
    opacity: 0.3;
}

@media (max-width: 640px) {
    .premium-separator {
        display: none;
    }
}

/* Nav Badge */
.badge {
    background: var(--primary-gold);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 12px;
    margin-left: 0.3rem;
    font-weight: 700;
}
