/**
 * Estilos Principales
 * Centro Móvil FamilySearch - Estaca Tierra del Fuego
 * Colores basados en estacatierradelfuego.ar
 */

:root {
    /* Colores principales de la Estaca */
    --primary-blue: #1e3a8a;
    --primary-gold: #d4af37;
    --secondary-blue: #3b82f6;
    --light-blue: #60a5fa;
    --dark-blue: #1e40af;
    
    /* Colores de la Iglesia */
    --church-blue: #0057b8;
    --church-gold: #c5a572;
    
    /* Colores neutrales */
    --white: #ffffff;
    --light-gray: #f3f4f6;
    --gray: #9ca3af;
    --dark-gray: #4b5563;
    --black: #1f2937;
    
    /* Colores de estado */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Transiciones */
    --transition: all 0.3s ease;
}

/* ============= RESET Y BASE ============= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--light-gray);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-blue);
}

/* ============= LAYOUT ============= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ============= HEADER ============= */

.header {
    background: rgba(30, 58, 138, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: #ffffff;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.nav a:hover {
    background-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
}

.nav a.active {
    background-color: rgba(212, 175, 55, 0.9);
    color: #1e3a8a;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ============= MENÚ MÓVIL (Liquid Glass - estilo Dashboard) ============= */

/* Botón hamburguesa */
.mobile-menu-toggle {
    display: none; /* Visible solo en móvil */
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle:hover {
    background: rgba(212, 175, 55, 0.2);
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Modal del menú móvil */
.home-mobile-menu-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                backdrop-filter 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.35s;
    padding: 1rem;
}

.home-mobile-menu-modal.active {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 1;
    visibility: visible;
}

/* Contenido del menú */
.home-mobile-menu-content {
    background: rgba(30, 58, 138, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(212, 175, 55, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.85);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.home-mobile-menu-modal.active .home-mobile-menu-content {
    transform: scale(1);
    opacity: 1;
}

.home-mobile-menu-modal.closing .home-mobile-menu-content {
    transform: scale(0.92);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 1, 1);
}

/* Navegación del menú */
.home-mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.home-mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.0625rem;
    text-decoration: none;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(10px);
}

.home-mobile-menu-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.2);
}

.home-mobile-menu-link.active {
    background: rgba(212, 175, 55, 0.4);
    border-color: rgba(212, 175, 55, 0.6);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.home-mobile-menu-link-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Animación escalonada de aparición */
.home-mobile-menu-modal.active .home-mobile-menu-link {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.home-mobile-menu-modal.active .home-mobile-menu-link:nth-child(1) {
    animation-delay: 0.1s;
}

.home-mobile-menu-modal.active .home-mobile-menu-link:nth-child(2) {
    animation-delay: 0.15s;
}

.home-mobile-menu-modal.active .home-mobile-menu-link:nth-child(3) {
    animation-delay: 0.2s;
}

.home-mobile-menu-modal.active .home-mobile-menu-link:nth-child(4) {
    animation-delay: 0.25s;
}

/* Divisor */
.home-mobile-menu-divider {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212, 175, 55, 0.3) 50%, 
        transparent 100%);
    margin: 0.5rem 0;
    opacity: 0;
    transform: scaleX(0);
}

.home-mobile-menu-modal.active .home-mobile-menu-divider {
    animation: dividerExpand 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

@keyframes dividerExpand {
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Link de admin especial */
.home-mobile-menu-admin {
    margin-top: 0.5rem;
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}

.home-mobile-menu-admin:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.6);
}

.home-mobile-menu-modal.active .home-mobile-menu-admin {
    animation-delay: 0.35s !important;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============= HERO SECTION ============= */

.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #1e40af 100%);
    background-attachment: fixed;
    color: #ffffff;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(212, 175, 55, 0.2);
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.hero .btn {
    background: rgba(212, 175, 55, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #1e3a8a;
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.hero .btn:hover {
    background: rgba(212, 175, 55, 1);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.5);
}

/* ============= SECCIÓN DE INFORMACIÓN ============= */

.info-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(30, 58, 138, 0.15);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.03) 0%, 
        rgba(212, 175, 55, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.info-card:hover::before {
    opacity: 1;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.15),
        0 0 25px rgba(212, 175, 55, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
    border-color: rgba(212, 175, 55, 0.4);
}

.info-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    position: relative;
    z-index: 1;
}

.info-card h3 {
    font-size: 1.5rem;
    color: #1e3a8a;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

.info-card p {
    position: relative;
    z-index: 1;
    color: #4b5563;
    line-height: 1.8;
}

/* ============= CALENDARIO (Liquid Glass) ============= */

.calendar-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    position: relative;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(30, 58, 138, 0.2);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-header:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(30, 58, 138, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.calendar-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.calendar-grid {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(30, 58, 138, 0.2);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

.calendar-weekday {
    text-align: center;
    font-weight: 700;
    color: var(--primary-blue);
    padding: 0.75rem 0.5rem;
    background: rgba(30, 58, 138, 0.05);
    border-radius: 12px;
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    background: rgba(243, 244, 246, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(156, 163, 175, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.calendar-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calendar-day:hover::before {
    opacity: 1;
}

.calendar-day:hover {
    background: rgba(59, 130, 246, 0.9);
    border-color: rgba(59, 130, 246, 0.6);
    color: var(--white);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(59, 130, 246, 0.4),
        0 0 15px rgba(59, 130, 246, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.calendar-day.available {
    background: rgba(16, 185, 129, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    color: var(--white);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 4px 12px rgba(16, 185, 129, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.calendar-day.available:hover {
    background: rgba(5, 150, 105, 0.95);
    border-color: rgba(16, 185, 129, 0.6);
    transform: scale(1.12) translateY(-3px);
    box-shadow: 
        0 10px 24px rgba(16, 185, 129, 0.5),
        0 0 20px rgba(16, 185, 129, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.calendar-day.reserved {
    background: rgba(239, 68, 68, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    color: var(--white);
    font-weight: 700;
    cursor: not-allowed;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.calendar-day.reserved:hover {
    transform: none;
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Día parcialmente ocupado - NARANJA */
.calendar-day.partial {
    background: rgba(245, 158, 11, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    color: var(--white);
    font-weight: 700;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 4px 12px rgba(245, 158, 11, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.calendar-day.partial:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 
        0 8px 20px rgba(245, 158, 11, 0.5),
        0 0 20px rgba(245, 158, 11, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.calendar-day.today {
    border: 2.5px solid var(--primary-gold);
    font-weight: 800;
    box-shadow: 
        0 6px 16px rgba(212, 175, 55, 0.4),
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.calendar-day.today.available {
    box-shadow: 
        0 6px 20px rgba(16, 185, 129, 0.4),
        0 0 25px rgba(212, 175, 55, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.calendar-day.other-month {
    opacity: 0.25;
    background: rgba(156, 163, 175, 0.1);
}

.calendar-day.other-month:hover {
    opacity: 0.4;
    transform: scale(1.02);
}

/* ============= FORMULARIO DE RESERVA (Liquid Glass) ============= */

.reservation-form {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(30, 58, 138, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 0.9375rem;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 1.5px solid rgba(30, 58, 138, 0.2);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--black);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-control:hover {
    border-color: rgba(30, 58, 138, 0.35);
    background: rgba(255, 255, 255, 0.95);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 0 0 4px rgba(30, 58, 138, 0.1),
        0 4px 12px rgba(30, 58, 138, 0.15);
    transform: translateY(-1px);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%231e3a8a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 3rem;
    cursor: pointer;
    color: var(--black);
}

select.form-control,
select {
    color: var(--black);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select.form-control option,
select option {
    color: var(--black);
    background: white;
    padding: 0.5rem;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ============= BOTONES (Liquid Glass Enhanced - Sin Transform) ============= */

.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border: 1.5px solid transparent;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Evitar cualquier cambio de layout */
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: width 0.5s ease;
    pointer-events: none;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.95) 0%, 
        rgba(59, 130, 246, 0.95) 100%);
    border-color: rgba(30, 58, 138, 0.3);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, 
        rgba(30, 64, 175, 0.98) 0%, 
        rgba(59, 130, 246, 0.98) 100%);
    box-shadow: 0 6px 18px rgba(30, 58, 138, 0.35);
    border-color: rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: rgba(156, 163, 175, 0.9);
    border-color: rgba(156, 163, 175, 0.3);
    color: var(--white);
}

.btn-secondary:hover {
    background: rgba(75, 85, 99, 0.95);
    box-shadow: 0 6px 18px rgba(75, 85, 99, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.95) 0%, 
        rgba(5, 150, 105, 0.95) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--white);
}

.btn-success:hover {
    background: linear-gradient(135deg, 
        rgba(5, 150, 105, 0.98) 0%, 
        rgba(4, 120, 87, 0.98) 100%);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.95) 0%, 
        rgba(220, 38, 38, 0.95) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--white);
}

.btn-danger:hover {
    background: linear-gradient(135deg, 
        rgba(220, 38, 38, 0.98) 0%, 
        rgba(185, 28, 28, 0.98) 100%);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}

.btn-gold {
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.95) 0%, 
        rgba(197, 165, 82, 0.95) 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    color: var(--primary-blue);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    font-weight: 800;
}

.btn-gold:hover {
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 1) 0%, 
        rgba(255, 215, 0, 1) 100%);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
    border-color: rgba(212, 175, 55, 0.6);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 10px;
}

.btn-lg {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
    border-radius: 16px;
}

.btn:active {
    opacity: 0.9;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:disabled:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* ============= MODALES (Liquid Glass) ============= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(30, 58, 138, 0.2);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(30, 58, 138, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Prevenir layout shifts por hover */
    position: relative;
    margin: auto;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.03) 0%, 
        rgba(212, 175, 55, 0.03) 100%);
}

.modal-header h2 {
    color: var(--primary-blue);
    font-size: 1.625rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-close {
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--gray);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(156, 163, 175, 0.1);
    border: 1px solid rgba(156, 163, 175, 0.2);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modal-close:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(30, 58, 138, 0.02) 100%);
    /* Prevenir overflow por hover de botones */
    overflow: hidden;
    flex-wrap: wrap;
}

.modal-footer .btn {
    /* Reducir ligeramente el transform en hover para evitar overflow */
    flex-shrink: 0;
    min-width: 120px;
}

.modal-footer .btn:hover {
    /* Usar solo box-shadow, sin transform para evitar layout shift */
    box-shadow: 
        0 6px 16px rgba(30, 58, 138, 0.35),
        0 0 12px rgba(59, 130, 246, 0.25);
}

/* ============= ANIMACIONES DE FORMULARIO (Subtle & Elegant) ============= */

/* Estado inicial de grupos de formulario */
.form-animate {
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animación escalonada por grupos */
.modal.active .form-animate[data-animate-group="1"] {
    animation: formFieldFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.05s forwards;
}

.modal.active .form-animate[data-animate-group="2"] {
    animation: formFieldFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.10s forwards;
}

.modal.active .form-animate[data-animate-group="3"] {
    animation: formFieldFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.15s forwards;
}

.modal.active .form-animate[data-animate-group="4"] {
    animation: formFieldFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.20s forwards;
}

.modal.active .form-animate[data-animate-group="5"] {
    animation: formFieldFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.25s forwards;
}

.modal.active .form-animate[data-animate-group="6"] {
    animation: formFieldFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.30s forwards;
}

.modal.active .form-animate[data-animate-group="7"] {
    animation: formFieldFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.35s forwards;
}

@keyframes formFieldFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respetar preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .form-animate {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}

/* ============= SOBRE VOLADOR (Flying Envelope Animation) ============= */

.flying-envelope {
    position: fixed;
    font-size: 3rem;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transform: translate(-50%, -50%) rotate(0deg);
}

.flying-envelope.fly {
    animation: flyEnvelope 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes flyEnvelope {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }
    15% {
        transform: translate(-50%, -50%) rotate(-10deg) scale(1.2);
    }
    30% {
        transform: translate(-30%, -80%) rotate(5deg) scale(1.1);
    }
    50% {
        opacity: 1;
        transform: translate(0%, -120%) rotate(-15deg) scale(1.3);
    }
    70% {
        opacity: 0.8;
        transform: translate(50%, -180%) rotate(10deg) scale(1.1);
    }
    85% {
        opacity: 0.4;
        transform: translate(100%, -250%) rotate(-5deg) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(150%, -350%) rotate(0deg) scale(0.5);
    }
}

/* Botón con sobre */
.btn-primary {
    position: relative;
    overflow: visible;
}

.btn-envelope {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 1.125rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover .btn-envelope {
    transform: translateY(-2px) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.3));
}

.btn-primary.sending .btn-text {
    opacity: 0.6;
}

.btn-primary.sending .btn-envelope {
    animation: envelopeShake 0.5s ease-in-out;
}

@keyframes envelopeShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-5px) rotate(-10deg); }
    75% { transform: translateX(5px) rotate(10deg); }
}

/* ============= ALERTAS ============= */

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d1fae5;
    border-color: var(--success);
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border-color: var(--error);
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: var(--warning);
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    border-color: var(--info);
    color: #1e40af;
}

/* ============= FOOTER ============= */

.footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ============= UTILIDADES ============= */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
    display: none !important;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============= RESPONSIVE ============= */

@media (max-width: 992px) {
    /* Header móvil compacto */
    .header {
        padding: 0.75rem 0;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .logo {
        gap: 0.75rem;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo h1 {
        font-size: 1.125rem;
    }
    
    .logo p {
        font-size: 0.75rem !important;
    }
    
    /* Ocultar navegación tradicional en móvil */
    .nav {
        display: none;
    }
    
    /* Botón hamburguesa */
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    /* Cards responsive sin desbordamiento */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .info-card {
        padding: 1.5rem;
        margin: 0;
    }
    
    .info-card-icon {
        font-size: 2.5rem;
    }
    
    .info-card h3 {
        font-size: 1.25rem;
    }
    
    .info-card p {
        font-size: 0.9375rem;
    }
    
    /* Hero compacto */
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    /* Secciones compactas */
    .info-section {
        padding: 2.5rem 0;
    }
    
    .info-section h2 {
        font-size: 1.5rem !important;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .calendar-grid {
        padding: 1.25rem;
    }
    
    .calendar-weekdays {
        gap: 0.4rem;
    }
    
    .calendar-weekday {
        font-size: 0.8125rem;
        padding: 0.5rem 0.25rem;
    }
    
    .calendar-days {
        gap: 0.4rem;
    }
    
    .calendar-day {
        font-size: 0.9375rem;
        border-radius: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-width: 95%;
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1.25rem;
    }
    
    .modal-header h2 {
        font-size: 1.375rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .info-card {
        padding: 1.25rem;
    }
    
    .calendar-section {
        padding: 2.5rem 0;
    }
    
    .calendar-grid {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .calendar-weekdays {
        gap: 0.3rem;
        margin-bottom: 0.75rem;
    }
    
    .calendar-weekday {
        font-size: 0.75rem;
        padding: 0.375rem 0.125rem;
        border-radius: 8px;
    }
    
    .calendar-days {
        gap: 0.3rem;
    }
    
    .calendar-day {
        font-size: 0.875rem;
        border-radius: 8px;
        border-width: 1px;
    }
    
    .calendar-day:hover {
        transform: scale(1.05);
    }
    
    .calendar-day.available:hover,
    .calendar-day.today {
        transform: scale(1.08);
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .btn-lg {
        padding: 1rem 1.75rem;
        font-size: 1rem;
    }
    
    .form-control {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 1rem;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 1.25rem 1rem 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.125rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.875rem 1rem 1rem;
        gap: 0.625rem;
    }
    
    .modal-footer .btn {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }
}

/* ============= SISTEMA DE NOTIFICACIONES TOAST ============= */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 500px;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    pointer-events: all;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-hide {
    transform: translateX(400px);
    opacity: 0;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

.toast-success .toast-icon {
    background-color: var(--success);
}

.toast-error .toast-icon {
    background-color: var(--error);
}

.toast-warning .toast-icon {
    background-color: var(--warning);
}

.toast-info .toast-icon {
    background-color: var(--info);
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    color: var(--black);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-info {
    border-left: 4px solid var(--info);
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--black);
}

/* ============= MODAL DE CONFIRMACIÓN ============= */

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-overlay.confirm-show {
    opacity: 1;
}

.confirm-overlay.confirm-show .confirm-modal {
    transform: scale(1);
    opacity: 1;
}

.confirm-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.confirm-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--light-gray);
}

.confirm-header h3 {
    margin: 0;
    color: var(--black);
    font-size: 20px;
    font-weight: 600;
}

.confirm-body {
    padding: 24px;
}

.confirm-body p {
    margin: 0;
    color: var(--dark-gray);
    font-size: 15px;
    line-height: 1.6;
}

.confirm-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.confirm-footer .btn {
    min-width: 100px;
}

/* Responsive para toasts */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    
    .confirm-modal {
        width: 95%;
        margin: 20px;
    }
}
