/* ========================================
   VARIABLES Y RESET
======================================== */
:root {
    --primary-blue: #1e3a8a;
    --primary-dark: #1e293b;
    --accent-gold: #f59e0b;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ========================================
   UTILIDADES
======================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   BARRA SUPERIOR
======================================== */
.top-bar {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1e40af 100%);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-section i {
    margin-right: 8px;
}

.top-links {
    display: flex;
    gap: 20px;
}

.top-links a {
    color: var(--white);
    transition: opacity 0.3s;
}

.top-links a:hover {
    opacity: 0.8;
}

/* ========================================
   HEADER PRINCIPAL
======================================== */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 30px;
}

/* Logo */
.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon img,
.logo-placeholder {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo-placeholder {
    background: linear-gradient(135deg, var(--primary-blue), #2563eb);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    border-radius: 10px;
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-blue);
}

.logo-text p {
    font-size: 12px;
    color: var(--text-gray);
}

/* Buscador */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 50px;
    padding: 12px 20px;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    color: var(--text-gray);
    margin-right: 10px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

/* Botones Header */
.header-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary,
.btn-primary {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary {
    color: var(--primary-blue);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--bg-light);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), #f97316);
    color: var(--white);
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
}

/* Menú hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
}

.menu-toggle span {
    display: block;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 3px;
    transition: all 0.3s;
}

/* Navegación */
.main-nav {
    border-top: 1px solid var(--border-color);
    padding: 15px 0;
}

.main-nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.main-nav a {
    color: var(--text-gray);
    font-weight: 600;
    font-size: 14px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* ========================================
   CONTENIDO PRINCIPAL
======================================== */
.main-content {
    padding: 40px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* ========================================
   NOTICIA DESTACADA
======================================== */
.featured-article {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

.featured-image {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
}

.category-investigacion { background: #2563eb; }
.category-cultura { background: #ec4899; }
.category-deportes { background: #10b981; }
.category-logros { background: #f59e0b; }
.category-campus { background: #8b5cf6; }

.featured-content {
    padding: 30px;
}

.featured-content h2 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.featured-excerpt {
    font-size: 18px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-gray);
}

.meta-left {
    display: flex;
    gap: 20px;
}

.meta-left span i,
.meta-right i {
    margin-right: 5px;
}

.views {
    color: var(--primary-blue);
    font-weight: 600;
}

/* ========================================
   SECCIÓN DE NOTICIAS
======================================== */
.news-section {
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.accent-bar {
    width: 5px;
    height: 35px;
    background: linear-gradient(to bottom, var(--primary-blue), #2563eb);
    border-radius: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-image .category-badge {
    top: 12px;
    left: 12px;
    font-size: 11px;
    padding: 6px 12px;
}

.news-content {
    padding: 20px;
}

.news-content h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-content p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-gray);
}

.news-footer .views {
    color: var(--primary-blue);
}

/* ========================================
   SIDEBAR
======================================== */
.sidebar-widget {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.sidebar-widget h3 i {
    margin-right: 8px;
    color: var(--primary-blue);
}

/* Widget Eventos */
.widget-eventos {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1e40af 100%);
    color: var(--white);
}

.widget-eventos h3 {
    color: var(--white);
}

.widget-eventos h3 i {
    color: var(--white);
}

.eventos-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.evento-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    transition: background 0.3s;
}

.evento-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.evento-item h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.evento-item p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3px;
}

.evento-item i {
    margin-right: 5px;
    font-size: 12px;
}

/* Widget Recientes */
.recientes-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.reciente-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.reciente-item:last-child {
    border-bottom: none;
}

.reciente-item:hover {
    background: var(--bg-light);
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 6px;
}

.reciente-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 5px;
    line-height: 1.4;
}

.reciente-item .date {
    font-size: 12px;
    color: var(--text-gray);
}

/* Widget CTA */
.widget-cta {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #f97316 100%);
    color: var(--white);
    text-align: center;
}

.widget-cta h3 {
    color: var(--white);
}

.widget-cta p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 15px;
}

.btn-cta {
    background: var(--white);
    color: var(--accent-gold);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-cta:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* ========================================
   FOOTER
======================================== */
.main-footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 50px 0 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-col p {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #9ca3af;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--accent-gold);
}

.contact-info li {
    color: #9ca3af;
    font-size: 14px;
}

.contact-info i {
    margin-right: 10px;
    color: var(--accent-gold);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent-gold);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: #9ca3af;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
        margin-top: 15px;
    }
    
    .header-actions {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
        padding: 0;
        border: none;
    }
    
    .main-nav.active {
        display: block;
        padding: 20px 0;
        background: var(--bg-light);
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-nav a {
        display: block;
        padding: 15px 0;
        border-bottom: none;
    }
    
    .featured-image {
        height: 250px;
    }
    
    .featured-content h2 {
        font-size: 24px;
    }
    
    .featured-excerpt {
        font-size: 16px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 18px;
    }
    
    .logo-text p {
        font-size: 10px;
    }
    
    .featured-content {
        padding: 20px;
    }
    
    .featured-content h2 {
        font-size: 20px;
    }
    
    .section-header h3 {
        font-size: 22px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}