/* Noticias Públicas - Estilos */

/* Header principal */
.noticias-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 12px 12px; /* Bordes redondeados sutiles solo en la parte inferior */
}

/* Breadcrumb personalizado */
.noticias-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.noticias-header .breadcrumb-item a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Expander discreto "Sobre esta sección" dentro del header */
.info-seccion-expander {
    margin-top: 1rem;
}

.info-toggle {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.info-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.info-toggle i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.info-toggle[aria-expanded="true"] i.fa-chevron-down {
    transform: rotate(180deg);
}

.info-content {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

/* Sección de introducción */
.alert-info {
    border-left: 4px solid #17a2b8;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

/* Mejoras para accesibilidad */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Estilos para resumen en bullets en vista pública */
.bullets-section {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    padding: 0.75rem;
    border-left: 4px solid #28a745;
}

.bullets-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.bullets-content {
    line-height: 1.5;
    color: #6c757d;
}

.bullets-content br + br {
    display: none; /* Evitar espacios dobles entre bullets */
}

/* Cards de noticias */
.card-noticia-publica {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 10px; /* Bordes redondeados sutiles */
    overflow: hidden; /* Para que la imagen respete los bordes redondeados */
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-noticia-publica:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Imagen con altura fija */
.card-noticia-publica .imagen-contenedor {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-noticia-publica .imagen-contenedor img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder para noticias sin imagen */
.noticia-imagen-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.noticia-imagen-placeholder::before {
    content: '\f1ea'; /* Font Awesome newspaper icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    opacity: 0.3;
}

/* Card body con flexbox para distribuir espacio */
.card-noticia-publica .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Wrapper del enlace de la card */
.card-link-wrapper {
    position: relative;
    display: block;
}

/* Tags de referencia */
.referencia-tag {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.referencia-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Contenedor de referencias múltiples */
.position-absolute .referencia-tag {
    margin: 0 0.25rem 0.25rem 0;
    display: inline-block;
}

/* Tags de fuente */
.fuente-tag {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 0.8rem;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
    margin-right: 0.5rem;
}

/* Tags de fecha */
.fecha-tag {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 0.8rem;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
}

/* Contenedor de imagen con bordes redondeados */
.card-noticia-publica .imagen-contenedor {
    border-radius: 10px 10px 0 0; /* Solo bordes superiores redondeados */
}

/* Botones en footer */
.card-noticia-publica .card-footer {
    border-radius: 0 0 10px 10px; /* Solo bordes inferiores redondeados */
}

/* Botón principal */
.card-noticia-publica .btn-primary {
    border-radius: 8px; /* Bordes sutilmente redondeados en botones */
}

/* Paginación con bordes redondeados */
.pagination .page-link {
    border-radius: 6px !important;
    margin: 0 2px;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    border-radius: 6px !important;
}

/* Alertas con bordes redondeados */
.alert {
    border-radius: 8px;
}

/* Estilos para texto truncado */
.card-text.resumen-truncado {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5em;
    max-height: 3em; /* 2 líneas x 1.5em */
}

/* Título siempre completo, sin truncar */
.card-noticia-publica .card-title {
    line-height: 1.4em;
    /* El título se muestra completo sin límite de líneas */
}

/* Mantener colores de texto en el enlace */
.card-link-wrapper .card-title {
    color: #212529;
}

.card-link-wrapper .card-text {
    color: #6c757d;
}

.card-link-wrapper:hover .card-title {
    color: #667eea;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .noticias-header {
        padding: 1.5rem 0;
        border-radius: 0 0 8px 8px;
    }
    
    .card-noticia-publica {
        border-radius: 8px;
    }
    
    .card-noticia-publica .imagen-contenedor {
        border-radius: 8px 8px 0 0;
    }
    
    .card-noticia-publica .card-footer {
        border-radius: 0 0 8px 8px;
    }
    
    /* Ajustar etiquetas en móviles */
    .referencia-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .noticias-header {
        border-radius: 0 0 6px 6px;
    }
    
    .card-noticia-publica {
        border-radius: 6px;
    }
    
    .card-noticia-publica .imagen-contenedor {
        border-radius: 6px 6px 0 0;
    }
    
    .card-noticia-publica .card-footer {
        border-radius: 0 0 6px 6px;
    }
    
    .pagination .page-link {
        border-radius: 4px !important;
    }
    
    .card-noticia-publica .btn-primary {
        border-radius: 6px;
    }
    
    .alert {
        border-radius: 6px;
    }
    
    /* Etiquetas más pequeñas en móviles pequeños */
    .referencia-tag {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
        margin: 0 0.15rem 0.15rem 0;
    }
}