/*
  ==========================================================================
  CORRECCIONES DEFINITIVAS - VERSIÓN 2 (master-estilos.css)
  ==========================================================================
*/

/* --- 1. ARREGLO DE FONDO DE PALABRAS CAÓTICAS --- */
#bg.bg-words {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1 !important;
    overflow: hidden !important;
    background: none !important;
}

.floating-word {
    position: absolute;
    white-space: nowrap;
    opacity: 0.15 !important;
    color: #4a3b32 !important;
    pointer-events: none !important;
    font-family: 'Montserrat', sans-serif;
    transform: translateZ(0);
}

/* --- 2. ARREGLO DE BARRA SUPERIOR FIJA --- */
.top-nav {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    height: 60px !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    background-color: #fdfaf6 !important;
    z-index: 9999 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
}

.nav-left {
    flex: 0 0 auto;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #4a3b32;
    text-decoration: none;
    white-space: nowrap;
}

.nav-right {
    flex: 0 0 auto;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

/* --- 3. MENÚ VISIBLE EN PC (CORRECCIÓN) --- */
.top-nav .nav-links {
    display: flex !important; 
    flex-direction: row !important;
    gap: 20px !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.top-nav .icon-btn {
    display: block !important;
}

.deck-container {
    padding-top: 80px !important; 
}

/* --- 4. ARREGLO DE BOTÓN DE DONACIONES A LA DERECHA (FIJO) --- */
.float-container {
    position: fixed !important;
    right: 20px !important; 
    bottom: 20px !important; 
    left: auto !important; 
    top: auto !important; 
    z-index: 9998 !important; 
}

.f-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #d1bba4;
    color: white;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* ==========================================================================
   MEDIA QUERY: VERSIÓN CELULAR (< 768px)
   ==========================================================================
*/
@media (max-width: 768px) {
    
    /* Mostrar hamburguesa solo en celu */
    .top-nav .menu-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 25px !important;
        height: 18px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        padding: 0 !important;
        z-index: 10000 !important;
    }

    .menu-toggle span {
        width: 100% !important;
        height: 3px !important;
        background-color: #4a3b32 !important;
        border-radius: 5px !important;
    }

    /* Ocultar el botón de la lunita suelto en celular */
    .top-nav .icon-btn {
        display: none !important;
    }

    /* Convertir el menú horizontal de PC en desplegable para celu */
    .top-nav .nav-links {
        position: fixed !important;
        top: 60px !important; 
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        background-color: #fdfaf6 !important;
        flex-direction: column !important;
        padding: 20px 0 !important;
        margin: 0 !important;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1) !important;

        /* Efecto de deslizar oculto por defecto */
        transform: translateY(-200%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.4s ease-in-out !important;
        z-index: 9997 !important; 
    }

    /* Se activa al tocar la hamburguesa */
    .top-nav .nav-links.active {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-links li {
        list-style: none !important;
        width: 100% !important;
        text-align: center !important;
        margin: 5px 0 !important;
    }

    .nav-links a {
        font-size: 1.2rem !important;
        text-decoration: none !important;
        color: #4a3b32 !important;
        display: block !important;
        padding: 15px !important;
    }
}
