/* =========================================
   Importación de Fuentes Premium
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@1,600&family=Montserrat:wght@400;600;700;900&display=swap');

/* =========================================
   Ajuste de Dorado Holístico Vibrante
   ========================================= */
:root {
    --bg-main: #faf7f2;
    --bg-card: #ffffff;
    --bg-arena: #eae3d9;
    --text-dark: #2c2925;
    --text-muted: #67625c;
    /* Amarillo/Dorado encendido */
    --color-gold: #e5ac10;          
    --color-gold-hover: #c79308;    
    --color-olive: #5c6b57;
}

/* Insignia principal con destello dorado y lectura reforzada */
.hero-badge {
    background: linear-gradient(135deg, #f3be26 0%, #e5ac10 100%) !important;
    color: #ffffff !important;
    font-size: 1.05rem;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    padding: 10px 26px;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    border: none;
}

/* Divisores de sección con resplandor */
.divider-purple {
    width: 90px;
    height: 4px;
    background: linear-gradient(90deg, #f3be26, #e5ac10);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(229, 172, 16, 0.3);
}

/* Botones de acción secundario con borde dorado vibrante */
.btn-copy-link, .btn-outline-purple {
    border-color: var(--color-gold) !important;
    color: #b88500 !important;
    font-weight: 700;
}

.btn-copy-link:hover, .btn-outline-purple:hover {
    background: linear-gradient(135deg, #f3be26 0%, #e5ac10 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(229, 172, 16, 0.35) !important;
}

/* =========================================
   Estilos Generales y Anti-Desbordamiento
   ========================================= */
html, body { 
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    scroll-behavior: smooth; 
    background-color: var(--bg-main); 
    color: var(--text-dark);
    overflow-x: clip; /* CAMBIO CLAVE: Permite que el menú se quede fijo */
    width: 100%;
    margin: 0;
    padding: 0;
}

/* =========================================
   Navegación
   ========================================= */
.navbar-custom {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--bg-arena);
    box-shadow: 0 4px 15px rgba(0,0,0,0.04) !important;
    z-index: 1050 !important; /* Mantiene el menú por encima de todo el sitio */
}

.navbar-logo {
    max-height: 110px; /* Aumentamos el tamaño (antes estaba en 75px) */
    width: auto;
    transition: transform 0.3s ease;
    filter: none !important; 
}

.navbar-logo:hover {
    transform: scale(1.03);
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    margin: 0 10px; /* Separación entre botones */
    transition: color 0.3s ease;
}

/* La línea dorada invisible por defecto */
.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

/* Efecto al pasar el mouse o al estar activo */
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--color-gold) !important;
}

/* Dibuja la línea dorada al 100% de ancho */
.navbar-dark .navbar-nav .nav-link:hover::after,
.navbar-dark .navbar-nav .nav-link.active::after {
    width: 100%;
}

/* =========================================
   Sección Hero (Portada Con Animación)
   ========================================= */
.hero-section {
    min-height: calc(100vh - 75px) !important;
    /* Bajamos la opacidad del color arena de 0.90 a 0.55 para revelar la fotografía */
    background: linear-gradient(rgba(250, 247, 242, 0.55), rgba(234, 227, 217, 0.65)), url('img/fondo.png') center/cover no-repeat !important;
}

.hero-logo {
    max-width: 100%;
    width: 350px; 
    height: auto !important; 
    object-fit: contain; 
    margin-top: -40px; /* <--- Agrega esto para la compu */
}

.hero-logo:hover {
    transform: scale(1.03);
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-dark) !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.9), 0 0 40px rgba(255, 255, 255, 0.8);
    animation: flotarTexto 6s ease-in-out infinite;
}

/* Subtítulo ajustado con sombra clara para máxima legibilidad */
.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.1rem !important;
    font-style: italic;
    color: #2c2925 !important;
    font-weight: 700 !important;
    max-width: 700px;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.95), 0 0 20px rgba(255, 255, 255, 0.85) !important;
}

.hero-author {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.85rem !important;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.85);
    padding: 10px 25px;
    border-radius: 50px;
    backdrop-filter: blur(8px);
    border: 1px solid var(--bg-arena);
    display: inline-block;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

@keyframes flotarTexto {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* =========================================
   Paleta de Colores y Utilidades
   ========================================= */
.text-purple-dark { color: var(--text-dark) !important; }
.text-purple-light { color: var(--color-gold) !important; }
.bg-purple { background-color: var(--color-gold) !important; }

.border-purple-custom {
    border-color: var(--color-gold) !important;
}

.divider-purple {
    width: 80px;
    height: 3px;
    background-color: var(--color-gold);
}

.card-gradient-custom {
    background: #ffffff !important;
    border: 1px solid var(--bg-arena) !important;
}

.btn-purple-custom {
    background-color: var(--text-dark) !important;
    color: #ffffff !important;
}

.icon-circle-purple {
    width: 70px;
    height: 70px;
    background-color: var(--color-olive) !important;
    color: #ffffff !important;
}

.badge-purple {
    background-color: var(--color-gold) !important;
    color: #ffffff !important;
}

/* =========================================
   Botones Principales y Flotantes (Animados)
   ========================================= */
.btn-whatsapp { 
    background-color: #25D366; 
    color: white !important; 
    transition: all 0.3s ease;
    border: none;
}

.btn-whatsapp:hover { 
    background-color: #1ebd5a; 
    color: white !important;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.35) !important;
}

.btn-whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff !important;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px 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;
    animation: pulse-green 2s infinite;
}

.btn-whatsapp-float:hover {
    color: #fff !important;
    transform: scale(1.1);
}

@keyframes pulse-green {
    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); }
}

/* =========================================
   Tarjetas de Servicios (Animación Elevación)
   ========================================= */
.service-card { 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    border: 1px solid var(--bg-arena) !important; 
    background-color: #ffffff !important;
}

.service-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 30px rgba(44, 41, 37, 0.1) !important; 
}

/* =========================================
   Contadores de Impacto
   ========================================= */
.contadores-section {
    background-color: var(--bg-arena) !important;
    color: var(--text-dark) !important;
}

/* =========================================
   Sección QR y Láser Animado
   ========================================= */
.qr-card {
    max-width: 480px;
    background: #ffffff;
    border: 1px solid var(--bg-arena);
}

.qr-badge {
    background-color: rgba(194, 155, 56, 0.12);
    color: var(--color-gold);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.qr-wrapper {
    border: 2px solid var(--bg-arena);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-wrapper:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(194, 155, 56, 0.2) !important;
}

.qr-img {
    max-width: 170px;
    z-index: 1;
}

.qr-img-clickable {
    cursor: pointer;
}

.qr-scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-gold), #25d366, transparent);
    box-shadow: 0 0 8px #25d366;
    animation: scanQR 2.2s infinite ease-in-out;
    z-index: 2;
}

@keyframes scanQR {
    0% { top: 5%; opacity: 0.2; }
    50% { top: 92%; opacity: 1; }
    100% { top: 5%; opacity: 0.2; }
}

.btn-copy-link {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.btn-copy-link:hover {
    background-color: var(--color-gold) !important;
    color: #ffffff !important;
}

/* =========================================
   Formulario y Notificaciones (Toast)
   ========================================= */
.custom-input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 0.25rem rgba(194, 155, 56, 0.2);
}

#btnEnviar:hover {
    background-color: var(--color-gold-hover) !important;
    transform: translateY(-2px);
}

.toast-flotante {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    background: #ffffff;
    border-left: 5px solid #28a745;
    min-width: 300px;
    max-width: 380px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =========================================
   Flyers y Modal Lightbox (Efecto Hover Completo)
   ========================================= */
.flyer-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--bg-arena) !important;
}

.flyer-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(44, 41, 37, 0.12) !important;
}

/* Cartel visible completo sin cortarse pero con zoom al pasar el mouse */
.flyer-img {
    height: 380px !important;
    object-fit: contain !important;
    object-position: center !important;
    background-color: #ffffff;
    padding: 8px;
    transition: transform 0.5s ease;
}

.flyer-card:hover .flyer-img {
    transform: scale(1.04);
}

.flyer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 41, 37, 0.65);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flyer-card:hover .flyer-overlay {
    opacity: 1;
}

.bg-purple-subtle {
    background-color: rgba(194, 155, 56, 0.12);
    color: var(--color-gold);
}

.text-purple {
    color: var(--color-gold);
}

.modal-header-purple {
    background-color: var(--text-dark) !important;
}

.modal-flyer-img {
    max-height: 80vh;
    object-fit: contain;
}

/* =========================================
   Testimonios, Red Sistémica y Footer
   ========================================= */
.testimonios-section {
    background-color: var(--bg-main) !important;
}

.quote-icon-custom {
    font-size: 4rem;
    color: var(--color-gold);
    opacity: 0.15;
}

.hr-purple-custom {
    border-color: var(--color-gold) !important;
    border-width: 2px;
}

.red-sistemica-section {
    background-color: #1e1b18 !important;
    min-height: 400px;
}

.red-sistemica-text {
    max-width: 600px;
    color: #e8e2d8;
}

.footer-custom {
    background-color: #1e1b18 !important;
}

.agency-credit {
    font-weight: 800;
    letter-spacing: 0.05em;
    text-decoration: none;
    /* Gradiente azul/morado para resaltar */
    background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.3s ease;
}

.agency-credit:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* =========================================
   📱 AJUSTES RESPONSIVOS (Móvil Corregido)
   ========================================= */
@media (max-width: 768px) {
    /* Mantenemos el logo del menú superior proporcional */
    .navbar-logo {
        max-height: 75px !important; 
    }

    /* FIX DEL LOGO PRINCIPAL EN CELULAR */
    .hero-logo {
        width: 85% !important;
        max-width: 320px !important;
        height: auto !important;
        margin-top: -90px !important; /* <--- ESTA ES LA MAGIA (Súbelo a -100px o -110px si necesitas más) */
        margin-bottom: 1.5rem;
    }

    .hero-title {
        font-size: 1.75rem !important;
        letter-spacing: 0px !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-subtitle {
        font-size: 1.3rem !important;
    }

    .hero-badge {
        font-size: 0.85rem !important;
        white-space: normal !important;
        max-width: 92%;
        margin: 0 auto;
        padding: 8px 16px !important;
        display: inline-block;
    }

    .hero-author {
        font-size: 0.75rem !important;
        letter-spacing: 1px !important;
        padding: 8px 16px !important;
        white-space: normal !important;
        max-width: 90%;
        display: inline-block;
    }

    .flyer-img {
        height: 320px !important;
    }
}

/* =========================================
   Sección Quiénes Somos (Estilo Ipi Mantra)
   ========================================= */
.nosotros-img-wrapper {
    height: 480px;
    border-radius: 20px;
    overflow: hidden;
}

.nosotros-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 18% center; /* Encadra a la persona directo al centro */
}

.text-gold-title {
    color: var(--color-gold) !important;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 2px;
}

.tracking-widest {
    letter-spacing: 3px;
    color: var(--color-gold);
}

.divider-gold-thin {
    width: 100%;
    max-width: 320px;
    height: 1px;
    background: linear-gradient(90deg, var(--color-gold), transparent);
}

.quote-gold-closing {
    font-family: 'Cormorant Garamond', serif;
    color: var(--color-gold);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    font-style: italic;
}

@media (max-width: 768px) {
    .nosotros-img-wrapper {
        height: 350px;
    }
}

/* =========================================
   Sección Espacios de Transformación (Estilo Círculos)
   ========================================= */
.espacios-section {
    background-color: var(--bg-main);
}

/* Franja superior oscura tipo Ipi Mantra */
.espacios-bg-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 280px;
    background-color: #312d29; /* Tono carbón/café oscuro */
    z-index: 0;
}

/* Círculos fotográficos estilo Ipi Mantra */
.espacio-circle-card {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 4px solid #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.espacio-circle-card:hover {
    transform: translateY(-10px) scale(1.04);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* 1. Capa de contraste más oscura detrás del texto */
.espacio-circle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.85) 100%) !important;
    z-index: 1;
    transition: background 0.3s ease;
}

/* 2. Sombra y tipografía de los títulos dentro del círculo */
.espacio-circle-title {
    position: relative;
    z-index: 2;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    line-height: 1.3;
    margin-bottom: 0;
    text-transform: uppercase;
}

/* Texto Blanco con Sombra */
.espacio-circle-title .text-white {
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.8) !important;
}

/* Texto Dorado Brillante Encendido (Alta Visibilidad) */
.espacio-circle-title .text-gold, 
.espacio-title-gold {
    color: #ffd700 !important; /* Dorado sol/brillante */
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.9) !important;
}

/* Iconos de alta definición */
.espacio-icon {
    position: relative;
    z-index: 2;
    font-size: 3.2rem;
    color: #ffffff;
    margin-bottom: 10px;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.9));
}

/* =========================================
   Footer Estilo Ipi Mantra (Fondo Amarillo)
   ========================================= */
.footer-amarillo {
    background-color: #eadb9d; /* Amarillo crema/arena exacto al de la referencia */
    color: #2c2925;
    font-family: 'Montserrat', sans-serif;
}

.footer-logo-mantra {
    width: 100%;
    height: auto;
    filter: brightness(0) opacity(0.85); 
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

/* Ajustes solo para computadoras/pantallas grandes */
@media (min-width: 992px) {
    .footer-logo-mantra {
        max-width: 420px; /* Lo hace mucho más grande */
        margin-left: -40px; /* Lo empuja hacia la izquierda fuera del margen normal */
    }
}

/* Ajustes para celulares (para que no se corte) */
@media (max-width: 991px) {
    .footer-logo-mantra {
        max-width: 280px; 
        margin-left: 0; /* Lo regresa al centro */
    }
}

.footer-title-mantra {
    font-family: 'Cormorant Garamond', serif; 
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    color: #2c2925;
}

.footer-links-mantra li {
    margin-bottom: 0.8rem;
}

.footer-links-mantra a {
    color: #2c2925;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links-mantra a:hover {
    color: #a38029;
    text-decoration: underline;
}

.footer-text-mantra {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: #2c2925;
}

.footer-form-mantra input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(44, 41, 37, 0.4);
    padding: 5px 0;
    margin-bottom: 15px;
    color: #2c2925;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.footer-form-mantra input:focus {
    border-bottom: 1px solid #2c2925;
}

.footer-form-mantra input::placeholder {
    color: rgba(44, 41, 37, 0.6);
}

.footer-form-mantra button {
    background: transparent;
    border: none;
    padding: 0;
    color: #2c2925;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.footer-form-mantra button:hover {
    opacity: 0.6;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #3a3224; /* Café muy oscuro para los círculos */
    color: #eadb9d; /* Ícono color amarillo */
    border-radius: 50%;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.footer-social-icon:hover {
    transform: scale(1.1);
    background-color: #2c2925;
    color: #ffffff;
}

/* =========================================
   Sección Galería (Carrusel de Experiencias)
   ========================================= */
.galeria-img-wrapper {
    position: relative;
    height: 550px;
    width: 100%;
}

.galeria-img {
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Degrado oscuro abajo para que el texto siempre se lea */
.galeria-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    padding: 60px 20px 30px;
    text-align: center;
}

/* Personalización de los indicadores (puntitos dorados) */
.carousel-indicators [data-bs-target] {
    background-color: var(--color-gold);
    height: 4px; /* Los hace un poco más gruesos y elegantes */
    border-radius: 2px;
}

/* Altura adaptable para celulares */
@media (max-width: 768px) {
    .galeria-img-wrapper {
        height: 350px;
    }
}

/* =========================================
   Ajuste del Fondo Hero para Celulares
   ========================================= */
@media (max-width: 768px) {
    .hero-section {
        /* Cambiamos el enfoque a "15% center" para que la familia salga en el encuadre */
        background: linear-gradient(rgba(250, 247, 242, 0.55), rgba(234, 227, 217, 0.65)), url('img/fondo.png') 15% center / cover no-repeat !important;
    }
}