/* ===============================================
   NOTICIAS CSS - COCEPU
   Estilos para el sistema de noticias/blog
   =============================================== */

/* Hero Section - Index */
.noticias-hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.noticias-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.noticias-hero .intro-text {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 800px;
}

.noticias-hero .intro-text p {
    margin: 0;
}

/* Noticias Grid */
.noticias-section {
    padding: 40px 0 60px;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.noticia-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

/* Imagen de la tarjeta */
.noticia-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--gray-light);
}

.noticia-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.noticia-card:hover .noticia-image img {
    transform: scale(1.05);
}

.noticia-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-light) 0%, #d5dbdb 100%);
}

.placeholder-content {
    font-size: 4rem;
    color: var(--gray-medium);
    opacity: 0.3;
}

/* Badge de categoría */
.categoria-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-yellow);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Contenido de la tarjeta */
.noticia-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.noticia-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--gray-medium);
    flex-wrap: wrap;
}

.noticia-meta i {
    margin-right: 5px;
}

.noticia-title {
    margin: 0 0 15px;
    font-size: 1.3rem;
    line-height: 1.4;
}

.noticia-title a {
    color: var(--gray-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.noticia-title a:hover {
    color: var(--primary-green);
}

.noticia-intro {
    color: var(--gray-medium);
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
}

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

.read-more:hover {
    color: var(--primary-dark);
}

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

/* Paginación */
.pagination {
    margin-top: 50px;
}

.pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    color: var(--gray-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
}

.pagination-link.active {
    background: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
    cursor: default;
}

.pagination-link i {
    font-size: 0.85rem;
}

/* Sin noticias */
.no-noticias {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-medium);
}

.no-noticias i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-noticias p {
    font-size: 1.1rem;
}

/* ===============================================
   DETALLE DE NOTICIA
   =============================================== */

/* Breadcrumbs */
.breadcrumbs {
    background: var(--gray-light);
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumbs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
    color: var(--gray-medium);
}

.breadcrumbs a {
    color: var(--gray-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--primary-green);
}

.breadcrumbs .current {
    color: var(--gray-medium);
}

/* Header de la noticia */
.noticia-header {
    padding: 40px 0 30px;
}

.categoria-badge-large {
    display: inline-block;
    background: var(--secondary-yellow);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.noticia-title-main {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--gray-dark);
}

.noticia-meta-main {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    color: var(--gray-medium);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item i {
    color: var(--primary-green);
}

.noticia-intro-main {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--gray-medium);
    max-width: 800px;
    margin: 0;
}

/* Imagen destacada */
.noticia-imagen-destacada {
    margin-bottom: 50px;
}

.img-destacada {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.imagen-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-top: 15px;
    font-style: italic;
}

/* Contenido principal */
.noticia-content-main {
    padding: 0 0 60px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    align-items: start;
}

/* Cuerpo del artículo */
.article-body {
    max-width: 800px;
}

.article-body h2 {
    font-size: 1.8rem;
    color: var(--gray-dark);
    margin: 30px 0 15px;
}

.article-body h3 {
    font-size: 1.4rem;
    color: var(--gray-dark);
    margin: 25px 0 12px;
}

.article-body p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-dark);
    margin-bottom: 20px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-green);
    padding-left: 20px;
    margin: 30px 0;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--gray-medium);
}

.article-body ul, .article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    margin: 0 0 20px;
    color: var(--gray-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-widget h3 i {
    color: var(--primary-green);
}

/* Tags Widget */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    background: var(--gray-light);
    color: var(--gray-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: var(--primary-green);
    color: var(--white);
}

/* Share Widget */
.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-facebook {
    background: #1877F2;
}

.share-twitter {
    background: #1DA1F2;
}

.share-linkedin {
    background: #0A66C2;
}

.share-whatsapp {
    background: #25D366;
}

/* Botón volver */
.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--primary-green);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--primary-dark);
    transform: translateX(-3px);
}

/* Noticias Relacionadas */
.related-news {
    background: var(--gray-light);
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--gray-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: var(--primary-green);
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.related-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.related-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 20px;
}

.related-content h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.related-content h3 a {
    color: var(--gray-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content h3 a:hover {
    color: var(--primary-green);
}

.related-date {
    font-size: 0.85rem;
    color: var(--gray-medium);
    margin: 0;
}

.related-date i {
    margin-right: 5px;
}

/* ===============================================
   RESPONSIVE
   =============================================== */

@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
    }

    .sidebar-widget {
        margin-bottom: 20px;
    }

    .noticias-hero h1 {
        font-size: 2rem;
    }

    .noticia-title-main {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .noticias-grid {
        grid-template-columns: 1fr;
    }

    .noticias-hero {
        padding: 40px 0 30px;
    }

    .noticias-hero h1 {
        font-size: 1.8rem;
    }

    .noticia-title-main {
        font-size: 1.6rem;
    }

    .noticia-meta-main {
        flex-direction: column;
        gap: 10px;
    }

    .related-news-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .noticias-hero h1 {
        font-size: 1.5rem;
    }

    .noticia-title-main {
        font-size: 1.4rem;
    }

    .noticia-image {
        height: 200px;
    }

    .pagination-list {
        gap: 5px;
    }

    .pagination-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}
