:root {
    --primary-black: #121212;
    --accent-red: #E63946;
    --accent-orange: #F4A261;
    --aguayo-yellow: #E9C46A;
    --glass-bg: rgba(255, 255, 255, 0.75);
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-black);
    overflow-x: hidden;
    /* Fondo base perla sólido */
    background-color: #ffffff; /* Color perla (Pearl white) */

    /* Imagen de aguayos repetitiva */
    background-image: url('../../assets/img/background.png');

    /* Repetir verticalmente pero no horizontalmente */
    background-repeat: repeat-y;

    /* Fijar la imagen para que no se mueva al hacer scroll (opcional, para efecto parallax) */
    /* background-attachment: fixed; */

    /* Escalar la imagen para que cubra todo el ancho (esto hará que los aguayos queden a los bordes) */
    /* background-size: cover; */

    /* Centrar horizontalmente para que los aguayos queden a los lados */
    background-position: center top;
}

h1, h2, h3, .navbar-brand {
    font-family: 'Playfair Display', serif;
}

h1.display-4 {
    font-size: 2.8rem; /* Tamaño más contenido para el Hero */
    line-height: 1.2;
}

h2.display-5 {
    font-size: 2.2rem; /* Tamaño más elegante para los encabezados de sección */
    letter-spacing: 1px;
}

section {
    padding-top: 4.5rem !important;
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--accent-orange);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   NAVBAR MAESTRO - ENCANTO DEL FOLKLORE (CONSOLIDADO)
   ========================================================================== */

/* --- Configuración Base y Reset --- */
#mainNav {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%); /* Soporte para Safari */
    padding: 0.5rem 0 !important;
    min-height: 85px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease-in-out;
}

.container-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* --- Tipografía y Enlaces --- */
.nav-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333 !important;
    padding: 0.5rem 1.2rem !important;
    white-space: nowrap;
    transition: color 0.3s ease;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.nav-link:hover {
    color: var(--accent-red) !important;
}

/* --- Logo Central --- */
.logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 25px;
    margin: 0 !important;
    z-index: 1050;
}

.nav-logo-img {
    height: 75px; /* Tamaño Premium del Banner */
    width: auto;
    transition: transform 0.3s ease;
}

/* --- Botón CTA (Pill Style) --- */
.btn-cta-nav {
    background-color: var(--accent-red);
    color: #fff !important;
    border-radius: 50px !important; /* Bordes redondeados consistentes */
    padding: 10px 24px !important;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    border: 2px solid var(--accent-red);
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.2);
}

.btn-cta-nav:hover {
    background: transparent;
    color: var(--accent-red) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(230, 57, 70, 0.3);
}

/* --- Ícono Hamburguesa a "X" --- */
.navbar-toggler {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
}

.hamburger {
    width: 26px;
    height: 3px;
    background: #333;
    display: block;
    position: relative;
    transition: background 0.2s ease;
}

.hamburger::before, .hamburger::after {
    content: '';
    width: 26px;
    height: 3px;
    background: #333;
    position: absolute;
    left: 0;
    transition: all 0.2s ease-in-out;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Transformación Activa */
.menu-active .hamburger {
    background: transparent !important;
}

.menu-active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* --- COMPORTAMIENTO DESKTOP (992px+) --- */
@media (min-width: 992px) {
    .nav-group {
        flex: 1; 
        display: flex !important;
    }
    
    .nav-group:first-child { justify-content: flex-end; }
    .nav-group:last-child { justify-content: flex-start; }
}

/* --- COMPORTAMIENTO MÓVIL (Bajo 992px) --- */
@media (max-width: 991.98px) {
    .container-nav {
        justify-content: center !important; /* Centra el logo */
    }

    .navbar-toggler {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-logo-img {
        height: 55px; /* Un poco más pequeño para dar aire */
    }

    /* Menú Desplegable Instantáneo */
    .navbar-collapse {
        display: none; 
    }

    .navbar-collapse.show {
        display: block !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.97) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 30px 20px;
        text-align: center;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        border-bottom: 4px solid var(--accent-red);
        z-index: 1000;
    }

    .nav-link {
        border-bottom: 1px solid #f8f8f8;
        padding: 15px !important;
        font-size: 1rem;
    }

    .btn-cta-nav {
        margin-top: 25px;
        width: 100%;
        display: inline-block;
    }
}

/* Hero Section */
/* Ajustes para el Hero Responsivo */
#hero {
    min-height: 100vh;
    overflow: hidden; /* Evita scrolls horizontales por animaciones */
}

.hero-img {
    max-height: 450px; /* Limitamos la altura para que no empuje todo hacia abajo */
    width: 100%;
    object-fit: cover;
}

/* Media query para móviles y tablets */
@media (max-width: 991.98px) {
    #hero {
        padding-top: 120px; /* Espacio extra para el Navbar Glassmorphism */
        text-align: center;
        min-height: auto; /* Permite que la sección crezca según el contenido */
    }

    .display-4 {
        font-size: 2.2rem; /* Título más pequeño en móvil para ahorrar espacio */
    }

    .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem !important;
    }

    .hero-img {
        margin-top: 20px; /* Separa la imagen del botón que está arriba */
        max-height: 300px; /* Imagen más pequeña en móviles */
    }
}

/* Botones Premium */
.btn-cta {
    background: linear-gradient(45deg, var(--accent-red), var(--accent-orange));
    color: #fff !important;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: bold;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
}

/* ==========================================================================
   SECCIÓN MENÚ
   ========================================================================== */

/* Tarjetas de Producto */
.product-img-portrait {
    width: 100%;
    aspect-ratio: 2 / 3; /* Formato vertical perfecto para instrumentos */
    overflow: hidden;
    background-color: #f8f9fa; /* Fondo neutro mientras carga */
}

.product-img-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la imagen se estire, la recorta al centro */
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card {
    border: none;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #fff;
    cursor: pointer;
    text-decoration: none !important;
}

/* Efecto Hover Solicitado */
.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid var(--accent-orange);
}

.product-card img {
    /* height: 200px; */
    object-fit: cover;
    border-bottom: 2px solid #f8f9fa;
}

/* Quitar subrayado de enlaces en las cards */
#menu a {
    text-decoration: none;
    color: inherit;
}

/* Animación de entrada para los iconos de servicios */
.product-card i {
    transition: transform 0.3s ease;
}

.product-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Concepto */
.icon-box {
    min-width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.service-item:hover .icon-box {
    transform: rotate(-10deg) scale(1.1);
    background: var(--primary-black);
}

.service-item:hover .icon-box i {
    color: #fff !important;
}

/* Decoración Aguayo para la imagen */
.aguayo-stripe {
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 100px;
    height: 100px;
    background: repeating-linear-gradient(
        45deg,
        #E63946,
        #E63946 10px,
        #F4A261 10px,
        #F4A261 20px,
        #E9C46A 20px,
        #E9C46A 30px
    );
    z-index: -1;
    border-radius: 15px;
}

.service-item h5 {
    color: var(--primary-black);
    letter-spacing: 0.5px;
}

/* Iconos de contacto con la paleta de colores */
.contact-icon {
    width: 45px;
    height: 45px;
    background: var(--accent-red);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

/* Efecto Dark para Google Maps */
.map-container iframe {
    filter: grayscale(100%) invert(92%) contrast(83%); /* Ajuste para tono oscuro premium */
    transition: filter 0.5s ease;
}

.map-container:hover iframe {
    filter: grayscale(0%) invert(0%) contrast(100%); /* Vuelve a color al pasar el mouse */
}

/* Ajuste de altura para que ambas columnas midan lo mismo en Desktop */
@media (min-width: 992px) {
    .map-container {
        min-height: 100%;
    }
}

/* Espaciado para la descripción del encabezado */
.header-section p {
    font-size: 1.1rem;
    margin-top: 10px;
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: var(--primary-black);
    color: #fff;
}

.footer h4, 
.footer h5, 
.footer .fs-4 {
    font-size: 1.15rem !important; /* Reducción para mayor elegancia */
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem !important;
}

.footer-logo span {
    font-size: 1.15rem !important;
    font-family: 'Montserrat', sans-serif; /* Cambio a Montserrat para limpieza */
}

/* Iconos de Redes Sociales (50% más grandes + Animación) */
.social-links-container {
    display: flex;
    gap: 20px;
}

.social-icon {
    color: var(--accent-red) !important;
    font-size: 1.45rem; /* Tamaño equilibrado: notable pero sutil */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.social-icon:hover {
    transform: translateY(-5px); /* Flotación un poco más corta para mayor elegancia */
    color: var(--accent-orange) !important;
    filter: drop-shadow(0 4px 8px rgba(230, 57, 70, 0.3));
}

/* Links de Navegación */
.footer-nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6) !important;
    transition: 0.3s;
    display: flex;
    align-items: center;
}

.footer-nav a i {
    font-size: 0.8rem;
    color: var(--accent-red);
}

.footer-nav a:hover {
    color: #fff !important;
    padding-left: 10px; /* Desplazamiento sutil al hover */
}

/* Botón CTA del Footer (Rojo Resaltante) */
.btn-footer-cta {
    background-color: var(--accent-red);
    color: #fff !important;
    border: none;
    border-radius: 50px;
    padding: 15px 35px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.btn-footer-cta:hover {
    background-color: #c12e3a; /* Un rojo un poco más oscuro para el hover */
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
}

/* Menu Hamburguesa */
.navbar-toggler {
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.hamburger {
    width: 28px; /* Ancho clásico */
    height: 3px;  /* Grosor definido */
    background: var(--primary-black);
    display: block;
    position: relative;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

/* Las otras dos líneas */
.hamburger::before,
.hamburger::after {
    content: '';
    width: 28px;
    height: 3px;
    background: var(--primary-black);
    position: absolute;
    left: 0;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

/* Espaciado clásico de las líneas */
.hamburger::before { top: -9px; }
.hamburger::after { top: 9px; }

/* Transformación limpia a X (sin iconos fantasma) */
.menu-active .hamburger {
    background: transparent !important; /* Desaparece la línea del centro */
}

.menu-active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}
/* Back to top */
#backToTop {
    position: fixed;
    bottom: 90px;
    right: 28px;
    background: var(--accent-red);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    display: none;
    z-index: 996;
}

@media (max-width: 768px) {
    #hero { text-align: center; }
}

/* --- Botón de WhatsApp --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px; /* Distancia al borde inferior */
    right: 20px;  /* Distancia al borde derecho */
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #FFF;
    transform: scale(1.1);
}

/* --- Barra Superior Guindo --- */
.topbar {
    background-color: #80211b; /* Guindo del banner */
    color: #ffffff;
    height: 30px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    transition: transform 0.3s ease-in-out;
}

.topbar-socials a {
    color: white;
    margin-right: 15px;
    font-size: 14px;
    text-decoration: none;
}

.topbar-contact {
    font-size: 13px;
    font-weight: 500;
}

.topbar-contact i {
    margin-right: 5px;
}

/* --- Ajuste del Navbar para evitar el espacio en blanco --- */

/* En computadoras (cuando existe topbar) */
@media (min-width: 992px) {
    #mainNav {
        top: 30px; /* Altura de la topbar */
        transition: top 0.3s ease-in-out;
    }
}

/* En móviles (eliminamos el espacio por completo) */
@media (max-width: 991.98px) {
    #mainNav {
        top: 0 !important;
    }
    body {
        padding-top: 0 !important;
    }
}

/* Clase para ocultar con Scroll */
.topbar.hidden {
    transform: translateY(-100%);
}

.topbar.hidden + #mainNav {
    top: 0 !important;
}