/* ==============================================
   Variables CSS - Colores y configuración global
   ============================================== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ==============================================
   Reset y estilos base
   ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* ==============================================
   Container y utilidades
   ============================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
}

/* ==============================================
   Header - Cabecera fija
   ============================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0.75rem 0;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.5rem 0;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-image {
    height: 80px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo-image {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 50px;
    }
}

/* Navegación */
.nav-list {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    position: relative;
    transition: var(--transition);
    border-radius: 30px;
    background-color: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.15) rotate(5deg);
}

.nav-link.active i {
    transform: scale(1.1);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 30px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
    transform: translateY(-2px);
}

.nav-link:hover::after {
    width: 70%;
}

.nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
    position: relative;
}

.nav-link.active::before {
    opacity: 1;
}

.nav-link.active::after {
    display: none;
}

/* Efecto de brillo en hover */
.nav-link:hover::before {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
    opacity: 1;
}

/* Animación de pulso sutil para el enlace activo */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.5);
    }
}

.nav-link.active {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Menú móvil toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ==============================================
   Main content
   ============================================== */
.main {
    margin-top: 80px;
}

/* ==============================================
   Hero / Banner principal
   ============================================== */
.hero {
    position: relative;
    height: 420px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-image--contain {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #000;
}

.hero-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.hero-content {
    position: absolute;
    bottom: 80px;
    left: 20px;
    max-width: 700px;
    color: white;
    z-index: 10;
    animation: fadeInUp 0.8s ease;
}

.hero-category {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

/* Controles del slider */
.hero-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 1rem;
    z-index: 20;
}

.hero-prev,
.hero-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.hero-prev:hover,
.hero-next:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot.active {
    background-color: white;
    width: 30px;
    border-radius: 6px;
}

/* ==============================================
   Botones
   ============================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==============================================
   Secciones
   ============================================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0 auto;
    border-radius: 2px;
}

/* ==============================================
   Noticias destacadas
   ============================================== */
.featured-news {
    padding-bottom: 4rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.news-card {
    background-color: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.news-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.news-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
    transition: transform 0.5s ease;
}

.news-modal-media video {
    object-fit: contain;
    background: #000;
}
.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-card:hover .news-image video {
    transform: scale(1.05);
}

.news-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.4rem 1rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.news-date i {
    margin-right: 0.25rem;
}

/* ==============================================
   Últimas noticias
   ============================================== */
.latest-news {
    background-color: var(--bg-primary);
    padding-bottom: 4rem;
}

.latest-news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.latest-news-item {
    display: flex;
    gap: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    cursor: pointer;
}

.latest-news-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.latest-news-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    background-color: rgba(37, 99, 235, 0.05);
}

.latest-news-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.latest-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-news-content {
    padding: 1rem 1rem 1rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.latest-news-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.latest-news-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.latest-news-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.latest-news-date i {
    margin-right: 0.25rem;
}

/* ==============================================
   Footer
   ============================================== */
.footer {
    background-color: var(--bg-dark);
    color: #9ca3af;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.footer-section {
    text-align: center;
    max-width: 600px;
}

.footer-logo {
    justify-content: center;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo .logo-image {
    height: 120px;
    width: auto;
    object-fit: contain;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==============================================
   Animaciones
   ============================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* ==============================================
   Responsive Design - Mobile First
   ============================================== */

/* Tablets */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-primary);
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 999;
        overflow-y: auto;
    }

    .nav.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-link {
        display: flex;
        padding: 1rem 1.5rem;
        width: 100%;
        border-radius: 12px;
        margin-bottom: 0.5rem;
        justify-content: flex-start;
    }

    .nav-link i {
        margin-right: 0.75rem;
        font-size: 1.1rem;
    }

    .nav-link span {
        font-size: 1rem;
    }

    .menu-toggle {
        display: flex;
        order: 3;
        z-index: 1001;
        min-width: 44px;
        min-height: 44px;
        padding: 0.75rem;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .search-container {
        order: 2;
    }

    .search-toggle {
        width: 44px;
        height: 44px;
        font-size: 0.9rem;
        min-width: 44px;
        min-height: 44px;
    }

    .hero {
        height: 450px;
    }

    .hero-content {
        bottom: 50px;
        left: 15px;
        right: 15px;
    }

    .hero-title {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .hero-excerpt {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .latest-news-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-card {
        margin: 0;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .main {
        margin-top: 70px;
    }

    .hero {
        height: 350px;
    }

    .hero-content {
        bottom: 30px;
        left: 15px;
        right: 15px;
        max-width: 100%;
    }

    .hero-category {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 0.5rem;
    }

    .hero-title {
        font-size: 1.3rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    .hero-excerpt {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-controls {
        bottom: 10px;
        right: 10px;
        gap: 0.5rem;
    }

    .hero-prev,
    .hero-next {
        width: 44px;
        height: 44px;
        font-size: 0.9rem;
        min-width: 44px;
        min-height: 44px;
    }

    .hero-dots {
        bottom: 10px;
        gap: 0.4rem;
    }

    .hero-dot {
        width: 8px;
        height: 8px;
    }

    .section-header {
        padding-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .news-grid {
        gap: 1rem;
    }

    .news-card {
        margin: 0;
        border-radius: 12px;
    }

    .news-image {
        height: 200px;
    }

    .news-content {
        padding: 1rem;
    }

    .news-title {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    .news-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .latest-news-item {
        flex-direction: column;
        border-radius: 12px;
        overflow: hidden;
    }

    .latest-news-image {
        width: 100%;
        height: 180px;
    }

    .latest-news-content {
        padding: 1rem;
    }

    .latest-news-title {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }

    .latest-news-meta {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-logo .logo-image {
        height: 80px;
        margin: 0 auto;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1rem;
        font-size: 0.85rem;
    }
}

/* ==============================================
   Utilidades adicionales
   ============================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Mejora de accesibilidad */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Scroll suave para navegadores que no lo soporten */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==============================================
   MEJORAS ADICIONALES
   ============================================== */

/* ==============================================
   1. Sistema de Búsqueda
   ============================================== */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-toggle:hover {
    background-color: var(--primary-color);
    color: white;
}

.search-box {
    position: absolute;
    top: 120%;
    right: 0;
    width: 350px;
    background-color: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    padding: 1rem;
    display: none;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    animation: slideDown 0.3s ease;
    z-index: 1001;
}

.search-box.active {
    display: flex;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-close {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-close:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

.search-results {
    position: absolute;
    top: calc(120% + 70px);
    right: 0;
    width: 400px;
    max-height: 500px;
    overflow-y: auto;
    background-color: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    display: none;
    z-index: 1001;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background-color: var(--bg-secondary);
    padding-left: 1.5rem;
}

.search-result-item:active {
    background-color: rgba(37, 99, 235, 0.1);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.search-result-excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================================
   2. Botones de Compartir
   ============================================== */
.news-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.share-buttons {
    position: relative;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.share-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.share-menu {
    position: absolute;
    bottom: 120%;
    right: 0;
    background-color: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    display: none;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 10;
}

.share-menu.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.share-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: white;
}

.share-option[data-share="facebook"] {
    background-color: #1877f2;
}

.share-option[data-share="twitter"] {
    background-color: #1da1f2;
}

.share-option[data-share="whatsapp"] {
    background-color: #25d366;
}

.share-option[data-share="copy"] {
    background-color: var(--text-secondary);
}

.share-option:hover {
    transform: scale(1.15);
}

/* ==============================================
   3. Modal de Noticias
   ============================================== */
.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.news-modal.active {
    display: flex;
}

.news-modal-content {
    background-color: white;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.news-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-modal-close:hover {
    background-color: var(--primary-color);
    transform: rotate(90deg);
}

.news-modal-header {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.news-modal-media {
    width: 100%;
    height: 100%;
    background: #000;
}

.news-modal-media img,
.news-modal-media video,
.news-modal-media iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    display: block;
}

.news-modal-media video {
    object-fit: contain;
    background: #000;
}

.news-modal--video .news-modal-header {
    height: auto;
}

.news-modal--video .news-modal-media {
    aspect-ratio: 9 / 16;
    max-height: 70vh;
}

.news-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-modal-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.news-modal-body {
    padding: 2rem;
}

.news-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-modal-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg-secondary);
}

.news-modal-date {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.news-modal-date i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.news-modal-text {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.news-modal-text p {
    margin-bottom: 1.2rem;
}

/* ==============================================
   4. Lightbox para Galería de Imágenes
   ============================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-caption {
    text-align: center;
    color: white;
    padding: 1rem;
    font-size: 1.1rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.lightbox-next {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.gallery-trigger {
    cursor: pointer;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==============================================
   5. Skeleton Loader (Pantalla de carga)
   ============================================== */
.skeleton-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.skeleton-loader.hide {
    opacity: 0;
    pointer-events: none;
}

.skeleton-header {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.skeleton-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-logo {
    width: 200px;
    height: 40px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-nav {
    display: flex;
    gap: 2rem;
}

.skeleton-nav-item {
    width: 80px;
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-hero {
    width: 100%;
    height: 500px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 3rem;
}

.skeleton-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.skeleton-card {
    height: 400px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 16px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ==============================================
   6. Efecto Parallax en Hero
   ============================================== */
.hero.parallax .hero-image {
    transition: transform 0.1s ease-out;
}

/* ==============================================
   Responsive adicional para nuevas funciones
   ============================================== */
@media (max-width: 768px) {
    .search-box {
        width: calc(100vw - 40px);
        max-width: 400px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }

    .search-results {
        width: calc(100vw - 40px);
        max-width: 400px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }

    .search-input {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }

    .search-result-item {
        padding: 0.875rem;
    }

    .search-result-title {
        font-size: 0.9rem;
    }

    .search-result-excerpt {
        font-size: 0.85rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-close {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .skeleton-nav {
        display: none;
    }

    .news-modal-content {
        margin: 0.5rem;
        max-height: 98vh;
        border-radius: 12px;
    }

    .news-modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .news-modal-header {
        height: 200px;
    }

    .news-modal-body {
        padding: 1.25rem;
    }

    .news-modal-title {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .news-modal-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .news-modal-text {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .news-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .share-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .share-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .search-box {
        width: calc(100vw - 30px);
        left: 15px;
        right: auto;
        transform: none;
    }

    .search-results {
        width: calc(100vw - 30px);
        left: 15px;
        right: auto;
        transform: none;
        max-height: 60vh;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 0.7rem 0.9rem;
    }

    .search-close {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .search-result-item {
        padding: 0.75rem;
    }

    .search-result-title {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .search-result-excerpt {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .news-modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }

    .news-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .news-modal-header {
        height: 180px;
    }

    .news-modal-body {
        padding: 1rem;
    }

    .news-modal-title {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .news-modal-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .news-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .share-buttons {
        flex-direction: column;
        width: 100%;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1rem;
    }

    .share-menu {
        bottom: auto;
        top: 120%;
        right: 0;
        left: 0;
        width: 100%;
    }

    .lightbox-content {
        padding: 0.5rem;
    }

    .lightbox-image {
        max-height: 85vh;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
}
/* Mejora visual para tarjeta destacada */
.news-card--featured {
    max-width: 1000px;            /* hace la tarjeta más ancha en pantallas grandes */
    margin: 0 auto;               /* centra la tarjeta */
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
}

/* Imagen: altura mayor, recorte con object-fit */
.news-card--featured .news-image {
    position: relative;
    height: 340px; /* ajusta a 280-380 según prefieras */
    overflow: hidden;
}

.news-card--featured .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* mantiene el encuadre y recorta correctamente */
    transform-origin: center;
    transition: transform 0.6s ease;
}

/* ligero zoom on hover */
.news-card--featured:hover .news-image img {
    transform: scale(1.06);
}

/* Degradado sobre la imagen para mejorar contraste */
.news-card--featured .image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.18) 50%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

/* Badge más visible y con sombra */
.news-card--featured .news-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background-color: rgba(37,99,235,0.95);
    color: #fff;
    padding: 0.45rem 0.85rem;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(37,99,235,0.18);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    z-index: 3;
}

/* Contenido */
.news-card--featured .news-content {
    padding: 2rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.98));
}

/* Tipografía */
.news-card--featured .news-title {
    font-size: 1.45rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.news-card--featured .news-excerpt {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* Footer area: fecha + acciones alineadas */
.news-card--featured .news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

/* Botón primario estilo grande */
.news-card--featured .btn-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    color: #fff;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(37,99,235,0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.news-card--featured .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37,99,235,0.18);
}

/* Share buttons (compact, no invaden layout) */
.news-card--featured .share-buttons.small {
    position: relative;
}

.news-card--featured .share-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(16,24,40,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.news-card--featured .share-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(16,24,40,0.08);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.news-card--featured .share-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Responsive: reducir altura imagen y espaciado en móviles */
@media (max-width: 768px) {
    .news-card--featured {
        margin: 0 0.5rem;
        border-radius: 12px;
    }
    .news-card--featured .news-image {
        height: 240px;
    }
    .news-card--featured .news-content {
        padding: 1.25rem;
    }
    .news-card--featured .news-title {
        font-size: 1.15rem;
    }
}
