/* ============================================================
   COLORES GENERALES
============================================================ */
:root {
  --azul: #004aad;
  --azul-oscuro: #003b87;
  --azul-claro: #e9f1ff;
  --blanco: #ffffff;
  --gris-fondo: #f4f6f8;
  --gris-texto: #555;
  --verde: #0a946d;
  --rojo: #d62828;
}

/* ============================================================
   GENERAL
============================================================ */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
  background: var(--gris-fondo);
  color: #002b5b;
}

/* ============================================================
   HEADER
============================================================ */
header {
  background: var(--azul);
  color: white;
  padding: 15px;
  text-align: center;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header h1 {
  margin: 10px 0;
  font-size: 1.6rem;
}

.logo-header {
  width: 90%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0 auto 5px auto;
}

/* ============================================================
   MENU HAMBURGUESA
============================================================ */
.menu-toggle {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--azul-oscuro);
  border: none;
  color: white;
  font-size: 1.7rem;
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: .2s;
}

.menu-toggle:hover {
  background: #022d63;
}

/* ============================================================
   SIDEBAR LATERAL
============================================================ */
.sidebar {
  position: fixed;
  left: -260px;
  top: 0;
  width: 260px;
  height: 100%;
  background: var(--azul-oscuro);
  color: white;
  padding-top: 20px;
  transition: all .3s ease;
  overflow-y: auto;
  z-index: 3000;
}

.sidebar.active {
  left: 0;
}

.titulo-menu {
  padding: 15px;
  font-size: 1.4rem;
  background: rgba(255,255,255,0.1);
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
}

.sidebar a {
  display: block;
  padding: 12px 20px;
  color: white;
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar a:hover {
  background: rgba(255,255,255,0.18);
  padding-left: 25px;
}

.menu-section {
  padding: 10px 20px;
  background: rgba(255,255,255,0.15);
  font-weight: bold;
  margin-top: 15px;
}

/* Overlay oscuro */
.overlay {
  position: fixed;
  display: none;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.4);
  z-index: 2900;
}

.overlay.active {
  display: block;
}

/* ============================================================
   CONTENIDO
============================================================ */
.content {
  padding: 20px;
}

/* ============================================================
   PROGRAMACIONES – GRID DE MINIATURAS
============================================================ */

.prog-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.prog-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  padding: 15px;
  text-align: center;
  transition: .2s;
}

.prog-card:hover {
  transform: scale(1.03);
}

/* Miniatura clickeable */
.prog-thumb img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
}

/* Miniatura PRÓXIMAMENTE */
.prog-thumb-prox {
  width: 100%;
  height: 180px;
  color: #666;
  font-size: 1.1rem;
  font-weight: bold;
  background: #e8e8e8;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.prog-title {
  margin-top: 12px;
  font-weight: bold;
  font-size: 1rem;
  color: var(--azul-oscuro);
}

/* ============================================================
   MODAL PDF
============================================================ */
.modal {
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.8);
  justify-content:center;
  align-items:center;
  z-index:4000;
}

.modal-content {
  background:white;
  width:90%;
  height:90%;
  border-radius:10px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.modal-buttons {
  text-align:right;
  padding:10px;
  background:white;
}

.close-btn {
  background:var(--rojo);
  color:white;
  border:none;
  padding:10px 18px;
  border-radius:7px;
  cursor:pointer;
}

iframe {
  width:100%;
  flex:1;
}

/* ============================================================
   FOOTER
============================================================ */
footer {
  background: var(--azul);
  color: white;
  padding: 20px;
  text-align: center;
  margin-top: 40px;
  font-size: 0.9rem;
}
/* Miniaturas pequeñas como antes */
.prog-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.prog-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: 0.25s;
}

.prog-card:hover {
  transform: scale(1.04);
}

/* MINIATURA REAL */
.prog-thumb img {
  width: 100%;
  height: 150px;
  object-fit: contain;  /* <-- Esto hace que NO SE DEFORME Y SE VEA PEQUEÑO */
  border-radius: 10px;
}

/* PROXIMAMENTE */
.prog-thumb-prox {
  width: 100%;
  height: 150px;
  background: #e6e6e6;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #777;
  font-weight: bold;
}

.prog-title {
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: bold;
  color: #003b87;
}

.img-inicio {
    width: 100%;
    max-width: 520px;   /* 🔥 TAMAÑO IDEAL */
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto 20px auto;  /* Centrada */
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* =======================
   BLOQUE LATERAL INDEX
======================= */
.side-links-box {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.20);
  width: 280px;
  margin-left: 25px;
  height: fit-content;
}

.side-links-box h3 {
  margin-top: 0;
  color: #003b87;
}

.side-links-box a {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 7px 0;
  font-size: 0.95rem;
  text-decoration: none;
  color: #003b87;
}

.side-links-box a:hover {
  text-decoration: underline;
}

/* =======================
   BOTONES GRANDES 
======================= */
.big-btn {
  display: block;
  text-align: center;
  background: #004aad;
  color: white;
  padding: 15px;
  border-radius: 12px;
  font-size: 1.1rem;
  margin: 12px 0;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: 0.2s;
}

.big-btn:hover {
  background: #003b87;
  transform: scale(1.03);
}

/* =======================
   MAQUETACIÓN INDEX
======================= */
.index-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.index-left {
  flex: 1;
}

.after-text-buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center; /* Centrado */
}

.big-btn-index {
    display: block;
    width: 90%;
    max-width: 350px;
    padding: 12px 20px;
    background: #004aad;
    color: white;
    font-weight: bold;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    transition: 0.25s;
}

.big-btn-index:hover {
    transform: scale(1.04);
    background: #003b87;
}

/* LAYOUT PRINCIPAL CON MENÚ A LA DERECHA */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 280px; /* Izquierda / Derecha */
    gap: 20px;
    align-items: start;
}

/* MENÚ LATERAL A LA DERECHA */
.right-side-menu {
    background: #ffffff;
    padding: 15px 18px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.20);
    border-left: 4px solid #004aad;
    position: sticky;
    top: 20px;
}

.right-side-menu h3 {
    margin-top: 0;
    color: #003b87;
}

.right-side-menu a {
    display: block;
    padding: 8px 4px;
    color: #004aad;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid #e5e5e5;
}

.right-side-menu a:hover {
    text-decoration: underline;
}

/* === GRID GENERAL === */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* === TARJETA === */
.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    overflow: hidden;
    text-align: center;
    transition: 0.25s;
    position: relative;
    cursor: pointer;
}

/* Efecto hover */
.card:hover {
    transform: translateY(-5px);
}

/* Imagen del logo */
.card img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    padding: 10px;
    background: #f7f9fc;
}

/* Overlay de texto */
.overlay-card {
    padding: 15px;
    background: white;
}

.overlay-card p {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #003b87;
}

/* Botoncitos */
.overlay-card a {
    display: inline-block;
    background: #004aad;
    color: white;
    padding: 8px 12px;
    margin: 5px 3px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: 0.2s;
}

.overlay-card a:hover {
    background: #002b5b;
}



