/* ========================================================================
   MAH Website — Design System & Global Styles
   Macedonian Association of Hydrology
   ======================================================================== */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    /* Colors */
    --bg-primary: #0A1628;
    --bg-card: #0F1D35;
    --bg-secondary: #162238;
    --bg-secondary-alpha: rgba(22, 34, 56, 0.5);
    --accent: #00C2CC;
    --accent-hover: #00D5DF;
    --accent-alpha-10: rgba(0, 194, 204, 0.1);
    --accent-alpha-20: rgba(0, 194, 204, 0.2);
    --accent-alpha-30: rgba(0, 194, 204, 0.3);
    --accent-alpha-50: rgba(0, 194, 204, 0.5);
    --text-primary: #E8F0F2;
    --text-muted: #8FA8BF;
    --text-dark: #0A1628;
    --border: rgba(0, 194, 204, 0.2);
    --border-hover: rgba(0, 194, 204, 0.5);
    --destructive: #d4183d;
    --success: #10b981;
    --warning: #f59e0b;

    /* Typography */
    --font-body: 'DM Sans', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --font-size-base: 16px;

    /* Spacing */
    --container-max: 1280px;
    --container-padding: 1.5rem;
    --section-padding: 5rem 0;

    /* Effects */
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --radius-full: 9999px;
    --shadow-accent: 0 4px 30px rgba(0, 194, 204, 0.2);
    --shadow-accent-lg: 0 8px 40px rgba(0, 194, 204, 0.3);
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
}

h1 { font-size: 3.5rem; font-weight: 700; }
h2 { font-size: 3rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.75rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.375rem; font-weight: 500; line-height: 1.4; }

p { line-height: 1.7; color: var(--text-muted); }

a { color: var(--accent); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* --- Layout Utilities --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section { padding: var(--section-padding); }
.section--card { background: var(--bg-card); }
.section--gradient { background: linear-gradient(to bottom, var(--bg-card), var(--bg-primary)); }
.section--gradient-br { background: linear-gradient(135deg, var(--bg-primary), var(--bg-card), var(--bg-secondary)); }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-header h2 { margin-bottom: 1rem; }
.section-header p { font-size: 1.125rem; color: var(--text-muted); }

/* --- Grid System --- */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

/* --- Flexbox Utilities --- */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

/* --- Card Component --- */
.card {
    background: var(--bg-secondary-alpha);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    /* backdrop-filter removed: applied to every card = huge GPU cost */
}
.card:hover {
    border-color: var(--border-hover);
}
.card--glow:hover {
    box-shadow: var(--shadow-accent);
}

/* --- Button Components --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-dark);
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--text-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-secondary-alpha);
    color: var(--text-primary);
    border: 1px solid var(--accent-alpha-30);
    backdrop-filter: blur(4px);
}
.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--text-primary);
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn-full { width: 100%; justify-content: center; }

.btn .icon-arrow {
    transition: transform 0.2s ease;
}
.btn:hover .icon-arrow {
    transform: translateX(4px);
}

/* --- Badge Component --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-accent {
    background: var(--accent-alpha-10);
    border: 1px solid var(--accent-alpha-30);
    color: var(--accent);
}

.badge-solid {
    background: var(--accent);
    color: var(--text-dark);
}

/* --- Form Components --- */
.form-group { margin-bottom: 1.5rem; }

.form-label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--accent-alpha-30);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-alpha-10);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-textarea { resize: vertical; min-height: 120px; }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2300C2CC' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.form-error {
    color: var(--destructive);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-card {
    background: var(--bg-secondary-alpha);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

/* --- Alert / Flash Messages --- */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}
.alert-error {
    background: rgba(212, 24, 61, 0.1);
    border: 1px solid rgba(212, 24, 61, 0.3);
    color: var(--destructive);
}

/* --- Table Component --- */
.table-wrapper {
    background: var(--bg-secondary-alpha);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-wrapper .overflow-x { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    color: var(--accent);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0, 194, 204, 0.1);
}
.data-table tr:hover td {
    background: var(--bg-secondary-alpha);
}
.data-table td.text-white { color: var(--text-primary); }
.data-table td.font-medium { font-weight: 500; color: var(--text-primary); }

/* --- Header / Navigation --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.site-header.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 194, 204, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    position: relative;
}

.logo-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--accent);
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-icon svg {
    transform: scale(1.1);
}

.logo-text .logo-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.logo-text .logo-subtitle {
    font-size: 0.6875rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transition: var(--transition-fast);
}

.nav-link.active::after { opacity: 1; }
.nav-link:hover::after { opacity: 0.5; }

.header-wave {
    width: 100%;
    height: 3px;
    opacity: 0.3;
}

/* Mobile menu toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle svg { width: 1.5rem; height: 1.5rem; }

/* --- Footer --- */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    padding: 4rem 0;
}

.footer-heading {
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}
.footer-links a:hover { color: var(--accent); }

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.footer-contact li svg {
    width: 1rem;
    height: 1rem;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.social-icons {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--accent);
    color: var(--text-dark);
}

.social-icon svg { width: 1.25rem; height: 1.25rem; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p { font-size: 0.875rem; }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: var(--text-muted); font-size: 0.875rem; }
.footer-bottom-links a:hover { color: var(--accent); }

/* --- Hero Sections --- */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero--full { min-height: 100vh; }
.hero--large { padding: 10rem 0 8rem; }
.hero--medium { padding: 8rem 0 5rem; }

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg .overlay {
    position: absolute;
    inset: 0;
}

.hero-bg .overlay--dark {
    background: linear-gradient(to bottom, rgba(10,22,40,0.7), rgba(10,22,40,0.5), var(--bg-primary));
}

.hero-bg .overlay--medium {
    background: linear-gradient(to bottom, rgba(10,22,40,0.8), rgba(10,22,40,0.7), var(--bg-primary));
}

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

.hero-content .max-w-4xl { max-width: 56rem; margin: 0 auto; }
.hero-content .max-w-3xl { max-width: 48rem; margin: 0 auto; }

/* Glow effects for CTA sections */
.glow-container { position: relative; overflow: hidden; }
.glow-orb {
    position: absolute;
    width: 24rem;
    height: 24rem;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.08;
    /* Isolate blur repaint to its own compositor layer */
    will-change: filter;
    contain: strict;
    pointer-events: none;
}
.glow-orb--tl { top: 5rem; left: 5rem; }
.glow-orb--br { bottom: 5rem; right: 5rem; }
.glow-orb--tr { top: 5rem; right: 5rem; }

/* --- Responsive Utility Classes ---
   These exist so inline styles in views can be replaced with classes that
   media queries can override. Inline style="" always wins over media queries. */

.hero-h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

/* Large number displayed as a prominent stat */
.display-stat {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* Sections that need extra top/bottom padding on desktop */
.section-xl {
    padding: 6rem 0;
}

/* --- Wave Divider --- */
.wave-divider {
    width: 100%;
    line-height: 0;
}

.wave-divider svg {
    width: 100%;
    height: 12px;
    opacity: 0.3;
}

/* --- Stats Cards --- */
.stat-card {
    position: relative;
}

.stat-card .stat-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-alpha-20), transparent);
    border-radius: var(--radius);
    filter: blur(20px);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover .stat-glow { opacity: 1; }

.stat-card .stat-inner {
    position: relative;
    background: var(--bg-secondary-alpha);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover .stat-inner { border-color: var(--border-hover); }

.stat-card .stat-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: var(--accent);
}

.stat-card .stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.stat-card .stat-label {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* --- News Cards --- */
.news-card { cursor: pointer; }

.news-card .news-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    height: 16rem;
}

.news-card .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    /* Pre-promote to compositor layer so hover scale doesn't trigger repaint */
    will-change: transform;
}

.news-card:hover .news-image img { transform: scale(1.06); }

.news-card .news-image .image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary), rgba(10,22,40,0.5), transparent);
}

.news-card .news-image .news-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.news-card .news-date { font-size: 0.875rem; color: var(--accent); margin-bottom: 0.5rem; }

.news-card h3 { transition: color 0.2s ease; }
.news-card:hover h3 { color: var(--accent); }

.news-card .read-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-size: 0.875rem;
    margin-top: 0.75rem;
    transition: var(--transition-fast);
}
.news-card:hover .read-more { gap: 0.75rem; }

/* --- CTA Features --- */
.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cta-feature .feature-icon {
    width: 3rem;
    height: 3rem;
    background: var(--accent-alpha-20);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cta-feature .feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--accent);
}

.cta-feature .feature-title { color: var(--text-primary); font-weight: 500; }
.cta-feature .feature-subtitle { color: var(--text-muted); font-size: 0.875rem; }

/* --- Board Member Cards --- */
.board-card { text-align: center; }

.board-avatar {
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    transition: transform 0.3s ease;
    overflow: hidden;
}
.board-card:hover .board-avatar { transform: scale(1.05); }

.board-initials {
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.board-badge {
    display: inline-block;
    background: var(--accent-alpha-20);
    color: var(--accent);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.875rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--accent-alpha-30);
    margin-bottom: 0.875rem;
}

.board-name { color: var(--text-primary); margin-bottom: 0.375rem; font-size: 1.0625rem; font-family: var(--font-heading); }
.board-institution { color: var(--text-muted); font-size: 0.875rem; }

/* President — featured, top row */
.board-president-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}
.board-card--president {
    max-width: 320px;
    width: 100%;
    padding: 2.5rem 2rem;
    border-color: var(--accent-alpha-50) !important;
    box-shadow: 0 0 48px rgba(0, 194, 204, 0.18), var(--shadow-accent) !important;
}
.board-card--president .board-avatar {
    width: 7.5rem;
    height: 7.5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border: 3px solid var(--accent-alpha-50);
    box-shadow: 0 0 28px var(--accent-alpha-30);
}
.board-card--president .board-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.board-card--president .board-initials { font-size: 2.25rem; }
.board-card--president .board-name { font-size: 1.2rem; }

/* 4-member row — Honorary President, VP, Secretary, Treasurer */
.board-members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 72rem;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .board-members-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .board-members-grid { grid-template-columns: 1fr; }
}

.board-card--officer { padding: 2rem 1.25rem; }
.board-card--officer .board-avatar {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}
.board-card--officer .board-initials { font-size: 1.5rem; }

/* --- Executive Committee Member List --- */
.exec-members-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}
.exec-member {
    color: var(--text-primary);
    font-size: 0.9375rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.exec-member::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .exec-members-grid { grid-template-columns: 1fr; }
}

/* --- FAQ Accordion --- */
.accordion-item {
    background: var(--bg-secondary-alpha);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
    transition: var(--transition);
}
.accordion-item:hover { border-color: var(--border-hover); }

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}
.accordion-trigger:hover { color: var(--accent); }

.accordion-trigger .chevron {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-item.open .accordion-trigger .chevron {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.open .accordion-content {
    max-height: 500px;
}

.accordion-content-inner {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- Timeline --- */
.timeline { position: relative; }

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-alpha-30);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-icon {
    position: relative;
    z-index: 2;
    width: 4rem;
    height: 4rem;
    background: var(--bg-secondary);
    border: 2px solid var(--accent);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--accent);
}

.timeline-content {
    flex: 1;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* --- Newsletter Grid --- */
.newsletter-item {
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-item.selected {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.newsletter-item .newsletter-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.newsletter-item .newsletter-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.newsletter-item .newsletter-meta svg {
    width: 1rem;
    height: 1rem;
}

.download-btn {
    padding: 0.5rem;
    background: var(--accent-alpha-20);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.download-btn:hover { background: var(--accent-alpha-30); }
.download-btn svg { width: 1.25rem; height: 1.25rem; color: var(--accent); }

/* --- Event Cards (Symposia) --- */
.event-card .event-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    height: 16rem;
}

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

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

.event-card .event-image .image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary), rgba(10,22,40,0.3), transparent);
}

.event-card .event-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.event-card .event-title-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
}

.event-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.event-detail svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent);
    flex-shrink: 0;
}

/* Past symposia items */
.past-symposium {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.past-symposium .past-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.past-symposium .past-year {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-body);
    flex-shrink: 0;
}

.past-symposium .past-info {
    border-left: 1px solid var(--accent-alpha-30);
    padding-left: 1.5rem;
    flex: 1;
}

/* --- Preview Panel (Newsletter) --- */
.preview-panel {
    position: sticky;
    top: 6rem;
}

.preview-panel .preview-empty {
    text-align: center;
    padding: 3rem 0;
}

.preview-panel .preview-empty svg {
    width: 4rem;
    height: 4rem;
    color: var(--accent-alpha-30);
    margin: 0 auto 1rem;
}

.preview-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2.25rem; }
    .hero-h1 { font-size: 2.75rem; }
    .display-stat { font-size: 2rem; }
    .section-xl { padding: 5rem 0; }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --section-padding: 3rem 0;
    }

    /* Mobile navigation */
    .main-nav { display: none; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 200;
        background: rgba(10, 22, 40, 0.98);
        backdrop-filter: blur(12px);
        padding: 0.75rem 1rem 1.25rem;
        border-bottom: 1px solid var(--border);
        gap: 0.125rem;
    }
    .mobile-toggle { display: block; }

    /* Bigger tap targets for nav links in vertical menu */
    .main-nav.open .nav-link { padding: 0.75rem 1rem; width: 100%; }

    /* Lang switcher sits at the bottom of the open nav */
    .main-nav.open .lang-switcher {
        margin-left: 0;
        margin-top: 0.75rem;
        align-self: flex-start;
    }

    /* Section spacing */
    .section-header { margin-bottom: 2rem; }
    .section-xl { padding: 3.5rem 0; }

    /* Typography */
    .hero-h1 { font-size: 2.25rem; }
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.5rem; }

    /* Display stats (awards hero numbers) */
    .display-stat { font-size: 1.75rem; }

    /* Hero sizing */
    .hero--full { min-height: 80vh; }
    .hero--large { padding: 6rem 0 4rem; }
    .hero--medium { padding: 5rem 0 3rem; }

    /* Grids — grid-6 stays 2 cols on mobile (partners), others collapse */
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .grid-6 { grid-template-columns: repeat(2, 1fr); }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }

    /* Symposia */
    .past-symposium .past-main { flex-direction: column; align-items: flex-start; }
    .past-symposium .past-info { border-left: none; padding-left: 0; border-top: 1px solid var(--accent-alpha-30); padding-top: 1rem; }

    /* Newsletter — hide sticky preview panel on mobile, it's useless stacked below the list */
    .preview-panel { display: none; }
    .newsletter-layout { grid-template-columns: 1fr !important; }
}

/* CTA feature items should stack on narrower phones */
@media (max-width: 640px) {
    .cta-feature { width: 100%; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.875rem; }
    .hero-h1 { font-size: 1.875rem; }
    .display-stat { font-size: 1.5rem; }
    .section-xl { padding: 2.5rem 0; }
    .section-header { margin-bottom: 1.5rem; }
    .btn-lg { padding: 1rem 1.75rem; font-size: 1rem; }
    .stat-card .stat-value { font-size: 2.25rem; }
    .form-card { padding: 1.25rem; }
    .grid-6 { grid-template-columns: 1fr; }

    /* Timeline — smaller icons on very small screens */
    .timeline::before { left: 1.5rem; }
    .timeline-icon { width: 3rem; height: 3rem; }
    .timeline-icon svg { width: 1.5rem; height: 1.5rem; }
    .timeline-item { gap: 1rem; }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pre-promote animating elements so the GPU layer is ready before animation starts */
.animate-on-scroll {
    will-change: transform, opacity;
}

.animate-fade-in-up {
    animation: fadeInUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    /* Remove will-change after animation to free compositor memory */
    animation-fill-mode: forwards;
}

/* --- Language Switcher --- */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-secondary-alpha);
    border: 1px solid var(--accent-alpha-20);
    border-radius: var(--radius-full);
    padding: 0.2rem 0.5rem;
    margin-left: 0.5rem;
    backdrop-filter: blur(4px);
}

.lang-btn {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.25rem 0.4rem;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    line-height: 1;
}

.lang-btn:hover {
    color: var(--accent);
}

.lang-btn--active {
    color: var(--text-dark) !important;
    background: var(--accent);
    border-radius: var(--radius-full);
    padding: 0.25rem 0.5rem;
}

.lang-divider {
    color: var(--accent-alpha-30);
    font-size: 0.75rem;
    line-height: 1;
    user-select: none;
    margin: 0 0.1rem;
}
