/* ============================================================
   MAIN.CSS — Theme Dark Netflix Unificado
   HAGO Noticias — I.E. Héctor Abad Gómez
   Desarrollo: Ing. Víctor Cañola
   ============================================================ */

/* ── Variables ── */
:root {
    --bg-primary:    #041B2D;
    --bg-secondary:  #0A1628;
    --bg-card:       rgba(255,255,255,0.04);
    --bg-glass:      rgba(255,255,255,0.06);
    --border:        rgba(255,255,255,0.06);
    --primary:       #e50914;
    --accent:        #4fc3f7;
    --accent-dim:    rgba(79,195,247,0.15);
    --success:       #2ecc71;
    --warning:       #f39c12;
    --text:          #ffffff;
    --text-secondary:rgba(255,255,255,0.7);
    --text-muted:    rgba(255,255,255,0.45);
    --radius:        12px;
    --radius-sm:     8px;
    --shadow:        0 8px 32px rgba(0,0,0,0.3);
    --transition:    all 0.3s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #81d4fa; }

img { max-width: 100%; height: auto; }

/* ── HEADER ── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(4,27,45,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 36px;
    width: auto;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-desktop {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text);
    background: var(--bg-glass);
}

.nav-link i { font-size: 0.8rem; }

/* ── MOBILE MENU ── */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(4,27,45,0.98);
    backdrop-filter: blur(20px);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    z-index: 99;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.mobile-menu a:hover {
    background: var(--bg-glass);
    color: var(--text);
}

@media (max-width: 768px) {
    .nav-desktop { display: none; }
    .mobile-toggle { display: block; }
}

/* ── HERO ── */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 6rem 1.5rem 4rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    background: var(--accent-dim);
    border: 1px solid rgba(79,195,247,0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 30%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #ff1a25;
    box-shadow: 0 4px 20px rgba(229,9,20,0.4);
    color: #fff;
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--accent);
    color: #000;
}

.btn-accent:hover {
    background: #81d4fa;
    color: #000;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg-glass);
    color: var(--text);
}

/* ── SECTIONS ── */
.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i { color: var(--accent); }

/* ── GLASS CARDS ── */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(79,195,247,0.15);
}

/* ── EDITION CARDS ── */
.editions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.edition-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.edition-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.edition-thumb {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary), #0f1f3a);
}

.edition-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.edition-card:hover .edition-thumb img {
    transform: scale(1.05);
}

.edition-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.edition-card:hover .edition-overlay { opacity: 1; }

.edition-info {
    padding: 0.75rem 1rem;
}

.edition-number {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--accent-dim);
    border: 1px solid rgba(79,195,247,0.2);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.edition-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.edition-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.edition-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem 0.75rem;
}

.edition-actions .btn { flex: 1; justify-content: center; font-size: 0.75rem; padding: 0.5rem; }

/* ── FEATURED EDITION ── */
.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 3rem;
}

.featured-image {
    aspect-ratio: 2/3;
    max-height: 400px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.featured-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.featured-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-image { max-height: 300px; }
}

/* ── SEARCH & FILTERS ── */
.search-bar {
    position: relative;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    font-size: 0.8rem;
}

.search-clear.visible { display: block; }

.filter-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip:hover { border-color: var(--accent); color: var(--accent); }

.filter-chip.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

/* ── CAMPUS MEDIA CARDS ── */
.campus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.campus-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    text-align: center;
}

.campus-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(79,195,247,0.15);
}

.campus-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.campus-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.campus-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ── VIDEO CARDS ── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(229,9,20,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .play-icon { opacity: 1; }

.video-info {
    padding: 0.75rem 1rem;
}

.video-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── PODCAST / TRACKS ── */
.tracks-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.track-item:hover {
    background: var(--bg-glass);
    border-color: rgba(79,195,247,0.15);
}

.track-item.active {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.track-number {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

.track-info { flex: 1; }

.track-title {
    font-size: 0.85rem;
    font-weight: 500;
}

.track-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.track-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.track-actions {
    display: flex;
    gap: 0.5rem;
}

/* ── AUDIO PLAYER ── */
.audio-player {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    position: sticky;
    bottom: 1rem;
    z-index: 50;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.player-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(229,9,20,0.4);
}

.player-btn.secondary {
    background: var(--bg-glass);
    border: 1px solid var(--border);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s;
}

/* ── FOOTER ── */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links h4,
.footer-social h4 {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.footer-links a {
    display: block;
    padding: 0.3rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── STATS COUNTERS ── */
.stats-bar {
    display: flex;
    gap: 2rem;
    justify-content: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── PDF VIEWER MODAL ── */
.pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.9);
    display: none;
    flex-direction: column;
}

.pdf-modal.open { display: flex; }

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.5);
    border-bottom: 1px solid var(--border);
}

.pdf-modal-header h3 {
    font-size: 0.9rem;
    font-weight: 500;
}

.pdf-modal-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
}

.pdf-modal-body {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-modal-body iframe,
.pdf-modal-body canvas {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── LOADING ── */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    gap: 0.5rem;
}

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .hero { min-height: 60vh; padding: 5rem 1rem 3rem; }
    .hero h1 { font-size: 1.8rem; }
    .section { padding: 2rem 1rem; }
    .editions-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .stats-bar { flex-wrap: wrap; gap: 1rem; }
    .stat-item { min-width: 80px; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-social { justify-content: center; }
}
