/* ============================================
   MEGA SECCIÓN: NOTICIAS AUTO + INSTAGRAM REAL
   ============================================ */

.anuncios-mega-section {
    background: linear-gradient(180deg, #f0f2f5 0%, #e8eaed 100%);
    padding: 100px 20px;
    position: relative;
}

.anuncios-mega-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
}

.anuncios-mega-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.anuncios-mega-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #DC143C;
    margin-bottom: 20px;
    padding: 12px 35px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.anuncios-mega-title {
    font-family: 'Georgia', serif;
    font-size: 3rem;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    line-height: 1.1;
    font-weight: 700;
}

.anuncios-mega-title span {
    color: #DC143C;
    position: relative;
}

.anuncios-mega-subtitle {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* MEGA CONTENEDOR */
.anuncios-mega-container {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.anuncios-mega-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    position: relative;
    z-index: 1;
}

/* === COLUMNA NOTICIAS === */
.noticias-column {
    display: flex;
    flex-direction: column;
    height: 100%; /* Ocupa toda la altura disponible */
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #FFD700;
    flex-shrink: 0;
}

.column-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.column-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #DC143C, #FF4500);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    box-shadow: 0 8px 20px rgba(220, 20, 60, 0.3);
}

.column-title {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    color: #1a1a1a;
    margin: 0;
    font-weight: 700;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* Filtros de categoría */
.news-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.news-filter-btn {
    padding: 6px 16px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #555;
}

.news-filter-btn:hover,
.news-filter-btn.active {
    border-color: #DC143C;
    background: #DC143C;
    color: #fff;
}

/* Grid de noticias - AHORA SE EXPANDE */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    flex-grow: 1; /* Ocupa todo el espacio disponible */
    align-content: start;
}

/* Tarjeta de noticia - AHORA SE EXPANDE */
.noticia-card-compact {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 160px; /* Altura mínima */
}

.noticia-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #DC143C, #FF4500);
    transition: width 0.3s ease;
}

.noticia-card-compact:hover {
    transform: translateY(-5px) scale(1.02);
    background: #fff;
    border-color: #DC143C;
    box-shadow: 0 15px 40px rgba(220, 20, 60, 0.2);
}

.noticia-card-compact:hover::before {
    width: 6px;
}

.noticia-category-compact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.noticia-category-compact.inmigracion { background: linear-gradient(135deg, #0066CC, #004499); }
.noticia-category-compact.vivienda { background: linear-gradient(135deg, #28a745, #1e7e34); }
.noticia-category-compact.eventos { background: linear-gradient(135deg, #FD7E14, #E8590C); }
.noticia-category-compact.legislacion { background: linear-gradient(135deg, #6F42C1, #5A32A3); }
.noticia-category-compact.comunidad { background: linear-gradient(135deg, #20C997, #17A589); }
.noticia-category-compact.urgente { background: linear-gradient(135deg, #DC143C, #B01030); }

.noticia-title-compact {
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.3;
    font-weight: 700;
    flex-grow: 1; /* Ocupa el espacio disponible */
}

.noticia-excerpt {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 10px 0;
    display: none; /* Oculto por defecto */
    flex-shrink: 0;
}

.noticia-card-compact:hover .noticia-excerpt {
    display: block; /* Se muestra al hacer hover */
}

.noticia-meta-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
    margin-top: auto; /* Empuja hacia abajo */
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.noticia-source-compact {
    font-weight: 600;
    color: #0066CC;
    text-decoration: none;
}

.noticia-source-compact:hover {
    color: #DC143C;
}

.noticia-badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 5;
}

/* Estado de carga */
.news-loading {
    text-align: center;
    padding: 40px;
    color: #888;
    grid-column: 1 / -1;
}

.news-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #DC143C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === COLUMNA INSTAGRAM === */
.instagram-column {
    display: flex;
    flex-direction: column;
}

.instagram-real-feed {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.instagram-feed-header {
    background: linear-gradient(135deg, #833AB4 0%, #C13584 50%, #E1306C 75%, #FD1D1D 100%);
    padding: 25px 20px;
    color: #fff;
    text-align: center;
}

.instagram-profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.instagram-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
}

.instagram-profile-text {
    text-align: left;
}

.instagram-profile-name {
    font-family: 'Georgia', serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.instagram-profile-handle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.instagram-follow-btn-real {
    display: inline-block;
    padding: 8px 20px;
    background: #fff;
    color: #833AB4;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.instagram-follow-btn-real:hover {
    transform: scale(1.05);
}

/* Contenedor del widget de Instagram */
.instagram-widget-container {
    flex-grow: 1;
    padding: 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instagram-widget-container iframe,
.instagram-widget-container .elfsight-app {
    width: 100%;
    border: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .anuncios-mega-grid {
        grid-template-columns: 1fr;
    }
    
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .anuncios-mega-container {
        padding: 25px 20px;
    }
    
    .anuncios-mega-title {
        font-size: 2rem;
    }
    
    .noticias-grid {
        grid-template-columns: 1fr;
    }
    
    .noticia-card-compact {
        height: 120px;
    }
}