@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Outfit:wght@400;700;900&display=swap');

.hero-header-top { transition: height 0.3s ease; }
.social-icons a { 
    transition: all 0.3s ease; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.social-icons a:hover { 
    transform: translateY(-3px) scale(1.1); 
    opacity: 1 !important; 
    background: var(--accent); 
    color: #fff !important;
    box-shadow: 0 5px 15px var(--accent);
}
:root {
  --primary: var(--accent, #e53935);
  --bg-light: #f8fafc;
  --bg-dark: #0f172a;
  --card-bg-light: rgba(255, 255, 255, 0.8);
  --card-bg-dark: rgba(30, 41, 59, 0.7);
  --text-light: #1e293b;
  --text-dark: #f1f5f9;
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
  font-family: 'Inter', sans-serif;
  transition: background-color 0.4s ease, color 0.4s ease;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

body.light {
  background-color: var(--bg-light);
  color: var(--text-light);
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

/* Header Premium */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 5%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    padding: 0.5rem 3%;
    justify-content: center;
    gap: 10px;
  }
}

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

.brand h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  margin: 0;
  background: linear-gradient(45deg, var(--primary), #ff7043);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.logo {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.1));
}

@media (max-width: 480px) {
  .brand h1 { font-size: 1.1rem; }
  .logo { height: 30px; }
}

/* Nav */
#main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

@media (max-width: 768px) {
  #main-nav {
    width: 100%;
    justify-content: center;
    order: 3;
    background: rgba(0,0,0,0.05);
    padding: 8px 0;
    border-radius: 8px;
    gap: 1rem;
  }
}

#main-nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.7;
  transition: all 0.3s ease;
  position: relative;
}

#main-nav a:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

#main-nav a:hover, #main-nav a.active {
  opacity: 1;
  color: var(--primary);
}

#main-nav a.active:after {
  width: 100%;
}

/* Content Wrap */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 20px;
}

/* Block Cards (General) */
.video-card, .noticia-item, .video-player-container {
  background: var(--card-bg-light);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

body.dark .video-card, body.dark .noticia-item {
  background: var(--card-bg-dark);
  border-color: rgba(255,255,255,0.05);
}

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

/* Section Titles */
.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 3rem 0 1.5rem;
}

.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  margin: 0;
  font-size: 1.8rem;
  text-transform: capitalize;
}

.section-line {
  flex: 1;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 2px;
  opacity: 0.6;
}

/* Buttons */
.theme-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--glass-border);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--primary);
  color: white;
  transform: rotate(15deg);
}

/* Row & Column System (Builder Phase 7) */
.row-section {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
  width: 100%;
}

.col-item {
  min-width: 0;
}

.custom-grid {
    display: grid !important;
    grid-template-columns: var(--desktop-cols, 1fr 1fr) !important;
    gap: 20px !important;
}

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

@media (max-width: 768px) {
  .row-section {
    grid-template-columns: 1fr !important; /* Stack columns on mobile */
  }
}

/* Custom Grids */
.news-grid-custom {
  display: grid;
  grid-template-columns: var(--desktop-cols, 1fr 1fr 1fr);
  gap: 25px;
  margin-top: 20px;
}
.videos-grid-custom {
  display: grid;
  gap: 20px;
}

.video-card.small {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.video-card.small h6 {
  padding: 10px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  background: rgba(0,0,0,0.8);
  margin: 0;
}

@media (max-width: 992px) {
    .news-grid-custom, .videos-grid-custom {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    }
}

/* Layout Utilities */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Footer Fixes for SPA components */
iframe.wsp {
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
  transition: transform 0.3s ease;
}

iframe.wsp:hover {
  transform: scale(1.05);
}

/* Custom Responsive Grid */
.custom-grid { 
    display: grid; 
    grid-template-columns: var(--desktop-cols); 
    gap: 2rem; 
}

@media (max-width: 992px) {
    .custom-grid { 
        grid-template-columns: 1fr !important; 
        gap: 1.5rem; 
    }
}

/* --- REQUERIMIENTOS ESPECÍFICOS DE LAYOUT --- */
/* 1. Ancho máximo 80% en contenido principal (excepto hero) */
@media (min-width: 900px) {
    header#main-header,
    main#app-content,
    footer.main-footer,
    .page-container {
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* 2. Enlaces sin color azul tradicional, herencia y hover de acento */
a, a:link, a:visited, a:active {
    text-decoration: none !important;
    color: inherit;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--accent) !important;
}

/* 3. Hero Responsive Fino */
@media (max-width: 768px) {
    .hero-header-top { height: 180px !important; padding: 0 5% !important; justify-content: center !important; }
    .hero-header-top img { max-height: 100px !important; }
    
    .programacion-hero { padding: 40px 10px !important; }
    .programacion-hero i { font-size: 2rem !important; }
    .programacion-hero h2 { font-size: 1.5rem !important; }
    
    .contact-form { padding: 20px !important; }
}
