html {
    scroll-behavior: smooth;
}

/* VIDEO CINE */
#hero-video {
    filter: brightness(0.9) contrast(1.1) saturate(1.1);
}

/* PAUSA (Blur) */
.video-paused {
    filter: brightness(0.5) blur(6px) grayscale(10%) !important;
    transform: scale(1.05);
}

/* OVERLAY */
.bg-dark-overlay {
    background-color: rgba(0, 0, 0, 0.4);
}

/* ANIMACIONES */
.visible-content {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ESTADO SCROLLED DEL HEADER */
.header-scrolled {
    background-color: rgba(27, 42, 65, 0.95) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
}

.header-scrolled .logo-text {
    color: #ffffff !important;
}

.header-scrolled .logo-subtitle {
    color: #C5A065 !important;
}

.logo-text {
    color: #ffffff !important;
}

.logo-subtitle {
    color: #C5A065 !important;
}

#main-header .logo-text {
    color: #ffffff !important;
}

#main-header .logo-subtitle {
    color: #C5A065 !important;
}

/* Asegurar que el icono del menú sea blanco */
.mobile-toggle span {
    color: #ffffff63 !important;
}

/* .material-symbols-outlined {
    color: #000000 !important;
} Removed to allow text-brand-primary to work */

/* CAMBIOS DE COLOR AL BAJAR (USANDO TU NUEVA PALETA) */
.header-scrolled .nav-links a {
    color: #E8E0D5 !important;
}

.header-scrolled .nav-links a:hover {
    color: #8FA998 !important;
}

.header-scrolled .mobile-toggle {
    color: #ffffff !important;
}

.header-scrolled .mobile-toggle span {
    color: #ffffff !important;
}

/* TARJETAS DE EVENTOS - HOVER CON TU AZUL */
.event-card:hover .lienzo-card {
    background-color: rgba(0, 0, 0, 0.8) !important;
    border-color: rgba(61, 133, 198, 0.4);
    /* Azul primary */
    border-top: 2px solid rgba(61, 133, 198, 0.5);
    /* Borde superior azul */
}

/* Mobile */
@media (max-width: 768px) {
    .lienzo-card {
        background-color: rgba(0, 0, 0, 0.8) !important;
    }
}

.lienzo-card {
    transform: translateY(0) !important;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
}

.lienzo-card div {
    opacity: 1 !important;
    height: auto !important;
}

/* css/styles.css */

html {
    scroll-behavior: smooth;
}

/* VIDEO CINE */
#hero-video {
    filter: brightness(0.9) contrast(1.1) saturate(1.1);
}

/* PAUSA (Blur) */
.video-paused {
    filter: brightness(0.5) blur(6px) grayscale(10%) !important;
    transform: scale(1.05);
}

.bg-dark-overlay {
    background-color: rgba(0, 0, 0, 0.4);
}

.visible-content {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* === HEADER SCROLLED (AL BAJAR EL SCROLL) === */
.header-scrolled {
    background-color: rgba(27, 42, 65, 0.95) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
    height: 100px !important;
}

/* Colores de texto */
.header-scrolled .nav-links a {
    color: #E8E0D5 !important;
}

.header-scrolled .nav-links a:hover {
    color: #8FA998 !important;
}

.header-scrolled .logo-text {
    color: #ffffff !important;
}

.header-scrolled .logo-subtitle {
    color: #C5A065 !important;
}

.header-scrolled .mobile-toggle {
    color: #ffffff !important;
}

.header-scrolled #site-logo {
    filter: none !important;
}

/* === HEADER SCROLLED RESPONSIVO (SOLO MÓVIL) === */
@media (max-width: 768px) {
    #main-header {
        height: auto !important;
    }

    .header-scrolled {
        height: 70px !important;
    }

    .header-scrolled #site-logo {
        height: 3rem !important;
    }

    .header-scrolled .logo-text {
        font-size: 0.875rem !important;
        /* text-sm */
    }

    .header-scrolled .logo-subtitle {
        font-size: 0.7rem !important;
    }
}

.header-scrolled .logo-text {
    color: #073763 !important;
}

.header-scrolled .logo-subtitle {
    color: #3D85C6 !important;
}

.header-scrolled .mobile-toggle {
    color: #073763 !important;
}

/* === AJUSTE DEL LOGO AL BAJAR === */
.header-scrolled #site-logo {
    filter: none !important;
    /* Recupera sus colores originales */

    /* CAMBIO AQUÍ: */
    height: 5.5rem;
    /* Antes 3.5rem. Ahora es más grande y visible */

    transition: all 0.5s ease;
    /* Transición suave */
}

/* El botón se mantiene igual */
.header-scrolled button {
    background-color: #3D85C6 !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(61, 133, 198, 0.4);
}

/* === ANIMACIÓN BOTÓN GOOGLE MAPS (SOLO LÍNEAS EN EL BORDE) === */

/* Clase base para el botón */
.google-btn-anim {
    position: relative;
    /* Z-index alto para asegurar que el fondo blanco cubra el centro */
    z-index: 10;
    background-color: #ffffff !important;
    /* Fondo blanco sólido crucial */
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    /* Borde gris inicial */
    overflow: visible;
    /* Necesario para que se vea el borde exterior */
}

/* La capa que hace la animación del borde */
.google-btn-anim::before {
    content: '';
    position: absolute;
    /* Z-index negativo para que quede DETRÁS del botón blanco */
    z-index: -1;

    /* AQUÍ ESTÁ LA CLAVE: */
    /* Estos valores negativos definen el grosor de la "línea". 
       -1.5px crea una línea fina y elegante. */
    top: -1.5px;
    left: -1.5px;
    right: -1.5px;
    bottom: -1.5px;

    /* El gradiente con los colores de Google */
    background: linear-gradient(90deg, #EA4335, #FBBC04, #34A853, #4285F4, #EA4335);
    background-size: 300% 100%;
    /* Tamaño para la animación */
    border-radius: inherit;
    /* Hereda el redondeo del botón */

    opacity: 0;
    /* Invisible al principio */
    transition: opacity 0.3s ease;
}

/* ESTADO HOVER: Al pasar el mouse */
.google-btn-anim:hover {
    /* Hacemos el borde original transparente para que se vea el animado */
    border-color: transparent;
    color: black;
    /* Sombra muy sutil para despegarlo */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Activación de la línea animada */
.google-btn-anim:hover::before {
    opacity: 1;
    /* Se muestra la línea a toda intensidad */
    /* Animación: corre una vez (1) de forma suave (ease-out) y se queda al final (forwards) */
    animation: google-border-draw 2.5s ease-out 1 forwards;
}

/* Definición del movimiento del gradiente a lo largo del borde */
@keyframes google-border-draw {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* Pequeño ajuste al icono del pin */
.google-btn-anim:hover .google-pin-svg {
    transform: translateY(-1px);
    transition: transform 0.3s ease;
}

/* Estilos para checkboxes visibles en los servicios */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.custom-checkbox:hover {
    border-color: #8FA998;
    background-color: #f0fdf4;
}

.custom-checkbox:checked {
    background-color: #8FA998;
    border-color: #8FA998;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
}

.custom-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(143, 169, 152, 0.1);
}

/* === CARRUSEL INFINITO JS-DRIVE === */
.carousel-container {
    overflow-x: auto;
    white-space: nowrap;
    cursor: grab;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    display: flex;
    /* Asegura layout horizontal */
    user-select: none;
    /* Evita seleccionar texto al arrastrar */
}

.carousel-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    /* gap-4 equivalent */
    padding-left: 1rem;
    padding-right: 1rem;
}

/* =====================================================================
   HERO PORTADA SUB-PÁGINAS: quitar margen superior que deja barra blanca
   El header es fixed, así que la sección dark sube hasta el borde del header
   ===================================================================== */
section.relative.bg-brand-dark.overflow-hidden,
section.relative.bg-brand-navy.overflow-hidden {
    margin-top: 0 !important;
}

/* =====================================================================
   RESPONSIVE MÓVIL COMPLETO — TODOS LOS TAMAÑOS DE CELULAR
   Cubre desde iPhone SE (320px) hasta teléfonos grandes (768px)
   ===================================================================== */

/* --- HEADER MÓVIL: altura reducida para no tapar contenido --- */
@media (max-width: 768px) {
    #main-header {
        height: 70px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    #main-header .flex.items-center {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #site-logo {
        height: 2.75rem !important;
    }

    .logo-text {
        font-size: 1rem !important;
        letter-spacing: 0.1em !important;
    }

    .logo-subtitle {
        font-size: 0.6rem !important;
    }

    .header-scrolled {
        height: 64px !important;
    }

    .header-scrolled #site-logo {
        height: 2.5rem !important;
    }
}

/* --- HERO PRINCIPAL (index.html - pantalla completa) --- */
@media (max-width: 768px) {

    /* Hero h1 principal */
    #inicio h1,
    section h1.font-serif {
        font-size: 2.5rem !important;
        line-height: 1.15 !important;
    }

    /* Sub-páginas hero (bodas, matrimonios, etc.) */
    section.relative.w-full.h-\[80vh\] h1 {
        font-size: 2.25rem !important;
        line-height: 1.2 !important;
    }

    /* Reducir padding inferior del contenido hero */
    #inicio .flex.flex-col.items-center {
        padding-bottom: 2rem;
    }
}

/* --- PANTALLAS MUY PEQUEÑAS (≤ 390px: iPhone SE, iPhone 12 mini, etc.) --- */
@media (max-width: 390px) {
    #main-header {
        height: 62px !important;
    }

    #site-logo {
        height: 2.25rem !important;
    }

    .logo-text {
        font-size: 0.9rem !important;
    }

    .logo-subtitle {
        display: none !important;
    }

    /* Hero title muy pequeño */
    #inicio h1,
    section h1.font-serif {
        font-size: 2rem !important;
    }

    section.relative.w-full.h-\[80vh\] h1 {
        font-size: 1.85rem !important;
    }
}

/* --- SECCIONES: padding reducido en móvil --- */
@media (max-width: 768px) {

    /* Secciones con mucho padding vertical */
    section.py-24 {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }

    section.py-32 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    section.py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Padding horizontal en pantallas chicas */
    section.px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* --- SECCIÓN NOSOTROS: imagen más baja en móvil --- */
@media (max-width: 768px) {

    #nosotros .relative.h-\[500px\],
    #detalles .relative.h-\[500px\],
    .relative.h-\[500px\] {
        height: 300px !important;
    }

    /* Gap entre columnas movil */
    #nosotros .grid.gap-16,
    .grid.gap-16 {
        gap: 2rem !important;
    }
}

/* --- TARJETAS DE EVENTOS (index.html): altura en móvil --- */
@media (max-width: 768px) {

    .event-card.h-\[350px\],
    .event-card.h-\[500px\],
    a.event-card {
        height: 260px !important;
    }

    /* H2 secciones */
    h2.text-5xl,
    h2.text-6xl {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h2.text-4xl {
        font-size: 1.75rem !important;
    }
}

/* --- SECCIÓN NOSOTROS IMAGEN Y TEXTO: orden correcto --- */
@media (max-width: 768px) {
    #nosotros .grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- CARRUSEL MODAL en páginas de evento: altura adaptada --- */
@media (max-width: 768px) {

    /* Carrusel imágenes en páginas de bodas/petit/etc. */
    #petit-carousel,
    #baby-carousel,
    #matrimony-carousel,
    [id$="-carousel"] {
        min-height: 260px;
    }

    .relative.h-\[500px\].rounded-sm {
        height: 260px !important;
    }
}

/* --- GALERIA 3 COLUMNAS: se vuelve 1 columna en móvil --- */
@media (max-width: 768px) {
    .grid.grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    /* Quitar el offset negativo en la tarjeta del medio */
    .grid.grid-cols-1.md\:grid-cols-3>*.\-mt-8,
    .md\:-mt-8 {
        margin-top: 0 !important;
    }

    /* Altura de tarjetas galería */
    .group.relative.h-80 {
        height: 200px !important;
    }
}

/* --- FORMULARIO DE COTIZACIÓN: diseño móvil --- */
@media (max-width: 768px) {

    /* El form de 5 columnas pasa a 1 columna */
    .grid.grid-cols-1.md\:grid-cols-5 {
        grid-template-columns: 1fr !important;
    }

    .md\:col-span-2,
    .md\:col-span-3 {
        grid-column: span 1 !important;
    }

    /* Subtítulo del formulario */
    .grid.grid-cols-1.md\:grid-cols-2.gap-4 {
        grid-template-columns: 1fr !important;
    }

    .grid.grid-cols-2.gap-4 {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Padding formularios */
    .p-6.md\:p-10,
    .md\:p-10 {
        padding: 1.25rem !important;
    }
}

/* --- SECCIÓN TODO INCLUIDO: cards de servicios --- */
@media (max-width: 768px) {
    .grid.grid-cols-1.lg\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    .grid.grid-cols-1.sm\:grid-cols-2.gap-6 {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }
}

/* --- SECCIÓN CTA (CONTACTO/COTIZAR): typography móvil --- */
@media (max-width: 768px) {

    /* "¿Listo para Celebrar?" y similares */
    #contacto h2,
    #cotizar-boda h2,
    #cotizar-petit h2,
    #cotizar-baby h2 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    /* Botones de acción CTA en dos columnas */
    .flex.flex-col.md\:flex-row.gap-6.justify-center {
        flex-direction: column !important;
        align-items: center !important;
    }

    .min-w-\[260px\] {
        min-width: 0 !important;
        width: 100% !important;
    }
}

/* --- MAPA GOOGLE: altura reducida en móvil --- */
@media (max-width: 768px) {
    .w-full.h-\[450px\] {
        height: 280px !important;
    }
}

/* --- SECCIÓN FAQ: padding y tipografía --- */
@media (max-width: 768px) {
    #faq .max-w-4xl {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* --- FOOTER --- */
@media (max-width: 768px) {
    footer.py-12 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    footer .flex.justify-center.gap-6 {
        gap: 1rem !important;
        flex-wrap: wrap !important;
    }
}

/* --- BOTÓN FLOTANTE WHATSAPP: posición segura en móvil --- */
@media (max-width: 768px) {
    a[aria-label="Chat en WhatsApp"].fixed {
        bottom: 1rem !important;
        right: 1rem !important;
        width: 48px !important;
        height: 48px !important;
    }
}

/* --- SCROLL INDICATOR (flecha abajo en hero) --- */
@media (max-width: 768px) {
    .absolute.bottom-10 {
        bottom: 1.5rem !important;
    }
}

/* --- DECORACION PAGE CARRUSEL: altura --- */
@media (max-width: 768px) {

    .carousel-item,
    .carousel-item img {
        min-height: 220px !important;
        max-height: 260px !important;
    }
}

/* --- GASTRONOMIA / MOMENTOS / BAR: secciones específicas --- */
@media (max-width: 768px) {

    /* tablas de precios u otros grids en págs internas */
    .grid.grid-cols-1.md\:grid-cols-2.gap-16 {
        gap: 2rem !important;
    }
}

/* --- TABLET (769px - 1024px): ajustes intermedios --- */
@media (min-width: 769px) and (max-width: 1024px) {
    #main-header {
        height: 90px !important;
    }

    #inicio h1 {
        font-size: 3.5rem !important;
    }
}

/* =====================================================================
   MENÚ MÓVIL SALVIA — Estilo premium verde salvia
   ===================================================================== */

/* Overlay principal — gradiente salvia profundo */
#mobile-menu-overlay {
    background: linear-gradient(160deg, #5C7A62 0%, #4A6651 40%, #3D5645 100%) !important;
    backdrop-filter: blur(0px);
}

/* Cabecera del menú */
#mobile-menu-overlay>div:first-child {
    background: rgba(0, 0, 0, 0.15) !important;
    border-bottom-color: rgba(255, 255, 255, 0.2) !important;
}

/* Área de nav links */
#mobile-menu-overlay nav {
    background: transparent !important;
}

/* Footer del menú (contacto + social) */
#mobile-menu-overlay>div:last-child {
    background: rgba(0, 0, 0, 0.2) !important;
    border-top-color: rgba(255, 255, 255, 0.2) !important;
}

/* Separator lines between nav items */
#mobile-menu-overlay nav>a,
#mobile-menu-overlay nav>div:not(.hidden) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
}

/* Submenu border al lado izquierdo */
#mobile-menu-overlay [id^="submenu-"] {
    border-left-color: rgba(197, 160, 101, 0.5) !important;
    /* gold */
}

/* Links del submenu: fondo suave al hover */
#mobile-menu-overlay [id^="submenu-"] a {
    border-radius: 4px;
    padding-left: 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#mobile-menu-overlay [id^="submenu-"] a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Botón cerrar — círculo con hover gold */
#close-menu-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    transition: all 0.2s ease !important;
}

#close-menu-btn:hover {
    background: rgba(197, 160, 101, 0.3) !important;
    border-color: rgba(197, 160, 101, 0.6) !important;
}

/* Botón "Volver" en el footer del menú */
#mobile-menu-overlay button[onclick] {
    border-color: rgba(255, 255, 255, 0.3) !important;
    transition: all 0.2s ease !important;
}

#mobile-menu-overlay button[onclick]:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

/* Flecha del submenu toggle */
.submenu-icon {
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, color 0.2s ease;
}

/* Safe area para notch en iPhone */
#mobile-menu-overlay {
    padding-bottom: env(safe-area-inset-bottom);
}