:root {
    --verde: #2d6a4f;
    --verde-claro: #52b788;
    --verde-suave: #b7e4c7;
    --tierra: #8b5e3c;
    --crema: #f8f5f0;
    --oscuro: #1a2e1e;
    --gris: #6b7280;
    --blanco: #ffffff;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--crema);
    background-image: radial-gradient(circle at 100% 0%, rgba(183, 228, 199, 0.3) 0%, transparent 50%),
                      radial-gradient(circle at 0% 100%, rgba(82, 183, 136, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--oscuro);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(248, 245, 240, 0.3); 
    backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb {
    background: rgba(45, 106, 79, 0.6);
    border-radius: 20px;
    border: 3px solid rgba(248, 245, 240, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(45, 106, 79, 0.9);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--verde), var(--verde-claro));
    z-index: 999999;
    transition: width 0.1s ease-out;
}

#preloader {
    position: fixed;
    inset: 0;
    background: var(--crema);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease-out;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(45, 106, 79, 0.2);
    border-top-color: var(--verde);
    border-radius: 50%;
    animation: spin-loader 1s linear infinite;
}

@keyframes spin-loader { 
    to { transform: rotate(360deg); } 
}

.float-whatsapp {
    position: fixed; 
    bottom: 30px; 
    right: 30px;
    background-color: #25D366; 
    color: white;
    width: 60px; 
    height: 60px; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 35px; 
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000; 
    text-decoration: none;
    animation: pulse-wa 2s infinite;
}

.float-whatsapp:hover { 
    transform: scale(1.1); 
    background-color: #20b858; 
}

@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

header {
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 100;
    background: rgba(248, 245, 240, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0 2rem;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    height: 75px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

header .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem; 
    font-weight: 700;
    color: var(--verde);
    background: rgba(255, 255, 255, 0.25) !important; 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border: 1px solid rgba(255, 255, 255, 0.5); 
    padding: 8px 20px !important;
    border-radius: 50px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: default;
    letter-spacing: -0.5px;
}

header .logo:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px);
    color: var(--oscuro);
}

header nav { 
    display: flex; 
    align-items: center; 
    gap: 1.5rem; 
}

header nav a {
    position: relative;
    text-decoration: none; 
    color: var(--oscuro);
    font-size: 0.95rem; 
    font-weight: 500;
    padding: 8px 4px;
    margin: 0 12px;
    transition: all 0.3s ease;
}

header nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--verde);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

header nav a:hover {
    color: var(--verde);
}

header nav a:hover::after {
    width: 100%;
}

.btn-login {
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: rgba(45, 106, 79, 0.8) !important; 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2); 
    color: var(--blanco) !important;
    padding: 10px 24px; 
    border-radius: 25px; 
    font-family: 'DM Sans', sans-serif; 
    font-weight: 700;
    cursor: pointer; 
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(45,106,79,0.2);
    margin-left: 10px;
}

.btn-login::before, .btn-agendar::before, .btn-modal::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    z-index: -1;
    transition: all 0.7s ease;
}

.btn-login:hover {
    background: rgba(26, 46, 30, 0.9) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26,46,30,0.3);
}

.btn-login:hover::before, .btn-agendar:hover::before, .btn-modal:hover::before {
    left: 200%;
}

.page { 
    display: none; 
    padding-top: 80px; 
    min-height: 100vh; 
}

.page.active { 
    display: block; 
}

.hero {
    background: linear-gradient(rgba(26, 46, 30, 0.6), rgba(26, 46, 30, 0.4)), url('../img/iniciointerfaz.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 90vh;
    display: flex; 
    align-items: center; 
    justify-content: center;
    position: relative; 
    overflow: hidden;
    padding: 4rem 2rem;
}

.hero-content { 
    position: relative; 
    z-index: 1; 
    text-align: center; 
    max-width: 700px; 
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white; 
    font-size: 0.8rem; 
    letter-spacing: 2px;
    text-transform: uppercase; 
    padding: 6px 16px; 
    border-radius: 20px;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900; 
    color: white;
    line-height: 1.1; 
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.hero h1 em { 
    color: var(--verde-suave); 
    font-style: normal; 
}

.hero p {
    color: rgba(255,255,255,0.85); 
    font-size: 1.1rem;
    line-height: 1.7; 
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero-btns { 
    display: flex; 
    gap: 1rem; 
    justify-content: center; 
    flex-wrap: wrap; 
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    padding: 14px 32px; 
    border-radius: 20px !important;
    font-family: 'DM Sans', sans-serif; 
    font-size: 1rem; 
    font-weight: 600;
    cursor: pointer; 
    transition: all 0.3s ease !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover, .btn-secondary:hover { 
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-3px) !important; 
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); 
}

.features {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem; 
    padding: 5rem 4rem; 
    max-width: 1200px; 
    margin: 0 auto;
}

.feature-card, .card {
    border-radius: 25px; 
    padding: 30px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover, .card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(45,106,79,0.15); 
    background: rgba(255, 255, 255, 0.95);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background 0.3s ease-in-out !important;
    will-change: transform;
}
.icon-box {
    width: 52px; 
    height: 52px; 
    border-radius: 20px;
    background: var(--verde-suave); 
    display: flex;
    align-items: center; 
    justify-content: center;
    font-size: 1.6rem; 
    margin-bottom: 1.2rem;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card h3, .card h3 { 
    font-family: 'Playfair Display', serif; 
    font-size: 1.2rem; 
    margin-bottom: 0.8rem; /* Ajustado para mejor jerarquía */
}

.feature-card p, .card p { 
    color: var(--gris); 
    font-size: 0.95rem;    
    line-height: 1.6; 
    margin-bottom: 0;      
}

.service-hero {
    background: linear-gradient(135deg, var(--verde), #1e4a38);
    padding: 5rem 4rem 4rem;
    text-align: center;
}

.service-hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem; 
    color: white; 
    font-weight: 900; 
    margin-bottom: 1rem;
}

.service-hero p { 
    color: rgba(255,255,255,0.85); 
    font-size: 1.1rem; 
    max-width: 600px; 
    margin: 0 auto; 
}

.fondo-servicios {
    background-image: url('../img/servicioimage.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    width: 95%;
    max-width: 1400px;
    margin: 40px auto;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease !important;
    overflow: hidden;
}


.fondo-servicios:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 0 30px rgba(82, 183, 136, 0.8), 
                0 0 60px rgba(45, 106, 79, 0.4),
                0 20px 40px rgba(0, 0, 0, 0.1) !important;
}


body.dark-theme .fondo-servicios:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 0 30px rgba(82, 183, 136, 1), 
                0 0 70px rgba(45, 106, 79, 0.8), 
                0 0 110px rgba(82, 183, 136, 0.5) !important;
}

.fondo-servicios .service-section {
    width: 100%;
    height: 100%; /* 🚀 ESTO ES NUEVO: Obliga al vidrio a estirarse hasta el fondo */
    padding: 80px 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
}

.fondo-servicios:hover .service-section {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.8);
}


.service-grid { 
    display: grid !important; 
    grid-template-columns: 1fr 1fr !important; 
    gap: 4rem !important; 
    align-items: center !important; 
    margin-bottom: 4rem !important; 
    transition: box-shadow 0.3s ease-in-out, background 0.3s ease-in-out !important;
    transform: none !important; 
}


.service-grid:hover {
    transform: none !important; 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important; 
    background: rgba(255, 255, 255, 0.05) !important; 
}

.service-grid.reverse { 
    direction: rtl !important; 
}

.service-grid.reverse > * { 
    direction: ltr !important; 
}

.service-grid.reverse:hover {
    transform: none !important;
}

.service-visual {
    width: 120px !important;     /* Ancho forzado */
    height: 120px !important;    /* Alto forzado */
    min-width: 120px !important; /* Evita que el grid lo aplaste */
    margin: auto !important;     /* Lo centra */
    border-radius: 28px !important; 
    
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important;
    
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    
    /* Matamos la animación de flotar para que se quede 100% quieto */
    animation: none !important; 
    transform: none !important;
}

.service-visual i {
    font-size: 4.5rem !important;
    line-height: 1 !important;
}
.service-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem; 
    margin-bottom: 1rem; 
    color: var(--oscuro);
}

.service-text p { 
    color: var(--oscuro); 
    line-height: 1.8; 
    margin-bottom: 1rem;
    font-weight: 500;
}

.tag {
    display: inline-block; 
    background: rgba(183, 228, 199, 0.7);
    backdrop-filter: blur(4px);
    color: var(--oscuro); 
    font-size: 0.8rem; 
    padding: 6px 14px;
    border-radius: 20px; 
    margin: 4px 4px 0 0; 
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.3);
}

.process {
    background: rgba(26, 46, 30, 0.95);
    backdrop-filter: blur(20px);
    padding: 4rem;
    margin: 0;
}

.process h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem; 
    color: white; 
    text-align: center; 
    margin-bottom: 3rem;
}

.steps { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 2rem; 
    max-width: 1100px; 
    margin: 0 auto; 
}

.step { 
    text-align: center; 
    padding: 20px; 
    border-radius: 15px; 
    transition: transform 0.4s ease; 
}

.step:hover {
    transform: translateY(-8px);
}

.step-num {
    width: 56px; 
    height: 56px; 
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: 'Playfair Display', serif; 
    font-size: 1.4rem; 
    font-weight: 700;
    display: flex; 
    align-items: center; 
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.4s ease;
}

.step:hover .step-num {
    background: var(--verde);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.step h4 { 
    color: white; 
    font-size: 1.1rem; 
    margin-bottom: 0.5rem; 
}

.step p { 
    color: rgba(255,255,255,0.7); 
    font-size: 0.9rem; 
    line-height: 1.6; 
}

.agenda-container { 
    max-width: 780px; 
    margin: 0 auto; 
    padding: 3rem 2rem; 
}

.agenda-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem; 
    color: var(--verde); 
    margin-bottom: 0.5rem;
}

.agenda-sub { 
    color: var(--gris); 
    margin-bottom: 2.5rem; 
}

.agenda-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 2rem; 
}

.calendar-card, .booking-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px; 
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 8px 32px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
}

.calendar-card:hover, .booking-card:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.card-title { 
    font-weight: 600; 
    font-size: 1rem; 
    margin-bottom: 1.5rem; 
    color: var(--oscuro); 
}

.month-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1rem; 
}

.month-name { 
    font-family: 'Playfair Display', serif; 
    font-size: 1.1rem; 
    font-weight: 700; 
}

.month-nav { 
    background: rgba(255,255,255,0.5); 
    border: 1px solid rgba(255,255,255,0.8); 
    width: 28px; 
    height: 28px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 0.9rem; 
}

.cal-grid { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    gap: 4px; 
}

.cal-day-name { 
    text-align: center; 
    font-size: 0.7rem; 
    color: var(--gris); 
    font-weight: 600; 
    padding: 4px 0; 
}

.cal-day {
    text-align: center; 
    padding: 6px; 
    font-size: 0.82rem;
    border-radius: 8px; 
    cursor: pointer; 
    transition: all 0.2s;
}

.cal-day:hover { 
    background: rgba(183, 228, 199, 0.6); 
}

.cal-day.available { 
    color: var(--verde); 
    font-weight: 600; 
}

.cal-day.selected { 
    background: var(--verde); 
    color: white; 
    box-shadow: 0 4px 10px rgba(45,106,79,0.3); 
}

.cal-day.today { 
    border: 2px solid var(--verde-claro); 
}

.cal-day.empty { 
    cursor: default; 
}

.time-slots { 
    margin-top: 1rem; 
}

.time-slots-label { 
    font-size: 0.85rem; 
    color: var(--gris); 
    margin-bottom: 0.8rem; 
}

.slots-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 8px; 
}

.slot {
    padding: 8px; 
    text-align: center; 
    border-radius: 8px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.8); 
    font-size: 0.8rem; 
    cursor: pointer;
    transition: all 0.2s; 
    color: var(--oscuro);
}

.slot:hover { 
    border-color: var(--verde); 
    background: white; 
}

.slot.selected { 
    background: var(--verde); 
    color: white; 
    border-color: var(--verde); 
}

.slot.ocupado { 
    background: rgba(0,0,0,0.05); 
    color: #bbb; 
    cursor: not-allowed; 
    border-color: transparent;
}

.form-group { 
    margin-bottom: 1.2rem; 
}

.form-label { 
    font-size: 0.85rem; 
    font-weight: 500; 
    margin-bottom: 0.4rem; 
    display: block; 
    color: var(--oscuro); 
}

.form-input, .form-select, .form-textarea {
    width: 100%; 
    padding: 12px; 
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 12px; 
    font-family: 'DM Sans', sans-serif; 
    font-size: 0.9rem;
    transition: all 0.3s; 
    background: rgba(255,255,255,0.5);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; 
    border-color: var(--verde); 
    background: white;
    box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.1);
}

.form-textarea { 
    resize: vertical; 
    min-height: 80px; 
}

.btn-agendar {
    width: 100%; 
    background: var(--verde); 
    color: white;
    border: none; 
    padding: 14px; 
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif; 
    font-size: 0.95rem; 
    font-weight: 600;
    cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    margin-top: 0.5rem;
}

.btn-agendar:hover { 
    background: var(--oscuro); 
    transform: translateY(-3px) scale(1.02); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.15); 
}

.selected-info {
    background: rgba(183, 228, 199, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 10px;
    padding: 10px 14px; 
    font-size: 0.85rem; 
    color: var(--verde);
    margin-bottom: 1rem; 
    display: none;
}

.selected-info.visible { 
    display: block; 
}

.auth-container {
    min-height: calc(100vh - 64px);
    display: flex; 
    align-items: center; 
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at top right, rgba(183, 228, 199, 0.4), transparent),
                linear-gradient(160deg, var(--crema) 0%, #e8f5e9 100%);
}

.auth-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px; 
    padding: 2rem;
    width: 100%; 
    max-width: 380px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.6);
    animation: fadeInUp 0.6s ease-out forwards;
}

.auth-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem; 
    font-weight: 700; 
    color: var(--verde);
    text-align: center; 
    margin-bottom: 0.3rem;
}

.auth-sub { 
    text-align: center; 
    color: var(--gris); 
    font-size: 0.9rem; 
    margin-bottom: 2rem; 
}

.auth-tabs { 
    display: flex; 
    background: rgba(0,0,0,0.03); 
    border-radius: 12px; 
    padding: 4px; 
    margin-bottom: 2rem; 
}

.auth-tab {
    flex: 1; 
    padding: 10px; 
    text-align: center; 
    border-radius: 9px;
    cursor: pointer; 
    font-size: 0.9rem; 
    font-weight: 600;
    transition: all 0.3s; 
    color: var(--gris);
}

.auth-tab.active { 
    background: white; 
    color: var(--verde); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
}

.auth-form { 
    display: none; 
}

.auth-form.active { 
    display: block; 
}

.success-msg {
    background: rgba(212, 237, 218, 0.8); 
    border: 1px solid rgba(195, 230, 203, 0.5);
    color: #155724; 
    padding: 12px; 
    border-radius: 10px;
    font-size: 0.9rem; 
    text-align: center; 
    display: none;
    margin-top: 1rem; 
    backdrop-filter: blur(5px);
}

.success-msg.visible { 
    display: block; 
}

.divider { 
    height: 1px; 
    background: rgba(0,0,0,0.05); 
    margin: 1.5rem 0; 
}

.modal-overlay {
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.4); 
    backdrop-filter: blur(5px);
    display: flex; 
    align-items: center; 
    justify-content: center;
    z-index: 200; 
    padding: 1rem; 
    opacity: 0; 
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.visible { 
    opacity: 1; 
    pointer-events: all; 
}

.modal {
    background: rgba(255,255,255,0.85); 
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 25px; 
    padding: 2rem;
    max-width: 400px; 
    width: 100%;
    transform: translateY(30px) scale(0.9); 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.modal-overlay.visible .modal { 
    transform: translateY(0) scale(1); 
}

.modal-icon { 
    font-size: 3rem; 
    text-align: center; 
    margin-bottom: 1rem; 
}

.modal h3 { 
    font-family: 'Playfair Display', serif; 
    font-size: 1.4rem; 
    text-align: center; 
    margin-bottom: 0.5rem; 
    color: var(--verde); 
}

.modal p { 
    text-align: center; 
    color: var(--gris); 
    font-size: 0.9rem; 
    margin-bottom: 1.5rem; 
}

.modal-detail { 
    background: rgba(0,0,0,0.03); 
    border-radius: 10px; 
    padding: 1rem; 
    margin-bottom: 1.5rem; 
    font-size: 0.88rem; 
    line-height: 1.8; 
}

.modal-detail strong { 
    color: var(--verde); 
}

.btn-modal { 
    width: 100%; 
    background: var(--verde); 
    color: white; 
    border: none; 
    padding: 14px; 
    border-radius: 12px; 
    font-family: 'DM Sans', sans-serif; 
    font-size: 1rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.3s;
}

.btn-modal:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
}

.footer {
    background-color: var(--oscuro);
    color: var(--blanco);
    padding: 4rem 2rem 1.5rem;
    margin-top: 5rem;
    font-family: 'DM Sans', sans-serif;
    opacity: 0;
    transform: translateY(80px);
    transition: all 1s ease-out;
}

.footer.visible { 
    opacity: 1; 
    transform: translateY(0); 
}

.footer-content {
    display: flex; 
    flex-wrap: wrap; 
    justify-content: space-between;
    max-width: 1100px; 
    margin: 0 auto; 
    gap: 3rem;
}

.footer-info { 
    flex: 1; 
    min-width: 300px; 
}

.footer-info h3 { 
    font-family: 'Playfair Display', serif; 
    color: var(--verde-claro); 
    font-size: 1.8rem; 
    margin-bottom: 1rem; 
}

.footer-info p { 
    color: #cccccc; 
    line-height: 1.6; 
    font-size: 0.95rem; 
}

.footer-links { 
    flex: 1; 
    min-width: 250px; 
    display: flex; 
    flex-direction: column; 
    gap: 0.8rem; 
}

.footer-links h4 { 
    color: var(--blanco); 
    font-size: 1.2rem; 
    margin-bottom: 0.5rem; 
    font-weight: 500; 
}

.social-link {
    color: #cccccc; 
    text-decoration: none; 
    transition: all 0.3s ease;
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 0.95rem;
}

.social-link:hover { 
    color: var(--verde-claro); 
    transform: translateX(5px); 
}

.footer-bottom {
    text-align: center; 
    margin-top: 3rem; 
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    color: #888888; 
    font-size: 0.85rem;
}

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

button:not(.btn-primary):not(.btn-secondary), a, input, select {
    transition: all 0.3s ease-in-out;
}

button:not(.btn-primary):not(.btn-secondary):hover {
    filter: brightness(1.1); 
    box-shadow: 0 5px 15px rgba(45, 106, 79, 0.4); 
}

button:active { 
    transform: scale(0.95); 
}

.feature-card:hover .icon-box, .card:hover .icon-box { 
    transform: rotateY(180deg) scale(1.15) translateY(-5px); 
    background: var(--verde);
    color: white;
}

button, a, .auth-tab, .cal-day.available, .slot:not(.ocupado) { 
    position: relative; 
    overflow: hidden; 
}

.ripple {
    position: absolute; 
    border-radius: 50%; 
    transform: scale(0);
    animation: ripple-anim 0.6s linear; 
    background-color: rgba(255, 255, 255, 0.4);
    pointer-events: none; 
    z-index: 10; 
}

.cal-day.available .ripple, .slot .ripple, .auth-tab:not(.active) .ripple { 
    background-color: rgba(45, 106, 79, 0.2); 
}

@keyframes ripple-anim { 
    to { transform: scale(4); opacity: 0; } 
}

.feature-card, .card, .service-grid, .step {
    border-radius: 25px; /* Redondeado unificado */
    padding: 30px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Propiedades de animación */
    opacity: 0; 
    transform: translateY(40px); 
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, border-radius 0.3s ease;
}

.feature-card.visible, .card.visible, .service-grid.visible, .step.visible {
    opacity: 1; 
    transform: translateY(0);
}

.feature-card:hover, .card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(45, 106, 79, 0.15); 
    background: rgba(255, 255, 255, 0.95);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background 0.3s ease-in-out;
}

.mobile-nav {
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%;
    background: rgba(255,255,255,0.85); 
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255,255,255,0.5);
    display: flex; 
    justify-content: space-around; 
    align-items: center;
    padding: 15px 20px 25px; 
    border-top-left-radius: 30px; 
    border-top-right-radius: 30px;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.06); 
    z-index: 2000; 
    transition: background-color 0.3s ease;
}

.mobile-nav.oculta { 
    display: none !important; 
}

@media (min-width: 769px) { 
    .mobile-nav { display: none !important; } 
}

.mobile-nav .nav-item {
    color: #888888; 
    font-size: 1.8rem; 
    text-decoration: none;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    position: relative; 
    transition: all 0.3s ease;
}

.mobile-nav .nav-item:hover { 
    color: var(--verde); 
    transform: translateY(-3px); 
}

.mobile-nav .nav-item.active { 
    color: #333333; 
}

.mobile-nav .active-dot {
    width: 5px; 
    height: 5px; 
    background-color: #333333; 
    border-radius: 50%;
    position: absolute; 
    bottom: -10px; 
    opacity: 1; 
    transition: all 0.3s ease;
}

.trust-badge {
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    margin-top: 30px; 
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px; 
    color: #ffffff; 
    font-size: 0.85rem; 
    backdrop-filter: blur(5px);
    transition: all 0.3s ease; 
    cursor: default;
}

.trust-badge i { 
    font-size: 1.3rem; 
    color: #4CAF50; 
}

.trust-badge:hover { 
    background: rgba(255, 255, 255, 0.2); 
    transform: translateY(-2px); 
}

body.dark-theme,
body.dark-theme .page:not(#page-servicio),
body.dark-theme .features,
body.dark-theme .process,
body.dark-theme .auth-container {
    background-color: #121212 !important; 
    color: #e0e0e0 !important; 
    background-image: none !important;
}

body.dark-theme h1, body.dark-theme h2, body.dark-theme h3, body.dark-theme h4,
body.dark-theme p, body.dark-theme label, body.dark-theme li, body.dark-theme .hero-content p {
    color: #f5f5f5 !important;
}

body.dark-theme .feature-card, 
body.dark-theme .auth-card,
body.dark-theme .booking-card,
body.dark-theme .calendar-card,
body.dark-theme .modal {
    background-color: rgba(30, 30, 30, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    border-color: rgba(255,255,255,0.1) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}

body.dark-theme .form-input, body.dark-theme .form-select, body.dark-theme .form-textarea,
body.dark-theme input, body.dark-theme select, body.dark-theme textarea {
    background-color: rgba(42, 42, 42, 0.6) !important; 
    color: #ffffff !important; 
    border: 1px solid rgba(255,255,255,0.1) !important;
}

body.dark-theme input::placeholder, body.dark-theme textarea::placeholder { 
    color: #aaaaaa !important; 
}

body.dark-theme header {
    background: rgba(18, 18, 18, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme header nav a { 
    color: #ffffff !important; 
}

body.dark-theme footer, body.dark-theme #mi-footer { 
    background-color: #08140a !important; 
}

body.dark-theme .mobile-nav {
    background: rgba(26, 26, 26, 0.85) !important;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.1);
}

body.dark-theme .mobile-nav .nav-item { 
    color: #666666; 
}

body.dark-theme .mobile-nav .nav-item.active { 
    color: #ffffff; 
}

body.dark-theme .mobile-nav .active-dot { 
    background-color: #ffffff; 
}

body.dark-theme .swal2-popup {
    background-color: #1a202c !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .swal2-title,
body.dark-theme .swal2-html-container {
    color: #e2e8f0 !important;
}

body.dark-theme td, body.dark-theme th {
    color: #e2e8f0;
}

body.dark-theme tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .fondo-servicios {
    transition: transform 0.5s ease, box-shadow 0.5s ease !important;
}

body.dark-theme .fondo-servicios:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 45px rgba(82, 183, 136, 0.5) !important;
}

body.dark-theme .fondo-servicios .service-section {
    background: rgba(0, 0, 0, 0.4) !important; 
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

body.dark-theme .fondo-servicios:hover .service-section {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(82, 183, 136, 0.7) !important;
}

body.dark-theme .fondo-servicios .service-grid, 
body.dark-theme .fondo-servicios .service-text {
    background: transparent !important;
}

body.dark-theme .service-text h3, 
body.dark-theme .service-text p, 
body.dark-theme .tag {
    color: #ffffff !important;
}

@media (max-width: 768px) {
    html {
        font-size: 14px; 
    }

    .CLASE_DE_TU_ICONO {
        width: 60px;
        height: 60px;
        border-radius: 15px;
    }
    .CLASE_DE_TU_ICONO img {
        width: 30px;
    }

    header {
        padding: 15px 10px !important;
        flex-direction: column;
        gap: 10px !important;
        height: auto !important;
    }

    header > div {
        flex-direction: column !important;
        gap: 10px !important;
    }

    header img[alt="Logo"] {
        height: 70px !important;
        margin: 0 !important;
    }

    header .logo {
        font-size: 1.1rem !important;
        text-align: center;
    }

    header nav {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    header nav a#nav-agendar, 
    header nav a#nav-perfil { 
        display: none !important; 
    }
    
    header nav a {
        display: inline-block !important;
        font-size: 0.9rem;
        padding: 6px 14px;
        margin: 0;
        background: rgba(45, 106, 79, 0.1);
        border-radius: 20px;
        border: 1px solid rgba(45, 106, 79, 0.2);
    }
    
    body.dark-theme header nav a {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    body {
        padding-top: 180px !important; 
    }

    .hero {
        padding: 4rem 1.5rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-btns button {
        width: 100%;
    }

    .features {
        padding: 3rem 1.5rem !important; 
        gap: 1.5rem !important;
    }

    .feature-card, .card, .service-grid, .step {
    border-radius: 25px;
    padding: 1.5rem !important; /* Padding forzado para asegurar uniformidad */
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Propiedades de animación */
    opacity: 0; 
    transform: translateY(40px); 
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, border-radius 0.3s ease;
    }

    .feature-card.visible, .card.visible, .service-grid.visible, .step.visible {
    opacity: 1; 
    transform: translateY(0);
    }

    .feature-card:hover, .card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(45, 106, 79, 0.15); 
    background: rgba(255, 255, 255, 0.95);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background 0.3s ease-in-out;
    }
    .service-hero {
        padding: 3rem 1.5rem 1.5rem 1.5rem !important;
    }

    .fondo-servicios {
        width: 92% !important;
        margin: 20px auto !important;
        border-radius: 20px !important;
        background-attachment: scroll !important;
    }

    .fondo-servicios .service-section {
        padding: 40px 20px !important;
        border-radius: 20px !important;
    }

    .service-grid {
        grid-template-columns: 1fr !important; 
        gap: 1.5rem !important;
        text-align: center;
    }

    .service-grid.reverse {
        display: flex;
        flex-direction: column-reverse; 
    }

    .service-visual {
        font-size: 4rem !important;
        height: 160px !important;
        margin-bottom: 1rem !important;
    }

    .agenda-container {
        padding: 1.5rem 1rem !important;
    }

    .agenda-grid {
        grid-template-columns: 1fr !important; 
        gap: 2rem !important;
    }

    div[style*="grid-template-columns: 1fr 2fr"] {
        grid-template-columns: 1fr !important; 
        gap: 2rem !important;
    }

    .auth-card {
        padding: 1.5rem 1rem !important;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 8px 4px !important; 
    }

    .btn-login { 
        padding: 8px 15px; 
        font-size: 0.85rem; 
        margin-left: 0; 
    }

    .float-whatsapp {
        bottom: 100px !important; 
        right: 20px !important;
    }
}