@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Oswald:wght@700&family=League+Gothic&family=Gabarito:wght@900&display=swap');

:root {
    --primary: #00aaff;
    --black: #000000;
    --white: #ffffff;
    --paper: #ffffff;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

/* Texture Overlay */
html::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-image: url('https://revistadj.com/blog/base-body-overlay.gif');
    background-repeat: repeat;
    opacity: 0.05;
    z-index: 9999; /* Higher than everything (including header/modals) */
    pointer-events: none;
}

html {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--paper);
    color: var(--black);
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

.no-scroll {
    overflow: hidden !important;
    height: 100% !important;
}

#magazine-wrapper {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

h1, h2, h3, h4, .editorial-title {
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 0.9;
    letter-spacing: -0.05em;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Controlled Chaos Utilities */
.rotate-1 { transform: rotate(1deg); }
.rotate--1 { transform: rotate(-1deg); }
.rotate-2 { transform: rotate(2deg); }
.rotate--2 { transform: rotate(-2deg); }

.box-shadow-heavy {
    box-shadow: 10px 10px 0px var(--black);
}

/* Form Styles mimicking Magazine Vibe */
.magazine-input {
    width: 100%;
    padding: 15px;
    border: 4px solid var(--black);
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 20px;
    outline: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.magazine-input:focus {
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0px var(--primary);
}

.magazine-btn {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary);
    color: var(--white);
    border: 4px solid var(--black);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0px var(--black);
}

.magazine-btn:hover {
    background: var(--black);
    transform: translate(0, 0);
    box-shadow: none;
}

.sticker {
    display: inline-block;
    background: black;
    color: var(--white);
    padding: 4px 15px;
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
    transition: transform 0.2s, background 0.2s;
    border: none;
}
.sticker:hover {
    transform: scale(1.05) rotate(0deg) !important;
}
.sticker-red { background: #ff4444 !important; }
.sticker-blue { background: #00aaff !important; }
.sticker-black { background: black !important; }

/* Base Blocks */
.hero-section {
    position: relative;
    padding: 50px 0 0 0;
}

.glass-panel {
    background: white;
    border: 5px solid black;
    padding: 40px;
    position: relative;
}

.desktop-only { display: flex; }
.mobile-only { display: none; }
.mobile-flex { display: none; }
.burger-icon { display: none; }

/* Header & Navigation System */
.main-header {
    padding: 20px 0;
    transition: all 0.3s ease;
}

.revista-text { font-family: 'League Gothic', sans-serif; color: black; font-weight: 400; }
.dj-text { font-family: 'Gabarito', sans-serif; color: #00aaff; font-weight: 900; margin-left: 5px; font-size: 1.09em; }

/* Desktop Specifics */
.desktop-header-layout {
    flex-direction: column;
    width: 100%;
}
.header-logo-desktop { text-align: center; margin-bottom: 30px; }
.logo-text-desktop { font-size: 3.5rem; letter-spacing: 0; text-decoration: none; }
.header-divider { height: 5px; background: black; width: 100%; margin-bottom: 30px; }

/* Desktop Navigation */
.header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    .mobile-flex { 
        display: flex !important; 
        align-items: center !important; 
        justify-content: space-between !important;
        width: 100%;
        min-height: 50px;
    }
    .header-nav { display: none !important; }

    header.main-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: var(--paper) !important;
        z-index: 2100 !important; /* Above sidebar (2005) */
        padding: 10px 20px !important;
        margin: 0 !important;
        max-width: 100% !important;
        box-shadow: none; /* No border as requested */
    }

    .header-spacer { width: 44px; } /* Same as burger width for centering */
    .header-logo { text-align: center; flex-grow: 1; }
    .logo-text { font-size: 2.2rem; letter-spacing: 0; text-decoration: none; }

    #magazine-wrapper {
        padding-top: 65px !important; /* Matches (header height + logo) */
    }
}

/* Burger Icon Animation & Positioning */
.burger-icon {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    z-index: 3000; /* Higher than sidebar (2005) */
    position: relative;
    transition: all 0.3s ease;
    width: 44px;
}

/* Side Drawer remains same as before, ensuring it works with fixed header */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: white;
    color: black;
    z-index: 2005;
    padding: 80px 30px 30px 30px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
}

.mobile-sidebar nav a {
    display: block;
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: black;
    text-decoration: none;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    text-transform: uppercase;
    font-weight: 700;
}

.burger-icon {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    z-index: 2001; /* Above sidebar */
    position: relative;
    transition: all 0.3s ease;
}

.burger-icon span {
    display: block;
    width: 30px;
    height: 4px;
    background: black;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Burger to X Transformation */
.burger-icon.is-open span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.burger-icon.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.burger-icon.is-open span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Competition Elements */
.competition-hero {
    border: 5px solid black;
    background: #f0f0f0;
    min-height: 300px;
    position: relative;
    margin-bottom: 50px;
}
.competition-hero img {
    width: 100%;
    max-height: 600px; 
    object-fit: cover;
    object-position: top;
    display: block;
}
.large-title-overlap {
    position: absolute; 
    bottom: -20px; 
    left: 20px; 
    width: calc(100% - 40px); 
    max-width: 1000px; 
    z-index: 10;
}
.fitty-hero {
    display: inline-block; 
    background: var(--white); 
    padding: 20px 40px; 
    border: 4px solid black; 
    margin-top: 10px; 
    white-space: nowrap; 
    transform: rotate(-1.5deg); 
    max-width: 100%; 
    position: relative; 
    z-index: 1;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }

    /* Case: Prize Cards 100% wide */
    .prize-card {
        width: 100% !important;
        margin-left: 0 !important;
        left: 0 !important;
    }
    .prize-card h3 {
        font-size: 2.5rem !important;
        top: -25px !important;
        left: 10px !important;
    }

    /* Case: Timeline elements smaller */
    .timeline-node div[style*="width: 80px"] {
        width: 50px !important;
        height: 50px !important;
    }
    .timeline-node svg {
        width: 24px !important;
        height: 24px !important;
    }
    .timeline-node div[style*="font-size: 1.5rem"] {
        font-size: 0.9rem !important;
    }
    .timeline-node div[style*="font-size: 1.1rem"] {
        font-size: 0.75rem !important;
    }

    /* Case: Abierto sign 50% smaller */
    .abierto-sign {
        padding: 10px 8px 8px 8px !important;
        transform: translateY(-50%) rotate(3deg) scale(0.65) !important;
        transform-origin: right center;
        right: -10px !important;
    }
    .abierto-sign div[style*="font-size: 2.3rem"] {
        font-size: 1.5rem !important;
    }
    .abierto-sign #countdown {
        font-size: 0.65rem !important;
        padding: 4px 8px !important;
    }
    .abierto-sign .participa-btn {
        font-size: 1rem !important;
        padding: 6px !important;
        margin-top: 10px !important;
    }

    /* Case: Concurso Remix text half size */
    .concurso-sticker {
        font-size: 1.8rem !important;
        padding: 5px 15px !important;
    }
}
