/**
 * Hero Carrusel - Estilos específicos
 * @package IslaNoticias
 */

/* ============================================ */
/* CONTENEDOR PRINCIPAL                         */
/* ============================================ */

.hero-carousel-container {
    position: relative;
    margin-bottom: 2rem;
}

/* ============================================ */
/* HEADER DEL CARRUSEL                          */
/* ============================================ */

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.hero-section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-section-title i {
    color: var(--color-primary);
    font-size: 1.25rem;
}

.view-all-news {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary);
    transition: color 0.3s ease;
    text-decoration: none;
}

.view-all-news:hover {
    color: var(--color-primary-dark);
}

/* ============================================ */
/* ESTRUCTURA DEL CARRUSEL - FLEX CORREGIDO     */
/* ============================================ */

.hero-carousel {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Carrusel principal - 70% del ancho */
.hero-carousel-main {
    flex: 1;
    min-width: 0;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.hero-carousel-track {
    position: relative;
    width: 100%;
}

.hero-carousel-slide {
    display: none;
    width: 100%;
}

.hero-carousel-slide.active {
    display: block;
}

.hero-main-inner {
    width: 100%;
}

/* ============================================ */
/* IMAGEN Y TEXTO SUPERPUESTO                   */
/* ============================================ */

.hero-image-container {
    position: relative;
    width: 100%;
}

.hero-image {
    width: 100%;
    display: block;
}

.hero-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

/* Contenido superpuesto sobre la imagen */
.hero-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
}

/* Tag de categoría sobre la imagen */
.hero-tag {
    margin-bottom: 0.75rem;
}

.breaking-badge {
    background: var(--color-secondary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* Título sobre la imagen */
.hero-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.hero-title a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-title a:hover {
    color: var(--color-primary);
}

/* Extracto sobre la imagen */
.hero-excerpt {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Meta sobre la imagen */
.hero-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.hero-meta i {
    margin-right: 0.25rem;
}

.hero-meta a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.hero-meta a:hover {
    color: white;
}

/* ============================================ */
/* SIDEBAR - 30% del ancho                      */
/* ============================================ */

.hero-carousel-sidebar {
    width: 30%;
    flex-shrink: 0;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.sidebar-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h3 i {
    color: var(--color-primary);
}

.sidebar-news-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ============================================ */
/* ITEMS DEL SIDEBAR                            */
/* ============================================ */

.sidebar-news-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin: -0.5rem;
}

.sidebar-news-item:hover {
    background: var(--color-gray-light);
}

.sidebar-news-item.active {
    background: rgba(0, 86, 179, 0.1);
    border-left: 3px solid var(--color-primary);
    padding-left: calc(0.5rem - 3px);
}

.sidebar-news-item.active .rank-number {
    background: var(--color-primary);
    color: white;
}

.sidebar-news-content {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

/* Número de posición */
.sidebar-news-rank {
    flex-shrink: 0;
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-gray-light);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-gray);
    transition: all 0.3s ease;
}

/* Miniatura */
.sidebar-news-thumbnail {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-gray-light);
}

.sidebar-news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.sidebar-news-item:hover .sidebar-news-thumbnail img {
    transform: scale(1.05);
}

/* Texto */
.sidebar-news-text {
    flex: 1;
}

.sidebar-news-text h4 {
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0 0 0.25rem;
}

.sidebar-news-text h4 a {
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-news-text h4 a:hover {
    color: var(--color-primary);
}

.sidebar-news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--color-gray);
}

.sidebar-news-meta i {
    font-size: 0.65rem;
}

/* ============================================ */
/* CONTROLES DE NAVEGACIÓN - FLECHAS VISIBLES   */
/* ============================================ */

.hero-carousel-main {
    position: relative;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover {
    background: var(--color-primary);
    transform: translateY(-50%) scale(1.05);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* Asegurar que las flechas sean visibles */
.carousel-nav i {
    font-size: 1.25rem;
    pointer-events: none;
}

/* ============================================ */
/* TEXTO DEL EXTRACTO EN BLANCO                 */
/* ============================================ */

.hero-excerpt {
    color: #ffffff !important;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Asegurar que el texto del extracto sea blanco puro */
.hero-excerpt p,
.hero-excerpt span,
.hero-excerpt strong,
.hero-excerpt em {
    color: #ffffff !important;
}

/* ============================================ */
/* META INFORMACIÓN EN BLANCO                   */
/* ============================================ */

.hero-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8) !important;
}

.hero-meta i {
    margin-right: 0.25rem;
    color: rgba(255, 255, 255, 0.7);
}

.hero-meta span {
    color: rgba(255, 255, 255, 0.8) !important;
}

.hero-meta a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.hero-meta a:hover {
    color: white;
}

/* ============================================ */
/* TÍTULO EN BLANCO                             */
/* ============================================ */

.hero-title a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-title a:hover {
    color: var(--color-primary) !important;
}

/* ============================================ */
/* PLACEHOLDER                                  */
/* ============================================ */

.hero-placeholder {
    background: var(--color-gray-light);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    color: var(--color-gray);
}

.hero-placeholder a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */

@media (max-width: 992px) {
    .hero-carousel {
        flex-direction: column;
    }
    
    .hero-carousel-sidebar {
        width: 100%;
    }
    
    .hero-overlay-content {
        padding: 1.5rem 1rem 1rem;
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .hero-excerpt {
        font-size: 0.8125rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .carousel-nav {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .sidebar-news-thumbnail {
        width: 55px;
        height: 55px;
    }
    
    .rank-number {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .hero-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}