/* shared-styles.css */
@font-face {
    font-family: 'PubliFluor';
    src: url('../fonts/PubliFluorNormale.otf') format('opentype');
}

@font-face {
    font-family: 'Insolente';
    src: url('../fonts/Insolente-Regular.otf') format('truetype');
    font-weight: bold;
}

@font-face {
    font-family: 'Gabarito';
    src: url('../fonts/Gabarito-VariableFont_wght.ttf') format('truetype');
}

@font-face {
    font-family: 'FluxischElse';
    src: url('../fonts/FluxischElse-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

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

body {
    min-height: 100vh;
    background-image: url('../images/background_2.jpg');
    background-size: 120%;
    background-position: center;
    background-attachment: scroll;
    background-repeat: no-repeat;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Gabarito', Arial, sans-serif;
}

/* Banner Container - moved up 150px and overflowing */
.banner-container {
    position: absolute;
    top: -250px;              /* was -150px, moves it higher */
    left: 50%;
    transform: translateX(-50%);
    width: 110vw;             /* allow overflow beyond viewport */
    height: 500px;            /* taller to fill edge-to-edge */
    z-index: 1;
    overflow: visible;
    pointer-events: none;     /* don't block clicks on content below */
}

/* Restore pointer events for all interactive elements inside the banner */
.nav-buttons,
.mobile-nav,
.create-event-link,
.blurb-container {
    pointer-events: auto;
}

/* Banner Image - stretch fully */
.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;        /* keeps proportions but fills container */
    display: block;
}

/* Blurb Container - positioned on top of banner, in the center */
.blurb-container {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 160px;
    z-index: 10;
}

/* Blurb Image */
.blurb-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Boletucho Container - inside the blurb */
.boletucho-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 75px;
    z-index: 20;
}

/* Boletucho Image */
.boletucho-image {
    width: 100%;
    height: 90%;
    object-fit: contain;
    display: block;
}

/* Retro Text Style 4 - Wavy underline for shared use - NOW WITH VINTAGE FONT */
.retro-link {
    font-family: 'Insolente', Arial, sans-serif;
    font-weight: bold;
    color: #000000;
    text-decoration: none;
    font-size: 17px;
    transition: all 0.25s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 5px;
}

.nav-icon {
    height: 66px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.retro-link:hover {
    background-color: #ffffff;
    box-shadow: 0 0 0 4px #ffffff;
    letter-spacing: 1px;
}

/* Modal Styles - Added to shared styles for potential reuse */
.modal {
    display: none;
    position: fixed;
    z-index: 1002; /* Increased from 1000 to be above burger menu */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    font-family: 'Gabarito', Arial, sans-serif;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    max-width: 300px;
}

.modal-content h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.modal-content p {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.modal-button {
    background: #000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-family: 'Insolente', Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-button:hover {
    background: #333;
    transform: scale(1.05);
}

/* Mobile: banner size + blurb position */
@media (max-width: 768px) {
    .banner-container {
        top: -100px;
        height: 250px;
    }

    .blurb-container {
        top: 50%;
        transform: translate(-50%, -50%);
        width: 150px;
        height: 120px;
    }

    .boletucho-container {
        width: 130px;
        height: 55px;
    }
}

/* ===== Global mobile header (burger/profile) used across pages ===== */
.global-mobile-nav {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none; /* icons remain clickable via child rule */
}
.global-mobile-nav img {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: transform 0.2s ease;
    pointer-events: auto; /* re-enable pointer events for icons */
}
.global-mobile-nav img:hover { transform: scale(1.08); }

/* ===== Create page layout (desktop: 2 columns, mobile: toggle) ===== */
.compose-wrapper {
    position: relative;
    margin: 140px auto 40px;      /* pushes content below banner area */
    max-width: 1100px;
    padding: 20px;
}
.compose-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.panel {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.panel img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Floating toggle button (FAB) */
.fab-toggle {
    position: fixed;
    bottom: 18px;
    right: 18px;                 /* default: right side */
    z-index: 200;
    border: none;
    border-radius: 999px;
    padding: 12px 16px;
    background: #000;
    color: #fff;
    font-family: 'Insolente', Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.fab-toggle:active { transform: scale(0.98); }

/* Strictly disable sideways scroll on mobile */
html, body { overflow-x: hidden; }

@media (max-width: 768px) {
    body {
        background-size: cover !important;
        background-repeat: no-repeat !important;
    }
}

/* ===== Mobile behavior: show one panel at a time, toggle with FAB ===== */
@media (max-width: 768px) {
    .compose-grid { display: block; }
    .panel { display: none; }

    /* Show only the active panel via data-view on wrapper */
    .compose-wrapper[data-view="form"] .panel--form { display: block; }
    .compose-wrapper[data-view="poster"] .panel--poster { display: block; }

    /* Move FAB to the opposite side depending on view */
    .fab-toggle { right: 18px; left: auto; }
    .compose-wrapper[data-view="poster"] ~ .fab-toggle { left: 18px; right: auto; }
}

/* ===== BURGER MENU STYLES ===== */
.burger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000; /* Burger overlay */
}

.burger-overlay.active {
    opacity: 1;
    visibility: visible;
}

.burger-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-image: url('../images/wallwall.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease;
    z-index: 1001; /* Burger sidebar - above overlay but below modal */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.burger-sidebar.active {
    left: 0;
}

/* Overlay gradient for readability */
.burger-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.65) 0%, 
        rgba(255, 255, 255, 0.85) 100%);
    z-index: -1;
}

.burger-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    color: #333;
}

.burger-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.burger-nav {
    padding: 80px 20px 20px;
    flex: 1;
}

.burger-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 8px;
    color: #333;
    text-decoration: none;
    font-family: 'Gabarito', Arial, sans-serif;
    font-size: 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.burger-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.burger-link:hover::before {
    left: 100%;
}

.burger-link:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.burger-link:active {
    transform: translateX(5px) scale(0.98);
}

.burger-icon {
    margin-right: 15px;
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.burger-footer {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

.burger-logo {
    font-family: 'Insolente', Arial, sans-serif;
    font-weight: bold;
    font-size: 24px;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .burger-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .burger-sidebar.active {
        left: 0;
    }
}

/* ---- PWA Install Banner ---- */
#pwa-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 0 12px 12px;
    transition: bottom 0.3s ease;
}

#pwa-banner.pwa-banner--visible {
    bottom: 0;
}

.pwa-banner-inner {
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
    max-width: 600px;
    margin: 0 auto;
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.pwa-banner-text strong {
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.pwa-banner-text span {
    font-family: 'Gabarito', Arial, sans-serif;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
}

.pwa-banner-btns {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-btn {
    background: #9fbc99;
    color: #fff;
    border: none;
    padding: 8px 20px;
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 0.78rem;
    letter-spacing: 1px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s;
}

.pwa-install-btn:hover { background: #7ba075; }

.pwa-dismiss-btn {
    background: transparent;
    color: rgba(255,255,255,0.5);
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    transition: color 0.15s;
}

.pwa-dismiss-btn:hover { color: #fff; }

/* ---- Nav badge (friend request count) ---- */
.nav-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
    margin-left: 6px;
    vertical-align: middle;
}