/* ==========================================================================
   SISTEMA DE DISEÑO (ROOT)
   ========================================================================== */


/* --- RESET & GENERALS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    text-decoration: none !important;
    color: inherit;
    transition: var(--transition);
}

.wrap {
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;   
}

/* --- HEADER & NAVIGATION --- */
.main-header { width: 100%; }

.top-bar {
    background: var(--bg-card);
    border-bottom: 1px solid #eee;
}

.top-nav-icons {
    display: flex;
    justify-content: center; /* CENTRADO TOTAL */
    padding: 10px 0;
    gap: 30px; /* SEPARACIÓN DE 30PX */
}

.nav-item-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    gap: 4px;
}

.nav-item-icon i {
    font-size: 20px;
    background: linear-gradient(135deg, var(--accent-pink), var(--dark-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.banner-main {
    background: linear-gradient(135deg, var(--Extra1) 0%, var(--dark-purple) 100%);
    padding: 30px 0;
    color: var(--bg-card);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-logo { height: 55px; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-header {
    display: flex;
    gap: 15px;
    font-size: 1.2rem;
}

/* Ajuste del botón MENU: Solo visible en móvil */
.btn-menu-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--bg-card);
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 700;
    display: none; /* Oculto por defecto (escritorio) */
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
/* Se quita el icono dentro del botón para modo móvil */
.btn-menu-outline i { display: none; }

/* --- MENÚ ESCRITORIO --- */
/* Solo visible en pantallas grandes (>768px) */
.desktop-nav {
    display: flex;
    gap: 10px; /* Pequeña separación */
}

.desktop-nav a {
    color: var(--btn1-txt);
    font-weight: 700;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px; 
    background: var(--btn1-bg);
}

.desktop-nav a:hover {
    color: var(--btn1-txt-h);
    background: var(--btn1-bg-h); /* Efecto hover suave */
}

/* Efecto activo (como "Inicio" o "Noticias" en tu imagen) */
.desktop-nav a.active {
    color: var(--btn1-txt-a);
    background: var(--btn1-bg-a); 
}

/* --- SIDEBAR MENU --- */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 2000;
    transition: 0.4s var(--transition);
}

.mobile-sidebar.active { left: 0; }

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    display: none;
}

.sidebar-overlay.active { display: block; }

.sidebar-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.close-btn {
    position: absolute;
    right: -50px;
    top: 15px;
    background: none;
    border: none;
    color: var(--bg-card);
    font-size: 45px;
    cursor: pointer;
}

.search-input {
    border: none;
    outline: none;
    font-size: 16px;
    width: 100%;
    font-weight: 500;
}

.sidebar-nav { padding-top: 20px; }
.sidebar-nav a {
    display: block;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: 800;
    text-align: right;
}

/* --- RADIO GRID & CARDS --- */
.main-content {
    flex: 1;
    padding: 40px 0;
}

.section-header { margin-bottom: 30px; }

.title-label {
    background: var(--accent-pink);
    color: var(--bg-card);
    display: inline-block;
    padding: 8px 15px;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
}

.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}

.radio-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 5px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.radio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.card-top {
    height: 200px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-circle {
    background: var(--bg-card);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.logo-circle img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
}

.play-btn {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    background: linear-gradient(180deg, var(--accent-pink), #673ab7);
    color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-bottom { padding: 40px 15px 20px; }

.current-song {
    font-size: 0.9rem;
    font-weight: 600;
    height: 38px;
    text-transform: uppercase;
    overflow: hidden;
}

.station-name {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- SOCIAL BAR --- */
.wrap-red { margin-bottom: 40px; }

.social-bar-container {
    background: var(--bg-card);
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #f0f0f0;
}

.social-bar-left { display: flex; align-items: center; gap: 20px; }
.social-bar-logo { height: 32px; }
.social-bar-text { font-weight: 700; font-size: 1.1rem; }

.social-bar-right { display: flex; gap: 10px; }
.social-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 1.4rem;
}
.social-box.wa { color: #25D366; }
.social-box.fb { color: var(--fb-blue); }
.social-box.ig { color: #E4405F; }
.social-box.x-twitter { color: #000; }

/* --- SECCIONES DE NOTICIAS (RSS & FB) --- */
.news-section-rss .title-label { background-color: var(--rss-pink); }
.news-section-fb .title-label { background-color: var(--fb-blue); }

.news-grid-rss {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.news-card-rss {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.large-news { grid-column: span 3; }
.small-news { grid-column: span 2; }

.news-thumb { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-content { padding: 15px; }

.facebook-wall-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.fb-card {
    flex: 1 1 30%;
    min-width: 320px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* ==========================================
   FOOTER MODERNO - CREA IDEA STUDIO
   ========================================== */

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    max-width: 180px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1); /* Si el logo es oscuro, esto lo hace blanco */
}

.footer-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: var(--accent-pink);
    font-size: 18px;
    margin-bottom: 20px;
    font-family: var(--font-main);
}

/* Redes Sociales */
.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-white);
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover {
    background: var(--accent-pink);
    transform: translateY(-3px);
    color: #fff;
}

/* Listas de enlaces */
.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent-pink);
    padding-left: 5px;
}

.footer-col.contact p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;    
    align-items: center;
    gap: 10px;
}

/* Footer Bottom */
.footer-bottom {
    background: var(--Extra1);
    padding: 25px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

.bottom-inner p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.bottom-inner strong {
    color: var(--text-muted);
}

.bottom-inner span {
    color: var(--accent-pink);
}

/* Responsive */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }
}

/* Formulario Newsletter */
.footer-form {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-form input {
    background: transparent;
    border: none;
    padding: 10px 20px;
    color: #fff;
    flex: 1;
    outline: none;
}
.footer-form button {
    background: var(--accent-pink);
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.footer-form button:hover { transform: scale(1.1); background: var(--dark-purple); }

/* Barra Inferior */
.footer-bottom {
    background: var(--Extra1);
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.bottom-inner {   
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
    padding: 0 20px;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: #666; }
.footer-legal a:hover { color: #fff; }

.designer-credit span {
    color: var(--accent-pink);
    font-weight: 700;
}


/* --- BUSCADOR DESLIZABLE --- */
.search-collapse {
    background: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    border-bottom: 0 solid #eee;
}

.search-collapse.open {
    max-height: 80px; /* Altura del buscador abierto */
    border-bottom: 2px solid var(--accent-pink);
}

.search-container-inner {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.search-container-inner form {
    width: 100%;
    display: flex;
    background: #f1f3f8;
    border-radius: 50px;
    padding: 5px 20px;
}

.search-container-inner input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-size: 16px;
    outline: none;
    font-weight: 500;
}

.search-container-inner button {
    background: none;
    border: none;
    color: var(--primary-purple);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Visibilidad de lupas */
.mobile-search-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    margin-right: 10px;
}



/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    /*FOOTER*/
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-social-links { justify-content: center; }
    .footer-form { margin: 0 auto; max-width: 300px; }
    .bottom-inner {
        flex-direction: column;
        gap: 15px;
    }
    /*MOVIL: BUSCADOR */
    .mobile-search-btn { display: block; }
    .desktop-nav .search-trigger { display: none; }
    /* MÓVIL: Mostramos botón MENU (sin icono) y ocultamos menú horizontal */
    .btn-menu-outline { display: flex; }
    .desktop-nav { display: none; }

    .top-nav-icons {
        display: flex !important;
        justify-content: center !important;
        gap: 30px !important;
    }
    .banner-main {padding: 30px 20px;}
    .main-content {flex: 1; padding: 40px 20px;}
    .radio-grid { grid-template-columns: 1fr; }
    .social-bar-container { flex-direction: column; gap: 15px; text-align: center; }
    .news-grid-rss { display: flex; flex-direction: column; }
    .fb-card { flex: 1 1 100%; }
}

/* --- ADMIN PLAYER COLORS --- */
.admin-player-container { padding: 20px; font-family: 'Montserrat', sans-serif; background: #fdfdfd; }
.header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }

/* Vista Previa Sticky */
.preview-sticky-section { 
    position: sticky; top: 10px; z-index: 100; background: #fff; padding: 15px;
    border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin-bottom: 30px;
}
.preview-controls { margin-bottom: 10px; font-size: 13px; font-weight: bold; }
.player-preview-canvas { 
    height: 320px; border-radius: 12px; position: relative; overflow: hidden;
    transition: background 0.3s; display: flex; flex-direction: column; justify-content: space-between;
    padding: 20px; background: #121212;
}

/* Mockup interno */
.mock-main-content { display: flex; gap: 40px; align-items: center; padding: 20px; }
.mock-album-card { width: 180px; padding: 15px; border-radius: 15px; border: 1px solid #333; }
.mock-img { height: 120px; background: #222; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 40px; margin-bottom: 10px; }
.mock-info span { font-size: 10px; text-transform: uppercase; font-weight: bold; }
.mock-info h4 { margin: 5px 0; font-size: 14px; }
.mock-info p { margin: 0; font-size: 12px; }

.mock-center-info h1 { font-size: 45px; margin: 0; color: #fff; }
.mock-center-info span { font-size: 10px; letter-spacing: 2px; color: #888; }
.mock-play-row { display: flex; align-items: center; gap: 15px; margin-top: 15px; }
.mock-btn-play { 
    width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; 
    justify-content: center; font-size: 20px; border: 2px solid transparent; 
}
.mock-hora-box span { display: block; line-height: 1; }
.mock-hora-val { font-size: 18px; font-weight: bold; }

.mock-bar { 
    height: 60px; border-top: 1px solid #222; display: flex; align-items: center; 
    justify-content: space-between; padding: 0 20px; margin: 0 -20px -20px -20px;
}
.mock-bar-vol { display: flex; align-items: center; gap: 10px; }
.vol-bg { width: 80px; height: 4px; border-radius: 2px; position: relative; }
.vol-prog { width: 60%; height: 100%; border-radius: 2px; }
.vol-handle { width: 10px; height: 10px; border-radius: 50%; position: absolute; left: 60%; top: -3px; }

/* Grid de Configuración */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.config-card { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #eee; }
.card-icon { font-size: 24px; margin-bottom: 10px; }
.config-card h3 { margin: 0 0 15px 0; font-size: 16px; color: #333; border-bottom: 1px solid #f5f5f5; padding-bottom: 10px; }

.color-field { margin-bottom: 12px; }
.color-field label { font-size: 11px; font-weight: bold; color: #777; display: block; margin-bottom: 5px; }
.picker-group { display: flex; gap: 8px; align-items: center; }
.color-text-input { 
    flex: 1; border: 1px solid #ddd; padding: 6px 10px; border-radius: 5px; 
    font-size: 12px; font-family: monospace; outline: none;
}

.btn-save-main {
    background: #007bff; color: white; border: none; padding: 12px 25px; 
    border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.3s;
}
.btn-save-main:hover { background: #0056b3; transform: translateY(-2px); }
