/* public/css/portales.css */
body {
    background-color: #f4f7fa;
    font-family: 'Inter', sans-serif;
}

.text-brand {
    color: var(--brand-color) !important;
}

.bg-brand {
    background-color: var(--brand-color) !important;
}

.nav-link {
    font-weight: 700;
    color: #334155 !important;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    font-size: 0.95rem;
    padding: 0.8rem 1rem !important;
    transition: all 0.2s;
}

@media (min-width: 992px) {
    .nav-link {
        font-size: 0.85rem;
        padding: 0.2rem 0 !important;
    }
}

.nav-link:hover {
    border-bottom: 3px solid var(--brand-color);
}

.news-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.news-link:hover {
    color: var(--brand-color);
}

.news-sidebar-item:hover h6 {
    color: var(--brand-color);
}

/* --- TÍTULOS DE NOTICIAS UNIFICADOS (Estilo Periodístico) --- */
.card-news h6,
.most-read-title,
.side-card h6,
.news-card-body h6,
.most-read-item h6,
.related-item h6 {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
}

.tag-badge {
    font-size: 0.65rem;
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.tag-badge:hover {
    background-color: var(--brand-color);
    color: white;
}

/* ==== SLIDER TIPO PERIÓDICO ==== */
.editorial-slider {
    width: 100%;
    position: relative;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-top: 6px solid var(--brand-color);
    /* Línea gruesa arriba institucional */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.slide {
    display: none;
    width: 100%;
}

.slide.active {
    display: block;
    animation: fadeIn 0.6s ease-in-out;
}

/* Imagen (Arriba) */
.slide-image-container {
    width: 100%;
    height: 400px;
    /* Altura de la foto ligeramente reducida para no desbordar */
    position: relative;
}

.slide-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Texto (Abajo) */
.slide-content-container {
    width: 100%;
    background-color: #ffffff;
    padding: 30px 40px;
    position: relative;
}

.category-tag {
    color: var(--brand-color);
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    display: inline-block;
}

.slide-title {
    font-family: 'Playfair Display', Georgia, serif;
    /* Fuente serif periodística */
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #111111;
    line-height: 1.1;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    margin-top: 0;
    transition: color 0.2s ease;
}

.slide-title:hover {
    color: var(--brand-color);
}

.slide-excerpt {
    font-size: 1.05rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 25px;
    font-family: Georgia, serif;
    /* Toque clásico */
}

/* Footer del texto */
.slide-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

.read-article-link {
    display: inline-flex;
    align-items: center;
    color: #111;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.read-article-link::after {
    content: '→';
    margin-left: 8px;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.read-article-link:hover {
    color: var(--brand-color);
}

.read-article-link:hover::after {
    transform: translateX(4px);
}

/* Indicadores de línea */
.progress-indicators {
    display: flex;
    gap: 6px;
}

.indicator-line {
    width: 25px;
    height: 4px;
    background-color: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-line.active {
    background-color: var(--brand-color);
    width: 35px;
}

/* Controles (Flechas laterales) */
.nav-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    border: 1px solid #e2e8f0;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.nav-control:hover {
    background: #ffffff;
    color: var(--brand-color);
    border-color: var(--brand-color);
}

/* Se pegan justo al borde externo */
.prev-control {
    left: -1px;
}

.next-control {
    right: -1px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .slide-image-container {
        height: 260px;
    }

    .slide-content-container {
        padding: 25px 20px;
    }

    .slide-title {
        font-size: 1.5rem;
    }

    .slide-excerpt {
        font-size: 0.95rem;
    }

    .nav-control {
        display: none;
    }

    /* Ocultar en móvil para dar espacio */
}

.card-news {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.card-news:hover {
    transform: translateY(-10px);
}

/* Sidebar - Lo más leído */
.sidebar-title {
    border-bottom: 2px solid var(--brand-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.most-read-item {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
    transition: all 0.2s;
}

.most-read-item:last-child {
    border-bottom: none;
}

.most-read-item:hover .most-read-title {
    color: var(--brand-color);
}

.most-read-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 5px;
    display: block;
}

.most-read-meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
}

.sticky-sidebar {
    position: sticky;
    top: 100px;
}

/* Header Alignment */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-side {
    flex: 1;
}

.portal-logo {
    height: 65px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .portal-logo {
        height: 100px;
        max-width: 350px;
    }
}

@media (min-width: 1200px) {
    .portal-logo {
        height: 150px;
        max-width: 500px;
    }
}

.header-side-left,
.header-side-right {
    flex: 1;
    min-width: 60px;
}

.navbar-toggler {
    transition: transform 0.2s ease;
}

.navbar-toggler:active {
    transform: scale(0.9);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-collapse {
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    border-bottom: 3px solid transparent;
    border-radius: 8px;
    margin: 2px 0;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #fff;
        padding-bottom: 1rem;
    }

    .navbar-nav .nav-link:hover {
        background-color: #f8f9fa;
        border-bottom-color: transparent;
    }

    .navbar-nav .nav-link.active {
        background-color: #f1f5f9;
        color: var(--brand-color) !important;
        border-bottom-color: transparent;
    }
}

@media (min-width: 992px) {
    .navbar-collapse {
        border-top: none;
    }
}

.border-brand-bottom {
    border-bottom: 3px solid var(--brand-color) !important;
}