@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&display=swap');

:root {
    --bg-color: #000000;
    --accent-red: #FF0000;
    --text-primary: #EEEEEE;
    --text-secondary: #888888;
    --card-bg: rgba(10, 10, 10, 0.8);
    --border-color: #333333;
    --scanline-color: rgba(255, 255, 255, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: crosshair;
    /* Custom cursor */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Syncopate', sans-serif;
    /* Wide tech feel */
    overflow-x: hidden;
    -webkit-font-smoothing: none;
    /* Sharper pixelated look */
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Scanline Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom,
            var(--scanline-color) 50%,
            rgba(0, 0, 0, 0) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
}

h1,
h2,
h3,
h4,
a,
button {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #000000;
    /* Solid Black as requested */
    border-bottom: 1px solid var(--border-color);
    /* backdrop-filter removed for solid opacity */
}

/* ... existing styles ... */

/* Hero Title Styling (Consolidated) */
.hero-title-svg {
    width: 80%;
    max-width: 600px;
    height: auto;
    overflow: visible;
    z-index: 10;
    pointer-events: none;
    position: absolute;
    top: 28%;
    /* Desktop Position */
    animation: pulse-glow 3s infinite ease-in-out;
}

@media (max-width: 768px) {
    .hero-title-svg {
        top: 42%;
        /* Mobile Position - Sitting lower as requested */
        width: 90%;
    }
}

/* ... existing styles ... */

/* Instagram Button Icon Styles */
#display-insta.cyber-button::after {
    content: '';
    display: block;
    width: 35px;
    height: 35px;
    background: url('assets/instagram_logo_final.png') no-repeat center/contain;
    margin-right: 15px;
    margin-left: -5px;
    order: -1;
    transition: transform 0.3s;
    flex-shrink: 0;
}

#display-insta.cyber-button:hover::after {
    filter: invert(0);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.8rem;
    position: relative;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
}

/* Hero Section */
.hero {
    height: 80vh;
    /* Increased further (80vh) for spacing */
    min-height: 400px;
    /* Ensure it doesn't get too small on landscape mobile */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    text-align: center;
    padding-top: 0;
    /* Exact header offset */
    overflow: hidden;
    /* Ensure "perfect frame" without scroll */
}

.hero-globe {
    width: 100%;
    height: 100%;
    /* Full screen canvas container */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.6;
}

.hero-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* Keep pointer events enabled for internal elements */
}

/* Container for next section */
@media (max-width: 768px) {
    #events {
        margin-top: 5vh;
        /* Reduced from 15vh to tighten layout */
    }
}

/* Desktop Spacing Fix for Large Globe */
#events {
    margin-top: 15rem;
    position: relative;
    z-index: 5;
    /* Ensure text is above scanlines/bg */
}

/* Instagram Button Styling */
/* Old Instagram styles removed to use new .cyber-button standard */

/* If using FontAwesome or SVG, we'd do differently. Assuming assets/instagram.png exists or we use a unicode/svg?
   Let's check if we have an instagram asset. If not, maybe use text or unicode? */
/* Fallback if no image: just text */

@keyframes pulse-glow {
    0% {
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.9));
    }

    100% {
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
    }
}

/* Redundant blocks removed */

.curved-text {
    fill: white;
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 55px;
    /* Slightly smaller to fit */
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-sphere-img {
    width: 45%;
    /* Spec from user */
    max-width: 500px;
    min-width: 300px;
    height: auto;
    margin: 1rem 0;
    filter: contrast(1.2);
    /* Ensure crispness */
    transform: rotate(40deg);
    /* Tilt as per logo */
}

.hero-subtitle-container {
    margin-top: 3rem;
    /* Give space below tilted sphere */
    position: relative;
    z-index: 20;
    /* Ensure on top */
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 0.5em;
    font-weight: 700;
    background: transparent;
    padding: 0;
}

.hero-logo-full {
    width: 80%;
    /* Slightly smaller width to encourage vertical shrink */
    max-width: 600px;
    max-height: calc(60vh - 100px);
    /* Aggressive max-height */
    object-fit: contain;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: contrast(1.1);
    /* Slight pop */
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--text-primary);
    padding-bottom: 0.5rem;
    color: var(--text-primary);
    /* White instead of red for sharper look */
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    gap: 1rem;
}

/* Fix helper for Anchor Navigation (Header Offset) */
section {
    scroll-margin-top: 120px;
    /* Header is 100px + 20px padding */
}

.section-link {
    font-size: 0.9rem;
    color: white !important;
    text-decoration: none;
    border: 1px solid white !important;
    padding: 1rem 2rem;
    transition: all 0.3s;
    background: transparent !important;
    text-transform: uppercase;
    font-weight: 700;
    display: inline-block;
}

.section-link:hover {
    background: white !important;
    color: black !important;
    border-color: white !important;
}

/* ... other styles ... */

/* Fix for specific Instagram Icon pseudo currently conflicting */
/* We need to separate the icon handling for the instagram button specifically */
#display-insta.cyber-button::after {
    /* Use after for the icon to not conflict with the slide before */
    content: '';
    display: block;
    width: 40px;
    /* Bigger logo as requested "logo comme bouton" implies prominence */
    height: 40px;
    background: url('assets/instagram_user.jpg') no-repeat center/contain;
    border-radius: 50%;
    /* Circular */
    margin-right: 15px;
    margin-left: -10px;
    order: -1;
    /* Move to left */
    transition: transform 0.3s;
}

.center-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.glass-card {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: all 0.2s;
    position: relative;
    /* overflow: hidden removed to prevent clipping interactive elements like buttons */
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--accent-red);
    transform: scaleY(0);
    transition: transform 0.2s;
    transform-origin: top;
}

.glass-card:hover {
    border-color: var(--text-primary);
    background: #0a0a0a;
}

.glass-card:hover::before {
    transform: scaleY(1);
}

.event-date {
    font-size: 0.8rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
    display: block;
}

.event-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.event-location {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Event Detail Page Specifics */
.event-full-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.event-image img {
    width: 100%;
    height: auto;
    filter: grayscale(100%) contrast(1.2);
    border: 1px solid var(--border-color);
}

.event-info h1 {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.event-meta {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    display: flex;
    gap: 2rem;
}

.event-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

/* Improved Description Text */
#about-text,
.event-description {
    color: var(--text-primary);
    /* was secondary */
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    line-height: 1.7;
}

.cyber-button {
    background: transparent;
    /* Removed Red background */
    color: white;
    /* White text */
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    display: inline-flex;
    /* Changed to flex for icon alignment */
    align-items: center;
    border: 2px solid white;
    /* White border */
    transition: color 0.3s;
    position: relative;
    z-index: 10;
    cursor: pointer;
    overflow: hidden;
    /* For slide effect */
    -webkit-tap-highlight-color: transparent;
}

/* Slide Effect Pseudo-element */
.cyber-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    /* Start empty */
    height: 100%;
    background: white;
    /* White fill */
    z-index: -1;
    /* Behind text */
    transition: width 0.3s ease-in-out;
}

.cyber-button:hover {
    color: black;
    /* Invert text to black */
    background: transparent;
}

.cyber-button:hover::before {
    width: 100%;
    /* Slide to full width */
}


.cyber-button.disabled {
    background: var(--border-color);
    border-color: var(--border-color);
    color: #555;
    cursor: not-allowed;
}

.admin-link {
    text-decoration: none;
    color: #333;
    font-size: 0.7rem;
    margin: 0 0.5rem;
}

.admin-link:hover {
    color: var(--accent-red);
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }

    .logo-img {
        height: 40px;
    }

    .menu-toggle {
        display: block !important;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 1001;
        transition: text-shadow 0.3s;
    }

    .menu-toggle:hover {
        text-shadow: 0 0 10px white;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: black;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    /* Fix for Instagram button overflow */
    .cyber-button {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
        /* Slightly tighter padding */
        max-width: 100%;
        /* Ensure it doesn't overflow container */
    }

    .glass-card {
        padding: 1.2rem;
        /* Reduce padding to give more horizontal room */
    }

    #display-insta.cyber-button::after {
        width: 25px;
        /* Slightly smaller icon for mobile */
        height: 25px;
        margin-right: 8px;
    }

    .hero-title-svg {
        margin-bottom: -90px;
        width: 90%;
    }

    .hero {
        height: 70vh !important;
        /* Increased context for the lowered globe */
        min-height: 500px !important;
        padding-top: 0 !important;
    }


    .event-full-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .event-info h1 {
        font-size: 2.5rem;
    }
}

/* Split Layout Styling */
.insta-ref-container {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    /* Safety wrap */
    justify-content: center;
}

.insta-handle-text {
    color: white;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1rem;
    text-transform: uppercase;
    transition: color 0.3s;
}

.insta-handle-text:hover {
    color: var(--accent-red);
    /* Or grey? */
    text-decoration: underline;
}

/* Mobile: Force Column Layout */
@media (max-width: 400px) {
    .insta-ref-container {
        flex-direction: column;
        gap: 10px;
    }

    .insta-handle-text {
        font-size: 0.9rem;
    }

    .cyber-button {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}