/* Fuente moderna y legible */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Variables CSS para colores nude */
:root {
    --nude-light: #f5f5dc;
    --nude-medium: #e0d8c7;
    --nude-dark: #d4c9b6;
    --nude-text: #5c5c5c;
    --nude-accent: #a08d7b;
    --nude-accent-hover: #8a7a6b;
    --success-green: #25d366;
    --success-green-hover: #20b05a;
}

/* Language Toggle Styles */
.language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 5px;
    transition: all 0.3s ease;
}

.language-toggle:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

#languageBtn {
    border: 2px solid var(--nude-accent);
    background: transparent;
    color: var(--nude-accent);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
}

#languageBtn:hover,
#languageBtn:focus {
    background-color: var(--nude-accent);
    color: white;
    border-color: var(--nude-accent);
    box-shadow: none;
    transform: scale(1.05);
}

#currentLang {
    font-weight: 700;
    opacity: 1;
}

#otherLang {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

#languageBtn:hover #otherLang {
    opacity: 1;
}

/* Estilos mejorados para botones principales - CTA BUTTONS */
.cta-button-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

.cta-button {
    width: 100%;
    padding: 18px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.cta-whatsapp {
    background: linear-gradient(135deg, var(--success-green), #128c7e);
    color: white;
    border: 2px solid transparent;
}

.cta-whatsapp:hover {
    background: linear-gradient(135deg, var(--success-green-hover), #0d7377);
    color: white;
}

.cta-schedule {
    background: linear-gradient(135deg, var(--nude-accent), #b89d8a);
    color: white;
    border: 2px solid transparent;
}

.cta-schedule:hover {
    background: linear-gradient(135deg, var(--nude-accent-hover), #a08d7b);
    color: white;
}

.cta-contact {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: 2px solid transparent;
}

.cta-contact:hover {
    background: linear-gradient(135deg, #545b62, #495057);
    color: white;
}

.cta-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: 2px solid transparent;
}

.cta-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    color: white;
}

.cta-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Estilos para testimonios */
.testimonials-section {
    background: linear-gradient(135deg, var(--nude-light), #f8f9fa);
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="0.5" fill="%23a08d7b" opacity="0.05"/><circle cx="75" cy="75" r="0.5" fill="%23a08d7b" opacity="0.05"/><circle cx="50" cy="10" r="0.3" fill="%23a08d7b" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.testimonial-carousel {
    position: relative;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 40px 35px;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(160, 141, 123, 0.1);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 30px;
    font-size: 4rem;
    color: var(--nude-accent);
    font-family: Georgia, serif;
    opacity: 0.3;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--nude-text);
    margin-bottom: 25px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nude-accent), var(--nude-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.author-info h5 {
    margin: 0;
    color: var(--nude-accent);
    font-weight: 600;
}

.author-info .text-muted {
    font-size: 0.9rem;
    margin: 0;
}

.stars {
    color: #ffc107;
    margin-top: 5px;
    font-size: 0.9rem;
}

/* Smooth transition for language changes */
[data-es], [data-en] {
    transition: opacity 0.3s ease-in-out;
}

.language-changing [data-es],
.language-changing [data-en] {
    opacity: 0.7;
}

/* Estilos de fondo */
.bg-light {
    background-color: var(--nude-light) !important;
}

/* Estilos de botones generales */
.btn-primary {
    background-color: var(--nude-accent);
    border-color: var(--nude-accent);
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--nude-accent-hover);
    border-color: var(--nude-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-light {
    background-color: #fff;
    border-color: #fff;
    color: var(--nude-accent);
    transition: all 0.3s ease;
}

.btn-light:hover,
.btn-light:focus {
    background-color: var(--nude-medium);
    border-color: var(--nude-medium);
    color: var(--nude-accent);
    transform: translateY(-2px);
}

.btn-success:hover,
.btn-success:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Estilos del Hero */
#hero {
    min-height: 100vh;
    background-color: var(--nude-medium);
    color: #fff;
    position: relative;
    overflow: hidden;
}

#hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: bold;
    margin-bottom: 1rem;
}

#hero h2 {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--nude-dark);
    margin-bottom: 1rem;
}

#hero p {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin-bottom: 2rem;
}

/* Overlay del hero con gradiente mejorado */
.hero-overlay {
    background: linear-gradient(135deg, rgba(160, 141, 123, 0.8), rgba(212, 201, 182, 0.6));
    backdrop-filter: blur(1px);
}

/* Estilos de secciones */
.section-padding {
    padding: 80px 0;
}

/* Estilos de tarjetas con hover mejorado */
.card-hover {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--nude-accent);
}

/* Estilos de botones mejorados */
.btn {
    transition: all 0.3s ease;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    text-decoration: none;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Efectos de texto */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Bordes redondeados */
.border-rounded {
    border-radius: 15px;
}

.img-rounded {
    border-radius: 20px;
}

/* Estilos de títulos de sección */
#uvp .h5 {
    color: var(--nude-accent);
    font-weight: 600;
}

/* Estilos del acordeón */
.accordion-button {
    background-color: var(--nude-medium);
    color: var(--nude-text);
    border: none;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    color: #fff;
    background-color: var(--nude-accent);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(160, 141, 123, 0.25);
}

.accordion-item {
    border-color: var(--nude-dark);
    margin-bottom: 0.5rem;
    border-radius: 10px;
    overflow: hidden;
}

.accordion-body {
    background-color: white;
    color: var(--nude-text);
}

/* Estilos del modal */
.modal-content {
    background-color: var(--nude-light);
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom-color: var(--nude-dark);
    background-color: var(--nude-medium);
}

.modal-footer {
    border-top-color: var(--nude-dark);
}

/* Modal 3 específico - fondo blanco */
#contactModal3 .modal-content {
    background-color: white;
}

#contactModal3 .modal-header {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
}

#contactModal3 .modal-body {
    background-color: white;
}

/* Estilos del formulario */
.form-control {
    border-radius: 10px;
    border: 2px solid var(--nude-medium);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--nude-accent);
    box-shadow: 0 0 0 0.25rem rgba(160, 141, 123, 0.25);
}

.form-label {
    color: var(--nude-text);
    font-weight: 600;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Animación de pulso para botones CTA */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(160, 141, 123, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(160, 141, 123, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(160, 141, 123, 0);
    }
}

.btn-primary:hover {
    animation: pulse 2s infinite;
}

/* Language transition animation */
@keyframes languageSwitch {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-switching {
    animation: languageSwitch 0.5s ease-in-out;
}

/* Mejoras de accesibilidad */
.btn:focus,
.form-control:focus,
.accordion-button:focus {
    outline: 2px solid var(--nude-accent);
    outline-offset: 2px;
}

/* Login Button Styles */
.login-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 5px;
    transition: all 0.3s ease;
}

.login-button:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

#loginBtn {
    border: 2px solid var(--nude-accent);
    background: transparent;
    color: var(--nude-accent);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
}

#loginBtn:hover,
#loginBtn:focus {
    background-color: var(--nude-accent);
    color: white;
    border-color: var(--nude-accent);
    box-shadow: none;
    transform: scale(1.05);
}

/* Custom close button position */
.modal-header .btn-close {
    margin-left: auto;
    margin-right: 0;
}

/* Asegurar que los modales aparezcan por encima de todos los elementos */
.modal {
    z-index: 10050 !important;
}

.modal-backdrop {
    z-index: 10040 !important;
}

/* ===== ESTILOS ESPECÍFICOS PARA EL PANEL DE ADMINISTRACIÓN ===== */

/* Estilos para el sidebar colapsable en móvil */
.admin-sidebar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle {
    background: var(--nude-accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(160, 141, 123, 0.2);
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
    background: var(--nude-accent-hover);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(160, 141, 123, 0.3);
}

.sidebar-backdrop {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mejoras específicas para el botón de logout */
.logout-container {
    background: rgba(248, 249, 250, 0.5);
    border-top: 2px solid var(--nude-medium);
    margin-top: auto;
}

.logout-btn {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.15);
}

.logout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.logout-btn:hover::before {
    left: 100%;
}

.logout-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Animación para el menú móvil */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.admin-sidebar.show {
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Mejoras de rendimiento para móvil */
@media (max-width: 768px) {
    .admin-sidebar {
        will-change: transform;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-backdrop {
        will-change: opacity;
    }
    
    /* Mejorar la experiencia táctil */
    .nav-pills .nav-link {
        min-height: 48px;
        touch-action: manipulation;
    }
    
    .logout-btn {
        min-height: 48px;
        touch-action: manipulation;
    }
    
    .sidebar-toggle {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
}

/* Estilos responsive mejorados */
@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
    
    #hero {
        padding: 0 15px;
    }
    
    #hero h2 {
        letter-spacing: 2px;
    }
    
    .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .card-hover {
        margin-bottom: 1rem;
    }
    
    .cta-button-group {
        gap: 15px;
    }
    
    .cta-button {
        font-size: 1rem;
        padding: 15px 25px;
    }
    
    .testimonial-card {
        margin: 10px;
        padding: 30px 25px;
    }

    .language-toggle {
        top: 15px;
        right: 15px;
        z-index: 10001; /* Por encima del sidebar */
    }
 
    .login-button {
        top: 15px;
        left: 15px;
        z-index: 10001; /* Por encima del sidebar */
    }

    #languageBtn, #loginBtn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

@media (max-width: 576px) {
    .section-padding {
        padding: 40px 0;
    }
    
    #hero h2 {
        letter-spacing: 1px;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .btn-lg {
        padding: 12px 25px;
    }
    
    .cta-button {
        font-size: 0.95rem;
        padding: 14px 20px;
    }
    
    /* Ajustes específicos para pantallas muy pequeñas */
    .admin-sidebar {
        width: 100vw;
        max-width: 320px;
    }
    
    .nav-pills .nav-link {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .logout-btn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .card-hover:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
        animation: none;
    }
    
    .language-toggle:hover {
        transform: none;
    }
    
    .nav-pills .nav-link:hover {
        transform: none;
    }
    
    /* Mejor feedback táctil */
    .nav-pills .nav-link:active {
        background-color: var(--nude-medium);
        transform: scale(0.98);
    }
    
    .logout-btn:active {
        background: linear-gradient(135deg, #a71e2a, #8b1a1a);
    }
}

/* Estilos para impresión */
@media print {
    .btn,
    .modal,
    .accordion-button,
    .language-toggle,
    .login-button,
    .sidebar-toggle,
    .sidebar-backdrop {
        display: none !important;
    }
    
    .admin-sidebar {
        position: static !important;
        width: auto !important;
        height: auto !important;
        box-shadow: none !important;
    }
    
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    .section-padding {
        padding: 20px 0;
    }
}

/* Mejoras de rendimiento */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Estilos para estados de carga */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Estilos para validación de formularios */
.was-validated .form-control:valid {
    border-color: #28a745;
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
}

/* Mejoras de contraste para accesibilidad */
@media (prefers-contrast: high) {
    :root {
        --nude-accent: #6b5b4a;
        --nude-text: #000;
    }
    
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
    
    #languageBtn {
        border-color: #000;
        color: #000;
    }
    
    .logout-btn {
        background: #000 !important;
        border-color: #000;
    }
}

/* Respeto por las preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in-up,
    .language-switching {
        animation: none;
    }
    
    .language-toggle,
    .btn,
    .card-hover,
    .admin-sidebar,
    .sidebar-backdrop {
        transition: none;
    }
    
    .admin-sidebar.show {
        animation: none;
    }
}
