/* ============================================
   BARAJA COFFEE — SAGE GREEN THEME
   Premium Digital Menu System
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
    /* Sage Green Palette */
    --sage-primary: #8FAE8B;
    --sage-dark: #6B8F6B;
    --sage-deep: #5A7D5A;
    --sage-light: #C5D9C0;
    --sage-mist: #E8F0E4;
    --sage-cream: #F5F8F3;
    --sage-white: #FAFCF9;

    /* Warm Accents */
    --accent-warm: #D4A76A;
    --accent-warm-light: #E8C99B;
    --accent-warm-dark: #B8894F;

    /* Neutrals */
    --text-primary: #2D3B2D;
    --text-secondary: #5A6B5A;
    --text-muted: #8A978A;
    --text-light: #B0BCB0;

    /* Glass & Surfaces */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-bg-strong: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.65);
    --glass-border-sage: rgba(143, 174, 139, 0.2);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(45, 59, 45, 0.04);
    --shadow-md: 0 8px 24px rgba(45, 59, 45, 0.06), 0 2px 8px rgba(45, 59, 45, 0.03);
    --shadow-lg: 0 16px 48px rgba(45, 59, 45, 0.08), 0 4px 16px rgba(45, 59, 45, 0.04);
    --shadow-xl: 0 24px 64px rgba(45, 59, 45, 0.1), 0 8px 24px rgba(45, 59, 45, 0.05);
    --shadow-sage: 0 12px 32px rgba(143, 174, 139, 0.18);
    --shadow-warm: 0 12px 32px rgba(212, 167, 106, 0.18);

    /* Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-premium: cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-fast: 0.2s var(--ease-smooth);
    --transition-base: 0.35s var(--ease-premium);
    --transition-slow: 0.6s var(--ease-premium);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: linear-gradient(160deg, var(--sage-white) 0%, var(--sage-mist) 40%, var(--sage-cream) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6, .display-font {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
    color: var(--sage-dark);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1, .display-3 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

p {
    color: var(--text-secondary);
}

.text-sage { color: var(--sage-primary) !important; }
.text-sage-dark { color: var(--sage-dark) !important; }
.text-baraja { color: var(--sage-dark) !important; }
.text-warm { color: var(--accent-warm) !important; }
.text-gold { color: var(--accent-warm) !important; }

/* ---------- Floating Orbs (Background Decoration) ---------- */
.orb-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--sage-light) 0%, transparent 70%);
    top: -10%; right: -5%;
    animation-duration: 25s;
}

.orb-2 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(212,167,106,0.3) 0%, transparent 70%);
    bottom: -5%; left: -5%;
    animation-duration: 20s;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px; height: 250px;
    background: radial-gradient(circle, var(--sage-mist) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 30s;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 30px) scale(1.02); }
}

/* ---------- Glassmorphism Cards ---------- */
.glass-card {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    pointer-events: none;
}

.glass-card:hover {
    box-shadow: var(--shadow-xl);
}

/* ---------- Glass Navbar ---------- */
.glass-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid rgba(143, 174, 139, 0.15);
    padding: 10px 0;
    box-shadow: 0 1px 12px rgba(45, 59, 45, 0.04);
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
    z-index: 100;
}

.navbar-logo {
    height: 32px;
    width: auto;
    transition: transform var(--transition-fast);
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* ---------- Buttons ---------- */
.btn-baraja {
    background: linear-gradient(135deg, var(--sage-primary) 0%, var(--sage-dark) 100%);
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: var(--radius-full);
    font-family: 'Inter', 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    box-shadow: var(--shadow-sage);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-baraja::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; right: 0; bottom: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--sage-dark) 0%, var(--sage-deep) 100%);
    transition: left var(--transition-base);
    z-index: -1;
}

.btn-baraja:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(143, 174, 139, 0.3);
}

.btn-baraja:hover::before {
    left: 0;
}

.btn-baraja:active {
    transform: translateY(-1px);
}

.btn-outline-baraja {
    background: transparent;
    color: var(--sage-dark);
    border: 1.5px solid var(--sage-light);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-family: 'Inter', 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-outline-baraja:hover {
    background: var(--sage-primary);
    color: white;
    border-color: var(--sage-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sage);
}

/* ---------- Hero Section (Landing) ---------- */
.no-scroll-page {
    height: 100vh;
    overflow: hidden;
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--sage-white) 0%, var(--sage-mist) 30%, var(--sage-cream) 60%, rgba(212,167,106,0.08) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(143, 174, 139, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 167, 106, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.4) 0%, transparent 70%);
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.z-index-1 {
    position: relative;
    z-index: 1;
}

.logo-main {
    max-width: 340px;
    margin-bottom: 2.5rem;
    transition: transform var(--transition-slow);
    filter: drop-shadow(0 8px 24px rgba(45, 59, 45, 0.08));
}

.logo-main:hover {
    transform: scale(1.03);
}

/* ---------- Title Decorator ---------- */
.title-decorator {
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent-warm), transparent);
    margin: 14px auto;
    position: relative;
}

.title-decorator::before {
    content: '';
    position: absolute;
    top: -3px; left: 50%; transform: translateX(-50%);
    width: 8px; height: 8px;
    background: var(--accent-warm);
    border-radius: 50%;
    opacity: 0.6;
}

/* ---------- Social Links ---------- */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--sage-dark);
    font-size: 1.1rem;
    margin: 0 8px;
    transition: all var(--transition-base);
    background: rgba(143, 174, 139, 0.08);
    border: 1px solid rgba(143, 174, 139, 0.12);
    text-decoration: none;
}

.social-links a:hover {
    color: white;
    background: var(--sage-primary);
    border-color: var(--sage-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(143, 174, 139, 0.3);
}

/* ---------- PDF Container ---------- */
.pdf-container {
    height: 85vh;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background: white;
    box-shadow: inset 0 0 30px rgba(45, 59, 45, 0.02);
}

.pdf-container iframe,
.pdf-container embed {
    border: none;
    width: 100%;
    height: 100%;
}

/* ---------- Form Controls ---------- */
.form-control {
    border: 1.5px solid var(--sage-mist);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--sage-primary);
    box-shadow: 0 0 0 4px rgba(143, 174, 139, 0.15);
    background: white;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-label {
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--sage-dark);
    margin-bottom: 6px;
}

/* File Input Styling */
input[type="file"].form-control {
    padding: 10px 16px;
    cursor: pointer;
    border-style: dashed;
    border-color: var(--sage-light);
    background: var(--sage-mist);
    transition: all var(--transition-fast);
}

input[type="file"].form-control:hover {
    border-color: var(--sage-primary);
    background: rgba(143, 174, 139, 0.08);
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: var(--radius-sm);
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 0.85rem;
    border: none;
    animation: slideInAlert 0.4s var(--ease-spring);
}

@keyframes slideInAlert {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Stats Card (Dashboard) ---------- */
.stat-item {
    text-align: center;
    padding: 20px 16px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--sage-mist) 0%, rgba(255,255,255,0.5) 100%);
    border: 1px solid rgba(143, 174, 139, 0.12);
    transition: all var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--sage-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

/* ---------- Section Header ---------- */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sage-mist);
}

.section-header i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--sage-mist) 0%, rgba(143,174,139,0.15) 100%);
    color: var(--sage-dark);
    font-size: 1rem;
}

.section-header h4 {
    margin: 0;
    font-size: 1.1rem;
}



/* ---------- Page Footer ---------- */
.page-footer {
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--sage-mist);
    margin-top: 40px;
}

.page-footer p {
    font-size: 0.78rem;
    color: var(--text-light);
    margin: 0;
}

/* ---------- Animations ---------- */
@keyframes revealUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-reveal {
    opacity: 0;
    animation: revealUp 0.9s var(--ease-premium) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

.animate-fade {
    opacity: 0;
    animation: fadeIn 0.6s var(--ease-smooth) forwards;
}

/* Page entrance */
.page-enter {
    animation: revealUp 0.7s var(--ease-premium) forwards;
}

/* ---------- Login Page Specific ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--sage-mist) 0%, var(--sage-cream) 50%, rgba(212,167,106,0.06) 100%);
    position: relative;
    overflow: hidden;
}

.login-card {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sage-light), var(--sage-primary), var(--accent-warm-light));
}

/* ---------- Admin Dashboard Specific ---------- */
.upload-zone {
    border: 2px dashed var(--sage-light);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    background: linear-gradient(135deg, var(--sage-mist) 0%, rgba(255,255,255,0.5) 100%);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--sage-primary);
    background: rgba(143, 174, 139, 0.08);
}

.upload-zone i {
    font-size: 2rem;
    color: var(--sage-primary);
    margin-bottom: 12px;
    display: block;
}

.upload-zone span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Logout button */
.btn-logout {
    background: transparent;
    border: 1.5px solid rgba(220,53,69,0.25);
    color: #dc3545;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 0.85rem;
    text-decoration: none;
}

.btn-logout:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: scale(1.05);
}

/* ---------- Responsive ---------- */

/* Tablets */
@media (max-width: 992px) {
    .glass-card {
        border-radius: var(--radius-md);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .pdf-container {
        height: 75vh;
    }

    .logo-main {
        max-width: 260px;
        margin-bottom: 2rem;
    }

    .display-3 {
        font-size: 2.2rem !important;
    }

    .glass-card {
        padding: 28px 20px !important;
        border-radius: var(--radius-md);
    }

    .hero .glass-card {
        margin: 0 8px;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin: 0 6px;
    }

    .btn-baraja {
        padding: 12px 28px;
        font-size: 0.78rem;
        letter-spacing: 2px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .stat-item {
        padding: 16px 12px;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .logo-main {
        max-width: 220px;
    }

    .display-3 {
        font-size: 1.8rem !important;
    }

    .glass-card {
        padding: 24px 16px !important;
    }

    .btn-baraja {
        padding: 11px 24px;
        font-size: 0.75rem;
    }
}

/* Landscape mobile */
@media (max-height: 480px) and (orientation: landscape) {
    .no-scroll-page {
        height: auto;
        overflow: auto;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding: 40px 0;
    }

    .logo-main {
        max-width: 140px;
        margin-bottom: 1.5rem;
    }

    .display-3 {
        font-size: 1.8rem !important;
    }

    .glass-card {
        padding: 20px !important;
    }

    .orb-container {
        display: none;
    }
}

/* ---------- Utility Classes ---------- */
.tracking-widest {
    letter-spacing: 4px;
}

.bg-sage-mist {
    background: var(--sage-mist) !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--sage-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--sage-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sage-primary);
}

/* Selection */
::selection {
    background: rgba(143, 174, 139, 0.25);
    color: var(--text-primary);
}

/* ============================================
   HERO DARK MODE OVERRIDES
   ============================================ */

body.hero-dark {
    background: #0e1a0e;
    overflow: hidden;
}

body.hero-dark .hero {
    background: #0e1a0e;
    height: 100vh;
    height: 100dvh;
}

body.hero-dark .hero::before {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(143,174,139,0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(143,174,139,0.07) 0%, transparent 50%);
}

body.hero-dark .glass-card {
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0.5px solid rgba(210, 230, 205, 0.2);
    box-shadow: none;
}

body.hero-dark .glass-card::before {
    background: linear-gradient(90deg, transparent, rgba(210,230,205,0.08), transparent);
}

body.hero-dark .btn-baraja {
    background: transparent;
    border: 0.5px solid rgba(210, 230, 205, 0.45);
    color: #d2e6cd;
    box-shadow: none;
    letter-spacing: 2px;
}

body.hero-dark .btn-baraja::before { display: none; }

body.hero-dark .btn-baraja:hover {
    background: rgba(210, 230, 205, 0.1);
    border-color: rgba(210, 230, 205, 0.75);
    color: #eaf4e6;
    transform: translateY(-2px);
    box-shadow: none;
}

body.hero-dark .social-links a {
    color: rgba(210, 230, 205, 0.65);
    background: rgba(210, 230, 205, 0.05);
    border: 0.5px solid rgba(210, 230, 205, 0.2);
}

body.hero-dark .social-links a:hover {
    color: #eaf4e6;
    background: rgba(210, 230, 205, 0.12);
    border-color: rgba(210, 230, 205, 0.55);
    box-shadow: none;
    transform: translateY(-3px);
}

body.hero-dark .hero-footer p {
    color: rgba(210, 230, 205, 0.45);
    background: transparent;
}

body.hero-dark .orb-container { display: none; }
