:root {
    --primary: #00f3ff;
    --secondary: #ff00ff;
    --dark: #0a0a0a;
    --darker: #050505;
    --light: #ffffff;
    --gray: #2a2a2a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
    --glass-bg: rgba(10, 10, 10, 0.7);
    --glass-border: rgba(0, 243, 255, 0.1);
}

body.magenta-mode {
    --primary: #ff00ff;
    --secondary: #00f3ff;
    --glass-border: rgba(255, 0, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

#particleCanvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1;
}

.scanline-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 10;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 243, 255, 0.01) 50%);
    background-size: 100% 3px;
    opacity: 0.5;
}

header {
    position: fixed; width: 100%; top: 0; z-index: 1000;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 15px 0;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-decoration: none;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}
.logo-main {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    line-height: 1;
}
.logo-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--light);
    opacity: 0.7;
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1;
}

.nav-links { display: flex; gap: clamp(8px, 1vw, 16px); align-items: center; margin-left: 150px; }
.nav-links a { 
    font-weight: 500; position: relative; padding: 6px 9px; border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 0.86rem;
}
.nav-links a:hover, .nav-links a.active { 
    color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.1), rgba(255, 0, 255, 0.05));
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.mobile-menu-btn { display: none; background: none; border: none; color: var(--light); font-size: 1.5rem; cursor: pointer; }

/* HERO */
.hero {
    height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 0 20px; position: relative; overflow: hidden;
    z-index: 2;
}

.page-video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.hero-video-bg {
    display: none;
}

.page-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10,10,10,0.4), rgba(5,5,5,0.7));
    z-index: 1;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10,10,10,0.3), rgba(5,5,5,0.6));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 20;
    transform: translateY(-45px);
}

/* Floating Logo - ABOVE title */
.floating-logo {
    position: relative;
    margin: 10px auto 34px;
    animation: float 6s ease-in-out infinite;
    max-width: 720px;
    opacity: 0.9;
    width: min(680px, 86vw);
    pointer-events: none;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.hero h1 {
    font-size: 4rem; margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    animation: heroGlow 3s ease-in-out infinite alternate;
    font-weight: 900;
    letter-spacing: 2px;
}
@keyframes heroGlow {
    0% { filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.3)); }
    100% { filter: drop-shadow(0 0 40px rgba(255, 0, 255, 0.3)); }
}
.hero p { font-size: 1.3rem; max-width: 600px; margin: 0 auto 40px; color: #b8b8b8; font-weight: 400; }

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, var(--primary), #00a8ff);
    color: var(--darker); padding: 14px 32px; border-radius: 50px;
    font-weight: 600; font-size: 1rem; border: none;
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.4); transition: var(--transition);
    position: relative; overflow: hidden; cursor: pointer;
    height: 52px;
    min-width: 160px;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0, 243, 255, 0.6); }
.btn-secondary { background: transparent; border: 2px solid var(--primary); color: var(--primary); box-shadow: none; }
.btn-secondary:hover { background: rgba(0, 243, 255, 0.1); }
.btn-tertiary { background: transparent; border: 2px solid var(--secondary); color: var(--secondary); box-shadow: none; }
.btn-tertiary:hover { background: rgba(255, 0, 255, 0.1); }

.ripple {
    position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.6);
    transform: scale(0); animation: rippleEffect 0.6s linear; pointer-events: none;
}
@keyframes rippleEffect {
    to { transform: scale(4); opacity: 0; }
}

/* SECTIONS */
section { padding: 100px 0; position: relative; z-index: 2; }
section:not(.hero) { background-color: rgba(10, 10, 10, 0.82); }
.section-title { text-align: center; margin-bottom: 70px; }
.section-title h2 { font-size: 2.8rem; margin-bottom: 15px; position: relative; display: inline-block; }
.section-title h2::after {
    content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
    width: 70px; height: 4px; background: linear-gradient(to right, var(--primary), var(--secondary));
}
.section-title p { color: #b8b8b8; max-width: 700px; margin: 30px auto 0; }

.reveal-text { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.reveal-text.visible { opacity: 1; transform: translateY(0); }

/* FEATURES */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-card {
    background: var(--gray); border-radius: 15px; padding: 35px; text-align: center;
    transition: var(--transition); border: 1px solid rgba(0, 243, 255, 0.1);
}
.feature-card:hover { 
    transform: translateY(-10px); 
    border-color: rgba(0, 243, 255, 0.3); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}
.feature-icon { font-size: 3.5rem; margin-bottom: 20px; color: var(--primary); }

/* EVENTS - NO CAPTIONS */
.events-grid-3d { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; perspective: 1000px; }
.events-empty {
    grid-column: 1 / -1;
    color: #c8c8c8;
    text-align: center;
    padding: 32px 0;
}
.event-card-3d {
    position: relative; width: 100%; aspect-ratio: 4 / 5; transform-style: preserve-3d;
    cursor: pointer;
}
.event-card-3d.flipped .card-front {
    opacity: 0;
    pointer-events: none;
    transform: rotateY(-180deg);
}
.event-card-3d.flipped .card-back {
    opacity: 1;
    transform: rotateY(0);
}
.card-face {
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
    border-radius: 20px; overflow: hidden; box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.card-front {
    background-image: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.7) 100%), var(--bg-img);
    background-size: 100% 100%, contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #050508;
    display: flex; flex-direction: column; justify-content: flex-end; padding: 30px;
    border: 1px solid rgba(0, 243, 255, 0.2);
}
.card-back {
    background: var(--gray); transform: rotateY(180deg); padding: 30px;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    border: 1px solid var(--primary);
    opacity: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.event-card-3d:hover { filter: drop-shadow(0 0 24px rgba(0, 243, 255, 0.55)); }
.event-date {
    position: absolute; top: 20px; right: 20px; background: linear-gradient(135deg, var(--secondary), #ff0066);
    color: var(--darker); padding: 8px 15px; border-radius: 10px; font-weight: 800;
    box-shadow: 0 5px 15px rgba(255, 0, 255, 0.4);
    display: none;
}

/* GALLERY */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.gallery-item {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 15px; overflow: hidden; cursor: pointer;
    box-shadow: var(--shadow); transition: var(--transition);
}
.gallery-item:hover { 
    transform: scale(1.03); 
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item .gallery-caption {
    position: absolute; 
    bottom: 10px; 
    left: 10px; 
    right: 10px;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    color: var(--light);
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    transform: translateY(0);
    transition: var(--transition);
    border-radius: 12px;
    border: 1px solid rgba(0, 243, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
.gallery-item:hover .gallery-caption {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--primary);
    border-color: rgba(0, 243, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.3);
    transform: translateY(-2px);
}

/* Gallery Modal */
.gallery-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 3000; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.gallery-modal.active { display: flex; opacity: 1; }
.modal-gallery-container {
    position: relative; width: 90%; max-width: 1000px;
    border-radius: 15px; overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.5);
}
.modal-gallery-slide {
    display: none; width: 100%; height: 600px;
    background-size: contain; background-position: center; background-repeat: no-repeat;
    background-color: #030306;
}
.modal-gallery-slide.active { display: block; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-gallery-nav {
    position: absolute; top: 50%; width: 100%;
    display: flex; justify-content: space-between; padding: 0 30px;
    transform: translateY(-50%);
}
.modal-gallery-btn {
    background: rgba(0, 0, 0, 0.7); color: var(--primary); border: none;
    width: 60px; height: 60px; border-radius: 50%; font-size: 1.8rem;
    cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; z-index: 10;
}
.modal-gallery-btn:hover { background: var(--primary); color: var(--darker); transform: scale(1.1); }
.modal-gallery-counter {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7); color: var(--primary);
    padding: 8px 20px; border-radius: 30px; font-weight: 600; font-size: 1.2rem; z-index: 10;
}
.close-gallery-modal {
    position: absolute; top: 20px; right: 20px; background: rgba(0, 0, 0, 0.7);
    color: var(--primary); border: none; width: 50px; height: 50px;
    border-radius: 50%; font-size: 1.5rem; cursor: pointer;
    transition: var(--transition); z-index: 20;
}
.close-gallery-modal:hover { background: var(--primary); color: var(--darker); transform: rotate(90deg); }

/* VIDEOS */
.videos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.video-card { 
    position: relative; padding-top: 56.25%; background: var(--gray); 
    border-radius: 15px; overflow: hidden; cursor: pointer;
    box-shadow: var(--shadow); transition: var(--transition);
}
.video-card:hover { transform: scale(1.03); box-shadow: 0 15px 35px rgba(0,0,0,0.6); }

.video-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.video-container iframe { width: 100%; height: 100%; border: none; display: block; }

.video-title {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.75); color: var(--light);
    padding: 15px; text-align: center; font-weight: 600; font-size: 1.1rem;
    transition: var(--transition); z-index: 3;
}
.video-title time { display: block; margin-top: 4px; font-size: .85em; font-weight: 400; }
.video-card:hover .video-title { background: rgba(0, 243, 255, 0.85); color: var(--darker); }

/* Residents */
.residents-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 2vw, 18px);
    max-width: 980px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}
.resident-card {
    overflow: hidden;
    border: 1px solid rgba(0, 243, 255, 0.15);
    border-radius: 14px;
    background: var(--gray);
    text-align: center;
}
.resident-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}
.resident-card span {
    display: block;
    padding: 10px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* CONTACT & MAP */
.contact-wrapper { display: flex; flex-wrap: wrap; gap: 50px; }
.contact-info { flex: 1; min-width: 300px; }
.contact-info h3 { font-size: 2rem; margin-bottom: 30px; position: relative; padding-bottom: 15px; }
.contact-info h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 50px; height: 3px; background: var(--primary); }
.contact-info p { margin-bottom: 15px; font-size: 1.1rem; }

.map-container {
    flex: 1;
    min-width: 300px;
    height: 400px;
    background: var(--gray);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.map-static {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(5,5,8,0.14), rgba(5,5,8,0.8)),
        radial-gradient(circle at 50% 40%, rgba(0, 243, 255, 0.16), transparent 24%),
        linear-gradient(135deg, #171717, #080808);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    position: relative;
    isolation: isolate;
}

.map-static::before {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(0, 243, 255, 0.12) 1px, transparent 1px),
        linear-gradient(rgba(0, 243, 255, 0.08) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.32;
    z-index: -1;
}

.map-static::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 8px rgba(0, 243, 255, 0.16), 0 0 34px rgba(0, 243, 255, 0.9);
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.map-static i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
    opacity: 0.8;
}

.map-static h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--light);
}

.map-static p {
    color: #b8b8b8;
    margin-bottom: 25px;
    font-size: 1rem;
}

.map-static .map-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, var(--primary), #00a8ff);
    color: var(--darker);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.map-static .map-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 243, 255, 0.4);
}

.map-embed {
    position: relative;
    width: 100%;
    height: 100%;
    background: #111;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    filter: saturate(0.95) contrast(1.04);
}

.map-embed .map-link {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 36px);
    max-width: 310px;
    min-height: 48px;
    background: linear-gradient(90deg, var(--primary), #00a8ff);
    color: var(--darker);
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.94rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 24px rgba(0, 243, 255, 0.3);
}

.map-embed .map-link:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 34px rgba(0, 243, 255, 0.5);
}

.social-links { display: flex; gap: 15px; margin-top: 30px; }
.social-link {
    width: 60px; height: 60px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 1.8rem;
    transition: var(--transition); text-decoration: none; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.social-link.vk { background: #4C75A3; }
.social-link.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-link.telegram { background: #0088cc; }
.social-link:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 6px 15px rgba(0,0,0,0.4); opacity: 0.9; }

/* FOOTER */
footer { background: var(--darker); padding: 40px 0; text-align: center; color: #8f8f8f; border-top: 1px solid #222; }

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-legal-link {
    color: #b8b8b8;
    font-size: 0.86rem;
}

.footer-legal-link:hover {
    color: var(--primary);
}

.footer-theme-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: #888;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cookie-consent {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60000;
    width: min(420px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid rgba(0, 243, 255, 0.35);
    border-radius: 8px;
    background: rgba(5, 5, 5, 0.94);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    color: #e8e8e8;
}

.cookie-consent[hidden] { display: none; }

.cookie-consent p {
    margin: 0 0 14px;
    color: #c8c8c8;
    font-size: 0.92rem;
}

.cookie-consent a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-actions .btn {
    min-height: 42px;
    padding: 10px 18px;
}

/* MOBILE NAV */
.mobile-nav {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(10, 10, 10, 0.98); border-top: 1px solid #333;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px 2px;
    padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    z-index: 1000;
    backdrop-filter: blur(20px);
}
.mobile-nav a {
    color: #a7a7a7;
    font-size: 0.66rem;
    line-height: 1.05;
    text-align: center;
    display: flex;
    min-width: 0;
    min-height: 52px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 8px;
}
.mobile-nav a i { font-size: 1.05rem; }
.mobile-nav a.active {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.1), rgba(255, 0, 255, 0.06));
}
.mobile-nav span {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.skip-link {
    position: absolute;
    top: -120px;
    left: 16px;
    z-index: 10001;
    padding: 12px 18px;
    border-radius: 8px;
    background: var(--primary);
    color: var(--darker);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 16px;
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

.mobile-menu-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}
.event-card-3d:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}
.nav-actions { margin-left: 4px; }
.nav-rent-btn,
.nav-book-btn {
    padding: 8px 14px !important;
    font-size: 0.84rem !important;
    min-width: auto !important;
    height: auto !important;
    margin-left: 0 !important;
}

.event-hint {
    position: relative;
    z-index: 2;
    margin-top: auto;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.02em;
}

/* RESPONSIVE */
@media (max-width: 1180px) {
    nav { justify-content: space-between; }
    .logo {
        position: static;
        top: auto;
        left: auto;
        transform: none;
    }
    .nav-links { display: none; margin-left: 0; }
    .mobile-menu-btn { display: block; }
    .nav-links.active {
        display: flex; flex-direction: column; position: fixed; top: 70px; left: 0; width: 100%;
        background: var(--dark); padding: 30px 0; text-align: center; gap: 15px;
        animation: fadeIn 0.3s ease;
        max-height: 70vh;
        overflow-y: auto;
    }
    .nav-actions { margin-left: 0; width: 100%; max-width: 280px; }
    .nav-rent-btn,
    .nav-book-btn { width: 100%; max-width: 280px; }
}

@media (max-width: 992px) {
    .gallery-masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .modal-gallery-slide { height: 400px; }
}

@media (max-width: 768px) {
    nav { justify-content: space-between; }
    .nav-links { margin-left: 0; }
    .logo {
        position: static;
        top: auto;
        left: auto;
        transform: none;
    }
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .nav-links.active {
        display: flex; flex-direction: column; position: fixed; top: 70px; left: 0; width: 100%;
        background: var(--dark); padding: 30px 0; text-align: center; gap: 15px;
        animation: fadeIn 0.3s ease;
        max-height: 70vh;
        overflow-y: auto;
    }
    .mobile-nav { display: grid; }
    .hero {
        min-height: 100svh;
        height: auto;
        padding-top: 90px;
        padding-bottom: 40px;
        justify-content: center;
        align-items: center;
    }
    .hero-content {
        transform: none;
        width: 100%;
        max-width: 390px;
        margin: 0 auto;
        padding-left: 0;
        padding-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    section { padding: 60px 0; }
    footer { margin-bottom: 126px; }
    .gallery-masonry { grid-template-columns: 1fr; }
    .modal-gallery-slide { height: 300px; }
    body { padding-bottom: 126px; }

    .nav-actions { margin-left: 0; width: 100%; max-width: 280px; }
    .nav-rent-btn,
    .nav-book-btn { width: 100%; max-width: 280px; }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    .btn {
        width: 100%;
        max-width: 280px;
    }

    .floating-logo {
        width: min(82vw, 350px);
        max-width: 350px;
        margin: 34px auto 26px;
        display: flex;
        justify-content: center;
        align-items: center;
        animation: none;
        transform: none;
    }
    .floating-logo img {
        width: 100%;
        margin: 0 auto;
    }

    .events-grid-3d,
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .event-card-3d {
        height: auto;
    }
    .card-face {
        border-radius: 16px;
    }
    .card-back {
        justify-content: flex-start;
        padding: 24px 18px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .card-back h3 {
        font-size: 1.35rem;
        margin-bottom: 12px;
    }
    .card-back p {
        font-size: 0.94rem;
        line-height: 1.45;
        margin-bottom: 10px;
    }
    .card-back .btn {
        flex: 0 0 auto;
        margin-top: 12px !important;
    }
    .card-front {
        background-size: 100% 100%, contain;
        background-color: #050508;
        background-position: center;
    }
    .modal-gallery-container {
        width: calc(100% - 24px);
    }
    .modal-gallery-nav {
        padding: 0 10px;
    }
    .modal-gallery-btn {
        width: 46px;
        height: 46px;
        font-size: 1.4rem;
    }
    .logo-main { font-size: 1.3rem; }
    .logo-sub { font-size: 0.65rem; letter-spacing: 2px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .section-title h2 { font-size: 2rem; }
    .event-card-3d { height: auto; }
    .video-title {
        font-size: 0.95rem;
        padding: 12px;
    }

}

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

.back-to-top {
    position: fixed; bottom: 90px; right: 20px;
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--primary); color: var(--darker);
    border: none; cursor: pointer; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(20px); transition: all 0.3s;
    z-index: 998; box-shadow: 0 4px 15px rgba(0,243,255,0.4);
}
.back-to-top.active { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,243,255,0.6); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .floating-logo { animation: none; }
    .scanline-overlay { display: none; }
}

/* EVENTS VIDEO BACKGROUND */
#events {
    position: relative;
    overflow: hidden;
}
.events-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.25;
}
.events-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10,10,10,0.75), rgba(5,5,5,0.85));
    z-index: 1;
}
#events .container {
    position: relative;
    z-index: 2;
}

/* VIDEO CLOSE BUTTON */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.video-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary);
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.video-close-btn:hover {
    background: var(--primary);
    color: var(--darker);
    transform: scale(1.1);
}

/* PREVENT VIDEO NAVIGATION TO RELATED */
.video-container iframe {
    pointer-events: auto;
}
.video-card:has(.video-container) {
    pointer-events: none;
}
.video-card:has(.video-container) .video-close-btn {
    pointer-events: auto;
}
.video-card:has(.video-container) iframe {
    pointer-events: auto;
}

:where(a, button, input, [role="button"], [tabindex]):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(0, 243, 255, 0.22);
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
    #particleCanvas, .scanline-overlay { display: none; }
}
