/* ==========================================================================
   ESTILOS GENERALES - RUTA SAMARIA (RUSA)
   Estudiante: Enrique Serna García - UNAD 2026
   ========================================================================== */

:root {
    --primary: #0284c7;        /* Azul Samario / Caribe */
    --primary-dark: #0369a1;
    --primary-light: #e0f2fe;
    --accent: #059669;         /* Verde Sierra Nevada / Sostenibilidad */
    --accent-light: #d1fae5;
    --warning: #d97706;        /* Ámbar para cupos limitados */
    --warning-light: #fef3c7;
    --danger: #dc2626;         /* Rojo agotado */
    --danger-light: #fee2e2;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.25rem;
}

.logo-badge {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* BOTONES */
.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: #cbd5e1;
}

/* HERO */
.hero {
    position: relative;
    background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=1600&auto=format&fit=crop') center/cover no-repeat;
    color: white;
    padding: 90px 24px 80px;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.hero-content {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
}

.badge-comercio-justo {
    display: inline-block;
    background: rgba(5, 150, 105, 0.25);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #6ee7b7;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
}

.hero p {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-bottom: 35px;
    font-weight: 400;
}

/* SEARCH BOX */
.search-box {
    background: white;
    padding: 12px;
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    text-align: left;
}

.search-field {
    flex: 1;
    min-width: 200px;
    padding: 6px 12px;
}

.search-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.search-field select {
    width: 100%;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    background: transparent;
    outline: none;
    cursor: pointer;
}

.btn-search {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-search:hover {
    background: #047857;
}

/* STATS BAR */
.stats-bar {
    max-width: 1100px;
    margin: -30px auto 40px;
    position: relative;
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-item h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* CATÁLOGO */
.catalog-section, .map-section, .host-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 35px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.filters-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.card-experience {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.card-experience:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card-experience:hover .card-image-wrap img {
    transform: scale(1.05);
}

.card-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-aforo-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-disponible {
    background: var(--accent-light);
    color: var(--accent);
}

.badge-ultimos {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-agotado {
    background: var(--danger-light);
    color: var(--danger);
}

.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-anfitrion {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 6px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-bottom: 16px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-price {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.price-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

/* MAPA */
.map-container {
    height: 450px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* PANEL ANFITRIÓN */
.host-dashboard {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.host-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.summary-card.highlight {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.summary-card h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.summary-number {
    font-size: 1.6rem;
    font-weight: 800;
    display: block;
    color: var(--text-main);
}

.summary-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.host-table-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.table-responsive {
    overflow-x: auto;
}

.table-reservas {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.table-reservas th {
    background: var(--bg-light);
    padding: 12px 14px;
    border-bottom: 2px solid var(--border);
    font-weight: 700;
    color: var(--text-muted);
}

.table-reservas td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.btn-confirmar-asistencia {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-confirmada-check {
    background: #e2e8f0;
    color: #475569;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-header {
    margin-bottom: 20px;
}

.modal-tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.modal-header h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 6px 0 2px;
}

.modal-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-group {
    margin-bottom: 16px;
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.aforo-status {
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pay-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.precio-breakdown {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.breakdown-row.total {
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 8px;
    font-size: 1.05rem;
    font-weight: 800;
}

.btn-confirmar-pago {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-confirmar-pago:hover {
    background: var(--primary-dark);
}

/* VOUCHER */
.voucher-box {
    text-align: center;
}

.voucher-success-header h4 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
}

.voucher-success-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.voucher-card {
    background: var(--bg-light);
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.voucher-details {
    flex: 1;
    font-size: 0.85rem;
}

.voucher-details p {
    margin-bottom: 6px;
}

.voucher-qr {
    text-align: center;
}

#qr-canvas {
    width: 120px !important;
    height: 120px !important;
    background: white;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* FOOTER */
.footer {
    background: #0f172a;
    color: white;
    padding: 60px 24px 30px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: #f8fafc;
}

.footer-col p {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid #1e293b;
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .search-box {
        flex-direction: column;
    }
    .voucher-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Avisos, errores y video */
.aviso-modo { background: #fef3c7; color: #92400e; text-align: center; padding: 8px 16px; font-size: 0.85rem; font-weight: 600; }
.reserva-error { color: var(--danger); font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; min-height: 1em; }
.btn-confirmar-pago:disabled { background: #94a3b8; cursor: not-allowed; }
.video-box { max-width: 800px; margin: 0 auto; text-align: center; }
.video-box iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-md); }
