/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary:   #c0392b;
    --secondary: #e67e22;
    --dark:      #1a1a2e;
    --light:     #fef9f0;
    --gray:      #6c757d;
    --shadow:    0 4px 20px rgba(0,0,0,0.1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--light);
    color: #333;
    line-height: 1.6;
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    background: var(--dark);
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 65px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.navbar .logo { font-size: 1.4rem; font-weight: bold; color: var(--secondary); text-decoration: none; }
.navbar ul { list-style: none; display: flex; gap: 22px; align-items: center; }
.navbar ul li a { color: #ddd; text-decoration: none; font-size: 0.88rem; transition: color 0.3s; }
.navbar ul li a:hover { color: var(--secondary); }

.btn-nav-login    { background: var(--primary) !important; color: white !important; padding: 7px 16px; border-radius: 20px; }
.btn-nav-registro { background: var(--secondary) !important; color: white !important; padding: 7px 16px; border-radius: 20px; }
.btn-nav-login:hover { opacity: 0.85; }

.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 5px; background: none; border: none; }
.hamburger span { width: 25px; height: 3px; background: #ddd; border-radius: 3px; display: block; }

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #c0392b 55%, #e67e22 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 5%;
}
.hero-content h1 {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    color: white;
    margin-bottom: 18px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}
.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255,255,255,0.9);
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.btn-hero {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 14px 38px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    transition: transform 0.3s, box-shadow 0.3s;
}
.btn-hero:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.3); }

/* ===== SECCIONES ===== */
section { padding: 80px 5%; }
.section-title { text-align: center; font-size: 2rem; color: var(--dark); margin-bottom: 10px; }
.section-title span { color: var(--primary); }
.section-subtitle { text-align: center; color: var(--gray); margin-bottom: 46px; }
.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    margin: 10px auto 36px;
    border-radius: 2px;
}

/* ===== NOSOTROS ===== */
#nosotros { background: white; }
.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}
.nosotros-img {
    width: 100%;
    height: 340px;
    background: linear-gradient(135deg, #e67e22, #c0392b);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7rem;
}
.nosotros-text h3 { font-size: 1.5rem; color: var(--dark); margin-bottom: 14px; }
.nosotros-text p  { color: #555; margin-bottom: 12px; line-height: 1.8; }

/* ===== MENÚ ===== */
#menu { background: var(--light); }
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 26px;
    max-width: 1100px;
    margin: 0 auto;
}
.menu-card { background: white; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s; }
.menu-card:hover { transform: translateY(-6px); }
.menu-card-img { width: 100%; height: 160px; display: flex; align-items: center; justify-content: center; font-size: 4rem; position: relative; overflow: hidden; }
.menu-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.menu-card-body { padding: 20px; }
.menu-card-body h4 { font-size: 1.05rem; color: var(--dark); margin-bottom: 8px; }
.menu-card-body p  { color: #777; font-size: 0.88rem; margin-bottom: 12px; }
.precio { color: var(--primary); font-weight: bold; font-size: 1.05rem; }

/* ===== GALERÍA ===== */
#galeria { background: white; }
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
    gap: 12px;
    max-width: 1000px;
    margin: 0 auto;
}
.galeria-item { border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; position: relative; overflow: hidden; }
.galeria-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.galeria-item.grande { grid-column: span 2; }

/* ===== VIDEO ===== */
#video { background: var(--dark); text-align: center; }
#video .section-title { color: white; }
#video .section-title span { color: var(--secondary); }
#video .section-subtitle { color: rgba(255,255,255,0.65); }
.video-wrapper {
    max-width: 820px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    aspect-ratio: 16/9;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-wrapper iframe { width: 100%; height: 100%; border: none; display: block; }
.video-placeholder { text-align: center; color: rgba(255,255,255,0.5); padding: 60px 20px; }
.video-placeholder span { font-size: 4rem; display: block; margin-bottom: 14px; }

/* ===== CONTACTO ===== */
#contacto { background: var(--light); }
.contacto-wrap {
    max-width: 620px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

/* ===== FORM GROUP ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.88rem; color: #444; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.93rem;
    font-family: inherit;
    transition: border-color 0.3s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.form-group textarea { height: 110px; resize: vertical; }

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}
.btn-primary:hover { opacity: 0.9; }

/* ===== FOOTER ===== */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.65);
    text-align: center;
    padding: 28px 5%;
    font-size: 0.88rem;
    line-height: 2;
}
footer a { color: var(--secondary); text-decoration: none; }

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e, #c0392b);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}
.auth-card {
    background: white;
    padding: 42px;
    border-radius: 18px;
    width: 100%;
    max-width: 430px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.auth-card h2 { text-align: center; color: var(--dark); font-size: 1.75rem; margin-bottom: 6px; }
.logo-auth { text-align: center; font-size: 1rem; color: var(--primary); font-weight: bold; margin-bottom: 22px; }
.link-alt { text-align: center; margin-top: 18px; font-size: 0.88rem; color: #666; }
.link-alt a { color: var(--primary); font-weight: bold; text-decoration: none; }

.msg-error {
    background: #fdecea;
    border-left: 4px solid var(--primary);
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.88rem;
}
.msg-exito {
    background: #eafaf1;
    border-left: 4px solid #27ae60;
    color: #1e8449;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.88rem;
}

/* ===== PANEL PAGES ===== */
.panel-page { min-height: 100vh; background: var(--light); }
.panel-content { max-width: 860px; margin: 60px auto; padding: 0 20px; }
.panel-card { background: white; border-radius: 14px; padding: 40px; box-shadow: var(--shadow); }
.panel-card h1 { font-size: 1.7rem; color: var(--dark); margin-bottom: 14px; }
.panel-card > p { color: #555; margin-bottom: 22px; }
.panel-card h3 { font-size: 0.85rem; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }

.permisos-list { list-style: none; margin-bottom: 28px; }
.permisos-list li { padding: 12px 0; border-bottom: 1px solid #f2f2f2; font-size: 0.93rem; color: #444; }

/* ===== BADGE ===== */
.badge { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 0.78rem; font-weight: bold; vertical-align: middle; margin-left: 6px; }
.badge-admin    { background: #fdecea; color: #c0392b; border: 1px solid #c0392b; }
.badge-usuario  { background: #eafaf1; color: #1e8449; border: 1px solid #27ae60; }
.badge-invitado { background: #f4f6f7; color: #6c757d; border: 1px solid #95a5a6; }

/* ===== MODAL INACTIVIDAD ===== */
.modal-inactividad {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.modal-inactividad.activo { display: flex; }
.modal-box { background: white; padding: 36px 40px; border-radius: 14px; text-align: center; max-width: 340px; width: 90%; box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.modal-box h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.2rem; }
.modal-box p  { color: #555; margin-bottom: 6px; font-size: 0.93rem; }
#contador { font-size: 3rem; font-weight: bold; color: var(--primary); display: block; margin: 10px 0; }
.btn-continuar { margin-top: 16px; padding: 10px 28px; background: var(--primary); color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 0.93rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 65px;
        left: 0; right: 0;
        background: var(--dark);
        padding: 20px 5%;
        gap: 14px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    }
    .navbar ul.open { display: flex; }
    .navbar { position: relative; flex-wrap: wrap; }
    .hamburger { display: flex; }

    .hero { min-height: 70vh; padding: 40px 5%; }

    .nosotros-grid { grid-template-columns: 1fr; }
    .nosotros-img { height: 220px; font-size: 5rem; }

    .menu-grid { grid-template-columns: 1fr 1fr; }

    .video-wrapper { border-radius: 8px; }

    .panel-content { margin: 30px auto; }
    section { padding: 50px 5%; }
}

@media (max-width: 480px) {
    .menu-grid { grid-template-columns: 1fr; }

    .hero-content h1 { font-size: 2rem; }
    .btn-hero { padding: 12px 28px; font-size: 0.95rem; }

    .auth-card { padding: 28px 20px; }
    .panel-card { padding: 24px 16px; }
    .contacto-wrap { padding: 24px 16px; }

    .navbar .logo { font-size: 1.2rem; }
}
