/* ───── GLOBAL ───── */
* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #f8f7f7;
  color: #141414;
}

/* ───── PORTADA ───── */
#portada {
  text-align: center;
  padding: 24px 16px 8px;
}

#imagen-portada {
  width: 50%;
  max-width: 980px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.texto-portada {
  width: min(520px, calc(100% - 32px));
  margin: 18px auto 0;
  background: rgba(255, 255, 255, 0.94);
  color: #163046;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(15,23,42,0.08);
}

/* ───── CALENDARIO ───── */
#calendario {
  padding: 100px;
}

.barra-mes {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.barra-mes button {
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
}

#dias-semana {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
}

#dias-mes {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 4px;
}

#dias-mes div {
  min-height: 60px;
  padding: 6px;
  border-radius: 8px;
  background: white;
  border: 1px solid #ccc;
  text-align: center;
  position: relative;
}

#dias-mes .vacio {
  background: transparent;
  border: none;
}

/* ───── FINES DE SEMANA ───── */
#dias-mes div.sabado { background-color: orange; font-weight: bold; color: black; }
#dias-mes div.domingo { background-color: orange; font-weight: bold; color: black; }

/* ───── FESTIVOS ───── */
#dias-mes div.festivo-nacional { background-color: red !important; color: white !important; }
#dias-mes div.festivo-autonomico { background-color: green !important; color: white !important; }
#dias-mes div.festivo-local {
  background-color: #ffffff !important;
  color: #141414 !important;
  box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.1);
}

#dias-mes div.festivo-local-murcia {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.18),
    inset 0 -4px 0 rgba(14, 40, 118, 0.28);
}
#dias-mes div.dia-sobrante{
  background-color: #ffd500 !important;
  color: #111 !important;
  font-weight: bold;
}

.marca-sobrante {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #5f4700;
  background: rgba(255,255,255,0.38);
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
  z-index: 1;
}
/* Icono info para festivos */
.info-festivo {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 24px;
  height: 24px;
  border: 1px solid #8ea1b5;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #dce9f7 100%);
  color: #0e3b66;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  z-index: 3;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.95),
    inset -1px -1px 0 rgba(73, 101, 130, 0.3),
    0 2px 4px rgba(0,0,0,0.18);
  padding: 0;
  overflow: hidden;
}

.info-festivo.info-festivo-nuevo {
  background: linear-gradient(180deg, #f8c7bb 0%, #e88f79 100%);
  color: #fff;
  border-color: #c67662;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.38),
    inset -1px -1px 0 rgba(123, 50, 32, 0.28),
    0 3px 6px rgba(0,0,0,0.22);
}

.info-festivo.info-festivo-mixto {
  box-shadow:
    0 0 0 2px #f2a08e,
    inset 1px 1px 0 rgba(255,255,255,0.95),
    inset -1px -1px 0 rgba(73, 101, 130, 0.3),
    0 3px 6px rgba(0,0,0,0.22);
}

.info-festivo.info-festivo-local {
  box-shadow:
    0 0 0 2px rgba(252, 225, 201, 0.95),
    inset 1px 1px 0 rgba(255,255,255,0.95),
    inset -1px -1px 0 rgba(73, 101, 130, 0.3),
    0 3px 6px rgba(0,0,0,0.22);
}

/* Prioridad festivos sobre fines de semana */
#dias-mes div.sabado.festivo-nacional,
#dias-mes div.domingo.festivo-nacional { background-color: red !important; color: white !important; }
#dias-mes div.sabado.festivo-autonomico,
#dias-mes div.domingo.festivo-autonomico { background-color: green !important; color: white !important; }
#dias-mes div.sabado.festivo-local,
#dias-mes div.domingo.festivo-local {
  background-color: #ffffff !important;
  color: #141414 !important;
  box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.1);
}

#dias-mes div.sabado.festivo-local-murcia,
#dias-mes div.domingo.festivo-local-murcia {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.18),
    inset 0 -4px 0 rgba(14, 40, 118, 0.28);
}

#dias-mes div.dia-actual {
  border: 4px solid #00f0ff !important;
  font-weight: 800;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.92),
    0 0 8px rgba(0, 240, 255, 0.55);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.96),
    0 0 0 3px rgba(0, 240, 255, 0.55),
    0 0 0 6px rgba(0, 240, 255, 0.22),
    0 0 18px rgba(0, 240, 255, 0.7),
    0 0 28px rgba(0, 240, 255, 0.42) !important;
}

/* ───── BOTONES DE PORTADA ───── */
.botones-portada {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.btn-portada {
  display: block;
  text-decoration: none;
  text-align: center;
  background: #007bff;
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.btn-portada:hover {
  background: #80089e;
}

.btn-portada.whatsapp { background: #25d366; }
.btn-portada.whatsapp:hover { background: #01180a; }

.btn-portada.secundario { background: #6c757d; }
.btn-portada.secundario:hover { background: #8b07ac; }

/* Escritorio */
@media (min-width: 768px) {
  .botones-portada { flex-direction: row; justify-content: center; }
  .btn-portada { min-width: 200px; }
}

/* Móvil */
@media (max-width: 600px) {
  #portada {
  max-height: none;
  overflow: visible;
}

#imagen-portada {
  height: auto;
  max-height: 220px; /* mantiene la imagen contenida sin cortar el texto */
  object-fit: cover;
}

  .texto-portada { width: calc(100% - 12px); margin-top: 14px; padding: 12px 14px; border-radius: 12px; }
  #titulo-organizacion { font-size: 18px; }
  #info-organizacion { font-size: 12px; }
  .btn-portada { font-size: 14px; padding: 10px; }

  #dias-mes div.festivo-local,
  #dias-mes div.sabado.festivo-local,
  #dias-mes div.domingo.festivo-local {
    box-shadow: inset 0 0 0 2px rgba(29, 78, 216, 0.12);
  }

  #dias-mes div.festivo-local-murcia,
  #dias-mes div.sabado.festivo-local-murcia,
  #dias-mes div.domingo.festivo-local-murcia {
    box-shadow:
      inset 0 0 0 2px rgba(255,255,255,0.18),
      inset 0 -5px 0 rgba(14, 40, 118, 0.32);
  }

  .info-festivo.info-festivo-local {
    box-shadow:
      0 0 0 3px rgba(252, 225, 201, 0.98),
      inset 1px 1px 0 rgba(255,255,255,0.95),
      inset -1px -1px 0 rgba(73, 101, 130, 0.3),
      0 4px 8px rgba(0,0,0,0.24);
  }

  .acciones-calendario {
    margin-top: 14px;
  }

  .btn-calculadora,
  .btn-calcular,
  .btn-secundario-calculadora {
    width: 100%;
  }

  .calculadora-contenido {
    padding: 18px;
    border-radius: 18px;
  }

  .calculadora-cabecera h3 {
    font-size: 24px;
  }

  .calculadora-grid,
  .resultado-calculadora {
    grid-template-columns: 1fr;
  }

  .calculadora-botones {
    flex-direction: column;
  }

  #calc-municipio {
    min-height: 180px;
  }

  .calculadora-baja-cabecera {
    flex-direction: column;
  }

  .calculadora-baja-acciones {
    width: 100%;
    flex-direction: column;
  }

  #iframe-bajas {
    height: 820px;
  }

}

/* ───── LEYENDA FESTIVOS ───── */
#leyenda-festivos {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.item-leyenda {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.color.nacional { background: red; }
.color.autonomico { background: green; }
.color.local { background: #1d4ed8; }
.color.dia-actual {
  background: #00f0ff;
  border: 2px solid #066a73;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.9),
    0 0 0 2px rgba(0, 240, 255, 0.28);
}
.color.fin-semana { background: rgb(218, 142, 2); }

/* ───── MARCA DE AGENDA ───── */
.marca-agenda {
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #c04cff 0%, #7c21c4 100%);
  border: 1px solid rgba(255,255,255,0.92);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.4),
    inset -1px -1px 0 rgba(68, 18, 107, 0.35),
    0 3px 8px rgba(0,0,0,0.24);
  font-size: 16px;
  line-height: 1;
  z-index: 2;
  user-select: none;
}




/* ───── CALCULADORA DE DIAS ───── */
.acciones-calendario {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn-calculadora {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  border-radius: 14px;
  padding: 13px 20px;
  background: linear-gradient(180deg, #124d7a 0%, #0a3557 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(10,53,87,0.2);
}

.btn-calculadora-secundaria {
  background: linear-gradient(180deg, #8a4f2b 0%, #64381d 100%);
  box-shadow: 0 12px 24px rgba(100,56,29,0.2);
}

.btn-calculadora-terciaria {
  background: linear-gradient(180deg, #0f9ec5 0%, #0a7fa0 100%);
  box-shadow: 0 12px 24px rgba(10,127,160,0.22);
}

#popup-calculadora {
  position: fixed;
  inset: 0;
  background: rgba(8, 21, 35, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1003;
  padding: 14px;
}

.calculadora-contenido {
  position: relative;
  width: min(760px, calc(100vw - 20px));
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.55);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(242,247,251,0.98) 100%);
  box-shadow: 0 26px 60px rgba(0,0,0,0.28);
}

#cerrar-calculadora {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #5d6975;
  font-size: 26px;
  cursor: pointer;
}

.calculadora-cabecera h3 {
  margin: 0;
  font-size: 28px;
  color: #10273d;
}

.calculadora-cabecera p {
  margin: 8px 0 0;
  color: #5c6c7c;
  line-height: 1.5;
}

.calculadora-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.calculadora-campo,
.calculadora-seccion-municipio {
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #d9e3ec;
  box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}

.calculadora-campo label,
.calculadora-seccion-municipio label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f617c;
}

#popup-calculadora input[type="date"],
#calc-municipio {
  width: 100%;
  border: 1px solid #c8d6e3;
  border-radius: 14px;
  background: #fbfdff;
  color: #16202a;
  font-size: 15px;
}

#popup-calculadora input[type="date"] {
  padding: 12px 14px;
}

#calc-municipio {
  min-height: 220px;
  padding: 8px;
}

#calc-municipio option {
  padding: 10px 12px;
  border-radius: 10px;
}

#popup-calculadora input[type="date"]:focus,
#calc-municipio:focus {
  outline: none;
  border-color: #1599c3;
  box-shadow: 0 0 0 4px rgba(21,153,195,0.16);
}

.calculadora-ayuda {
  margin: 12px 0 0;
  color: #637384;
  font-size: 13px;
  line-height: 1.45;
}

.calculadora-botones {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.btn-calcular,
.btn-secundario-calculadora {
  border: none;
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.btn-calcular {
  background: linear-gradient(180deg, #0f9ec5 0%, #0a7fa0 100%);
  color: #fff;
  box-shadow: 0 12px 20px rgba(10,127,160,0.22);
}

.btn-secundario-calculadora {
  background: #e8eef3;
  color: #283847;
}

.resultado-calculadora {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.resultado-tarjeta {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f8fc 100%);
  border: 1px solid #d9e4ee;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}

.resultado-etiqueta {
  display: block;
  color: #5c6c7c;
  font-size: 13px;
  margin-bottom: 8px;
}

.resultado-tarjeta strong {
  font-size: 34px;
  color: #10273d;
}

.mensaje-calculadora {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7e8;
  color: #845813;
  border: 1px solid #f0d8aa;
}


.calculadora-baja-integrada {
  margin-top: 22px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbfd 0%, #edf4f8 100%);
  border: 1px solid #d7e3ec;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 14px 28px rgba(15,23,42,0.06);
}

.calculadora-baja-cabecera {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.calculadora-baja-cabecera h4 {
  margin: 0;
  font-size: 22px;
  color: #10273d;
}

.calculadora-baja-cabecera p {
  margin: 8px 0 0;
  color: #5c6c7c;
  line-height: 1.45;
}

.calculadora-baja-acciones {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#iframe-bajas {
  width: 100%;
  height: 980px;
  border: 1px solid #ccd8e4;
  border-radius: 18px;
  background: #0f172a;
  box-shadow: 0 18px 36px rgba(15,23,42,0.12);
}

/* ───── POPUP DE FESTIVO ───── */
#popup-festivo {
  position: fixed;
  z-index: 1002;
  background: white;
  padding: 14px 16px 12px;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.22);
  max-width: 320px;
  width: min(320px, calc(100vw - 24px));
  border: 1px solid #d7dee7;
}

#cerrar-popup-festivo {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #5d6975;
  font-size: 22px;
  cursor: pointer;
}

#popup-festivo-contenido {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.popup-festivo-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
}

.popup-festivo-etiqueta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.popup-festivo-etiqueta.nacional { color: #b91c1c; }
.popup-festivo-etiqueta.autonomico { color: #15803d; }
.popup-festivo-etiqueta.local { color: #1d4ed8; }
.popup-festivo-etiqueta.sobrante { color: #8a6a00; }

.popup-festivo-nombre {
  font-size: 14px;
  font-weight: 700;
  color: #17212b;
}

.popup-festivo-municipio {
  font-size: 13px;
  color: #506070;
}

.popup-festivo-item.popup-festivo-item-nuevo {
  border-left: 4px solid #f2a08e;
}

#popup-festivo.oculto {
  display: none !important;
}

#popup-festivo:not(.oculto) {
  display: block;
}


/* ───── POPUP DE AGENDA ───── */
#popup-agenda {
  position: fixed;
  inset: 0;
  background: rgba(9,22,34,0.56);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

#popup-agenda .popup-contenido {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.55);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(244,247,251,0.97) 100%);
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}

#popup-agenda textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 110px;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #c9d6e2;
  background: #fff;
  color: #16202a;
  font-size: 15px;
  line-height: 1.55;
  box-shadow: inset 0 1px 2px rgba(15,23,42,0.06);
}

#popup-agenda textarea:focus,
#popup-agenda input:focus,
#popup-agenda select:focus {
  outline: none;
  border-color: #1599c3;
  box-shadow: 0 0 0 4px rgba(21,153,195,0.16);
}

.agenda-cabecera {
  margin-bottom: 18px;
}

#agenda-fecha {
  margin: 0;
  font-size: 24px;
  color: #0f2133;
}

.agenda-subtitulo {
  margin: 6px 0 0;
  color: #5b6b7b;
  font-size: 14px;
}

.agenda-seccion {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #dbe5ee;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}

.agenda-seccion-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agenda-seccion-personal {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(250,252,255,0.98) 100%);
}

.agenda-etiqueta {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0e5d78;
}

.btn-limpiar-seccion {
  border: 1px solid #d5dde6;
  background: #ffffff;
  color: #4d5f70;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-limpiar-seccion:hover {
  background: #f3f7fb;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(15,23,42,0.08);
}

.agenda-hoja-personal {
  min-height: 180px;
  background:
    repeating-linear-gradient(
      to bottom,
      #ffffff 0,
      #ffffff 29px,
      #d7e6f2 30px
    );
  padding-left: 22px;
}

.agenda-seccion-recordatorio {
  background: linear-gradient(180deg, #f5fbff 0%, #eef7ff 100%);
}

.agenda-campos-recordatorio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 12px;
  align-items: end;
}

.campo-agenda {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campo-agenda label,
.check-recordatorio {
  font-size: 14px;
  color: #314355;
}

.check-recordatorio {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.74);
  border: 1px solid #d5e2ec;
}

#popup-agenda input[type="time"],
#popup-agenda select,
#agenda-archivo {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #c9d6e2;
  background: #fff;
  color: #16202a;
  font-size: 14px;
}

#agenda-archivo {
  margin-top: 12px;
}

.botones-popup {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.botones-popup button {
  min-width: 128px;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#guardar-agenda {
  background: linear-gradient(180deg, #0f9ec5 0%, #0a7fa0 100%);
  color: white;
  box-shadow: 0 10px 20px rgba(10,127,160,0.25);
}

#guardar-agenda:hover,
#cancelar-agenda:hover {
  transform: translateY(-1px);
}

#cancelar-agenda {
  background: #e8eef3;
  color: #263746;
}

#vista-archivos {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #d5e2ec;
  padding: 12px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f9fcff;
  border-radius: 14px;
}

.archivo-item {
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e1e8ef;
  box-shadow: 0 4px 10px rgba(15,23,42,0.05);
}

/* ───── CLASE OCULTO ───── */
.oculto {
  display: none !important;
}
@media (max-width: 600px) {
  #popup-agenda .popup-contenido {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
    padding: 16px;
    border-radius: 18px;
  }

  .agenda-seccion {
    padding: 14px;
  }

  .botones-popup {
    flex-direction: column;
  }

  .botones-popup button {
    width: 100%;
  }
}
#popup-alarma {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#popup-alarma.oculto {
  display: none;
}

.alarma-contenido {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  max-width: 300px;
  animation: parpadeo 1s infinite alternate;
}
#reloj-calendario {
  text-align: center;
  margin-bottom: 10px;
  font-family: inherit;
}
@keyframes parpadeo {
  from { box-shadow: 0 0 10px #a855f7; }
  to   { box-shadow: 0 0 25px #a855f7; }
}

#hora-actual {
  font-size: 30px;
  font-weight: 700;
}

#fecha-actual {
  font-size: 24px;
  font-weight:800;
  opacity: 2.85;
}
#reloj-calendario {
    position: relative;       /* permite mover libremente dentro de la portada */
                  /* ajusta este valor para subir o bajar */
    left: 50%;                /* centra horizontalmente */
    transform: translateX(-50%); /* centrado perfecto */
    background-color: rgba(255, 255, 255, 0.85);
; /* fondo oscuro opcional */
    padding: 15px 25px;       /* espacio interno */
    border-radius: 10px;      /* esquinas redondeadas */
    text-align: center;        /* centra hora y fecha dentro del recuadro */
   color: #0a3d62;
             /* color de texto */
    z-index: 10;              /* asegura que esté arriba de otros elementos */
}

/* Ajusta estilo de hora y fecha */
#hora-actual {
    font-size: 36px;
    font-weight: bold;
}

#fecha-actual {
    font-size: 18px;
    margin-top: 5px;
}
/* ====== DERECHOS LABORALES ====== */

#derechos-laborales {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
}

#derechos-laborales h1 {
  text-align: center;
  margin-bottom: 25px;
}

.bloque-derecho {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 15px;
}
@media (orientation: portrait) {
  #calendario {
    padding: 20px 8px;
  }
}
/* ===== CONTACTO + AFÍLIATE EN PORTADA ===== */
#contacto-portada{
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

#contacto-texto{
  font-size: 12px;
  line-height: 1.25;
}

#contacto-texto a{
  color: #ffffff;            /* dentro de la caja oscura de portada */
  text-decoration: underline;
}

#cta-afiliate{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* “igual de alta que dos renglones”: lo logramos con tamaño + padding */
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  padding: 10px 14px;

  border-radius: 12px;
  text-decoration: none;

  /* morado tirando a rojo, muy llamativo */
  color: #ffffff;
  background: #a21caf;       /* morado-rojizo */
  border: 2px solid rgba(255,255,255,0.35);
}

#cta-afiliate:hover{
  filter: brightness(1.05);
}

/* En pantallas estrechas, apilamos para que no se vea apretado */
@media (max-width: 600px){
  #contacto-portada{
    flex-direction: column;
    gap: 10px;
  }
  #cta-afiliate{
    width: 100%;
    max-width: 240px;
  }
}
/* ===== DÍA SOBRANTE JORNADA ANUAL (amarillo) ===== */
#dias-mes div.dia-sobrante{
  background-color: #ffd500 !important;
  color: #111 !important;
  font-weight: bold;
}

/* Color de la leyenda */
.color.sobrante{
  background: #ffd500;
}
