/* === Importar fuentes modernas === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700;800;900&display=swap');

/* === Reset y contenedores base === */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 400;
    color: #2c3e50;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Marca de agua de fondo con zoom al scroll === */
.watermark-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    background: #ffffff;
    pointer-events: none;
}

.watermark-background img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 100%;
    max-width: 1600px;
    opacity: 0.15;
    object-fit: contain;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* === Mejoras tipográficas globales === */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

h1 { 
    font-size: 2.5rem; 
    font-weight: 800;
    letter-spacing: -1px;
}

h2 { 
    font-size: 2rem; 
    font-weight: 700;
}

h3 { 
    font-size: 1.75rem; 
    font-weight: 600;
}

h4 { 
    font-size: 1.5rem; 
    font-weight: 600;
}

h5 { 
    font-size: 1.25rem; 
    font-weight: 600;
}

h6 { 
    font-size: 1.1rem; 
    font-weight: 600;
}

p {
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.font-weight-bold {
    font-weight: 700 !important;
}

/* === Video de fondo === */
.video-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 3;
}

.video-fondo {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* === Logo central === */
.logo-central {
    position: absolute;
    top: 25%;
    left: 10%;
    transform: translate(-40%, -50%);
    z-index: 10;
    max-width: 200px;
    margin-bottom: 20px;
}

.logo-central img {
    max-width: 350px;
    width: 500px;
    height: 200px;
    object-fit: contain;
}

/* === Navbar inferior === */
.navbar-inferior {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%; /* Cambiado de 80% a 100% para ocupar todo el ancho */
    height: 120px;
    background-color: rgba(77, 148, 83, 0.38);
    z-index: 10;
    text-align: center;
    padding: 30px 40px 0 40px; /* Agregado padding horizontal para que el contenido no quede pegado */
    border-top-left-radius: 100% 150px;
}

.navbar-inferior a,
.navbar-inferior .nav-link {
    color: white !important;
    margin: 0 15px;
    font-weight: 500;
    text-decoration: none;
    padding: 15px 20px;
}

.navbar-inferior .navbar-brand img {
    max-height: 50px;
}

/* === Navbar responsive === */
.custom-navbar {
    background: transparent;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        bottom: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(57, 97, 60, 0.57);
        z-index: 999;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }

    .navbar-nav .nav-item .nav-link {
        color: white !important;
        padding: 10px;
    }
}

/* === Menú desplegable === */
.navbar .dropdown-menu {
    top: auto !important;
    bottom: 100%;
    margin-bottom: 0.5rem;
    transform: none !important;
    background-color: rgba(27, 43, 28, 0.57);
    border: none;
    border-radius: 0;
    overflow: visible;
    max-height: none;
}

.navbar .dropdown-menu .dropdown-item {
    color: white;
}

.navbar .dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* === Submenú de tercer nivel usando Bootstrap dropdown === */
.dropdown-menu .dropdown {
    position: relative;
}

.dropdown-menu .dropdown > .dropdown-menu {
    bottom: 0 !important; /* Alineado desde abajo para que se despliegue hacia arriba */
    top: auto !important;
    left: 100% !important;
    margin-top: 0 !important;
    margin-left: 0.25rem;
    margin-bottom: 0;
    background-color: rgba(27, 43, 28, 0.65);
    min-width: 200px;
    display: none;
    max-height: none !important; /* Sin límite de altura */
    overflow-y: visible !important; /* Permitir que el contenido se expanda sin scroll */
}

/* Mostrar cuando tenga la clase show */
.dropdown-menu .dropdown.show > .dropdown-menu,
.dropdown-menu .dropdown > .dropdown-menu.show {
    display: block !important;
}

/* Desktop: mostrar en hover */
@media (min-width: 769px) {
    .dropdown-menu .dropdown:hover > .dropdown-menu {
        display: block;
    }
}

.dropdown-menu .dropdown > .dropdown-toggle,
.dropdown-menu .dropdown > .dropdown-item.dropdown-toggle {
    position: relative;
    padding-right: 2rem;
    cursor: pointer; /* Asegurar que el cursor sea una mano */
}

/* Prevenir cualquier cambio de color en el toggle del submenú */
.dropdown-menu .dropdown > .dropdown-toggle:hover,
.dropdown-menu .dropdown > .dropdown-toggle:focus,
.dropdown-menu .dropdown > .dropdown-toggle:active,
.dropdown-menu .dropdown > .dropdown-toggle.active,
.dropdown-menu .dropdown > .dropdown-item.dropdown-toggle:hover,
.dropdown-menu .dropdown > .dropdown-item.dropdown-toggle:focus,
.dropdown-menu .dropdown > .dropdown-item.dropdown-toggle:active,
.dropdown-menu .dropdown > .dropdown-item.dropdown-toggle.active {
    background-color: transparent !important;
    color: white !important;
}

.dropdown-menu .dropdown > .dropdown-toggle::after,
.dropdown-menu .dropdown > .dropdown-item.dropdown-toggle::after {
    display: inline-block;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    content: "›";
    border: none;
    font-size: 1.3em;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
}

/* Asegurar que el sub-submenú no se salga de la pantalla */
.dropdown-menu .dropdown .dropdown-menu {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Hover en items del sub-submenú */
.dropdown-menu .dropdown .dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
}

.dropdown-menu .dropdown .dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.25);
    padding-left: 1.2rem;
    transition: all 0.2s ease;
}

/* Mobile: tercer nivel abajo en lugar de al lado */
@media (max-width: 768px) {
    /* Asegurar que el submenú no use hover en móvil */
    .dropdown-menu .dropdown:hover > .dropdown-menu {
        display: none !important;
    }
    
    /* Contenedor del submenú con tercer nivel */
    .dropdown-menu .dropdown {
        display: block;
        width: 100%;
        position: relative;
        z-index: 10; /* Asegurar que esté por encima */
    }
    
    .dropdown-menu .dropdown > .dropdown-menu {
        position: static !important; /* Cambiar de relative a static para flujo normal */
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        float: none !important;
        transform: none !important;
        background-color: rgba(15, 25, 15, 0.95);
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 0;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
        z-index: 15; /* Por encima del contenedor padre */
    }
    
    /* Cuando está visible */
    .dropdown-menu .dropdown > .dropdown-menu.show {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .dropdown-menu .dropdown > .dropdown-toggle,
    .dropdown-menu .dropdown > .dropdown-item.dropdown-toggle {
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
        display: block;
        width: 100%;
        padding: 0.75rem 1rem;
    }
    
    .dropdown-menu .dropdown > .dropdown-toggle::after,
    .dropdown-menu .dropdown > .dropdown-item.dropdown-toggle::after {
        content: "▼";
        font-size: 0.85em;
        right: 1rem;
        transition: transform 0.2s ease;
        float: right;
        margin-top: 0.25rem;
    }
    
    /* Indicador visual de menú abierto en móvil */
    .dropdown-menu .dropdown.show > .dropdown-toggle,
    .dropdown-menu .dropdown.show > .dropdown-item.dropdown-toggle {
        background-color: rgba(40, 60, 40, 0.6);
        border-left: 3px solid rgba(144, 238, 144, 0.5);
    }
    
    .dropdown-menu .dropdown.show > .dropdown-toggle::after,
    .dropdown-menu .dropdown.show > .dropdown-item.dropdown-toggle::after {
        content: "▲";
        transform: rotate(0deg);
        color: rgba(144, 238, 144, 0.9);
    }
    
    /* Items del submenú en móvil */
    .dropdown-menu .dropdown .dropdown-menu .dropdown-item {
        display: block;
        padding: 0.85rem 1rem 0.85rem 2rem;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.95);
        border-left: 3px solid rgba(255, 255, 255, 0.3);
        background-color: transparent;
        width: 100%;
        text-align: left;
        clear: both;
        white-space: normal;
    }
    
    .dropdown-menu .dropdown .dropdown-menu .dropdown-item:hover,
    .dropdown-menu .dropdown .dropdown-menu .dropdown-item:active,
    .dropdown-menu .dropdown .dropdown-menu .dropdown-item:focus {
        padding-left: 2.2rem;
        border-left-color: rgba(255, 255, 255, 0.7);
        background-color: rgba(255, 255, 255, 0.12);
        color: #fff;
    }
    
    /* Asegurar que el dropdown-menu padre no oculte los sub-submenús */
    .navbar .dropdown-menu {
        overflow: visible !important;
    }
}

/* === Slider de destinos === */
.destino-slider-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 30px 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(34, 153, 84, 0.03) 50%, rgba(255,255,255,0) 100%);
}

.slider-multiple {
    display: flex;
    gap: 25px;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 25px 10px;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
}

/* Ocultar scroll horizontal para todos los sliders */
.slider-multiple::-webkit-scrollbar {
    display: none;
}

#sliderDestinos {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#sliderDestinos::-webkit-scrollbar {
    display: none;
}

/* Elementos del slider */
.slider-item {
    flex-shrink: 0;
    width: 22%;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
    overflow: visible;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 992px) {
    .slider-item { width: 32%; }
}

@media (max-width: 768px) {
    .slider-item { width: 48%; }
}

@media (max-width: 576px) {
    .slider-item { width: 85%; }
}

/* Efecto hover: levantar y expandir con rotación sutil */
.slider-item:hover {
    transform: translateY(-15px) scale(1.05) rotateZ(-1deg);
    z-index: 10;
}

/* Contenido interno del card */
.slider-item .card {
    border: 3px solid transparent !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 !important;
    overflow: hidden !important;
    transition: all 0.5s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
}

.slider-item:hover .card {
    box-shadow: 0 20px 40px rgba(34, 153, 84, 0.25), 0 10px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
    border-color: rgba(46, 204, 113, 0.4) !important;
}

/* Imagen en relación más vertical y alta */
.img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden !important;
    border-radius: 0 !important;
}

.img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.5s ease;
}

/* Zoom suave y ajuste de color en la imagen al hover */
.slider-item:hover .img-wrapper img {
    transform: scale(1.12);
    filter: brightness(1.1) contrast(1.05) saturate(1.1);
}

/* Título en overlay con gradiente vibrante */
.titulo-overlay {
    background: linear-gradient(to top, 
        rgba(30, 132, 73, 0.95) 0%, 
        rgba(34, 153, 84, 0.85) 40%,
        rgba(39, 174, 96, 0.5) 100%
    );
    padding: 14px 10px;
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 2;
    text-align: center;
    color: white;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
    border-radius: 0;
}

.slider-item:hover .titulo-overlay {
    background: linear-gradient(to top, 
        rgba(46, 204, 113, 0.98) 0%, 
        rgba(39, 174, 96, 0.92) 40%,
        rgba(34, 153, 84, 0.7) 100%
    );
    padding: 18px 10px;
    transform: translateY(-3px);
}

.titulo-overlay h6 {
    font-weight: 700;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.slider-item:hover .titulo-overlay h6 {
    transform: scale(1.05);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Botones de navegación del slider - estilo premium */
.nav-left,
.nav-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 50%, #229954 100%);
    border: 3px solid rgba(255, 255, 255, 0.9);
    color: white;
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 20px rgba(34, 153, 84, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.nav-left::before,
.nav-right::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #2ecc71, #27ae60, #1e8449);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-left:hover::before,
.nav-right:hover::before {
    opacity: 1;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

.nav-left:hover,
.nav-right:hover {
    background: linear-gradient(135deg, #48e68b 0%, #2ecc71 50%, #27ae60 100%);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 12px 35px rgba(46, 204, 113, 0.5), 0 4px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 1);
}

.nav-left:active,
.nav-right:active {
    transform: translateY(-50%) scale(0.92);
    box-shadow: 0 4px 15px rgba(34, 153, 84, 0.4);
}

.nav-left { left: 20px; }
.nav-right { right: 20px; }

@media (max-width: 768px) {
    .nav-left,
    .nav-right {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    .nav-left { left: 10px; }
    .nav-right { right: 10px; }
}

.bloque-cuatro {
    position: relative;
    background-image: url('/images/default.jpg'); /* Este será reemplazado dinámicamente desde Blade */
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.bloque-cuatro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.bloque-cuatro-contenido {
    position: relative;
    z-index: 1;
}
.text-justify-custom {
    text-align: justify;
}

.floating-social {
    position: fixed;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    z-index: 1020;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-float {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.btn-float.whatsapp { background-color: #25D366; }
.btn-float.tiktok   { background-color: #000000; }
.btn-float.facebook { background-color: #3b5998; }
.btn-float.instagram { background-color: #E4405F; }
.btn-float.email    { background-color: #ea4335; }

/* Estilos para botón de precio desplegable */
.btn-precio-toggle {
    transition: all 0.3s ease;
}

.btn-precio-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-float:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

.btn-float {
    text-decoration: none !important;
    color: white !important;
    outline: none;
}

.btn-float:focus,
.btn-float:active,
.btn-float:hover {
    text-decoration: none !important;
    color: white !important;
}

 .titulo-central-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    color: white;
    text-align: center;
    background-color: rgba(5, 116, 29, 0.23);
    padding: 20px 40px;
    border-radius: 80px;
}

.titulo-central-video h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: bold;
}

    .video-container {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/* === Hojas animadas decorativas (fondo) === */
.leaf-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.leaf {
    position: absolute;
    width: 30px;
    height: 30px;
    --leaf-scale: 1.5; /* escala 1.5 = 50% más grande */
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.8) 0%, rgba(39, 174, 96, 0.7) 50%, rgba(34, 153, 84, 0.6) 100%);
    clip-path: path('M15,0 Q20,5 22,12 Q23,18 20,25 Q18,28 15,30 Q12,28 10,25 Q7,18 8,12 Q10,5 15,0 Z');
    animation: fall linear infinite;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
    transform: scale(var(--leaf-scale));
}

.leaf:nth-child(1) {
    left: 10%;
    animation-duration: 15s;
    animation-delay: 0s;
    opacity: 0.6;
}

.leaf:nth-child(2) {
    left: 25%;
    animation-duration: 18s;
    animation-delay: 3s;
    opacity: 0.5;
    width: 25px;
    height: 25px;
}

.leaf:nth-child(3) {
    left: 40%;
    animation-duration: 20s;
    animation-delay: 5s;
    opacity: 0.7;
}

.leaf:nth-child(4) {
    left: 55%;
    animation-duration: 17s;
    animation-delay: 2s;
    opacity: 0.4;
    width: 35px;
    height: 35px;
}

.leaf:nth-child(5) {
    left: 70%;
    animation-duration: 19s;
    animation-delay: 4s;
    opacity: 0.6;
}

.leaf:nth-child(6) {
    left: 85%;
    animation-duration: 16s;
    animation-delay: 1s;
    opacity: 0.5;
    width: 28px;
    height: 28px;
}

.leaf:nth-child(7) {
    left: 15%;
    animation-duration: 21s;
    animation-delay: 6s;
    opacity: 0.45;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.8) 0%, rgba(46, 204, 113, 0.6) 100%);
}

.leaf:nth-child(8) {
    left: 60%;
    animation-duration: 22s;
    animation-delay: 7s;
    opacity: 0.55;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.7) 0%, rgba(22, 163, 74, 0.6) 100%);
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg) scale(var(--leaf-scale));
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(50px) scale(var(--leaf-scale));
    }
    100% {
        transform: translateY(100vh) rotate(360deg) translateX(-50px) scale(var(--leaf-scale));
    }
}

/* Desactivar animación para usuarios con preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .leaf {
        animation: none;
        display: none;
    }
}

/* === Aviones de papel y palmas decorativas (viajes) === */
.paperplane-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}

.paperplane {
    position: absolute;
    width: 34px;
    height: 24px;
    background: transparent;
    border-left: 18px solid rgba(255,255,255,0.0);
    border-right: 18px solid rgba(255,255,255,0.0);
    border-bottom: 24px solid rgba(255,255,255,0.0);
    transform: rotate(15deg);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.12));
}

/* simple paperplane using pseudo-element */
.paperplane::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: 0;
    height: 0;
    border-left: 18px solid rgba(255,255,255,0.95);
    border-right: 18px solid transparent;
    border-bottom: 24px solid rgba(46, 204, 113, 0.95);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.paperplane.small { width: 24px; height: 16px; }
.paperplane.large { width: 46px; height: 32px; }

.plane-1 { left: 5%; top: 20%; animation: fly1 8s linear infinite; opacity: 0.85; }
.plane-2 { left: 20%; top: 40%; animation: fly2 10s linear infinite; opacity: 0.8; }
.plane-3 { left: 80%; top: 60%; animation: fly3 12s linear infinite; opacity: 0.9; }

@keyframes fly1 {
    0% { transform: translateX(0) translateY(0) rotate(-10deg) scale(1); }
    50% { transform: translateX(40vw) translateY(-10vh) rotate(10deg) scale(1.05); }
    100% { transform: translateX(80vw) translateY(-20vh) rotate(20deg) scale(1); }
}
@keyframes fly2 {
    0% { transform: translateX(0) translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateX(-30vw) translateY(-8vh) rotate(-8deg) scale(1.02); }
    100% { transform: translateX(-60vw) translateY(-16vh) rotate(-12deg) scale(1); }
}
@keyframes fly3 {
    0% { transform: translateX(0) translateY(0) rotate(6deg) scale(1); }
    50% { transform: translateX(-45vw) translateY(-12vh) rotate(-6deg) scale(1.03); }
    100% { transform: translateX(-90vw) translateY(-24vh) rotate(-10deg) scale(1); }
}

/* small palm icon */
.palm {
    position: absolute;
    width: 34px;
    height: 28px;
    background: linear-gradient(180deg, rgba(46,204,113,1), rgba(39,174,96,0.95));
    clip-path: polygon(50% 0%, 62% 18%, 80% 20%, 66% 34%, 72% 56%, 50% 44%, 28% 56%, 34% 34%, 20% 20%, 38% 18%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transform-origin: center;
    animation: sway 6s ease-in-out infinite alternate;
    will-change: transform;
    z-index: -0;
}

.palm.small { width: 22px; height: 22px; }
.palm.large { width: 40px; height: 40px; }

@keyframes sway {
    0% { transform: translateY(0) translateX(0) rotate(-6deg) scale(1); }
    25% { transform: translateY(-6px) translateX(4px) rotate(4deg) scale(1.03); }
    50% { transform: translateY(-10px) translateX(-2px) rotate(8deg) scale(1.04); }
    75% { transform: translateY(-6px) translateX(3px) rotate(2deg) scale(1.02); }
    100% { transform: translateY(0) translateX(0) rotate(-6deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .paperplane, .palm { animation: none; display: none; }
}

/* === Llamita animada (fondo) === */
.flame-bg {
    position: fixed;
    top: 50%;
    left: 2%; /* más cerca del borde izquierdo */
    width: 100px; /* un poco más pequeña para no interrumpir */
    height: 100px;
    pointer-events: auto; /* permitir clicks en el contenedor */
    z-index: 1030; /* por debajo del modal/backdrop de Bootstrap */
    opacity: 0.9;
    transform: translateY(-50%); /* centrada verticalmente */
}

.flame-svg { width: 100%; height: 100%; display: block; }

/* Enlace que envuelve la llama */
.flame-link { display: inline-block; width: 100%; height: 100%; outline: none; }
.flame-link:hover { cursor: pointer; }
.flame-link:focus { box-shadow: 0 0 0 3px rgba(34,153,84,0.3); border-radius: 6px; }

/* Badge que indica que es clicable: pequeño icono de casa sobre el gorro */
.flame-link {
    position: relative; /* para posicionar el badge */
}
.flame-link::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px; /* sitúa en la parte superior-izquierda del contenedor */
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    display: block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23227B3B' d='M12 3l7 6v11a1 1 0 0 1-1 1h-4v-7H10v7H6a1 1 0 0 1-1-1V9l7-6z'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    pointer-events: none; /* no interfiere con el click */
    transition: transform 180ms ease, opacity 180ms ease;
    opacity: 0.95;
}

/* Al pasar el cursor, levantar ligeramente la llama (no cancelar bob animation) */
.flame-link:hover .flame-svg { transform: translateY(-4px); }
.flame-link:active::after { transform: scale(0.96); }

.flame-anim { animation: bob 3.2s ease-in-out infinite; transform-origin: center bottom; }

@keyframes bob {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.02); }
    100% { transform: translateY(0) scale(1); }
}

/* Animaciones de gestos de la llama */
.ear-left, .ear-right {
    animation: ear-wiggle 3s ease-in-out infinite;
    transform-origin: center bottom;
}

.ear-right { animation-delay: 0.5s; }

@keyframes ear-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.eyelid-left, .eyelid-right {
    animation: blink 5s ease-in-out infinite;
}

.eyelid-right { animation-delay: 0.1s; }

@keyframes blink {
    0%, 90%, 100% { ry: 0; opacity: 0; }
    95% { ry: 9; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .flame-anim { animation: none; }
    .ear-left, .ear-right, .eyelid-left, .eyelid-right { animation: none; }
}

