/* ==========================================
   Noticias Section Styles
   ========================================== */

#noticias {
    background: linear-gradient(135deg, #0a1f1f 0%, #000000 100%);
    position: relative;
    overflow: hidden;
}

#noticias::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/hero/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

#noticias .container {
    position: relative;
    z-index: 1;
    max-width: 1400px !important;
    padding-left: 0;
    padding-right: 0;
    margin: 0 auto !important;
    width: 100%;
}

/* Espaciado uniforme entre tarjetas - FLEXBOX */
.noticias-grid-custom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 3rem;
    padding: 0;
    margin: 0 3.125rem;
    width: calc(100% - 6.25rem);
}

.noticias-grid-custom > div {
    width: calc(33.333% - 2rem);
    max-width: 400px;
    flex-shrink: 0;
    flex-grow: 0;
}

#noticias h2,
#noticias .lead {
    color: white;
}

#noticias h2 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* News Cards - Simples */
.news-card-full {
    transition: all var(--transition-normal);
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 206, 209, 0.3);
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.news-card-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    z-index: 1;
}

.news-card-full:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 206, 209, 0.5);
    background: rgba(255, 255, 255, 0.80);
    border-color: var(--primary-color);
}

.news-image-container {
    width: 100%;
    height: 150px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.news-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all var(--transition-normal);
}

.news-card-full:hover .news-image-container img {
    transform: scale(1.05);
}

.news-card-full .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-full .card-title {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.news-card-full .card-text {
    color: #444;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.news-card-full .badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Botones alineados al fondo */
.news-card-full .btn {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: none;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 206, 209, 0.3);
    margin-top: auto;
    align-self: flex-start;
}

.news-card-full .btn:hover {
    background-color: #00b8bb;
    color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 206, 209, 0.5);
}

.btn-outline-primary {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: none;
}

.btn-outline-primary:hover {
    background-color: #00b8bb;
    color: var(--dark-color);
}

/* Botón Ver más (solo visible en mobile/tablet) */
#btn-ver-mas-noticias {
    display: none;
    font-weight: 700;
}

#btn-ver-mas-noticias i {
    transition: all 0.3s ease;
}

/* Ocultar noticias 3-6 en mobile/tablet */
.news-item-hidden {
    display: none;
}

/* Responsive */
@media (max-width: 991px) {
    .noticias-grid-custom {
        gap: 2rem;
    }
    
    .noticias-grid-custom > div {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
    
    #btn-ver-mas-noticias {
        display: inline-block;
    }
    
    .news-item-hidden {
        display: none;
    }
    
    .news-item-hidden.show {
        display: block;
        animation: fadeInUp 0.5s ease;
    }
    
    #noticias .container {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .noticias-grid-custom {
        gap: 1.5rem;
    }
    
    .noticias-grid-custom > div {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    #noticias .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .news-image-container {
        height: 130px;
        padding: 1.25rem;
    }
    
    .news-card-full .card-title {
        font-size: 1rem;
    }
    
    .news-card-full .card-body {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    #noticias .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 992px) {
    /* En desktop: mostrar todas las noticias */
    .news-item-hidden {
        display: block !important;
    }
    
    #btn-ver-mas-noticias {
        display: none !important;
    }
}
