/* ========================================
   VARIABLES CSS - MEJORADAS CON PSICOLOGÍA DE COLORES
   ======================================== */
:root {
    /* Colores principales - Optimizados */
    --primary-red: #E63946;
    --primary-red-dark: #C1121F;
    --primary-dark: #1D3557;
    --primary-dark-light: #2a4a6b;
    --accent-blue: #457B9D;
    --light-bg: #F1FAEE;
    --white: #FFFFFF;
    --text-dark: #1D3557;
    --text-light: #6C757D;
    --success: #28a745;
    
    /* Espaciados */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Sombras - Más sutiles y profesionales */
    --shadow-sm: 0 2px 8px rgba(29, 53, 87, 0.08);
    --shadow-md: 0 5px 20px rgba(29, 53, 87, 0.12);
    --shadow-lg: 0 15px 40px rgba(230, 57, 70, 0.15);
    --shadow-hover: 0 20px 50px rgba(230, 57, 70, 0.25);
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   RESET Y BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--white);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

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

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-dark) !important;
}

.navbar-brand img {
    filter: drop-shadow(0 2px 8px rgba(230, 57, 70, 0.2));
}

.nav-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--text-dark) !important;
    margin: 0 0.5rem;
    position: relative;
    padding: 0.5rem 1rem !important;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-red);
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 80%;
}

/* ========================================
   HERO FULL-SCREEN - SIN OVERLAY
   ======================================== */
.hero-fullscreen {
    min-height: 100vh;
    background: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=1600&h=900&fit=crop') center/cover no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--white);
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.8),
        -1px -1px 3px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--white);
    font-weight: 600;
    text-shadow: 
        2px 2px 5px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

/* ========================================
   BOTONES - PSICOLOGÍA DE COLORES APLICADA
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%) !important;
    border: none !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    padding: 14px 32px;
    font-size: 1.05rem;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white !important;
    transition: all var(--transition-normal);
    min-height: 44px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red) 100%) !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-light {
    background: white !important;
    color: var(--primary-red) !important;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    padding: 14px 32px;
}

.btn-light:hover {
    background: var(--light-bg) !important;
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid white;
    color: white !important;
    font-weight: 600;
    border-radius: 50px;
    padding: 14px 32px;
}

.btn-outline-light:hover {
    background: white !important;
    color: var(--primary-red) !important;
}

/* ========================================
   SECCIONES - PATRÓN DE FONDOS OPTIMIZADO
   ======================================== */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    color: var(--primary-dark);
    font-size: clamp(2rem, 5vw, 2.5rem);
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--accent-blue));
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Fondos alternados según psicología de colores */
#actividades {
    background: var(--white);
}

#productos {
    background: var(--light-bg);
}

#galeria {
    background: var(--white);
}

#testimonios {
    background: var(--light-bg);
}

#faq {
    background: var(--white);
}

#sucursales {
    background: var(--light-bg);
}

.bg-light-section {
    background: var(--light-bg) !important;
}

/* ========================================
   TARJETAS - MEJORADAS
   ======================================== */
.card {
    background: var(--white);
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.08);
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.25rem;
    margin-top: 1rem;
}

.card-text {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ========================================
   ESTADÍSTICAS
   ======================================== */
.stats-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark-light) 100%);
    color: var(--white);
}

.stat-item {
    padding: 2rem 1rem;
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
    display: block;
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* ========================================
   GALERÍA CARRUSEL - OPCIÓN 1 MEJORADA
   ======================================== */

/* Contenedor del carrusel */
.carousel-img {
    height: 500px;
    width: 100%;
    object-fit: contain;
    background: transparent;
    padding: 20px;
}

/* Controles del carrusel */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary-red);
    border-radius: 50%;
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
    background-color: var(--primary-red-dark);
    transform: scale(1.1);
}

/* Responsive: Flechas más chicas en mobile */
@media (max-width: 768px) {
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        padding: 1.0rem; /* Más chicas en tablets */
    }
}

@media (max-width: 576px) {
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        padding: 0.5rem; /* Mucho más chicas en mobile */
    }
}

/* Indicadores */
.carousel-indicators button {
    background-color: var(--primary-red);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

.carousel-indicators button.active {
    background-color: var(--primary-red-dark);
    transform: scale(1.2);
}

/* ========================================
   TESTIMONIOS - REDISEÑADOS CON AVATARES
   ======================================== */
.testimonial-card-carousel {
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--primary-red);
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
    transition: opacity 0.6s ease;
}

.testimonial-quote-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 4rem;
    color: rgba(230, 57, 70, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-avatar {
    flex-shrink: 0;
}

.testimonial-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-red);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.3);
}

.testimonial-content {
    flex: 1;
}

.testimonial-stars {
    color: #FFC107;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    letter-spacing: 0.2rem;
}

.testimonial-text {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    color: var(--primary-red);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    margin: 0;
}

/* Controles del carrusel de testimonios - FUERA DEL CONTENIDO */
#testimoniosCarousel {
    padding: 0 80px;
}

.testimonial-carousel-prev,
.testimonial-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
}

.testimonial-carousel-prev {
    left: -60px;
}

.testimonial-carousel-next {
    right: -60px;
}

.testimonial-carousel-prev .carousel-control-prev-icon,
.testimonial-carousel-next .carousel-control-next-icon {
    background-color: var(--primary-red);
    border-radius: 50%;
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.testimonial-carousel-prev:hover .carousel-control-prev-icon,
.testimonial-carousel-next:hover .carousel-control-next-icon {
    background-color: var(--primary-red-dark);
    transform: scale(1.1);
}

/* Indicadores mejorados */
.testimonial-indicators {
    bottom: -50px !important;
}

.testimonial-indicators button {
    background-color: var(--primary-red) !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    margin: 0 5px !important;
}

/* ========================================
   FAQ ACCORDION
   ======================================== */
.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 15px !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-button {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--white);
    font-size: 1.1rem;
    padding: 1.5rem;
}

.accordion-button:not(.collapsed) {
    background: var(--light-bg);
    color: var(--primary-red);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--primary-red);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23E63946'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    padding: 1.5rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* ========================================
   SUCURSALES
   ======================================== */
.sucursal-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

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

.sucursal-card h4 {
    color: var(--primary-red);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif;
}

iframe {
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    border: none;
}

/* ========================================
   CTA CONTACTO
   ======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.cta-section h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--white);
}

.cta-phone {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.cta-buttons .btn {
    min-width: 200px;
}

/* ========================================
   FOOTER - CON CRÉDITOS
   ======================================== */
.footer-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark-light) 100%);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-section h5 {
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.9);
}

.footer-section hr {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 2rem 0 1rem;
}

.footer-credits {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-credits a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 600;
}

.footer-credits a:hover {
    color: var(--white);
    text-decoration: underline;
}

.social-link {
    color: var(--white);
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary-red);
    transform: translateY(-5px);
    color: var(--white) !important;
}

/* ========================================
   WHATSAPP FLOTANTE
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all var(--transition-normal);
}

.whatsapp-float i {
    font-size: 28px;
    line-height: 1;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white;
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: var(--primary-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    /* Ocultar flechas de testimonios en tablets */
    .testimonial-carousel-prev,
    .testimonial-carousel-next {
        display: none;
    }
    
    #testimoniosCarousel {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .hero-fullscreen {
        min-height: 85vh;
        background-attachment: scroll;
    }
    
    .nav-menu {
        background: rgba(255, 255, 255, 0.98);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
    }
    
    /* Galería carrusel responsive */
    .carousel-img {
        height: 350px;
        padding: 10px;
    }
    
    /* Testimonios mobile: layout vertical */
    .testimonial-card-carousel {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2rem 1.5rem;
        gap: 1rem;
    }
    
    .testimonial-avatar img {
        width: 70px;
        height: 70px;
    }
    
    .testimonial-quote-icon {
        font-size: 3rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-icon {
        font-size: 2.5rem;
    }
    
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float i {
        font-size: 24px;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
    
    .cta-buttons .btn {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    /* Galería mobile pequeño */
    .carousel-img {
        height: 280px;
        padding: 10px;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .testimonial-card-carousel {
        padding: 2rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .cta-phone {
        font-size: 1.5rem;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}