/* =========================================
   1. ESTILOS PORTADA (Index - Featured News)
   Se usa en la página de inicio
   ========================================= */

#featured-news {
    padding: 80px 0;
    background-color: transparent;
}

/* Cabecera de la Sección en Index */
#featured-news .section-header {
    text-align: center;
    margin-bottom: 3.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#featured-news .section-title {
    color: var(--primary-deep-green);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

#featured-news .section-intro {
    color: var(--text-medium);
    margin-bottom: 0;
}

/* --- Tarjeta Principal (Izquierda) --- */
.news-main-card {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: all 0.35s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
}

.news-main-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
    border-color: rgba(46, 125, 50, 0.2);
}

.news-main-img-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 60%; /* Aspect Ratio 16:9 */
}

.news-main-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.news-main-card:hover .news-main-img-wrapper img {
    transform: scale(1.08);
}

.news-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--accent-gold);
    color: var(--primary-deep-green);
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.news-main-body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    font-size: 0.85rem;
    color: var(--text-muted-custom);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.news-meta i {
    color: var(--accent-gold);
}

.news-main-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-deep-green);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-main-excerpt {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enlace "Leer más" */
.read-more-link {
    color: var(--primary-vibrant-green);
    font-weight: 700;
    text-decoration: none;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.read-more-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.read-more-link:hover {
    color: var(--primary-deep-green);
}

.read-more-link:hover i {
    transform: translateX(5px);
}

/* --- Lista Lateral de Noticias (Derecha) --- */
.news-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    height: 100%;
}

.news-list-item {
    display: flex;
    align-items: center;
    background-color: var(--white-pure);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    border-left: 4px solid transparent;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}

.news-list-item:hover {
    background-color: #fcfdfc;
    border-color: #eee;
    border-left-color: var(--accent-gold);
    transform: translateX(5px);
    box-shadow: var(--shadow-medium);
}

.news-list-thumb {
    width: 85px;
    height: 85px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    margin-right: 1.2rem;
    flex-shrink: 0;
}

.news-list-content {
    flex-grow: 1;
    min-width: 0;
}

.news-list-date {
    font-size: 0.75rem;
    color: var(--text-muted-custom);
    margin-bottom: 0.4rem;
    display: block;
    text-transform: uppercase;
    font-weight: 600;
}

.news-list-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-deep-green);
    margin: 0;
    line-height: 1.35;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-list-item:hover .news-list-title {
    color: var(--primary-vibrant-green);
}

/* Botón "Ver todas las noticias" */
.btn-news-all {
    margin-top: 3rem;
    background-color: var(--primary-deep-green);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--primary-deep-green);
}

.btn-news-all:hover {
    background-color: transparent;
    color: var(--primary-deep-green);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* ===============================
   Filtros de noticias
   =============================== */

   .news-filters{
   margin-top:10px;
   margin-bottom:25px;
   }

   .ui-pill-filter{
   padding:6px 14px;
   font-size:.85rem;
   border-radius:50px;
   border:1px solid #e5e7eb;
   background:#fff;
   text-decoration:none;
   color:#555;
   transition:.25s;
   }

   .ui-pill-filter:hover{
   background:#f5f7f6;
   color:var(--primary-deep-green);
   }

   .ui-pill-filter.active{
   background:var(--primary-deep-green);
   color:#fff;
   border-color:var(--primary-deep-green);
   }

/* =========================================
   2. ESTILOS DE TARJETA DE NOTICIA (Grid)
   Usado en noticias.php
   ========================================= */

/* --- Tarjeta Individual (Grid) --- */
.news-card-grid {
    background: white;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.news-card-grid:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(46, 125, 50, 0.2);
}

.card-img-top-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-img-top-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card-grid:hover .card-img-top-wrapper img {
    transform: scale(1.1);
}

/* Badge de Categoría */
.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--primary-deep-green);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.news-date {
    font-size: 0.8rem;
    color: var(--text-muted-custom);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-deep-green);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer-custom {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* Botón Leer Más (Estilo para Listado) */
.read-more-btn {
    text-decoration: none;
    color: var(--primary-vibrant-green);
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}

.read-more-btn i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.read-more-btn:hover i {
    transform: translateX(5px);
}

/* =========================================
   3. RESPONSIVIDAD
   ========================================= */

@media (max-width: 991.98px) {
    .news-main-card { margin-bottom: 2rem; }
}

@media (max-width: 768px) {
    #featured-news { padding: 50px 0; }
    .news-main-title { font-size: 1.35rem; }
    .news-list-thumb { width: 70px; height: 70px; }
}
