/**
 * LA FÁBRICA DE IDEAS - HOJA DE ESTILOS PRINCIPAL
 * -----------------------------------------------------------------------------
 * Este archivo define la apariencia visual de toda la web pública.
 * Está organizado por secciones lógicas (header, hero, proyectos, etc.)
 * y utiliza variables CSS para mantener la coherencia cromática.
 */

/* -----------------------------------------------------------------------------
 * VARIABLES GLOBALES (Paleta de colores y configuración base)
 * -----------------------------------------------------------------------------
 */
:root {
    --bg-dark: #0b0c0e;               /* Fondo principal de la web */
    --bg-card: #15171a;               /* Fondo de tarjetas y contenedores */
    --accent: #d4af37;                /* Color dorado de acento (enlaces, botones) */
    --accent-glow: rgba(212, 175, 55, 0.3); /* Resplandor para efectos hover */
    --text-light: #e9e9e9;            /* Texto principal claro */
    --text-muted: #a0a0a0;            /* Texto secundario / menos relevante */
    --border-subtle: #2a2c30;         /* Bordes sutiles para tarjetas y separadores */
    --font-main: 'Inter', sans-serif; /* Tipografía principal */
    --transition: all 0.25s ease;     /* Transición estándar para interacciones */
}

/* -----------------------------------------------------------------------------
 * RESETEO BÁSICO
 * -----------------------------------------------------------------------------
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* -----------------------------------------------------------------------------
 * ANIMACIÓN DE PULSO SECUENCIAL PARA LAS PÍLDORAS INACTIVAS
 * -----------------------------------------------------------------------------
 */

@keyframes pulsoPildora {
    0%   { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
    60%  { box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.7); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.pildora.activo {
    animation: none;
    box-shadow: none;
}

/* -----------------------------------------------------------------------------
 * BOTÓN DE RECARGA FORZADA (DESARROLLO)
 * -----------------------------------------------------------------------------
 */
.dev-reload-btn {
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 12px;
    opacity: 0.6;
    transition: var(--transition);
    font-size: 1rem;
}

.dev-reload-btn:hover {
    opacity: 1;
    background: var(--accent);
    color: var(--bg-dark);
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .dev-reload-btn {
        width: 30px;
        height: 30px;
        margin-left: 8px;
    }
}

/* -----------------------------------------------------------------------------
 * ESTILOS RESPONSIVE (Móviles y tablets con menú hamburguesa)
 * -----------------------------------------------------------------------------
 */

/* Tablets y móviles con pantalla táctil (hasta 1366px) - Menú hamburguesa */
@media (pointer: coarse) and (max-width: 1366px) {
    .container {
        padding: 0 1.5rem;
    }

    /* Menú hamburguesa */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-subtle);
        padding: 0.2rem 0;
        z-index: 99;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column !important;
        align-items: stretch;
    }
    .main-nav li {
        width: 100%;
        margin: 0;
    }
    .main-nav a {
        padding: 0.5rem 2rem !important;
        line-height: 1.2;
        border-bottom: 1px solid var(--border-subtle);
    }
    .main-nav a:last-child {
        border-bottom: none;
    }

    /* Ajustes tipográficos */
    .hero h1 {
        font-size: 1.8rem !important;
    }

    .hero p {
        font-size: 1.1rem !important;
    }

    .section-title {
        font-size: 2rem !important;
    }

    .page-title {
        font-size: 2rem !important;
    }

    /* Grids */
    .project-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-right {
        align-items: center;
    }

    .footer-contact {
        align-items: center;
        gap: 0.5rem;
    }

    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Pieza del Día en móvil */
    .puzzle-piece {
        padding: 1.5rem;
        min-height: 220px;
    }

    .pieza-contenido {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .mini-logo {
        height: 26px;
    }
}

/* -----------------------------------------------------------------------------
 * ALTAVOZ FLOTANTE PARA MÚSICA AMBIENTAL
 * -----------------------------------------------------------------------------
 */
.altavoz-flotante {
    position: fixed;
    bottom: 25px;
    right: 45px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--accent);
    color: var(--accent);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0.6;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.altavoz-flotante:hover {
    opacity: 1;
    background: var(--accent);
    color: var(--bg-dark);
    transform: scale(1.05);
}

.altavoz-flotante.activo {
    opacity: 1;
    animation: pulsoAltavoz 3s infinite;
}

@keyframes pulsoAltavoz {
    0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
    50% { box-shadow: 0 0 20px var(--accent); }
}

@media (max-width: 768px) {
    .altavoz-flotante {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
    }
}

.altavoz-siguiente {
    position: absolute;
    top: 50%;
    right: -10px;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--accent);
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition);
}

.altavoz-siguiente:hover {
    opacity: 1;
    color: white;
}

.podcast-grid-item {
    background: transparent !important;
}

.podcast-lightbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-light);
}

.podcast-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    object-fit: contain;
}

.podcast-info {
    text-align: center;
}

.podcast-author, .podcast-date, .podcast-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0.25rem 0;
}

.podcast-origen {
    font-size: 0.8rem;
    margin-top: 1rem;
    color: var(--accent);
}

.podcast-origen a {
    color: var(--accent);
    text-decoration: underline;
}

.podcast-overlay {
    opacity: 1 !important;
}

/* -----------------------------------------------------------------------------
 * BUSCADOR EN CABECERA
 * -----------------------------------------------------------------------------
 */
.buscador-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 2rem;
    text-align: center;
}

.buscador-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.buscador-input-group {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    overflow: hidden;
}

.buscador-input {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--text-light);
    font-size: 0.95rem;
    width: 250px;
    outline: none;
}

.buscador-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.buscador-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

.buscador-checkboxes {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.buscador-checkboxes .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.buscador-checkboxes .checkbox-label input[type="checkbox"] {
    accent-color: var(--accent);
}

/* -----------------------------------------------------------------------------
 * PÁGINA DE RESULTADOS
 * -----------------------------------------------------------------------------
 */
.buscadear-page .busqueda-info {
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-align: center;
}

.resultados-lista {
    max-width: 800px;
    margin: 0 auto;
}

.resultado-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.resultado-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.resultado-tipo {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.resultado-tipo.proyecto {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent);
}

.resultado-tipo.señal {
    background: rgba(13, 202, 240, 0.15);
    color: #0dcaf0;
}

.resultado-tipo.galería {
    background: rgba(25, 135, 84, 0.15);
    color: #198754;
}

.resultado-item h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
}

.resultado-item h3 a {
    color: var(--text-light);
    text-decoration: none;
}

.resultado-item h3 a:hover {
    color: var(--accent);
}

.resultado-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .buscador-header {
        padding: 0.5rem 1rem;
    }
    .buscador-input {
        width: 180px;
    }
    .buscador-form {
        flex-direction: column;
        gap: 0.5rem;
    }
    .ideograma-img {
        width: 50px;
        height: 50px;
    }
    .main-nav {
    display: none;
    }
    .main-nav.active {
        display: block;
    }
    .mobile-menu-toggle {
        display: flex;
    }
}


.mobile-menu-toggle {
    display: flex !important;
    width: 40px;
    height: 40px;
    background-color: red; /* para verlo */
    position: relative;
    z-index: 1000;
}
.mobile-menu-toggle span {
    background-color: white;
}