/* ============================================
   HOTEL BOOKING - ESTILOS FRONTEND
   ============================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;

    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;

    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-light: #f3f4f6;

    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-light);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.bg-light {
    background: var(--bg-light);
}

/* ============================================
   SEARCH SECTION
   ============================================ */
.search-section {
    padding: 2rem 0;
}

.search-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.search-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.search-form .form-row,
.modal-form .form-row {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 180px;
    margin-bottom: 0;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input.error {
    border-color: var(--danger);
    background-color: #fef2f2;
}

/* ============================================
   HABITACIONES GRID
   ============================================ */
.habitaciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.habitacion-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.habitacion-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.habitacion-imagen {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.habitacion-info {
    padding: 1.5rem;
}

.habitacion-tipo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.habitacion-descripcion {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.habitacion-detalles {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.habitacion-precio {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.habitacion-precio small {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ============================================
   CALENDARIO
   ============================================ */
.calendario-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.calendario-container {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
}

.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    min-width: 700px;
}

.calendario-header {
    font-weight: 700;
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.calendario-dia {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    min-height: 100px;
    transition: var(--transition);
}

.calendario-dia:hover {
    background: var(--bg-light);
}

.dia-numero {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.habitaciones-ocupadas {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.calendario-dia.ocupado {
    background: #fee2e2;
    border-color: #fca5a5;
}

.calendario-dia.disponible {
    background: #d1fae5;
    border-color: #6ee7b7;
}

.calendario-leyenda {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.leyenda-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.dot.disponible {
    background: #6ee7b7;
}

.dot.ocupado {
    background: #fca5a5;
}

/* ============================================
   RESERVAS
   ============================================ */
.reservas-container {
    display: grid;
    gap: 1.5rem;
}

.reserva-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.reserva-imagen {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.reserva-info h3 {
    margin-bottom: 0.5rem;
}

.reserva-detalle {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.reserva-estado {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
}

.estado-pendiente {
    background: #fef3c7;
    color: #92400e;
}

.estado-confirmada {
    background: #d1fae5;
    color: #065f46;
}

.estado-cancelada {
    background: #fee2e2;
    color: #991b1b;
}

.reserva-acciones {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-stepper {
    max-width: 850px;
}

/* Stepper Progress */
.stepper-progress {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    position: relative;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    position: relative;
    flex: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-item.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.step-item.active .step-label {
    color: var(--primary);
}

.step-item.completed .step-number {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.progress-line {
    position: absolute;
    top: 31px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.4s ease;
}

/* Transitions */
.form-step {
    display: none;
    padding: 2rem;
    animation: slideInFade 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.btn-success {
    background: var(--secondary);
    color: white;
    width: 100%;
}

.btn-success:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-form {
    padding: 1.5rem;
}

.modal-footer {
    text-align: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .search-form .form-row {
        grid-template-columns: 1fr;
    }

    .habitaciones-grid {
        grid-template-columns: 1fr;
    }

    .reserva-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .reserva-imagen {
        margin: 0 auto;
    }
}