/* OGGUN - Estilos Completos v2.2 */
/* Incluye estilos originales + correcciones para noticias */

:root {
    --color-primary: #1a365d;
    --color-secondary: #2c5282;
    --color-accent: #38a169;
    --color-accent-light: #48bb78;
    --color-dark: #0d1b2a;
    --color-dark-light: #1a202c;
    --color-light: #f7fafc;
    --color-gray: #4a5568;
    --color-gray-light: #a0aec0;
    --color-border: #e2e8f0;
    --primary-color: #1a365d;
    --secondary-color: #2c5282;
    --accent-color: #38a169;
    --accent-light: #48bb78;
    --dark: #0d1b2a;
    --dark-light: #1a202c;
    --light: #f7fafc;
    --gray: #4a5568;
    --gray-light: #a0aec0;
    --border-color: #e2e8f0;
    --card-bg: white;
    --bg-secondary: #f7fafc;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--color-dark);
    background: var(--color-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.25rem;
}

.logo-text {
    color: white;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

.nav-cta {
    background: var(--color-accent);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    color: white !important;
}

.nav-cta:hover {
    background: var(--color-accent-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: white;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--color-dark);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
}

/* ===== PAGE HEADER ===== */
.page-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 100%);
    color: white;
    text-align: center;
}

.page-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.section-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-desc {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .page-header {
        padding: 6rem 0 3rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-desc {
        font-size: 1rem;
    }
}

/* ===== FILTROS ===== */
.noticias-filtros {
    padding: 2rem 0;
    background: var(--color-light);
    border-bottom: 1px solid var(--color-border);
}

.filtros-wrapper {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filtro-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-gray);
    cursor: pointer;
    transition: var(--transition);
}

.filtro-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.filtro-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* ===== NOTICIAS GRID ===== */
.noticias-grid-section {
    padding: 3rem 0;
    background: var(--color-light);
    min-height: 50vh;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

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

/* ===== NOTICIA CARD ===== */
.noticias-fecha-header {
    grid-column: 1 / -1;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.noticias-fecha-header:first-child {
    margin-top: 0;
}

.noticias-fecha-header h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    text-transform: capitalize;
}

.noticia-grid-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.noticia-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.noticia-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.noticia-categoria {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cat-ciberseguridad { background: #fed7d7; color: #c53030; }
.cat-vulnerabilidades { background: #feebc8; color: #c05621; }
.cat-ransomware { background: #e9d8fd; color: #6b46c1; }
.cat-backup { background: #c6f6d5; color: #276749; }
.cat-cloud { background: #bee3f8; color: #2c5282; }
.cat-vpn { background: #d6f5d6; color: #276749; }
.cat-redes { background: #e2e8f0; color: #4a5568; }

.noticia-idioma-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    color: var(--text-secondary);
}

.noticia-grid-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.noticia-grid-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.noticia-grid-title a:hover {
    color: var(--accent-color);
}

.noticia-grid-intro {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.noticia-grid-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.noticia-fuente {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.noticia-fuente a {
    color: var(--accent-color);
    text-decoration: none;
}

.btn-leer-mas {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-leer-mas:hover {
    background: var(--secondary-color);
}

/* ===== MODAL ===== */
.noticia-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.noticia-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    z-index: 1001;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.modal-title {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.modal-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.modal-meta a {
    color: var(--accent-color);
    text-decoration: none;
}

.modal-content-text {
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.modal-content-text p {
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-light);
}

.noticias-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-contact h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ===== UTILIDADES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
