/* ============================================
   GOPE 100 Anos - Estilos Principais
   Grande Oriente de Pernambuco - Centenário
   ============================================ */

/* ============================================
   CSS Variables / Design Tokens
   ============================================ */
:root {
    /* Paleta Sofisticada e Elegante */
    --navy-deepest: #0a0e27;
    --navy-dark: #1a1f3a;
    --navy-primary: #2d3561;
    --navy-medium: #3d4a7a;
    --navy-light: #4a5a8e;

    /* Dourado Premium e Discreto */
    --gold-primary: #c9a961;
    --gold-light: #d4b871;
    --gold-dark: #a68a4d;
    --gold-accent: #e8d4a0;

    /* Neutros Sofisticados */
    --white: #ffffff;
    --off-white: #fafbfc;
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-200: #dee2e6;
    --gray-300: #ced4da;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Texto */
    --text-primary: #1a1f3a;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --text-white: #ffffff;

    /* Sombras Suaves */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Gradientes Elegantes */
    --gradient-navy: linear-gradient(180deg, var(--navy-deepest) 0%, var(--navy-dark) 100%);
    --gradient-gold: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-primary) 50%, var(--gold-light) 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(10, 14, 39, 0.95) 0%, rgba(26, 31, 58, 0.98) 100%);

    /* Transições Suaves */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    line-height: 1.75;
    background: var(--off-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-width: 320px;
}

/* Prevent horizontal scroll on mobile */
* {
    max-width: 100%;
}

img {
    height: auto;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 5px;
    border: 2px solid var(--gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

::selection {
    background: var(--gold-accent);
    color: var(--navy-dark);
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--navy-dark);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem 0;
    z-index: 1000;
    transition: var(--transition-base);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-200);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar.scrolled .nav-logo {
    color: var(--navy-dark);
}

.nav-logo::before {
    content: '';
    width: 3px;
    height: 30px;
    background: var(--gold-primary);
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gold-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--white);
    transition: var(--transition-base);
    border-radius: 2px;
}

.navbar.scrolled .mobile-menu-toggle span {
    background: var(--navy-dark);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-navy);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(10, 14, 39, 0.7), rgba(10, 14, 39, 0.9)),
        url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(201,169,97,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 2rem;
}

.hero-logo {
    max-width: 380px;
    width: 100%;
    margin: 0 auto 3.5rem;
    opacity: 0.95;
    position: relative;
}

/* Golden Glow Effect Behind Logo */
.hero-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(
        ellipse at center,
        rgba(201, 169, 97, 0.6) 0%,
        rgba(212, 184, 113, 0.4) 25%,
        rgba(232, 212, 160, 0.2) 50%,
        rgba(201, 169, 97, 0.1) 70%,
        transparent 85%
    );
    border-radius: 50%;
    filter: blur(30px);
    z-index: -1;
    animation: goldenPulse 4s ease-in-out infinite;
}

/* Secondary Glow Layer for Depth */
.hero-logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(255, 215, 0, 0.5) 0%,
        rgba(201, 169, 97, 0.3) 30%,
        transparent 60%
    );
    border-radius: 50%;
    filter: blur(20px);
    z-index: -1;
    animation: goldenPulse 4s ease-in-out infinite 0.5s;
}

@keyframes goldenPulse {
    0%, 100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.hero-logo img {
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero .subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.125rem);
    margin-bottom: 3rem;
    font-family: 'Inter', sans-serif;
    color: var(--gold-accent);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    transition: var(--transition-base);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold-primary);
}

.badge i {
    font-size: 2rem;
    color: var(--gold-primary);
}

.badge span {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    color: var(--gray-200);
}

.scroll-down {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold-primary);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: var(--transition-base);
}

.scroll-down:hover {
    opacity: 1;
}

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

/* Rotating Word Effect */
.rotating-word {
    position: relative;
    display: inline-block;
    color: var(--gold-primary);
    font-weight: 700;
    min-width: 280px;
    text-align: left;
}

.rotating-word::after {
    content: attr(data-current-word);
    animation: wordRotate 1s ease-in-out;
}

@keyframes wordRotate {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    10% {
        opacity: 0;
        transform: translateY(-20px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    90% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* ============================================
   Buttons
   ============================================ */
.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.5px;
    transition: var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    text-transform: none;
}

.btn-primary {
    background: var(--gold-primary);
    color: var(--navy-dark);
    border-color: var(--gold-primary);
}

.btn-primary:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--white);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* ============================================
   Section Styles
   ============================================ */
section {
    padding: 7rem 0;
    position: relative;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 3rem;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    color: var(--navy-dark);
    margin-bottom: 1.25rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gold-primary);
    margin: 1.25rem auto 0;
}

.section-header p {
    max-width: 650px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ============================================
   Legacy Section
   ============================================ */
.legacy {
    background: var(--white);
    position: relative;
}

.legacy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.legacy-text p {
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.legacy-text .highlight {
    color: var(--gold-dark);
    font-weight: 600;
}

.legacy-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.legacy-image img {
    width: 100%;
    max-width: 450px;
    filter: drop-shadow(var(--shadow-xl));
}

.legacy-stat {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3.5rem;
    padding-top: 3.5rem;
    border-top: 2px solid var(--gray-100);
}

.stat-item {
    text-align: center;
}

.stat-item h4 {
    font-size: 3.5rem;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
    font-weight: 800;
    line-height: 1;
}

.stat-item span {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
    display: block;
}

/* ============================================
   Values Section
   ============================================ */
.values {
    background: var(--gray-50);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.value-card {
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 12px;
    text-align: left;
    transition: var(--transition-base);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--gold-primary);
}

.value-icon {
    font-size: 2.75rem;
    color: var(--gold-primary);
    margin-bottom: 1.75rem;
    transition: var(--transition-base);
    display: inline-block;
}

.value-card:hover .value-icon {
    transform: scale(1.1);
}

.value-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    color: var(--navy-dark);
}

.value-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

/* ============================================
   Timeline Section
   ============================================ */
.timeline-section {
    background: var(--white);
    position: relative;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: var(--gray-200);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 0 60px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 3rem;
}

/* Timeline Dot */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--white);
    border: 4px solid var(--gold-primary);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    transition: var(--transition-base);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 1);
}

.timeline-item:hover::after {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(201, 169, 97, 0.2);
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before,
.right::before {
    content: none;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 2rem 2.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.timeline-item:hover .timeline-content {
    border-color: var(--gold-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.date {
    color: var(--gold-primary);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
    display: inline-block;
    background: var(--gray-50);
    padding: 0.375rem 0.875rem;
    border-radius: 4px;
}

.timeline-content h3 {
    color: var(--navy-dark);
    margin-bottom: 0.875rem;
    font-size: 1.5rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 1rem;
}

/* ============================================
   Gallery Section - Masonry Layout
   ============================================ */
.gallery {
    background: var(--gray-50);
}

.gallery-grid {
    column-count: 3;
    column-gap: 1.5rem;
    padding: 1rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    break-inside: avoid;
    margin-bottom: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: var(--transition-base);
}

.gallery-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--gold-primary);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 31, 58, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    color: var(--gold-primary);
    font-size: 2rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

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

/* ============================================
   Gallery Modal
   ============================================ */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(10, 14, 39, 0.97);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.gallery-modal.closing {
    opacity: 0;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.modal-image.loaded {
    opacity: 1;
    transform: scale(1);
}

.modal-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    z-index: 2001;
}

.modal-close:hover {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
    transform: rotate(90deg);
}

.modal-close i {
    color: var(--white);
    font-size: 1.5rem;
}

.modal-close:hover i {
    color: var(--navy-dark);
}

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    z-index: 2001;
}

.modal-nav:hover {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
}

.modal-nav i {
    color: var(--white);
    font-size: 1.25rem;
}

.modal-nav:hover i {
    color: var(--navy-dark);
}

.modal-prev {
    left: 2rem;
}

.modal-next {
    right: 2rem;
}

.modal-counter {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-caption {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    text-align: center;
    max-width: 600px;
    padding: 0 2rem;
}

/* Modal Loading Spinner */
.modal-loader {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Event Modal
   ============================================ */
/* Event Modal */
.event-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.event-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 1;
    padding: 2rem;
}

.event-modal.closing {
    opacity: 0;
}

.event-modal-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.4s ease;
    margin: auto;
}

.event-modal.active .event-modal-content {
    transform: scale(1);
}

/* Event Modal Close Button */
.event-modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border: none;
}

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

.event-modal .modal-close i {
    color: var(--navy-dark);
}

.event-modal-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.event-modal-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), transparent);
}

.event-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-modal-body {
    padding: 2.5rem;
}

.event-modal-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.event-modal-date {
    display: inline-block;
    background: var(--gold-primary);
    color: var(--navy-dark);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}

.event-modal-title {
    color: var(--navy-dark);
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.event-modal-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    flex-wrap: wrap;
}

.event-modal-location i {
    color: var(--gold-primary);
    font-size: 1.125rem;
}

.event-modal-description,
.event-modal-details {
    margin-bottom: 1.5rem;
}

.event-modal-description:last-child,
.event-modal-details:last-child {
    margin-bottom: 0;
}

.event-modal-description h3,
.event-modal-details h3 {
    color: var(--navy-dark);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-modal-description h3::before,
.event-modal-details h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--gold-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.event-modal-description p,
.event-modal-details p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-xs);
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-primary);
}

.contact-card i {
    color: var(--gold-primary);
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.contact-card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    color: var(--navy-dark);
}

.contact-card-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.contact-map {
    height: 100%;
    min-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--navy-dark);
    color: var(--white);
    padding: 5rem 0 2rem;
    border-top: 3px solid var(--gold-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h3 {
    color: var(--gold-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    font-family: 'Playfair Display', serif;
}

.footer-logo-text {
    font-size: 2rem !important;
    margin-bottom: 1.25rem !important;
    color: var(--white);
}

.footer-desc {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.75;
    margin-bottom: 1.75rem;
    font-size: 0.9375rem;
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-base);
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--gold-primary);
    transform: translateX(4px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.75rem;
}

.social-btn {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.social-btn:hover {
    background: var(--gold-primary);
    color: var(--navy-dark);
    transform: translateY(-3px);
    border-color: var(--gold-primary);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ============================================
   Responsive - Large Screens
   ============================================ */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
    }

    .hero-content {
        max-width: 1000px;
    }

    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 3rem;
    }
}

/* ============================================
   Responsive - Tablets
   ============================================ */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .navbar .container {
        padding: 0 2rem;
    }

    .legacy-content {
        gap: 4rem;
    }

    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        column-count: 2;
        column-gap: 1.25rem;
    }

    .gallery-item {
        margin-bottom: 1.25rem;
    }
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    .navbar .container {
        padding: 0 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background: var(--navy-dark);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        align-items: flex-start;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        width: 100%;
        padding: 1rem 0;
        color: var(--white) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 1rem;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        padding-left: 0.5rem;
    }

    .hero {
        min-height: 100svh;
        min-height: 100dvh;
        padding: 6rem 0 3rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-logo {
        max-width: 260px;
        margin-bottom: 2rem;
    }

    /* Adjust glow for mobile */
    .hero-logo::before {
        width: 130%;
        height: 130%;
        filter: blur(25px);
    }

    .hero-logo::after {
        filter: blur(15px);
    }

    .hero h1 {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
        margin-bottom: 0.75rem;
    }

    .hero .subtitle {
        font-size: 0.7rem;
        letter-spacing: 1px;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }

    .hero-badges {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        width: 100%;
        justify-content: center;
    }

    .badge {
        padding: 0.875rem 1rem;
        flex: 0 1 auto;
        min-width: 85px;
        gap: 0.5rem;
    }

    .badge i {
        font-size: 1.25rem;
    }

    .badge span {
        font-size: 0.6rem;
        letter-spacing: 0.5px;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }

    .scroll-down {
        bottom: 1rem;
        font-size: 1.25rem;
    }

    /* Fix rotating-word alignment on mobile */
    .rotating-word {
        min-width: auto;
        text-align: center;
        display: block;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .section-header p {
        font-size: 0.9375rem;
    }

    .legacy-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .legacy-image {
        order: -1;
    }

    .legacy-image img {
        max-width: 220px;
    }

    .legacy-text p {
        font-size: 0.9375rem;
    }

    .legacy-stat {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 2rem;
    }

    .stat-item h4 {
        font-size: 2rem;
    }

    .stat-item span {
        font-size: 0.7rem;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .timeline-item::after {
        left: 11px;
        right: auto;
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .right {
        left: 0;
    }

    .right::after {
        left: 11px;
    }

    .timeline-content {
        padding: 1.25rem;
    }

    .timeline-content h3 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .timeline-content p {
        font-size: 0.875rem;
    }

    .date {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .value-card {
        padding: 1.5rem 1.25rem;
    }

    .value-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .value-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .value-card p {
        font-size: 0.875rem;
        line-height: 1.7;
    }

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

    .contact-card {
        padding: 1.25rem;
        gap: 1rem;
    }

    .contact-card i {
        font-size: 1.25rem;
    }

    .contact-card-content h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .contact-card-content p {
        font-size: 0.875rem;
    }

    .contact-map {
        min-height: 300px;
    }

    .modal-nav {
        width: 40px;
        height: 40px;
    }

    .modal-prev {
        left: 0.75rem;
    }

    .modal-next {
        right: 0.75rem;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }

    .modal-close i {
        font-size: 1.25rem;
    }

    .modal-nav i {
        font-size: 1rem;
    }

    .modal-caption {
        font-size: 0.875rem;
        bottom: 4rem;
        padding: 0 1rem;
    }

    .modal-counter {
        font-size: 0.75rem;
        padding: 0.375rem 1rem;
    }

    /* Event Modal Mobile */
    .event-modal {
        padding: 0;
    }

    .event-modal.active {
        padding: 0;
        align-items: flex-start;
    }

    .event-modal-content {
        border-radius: 0;
        max-height: none;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .event-modal .modal-close {
        position: fixed;
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .event-modal-image {
        height: 200px;
    }

    .event-modal-image::after {
        height: 60px;
    }

    .event-modal-body {
        padding: 1.5rem 1.25rem 2rem;
    }

    .event-modal-header {
        margin-bottom: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .event-modal-date {
        font-size: 0.6875rem;
        padding: 0.375rem 0.875rem;
        letter-spacing: 1px;
        margin-bottom: 0.75rem;
    }

    .event-modal-title {
        font-size: 1.375rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }

    .event-modal-location {
        font-size: 0.875rem;
        gap: 0.375rem;
    }

    .event-modal-location i {
        font-size: 1rem;
    }

    .event-modal-description,
    .event-modal-details {
        margin-bottom: 1.25rem;
    }

    .event-modal-description h3,
    .event-modal-details h3 {
        font-size: 0.9375rem;
        margin-bottom: 0.5rem;
        gap: 0.375rem;
    }

    .event-modal-description h3::before,
    .event-modal-details h3::before {
        width: 3px;
        height: 16px;
    }

    .event-modal-description p,
    .event-modal-details p {
        font-size: 0.8125rem;
        line-height: 1.65;
    }

    /* Footer mobile */
    footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-grid {
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .footer-col h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }

    .footer-logo-text {
        font-size: 1.5rem !important;
    }

    .footer-desc {
        font-size: 0.875rem;
    }

    .footer-links a {
        font-size: 0.875rem;
    }

    .social-links {
        margin-top: 1.25rem;
    }

    .social-btn {
        width: 38px;
        height: 38px;
    }

    .copyright {
        font-size: 0.75rem;
    }
}

/* ============================================
   Responsive - Small Tablets
   ============================================ */
@media (min-width: 481px) and (max-width: 768px) {
    section {
        padding: 3.5rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    .hero-logo {
        max-width: 300px;
        margin-bottom: 2.5rem;
    }

    .hero h1 {
        font-size: clamp(1.875rem, 6vw, 2.5rem);
    }

    .hero .subtitle {
        font-size: 0.75rem;
        margin-bottom: 1.75rem;
    }

    .hero-badges {
        gap: 0.75rem;
    }

    .badge {
        padding: 1rem 1.25rem;
        min-width: 95px;
    }

    .badge i {
        font-size: 1.375rem;
    }

    .badge span {
        font-size: 0.65rem;
    }

    .legacy-stat {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .stat-item h4 {
        font-size: 2.25rem;
    }

    .stat-item span {
        font-size: 0.75rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .timeline::after {
        left: 25px;
    }

    .timeline-item {
        padding-left: 55px;
        margin-bottom: 2rem;
    }

    .timeline-item::after {
        left: 16px;
        width: 16px;
        height: 16px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-map {
        min-height: 350px;
    }
}

/* ============================================
   Responsive - Small Mobile
   ============================================ */
@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
        column-gap: 1rem;
    }

    .gallery-item {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    section {
        padding: 2.5rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .navbar {
        padding: 0.875rem 0;
    }

    .navbar .container {
        padding: 0 1rem;
    }

    .nav-logo {
        font-size: 1.125rem;
    }

    .nav-logo::before {
        width: 2px;
        height: 24px;
    }

    .nav-links {
        width: 100%;
        right: -100%;
    }

    .hero {
        min-height: 100svh;
        min-height: 100dvh;
        padding: 5rem 0 2rem;
    }

    .hero-content {
        padding: 0.75rem;
    }

    .hero-logo {
        max-width: 200px;
        margin-bottom: 1.5rem;
    }

    .hero-logo::before {
        width: 140%;
        height: 140%;
        filter: blur(20px);
    }

    .hero-logo::after {
        filter: blur(12px);
    }

    .hero h1 {
        font-size: clamp(1.375rem, 6.5vw, 1.75rem);
        margin-bottom: 0.5rem;
    }

    .hero .subtitle {
        font-size: 0.6rem;
        letter-spacing: 0.75px;
        margin-bottom: 1.25rem;
        padding: 0 0.25rem;
    }

    .hero-badges {
        gap: 0.375rem;
        margin-bottom: 1.25rem;
    }

    .badge {
        padding: 0.625rem 0.75rem;
        border-radius: 6px;
        min-width: 75px;
        gap: 0.375rem;
    }

    .badge i {
        font-size: 1rem;
    }

    .badge span {
        font-size: 0.55rem;
        letter-spacing: 0.25px;
    }

    .cta-group {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.8125rem;
    }

    .scroll-down {
        bottom: 0.75rem;
        font-size: 1rem;
    }

    /* Fix rotating-word alignment on small mobile */
    .rotating-word {
        min-width: auto;
        text-align: center;
        display: block;
        width: 100%;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
        margin-bottom: 0.75rem;
    }

    .section-header h2::after {
        width: 40px;
        height: 3px;
        margin: 0.75rem auto 0;
    }

    .section-header p {
        font-size: 0.875rem;
    }

    .legacy-content {
        gap: 1.5rem;
    }

    .legacy-image img {
        max-width: 180px;
    }

    .legacy-text p {
        font-size: 0.875rem;
        line-height: 1.65;
    }

    .legacy-stat {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        gap: 0.75rem;
    }

    .stat-item h4 {
        font-size: 1.75rem;
    }

    .stat-item span {
        font-size: 0.6rem;
    }

    .value-card {
        padding: 1.25rem 1rem;
    }

    .value-icon {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .value-card h3 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .value-card p {
        font-size: 0.8125rem;
    }

    .timeline::after {
        left: 15px;
    }

    .timeline-item {
        padding-left: 40px;
        padding-right: 0;
        margin-bottom: 1.5rem;
    }

    .timeline-item::after {
        left: 7px;
        width: 14px;
        height: 14px;
        border-width: 2px;
    }

    .timeline-content {
        padding: 1rem;
    }

    .timeline-content h3 {
        font-size: 1rem;
        margin-bottom: 0.375rem;
    }

    .timeline-content p {
        font-size: 0.8125rem;
        line-height: 1.6;
    }

    .date {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
        margin-bottom: 0.5rem;
    }

    .contact-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .contact-card i {
        font-size: 1.125rem;
    }

    .contact-card-content h3 {
        font-size: 0.9375rem;
    }

    .contact-card-content p {
        font-size: 0.8125rem;
    }

    .contact-map {
        min-height: 250px;
    }

    footer {
        padding: 2.5rem 0 1.25rem;
    }

    .footer-grid {
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .footer-logo-text {
        font-size: 1.75rem !important;
    }

    .footer-desc {
        font-size: 0.875rem;
    }

    .scroll-down {
        bottom: 1rem;
    }

    /* Event Modal - Extra Small */
    .event-modal-image {
        height: 160px;
    }

    .event-modal-body {
        padding: 1.25rem 1rem 1.5rem;
    }

    .event-modal-header {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .event-modal-date {
        font-size: 0.625rem;
        padding: 0.3rem 0.75rem;
        margin-bottom: 0.5rem;
    }

    .event-modal-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .event-modal-location {
        font-size: 0.8125rem;
    }

    .event-modal-description,
    .event-modal-details {
        margin-bottom: 1rem;
    }

    .event-modal-description h3,
    .event-modal-details h3 {
        font-size: 0.875rem;
    }

    .event-modal-description p,
    .event-modal-details p {
        font-size: 0.75rem;
        line-height: 1.6;
    }
}
