/* =========================
   RESET BÁSICO
========================= */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  color: #333;
  text-align: center;
  margin: 0;
  padding: 0;
}

/* =========================
   HEADER
========================= */
header {
  background-color: #056839;
  color: white;
  padding: 5px 20px;
}

header .escudo {
  max-width: 200px;
  margin: 5px auto;
  display: block;
}

.header-social {
  margin: 6px 0 2px;
}

.header-ig-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.95em;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.header-ig-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* =========================
   MAIN
========================= */
main {
  padding: 20px;
}

.hf-link-externo {
  margin: 10px auto 12px;
  max-width: 600px;
}

.hf-link-externo a {
  display: inline-block;
  background: #fff8e1;
  color: #5d4037;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.95em;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.hf-link-externo a:hover {
  background: #fff3cd;
}

/* =========================
   IFRAME GENERAL
========================= */
iframe {
  max-width: 100%;
  border: 1px solid #ccc;
}

/* =========================
   FOOTER
========================= */
footer {
  background-color: #333;
  color: white;
  padding: 10px;
  font-size: 0.9em;
}

footer a {
  color: #eee;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* =========================
   BIOGRAFÍA
========================= */
.biografia {
  background-color: #ffffff;
  color: #333;
  padding: 20px;
  max-width: 800px;
  margin: 30px auto;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.biografia a {
  color: #056839;
  text-decoration: none;
}

.biografia a:hover {
  text-decoration: underline;
}

.biografia em {
  color: #056839;
  font-style: normal;
  font-weight: bold;
}

/* =========================
   CONTADOR
========================= */
.contador h3 {
  color: #0d511e;
  font-family: "Courier New", monospace;
  margin-bottom: 0;
}

.display {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  display: inline;
}

/* =========================
   PROPAGACIÓN
========================= */
.propagacion {
  margin: 40px auto;
}

.propagacion h2 {
  color: #056839;
  margin-bottom: 15px;
}

.propagacion-img {
  text-align: center;
}

.propagacion-img img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Estado base: móvil vertical */
.img-mobile {
  display: inline;
}

.img-desktop {
  display: none;
}

/* Móvil horizontal */
@media (orientation: landscape) and (max-width: 900px) {
  .img-mobile {
    display: none;
  }

  .img-desktop {
    display: inline;
  }
}

/* Desktop real */
@media (min-width: 901px) {
  .img-mobile {
    display: none;
  }

  .img-desktop {
    display: inline;
  }
}

/* =========================
   DX CLUSTER
========================= */
.dx-cluster {
  margin: 40px auto;
  max-width: 1200px;
}

.dx-cluster h2 {
  color: #056839;
  margin-bottom: 10px;
}

.dx-cluster-subtitulo {
  margin-top: 0;
  margin-bottom: 16px;
  color: #555;
  font-size: 0.95rem;
}

.dx-cluster-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.dx-filter {
  background: #ffffff;
  border: 1px solid #056839;
  color: #056839;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.dx-filter:hover {
  background: #eaf6ef;
}

.dx-filter.active {
  background: #056839;
  color: #ffffff;
}

.dx-cluster-box {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
  padding: 14px;
}

.dx-cluster-status {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: #444;
}

.dx-cluster-table-wrap {
  overflow-x: auto;
}

.dx-cluster-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

.dx-cluster-table th,
.dx-cluster-table td {
  border: 1px solid #dcdcdc;
  padding: 8px 10px;
  text-align: left;
  font-size: 0.93rem;
}

.dx-cluster-table th {
  background: #056839;
  color: #ffffff;
}

.dx-cluster-table tr:nth-child(even) {
  background: #f7f7f7;
}

.dx-cluster-link {
  margin-top: 10px;
  font-size: 0.95rem;
}

.dx-cluster-link a {
  color: #056839;
  text-decoration: none;
}

.dx-cluster-link a:hover {
  text-decoration: underline;
}

/* =========================
   LOGBOOK
========================= */
.logbook {
  margin-top: 40px;
}

.logbook-frame {
  width: 640px;
  max-width: 100%;
  height: 500px;
  border: 1px solid #ccc;
}

/* =========================
   TITULOS GENERALES
========================= */
section h2 {
  font-size: 1.6em;
  letter-spacing: 1px;
}

/* =========================
   RESPONSIVE GENERAL
========================= */
@media (max-width: 767px) {

  /* Header */
  header {
    padding: 10px 14px;
  }
  header h1 {
    font-size: 1.15em;
    letter-spacing: 0;
  }
  header .escudo {
    max-width: 140px;
  }

  /* Main */
  main {
    padding: 10px;
  }

  /* Títulos de sección */
  section h2 {
    font-size: 1.3em;
    letter-spacing: 0;
  }

  /* Biografía */
  .biografia {
    padding: 14px;
    font-size: 0.93rem;
  }

  /* DX Cluster */
  .dx-cluster-box {
    padding: 8px;
  }
  .dx-filter {
    font-size: 0.85rem;
    padding: 6px 9px;
  }
  .dx-cluster-status,
  .dx-cluster-subtitulo,
  .dx-cluster-link {
    font-size: 0.85rem;
  }

  /* DX Cluster tabla: ocultar Banda, DE y Comentario en móvil
     Columnas: 1=Hora 2=Freq 3=Banda 4=DX 5=DE 6=Origen 7=Comentario */
  .dx-cluster-table {
    min-width: 0;
  }
  .dx-cluster-table th:nth-child(3),
  .dx-cluster-table td:nth-child(3),
  .dx-cluster-table th:nth-child(5),
  .dx-cluster-table td:nth-child(5),
  .dx-cluster-table th:nth-child(7),
  .dx-cluster-table td:nth-child(7) {
    display: none;
  }
  .dx-cluster-table th,
  .dx-cluster-table td {
    padding: 6px 7px;
    font-size: 0.82rem;
  }

  /* Contests */
  .contests-filtros {
    gap: 6px;
  }
  .contest-filtro {
    font-size: 0.82rem;
    padding: 5px 9px;
  }
  .contests-table {
    min-width: 0;
  }
  .contest-fecha {
    min-width: 0;
    white-space: normal;
    font-size: 0.78rem;
    width: 42%;
  }
  .contest-nombre {
    font-size: 0.82rem;
  }
  .contests-table th,
  .contests-table td {
    padding: 6px 8px;
  }
  .contests-table-wrap {
    max-height: 320px;
  }

  /* Greyline leyenda */
  .greyline-leyenda {
    padding: 10px 12px;
  }
  .greyline-leyenda-item {
    font-size: 0.8rem;
  }
  .greyline-utc {
    font-size: 0.82rem;
  }

  /* Propagación leyenda */
  .prop-leyenda {
    padding: 12px 12px;
  }
  .prop-leyenda-item {
    font-size: 0.8rem;
  }
  .prop-leyenda-lista li {
    font-size: 0.8rem;
  }
  .prop-leyenda-nota {
    font-size: 0.8rem;
  }

  /* Logbook */
  .logbook-frame {
    height: 380px;
  }
}

.flag {
  font-size: 1.1em;
  margin-right: 6px;
  vertical-align: middle;
}

/* =========================
   CONTESTS
========================= */
.contests {
  margin: 40px auto;
  max-width: 1000px;
}

.contests h2 {
  color: #056839;
  margin-bottom: 10px;
}

.contests-subtitulo {
  margin-top: 0;
  margin-bottom: 14px;
  color: #555;
  font-size: 0.9rem;
}

.contests-subtitulo a {
  color: #056839;
  text-decoration: none;
}

.contests-subtitulo a:hover {
  text-decoration: underline;
}

.contests-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}

.contest-filtro {
  background: #fff;
  border: 1px solid #056839;
  color: #056839;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.contest-filtro:hover { background: #eaf6ef; }
.contest-filtro.active { background: #056839; color: #fff; }

.contests-box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  padding: 14px;
}

.contests-status {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
}

.contests-table-wrap {
  overflow-x: auto;
  max-height: 480px;
  overflow-y: auto;
}

.contests-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.contests-table th {
  background: #056839;
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-size: 0.88rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

.contests-table td {
  border-bottom: 1px solid #eee;
  padding: 7px 12px;
  font-size: 0.88rem;
  text-align: left;
}

.contests-table tr:hover td { background: #f4faf7; }

.contest-sa td { background: #f0faf4; }
.contest-weekly td { color: #888; }

.contest-fecha {
  white-space: nowrap;
  color: #444;
  min-width: 200px;
}

.contest-nombre a {
  color: #056839;
  text-decoration: none;
  font-weight: 500;
}

.contest-nombre a:hover { text-decoration: underline; }

.contests-sa-badge {
  font-size: 0.78rem;
  background: #e6f4ec;
  color: #056839;
  border: 1px solid #b2d9c1;
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: bold;
  vertical-align: middle;
}

.contest-tag-weekly {
  font-size: 0.72rem;
  color: #aaa;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

@media (max-width: 767px) {
  .contests-table-wrap { max-height: 360px; }
  .contest-fecha { min-width: 140px; font-size: 0.82rem; }
}

/* =========================
   LEYENDA PROPAGACIÓN
========================= */
.prop-leyenda {
  margin: 0 auto 40px;
  max-width: 1000px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.07);
  padding: 18px 22px 20px;
  text-align: left;
}

.prop-leyenda-nota {
  font-size: 0.85rem;
  color: #555;
  margin: 0 0 14px;
  border-left: 3px solid #056839;
  padding-left: 10px;
}

.prop-leyenda-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

.prop-leyenda-item {
  font-size: 0.85rem;
  color: #333;
}

.prop-leyenda-titulo {
  font-weight: bold;
  color: #056839;
  margin-bottom: 5px;
  font-size: 0.87rem;
}

.prop-leyenda-cuerpo {
  line-height: 1.5;
}

.prop-leyenda-lista {
  margin: 5px 0 0 0;
  padding-left: 0;
  list-style: none;
}

.prop-leyenda-lista li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 3px;
}

.prop-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
}

.prop-dot.excel { background: #00aa44; }
.prop-dot.good  { background: #88cc00; }
.prop-dot.fair  { background: #ddaa00; }
.prop-dot.poor  { background: #dd2200; }

@media (max-width: 767px) {
  .prop-leyenda-grid {
    grid-template-columns: 1fr;
  }
  .prop-leyenda {
    padding: 14px 16px;
  }
}

/* =========================
   GREYLINE + K-INDEX
========================= */
.greyline-kindex {
  margin: 40px auto;
  max-width: 1100px;
}

.greyline-kindex h2 {
  color: #056839;
  margin-bottom: 10px;
}

.greyline-kindex-subtitulo {
  margin-top: 0;
  margin-bottom: 16px;
  color: #555;
  font-size: 0.95rem;
}

.greyline-kindex-wrap {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}

.greyline-mapa-wrap {
  position: relative;
  flex: 1 1 580px;
  max-width: 900px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.12);
  line-height: 0;
}

.greyline-mapa-img {
  display: block;
  width: 100%;
  height: auto;
}

#greyline-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.greyline-utc {
  margin-top: 10px;
  font-size: 0.92rem;
  color: #555;
  font-family: "Courier New", monospace;
  letter-spacing: 1px;
}

/* K-index overlay sobre el mapa */
.kindex-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 10px;
  padding: 10px 14px 8px;
  text-align: center;
  color: white;
  z-index: 10;
  min-width: 110px;
}

.kindex-overlay-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2px;
}

.kindex-overlay-num {
  font-size: 2.6rem;
  font-weight: bold;
  line-height: 1;
  color: #fff;
  margin-bottom: 5px;
  transition: color 0.4s;
}

.kindex-overlay-barra-wrap {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  height: 5px;
  margin-bottom: 5px;
  overflow: hidden;
}

.kindex-overlay-barra {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: #fff;
  transition: width 0.5s, background 0.5s;
}

.kindex-overlay-status {
  font-size: 0.72rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 3px;
  transition: color 0.4s;
}

.kindex-overlay-updated {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 767px) {
  .greyline-kindex-wrap {
    flex-direction: column;
    align-items: center;
  }

  .greyline-mapa-wrap {
    flex: none;
    width: 100%;
  }

  .kindex-overlay {
    bottom: 8px;
    right: 8px;
    min-width: 95px;
    padding: 8px 10px 6px;
  }

  .kindex-overlay-num {
    font-size: 2rem;
  }
}

/* Leyenda del greyline */
.greyline-leyenda {
  margin: 14px auto 0;
  max-width: 900px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.07);
  padding: 14px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.greyline-leyenda-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #333;
  line-height: 1.45;
}

.gl-icono {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: 1px;
  display: inline-block;
}

.gl-noche {
  background: rgba(0, 10, 40, 0.75);
  border: 1px solid #aaa;
}

.gl-sol {
  background: rgba(255, 210, 0, 0.95);
  border: 1.5px solid rgba(255,255,255,0.5);
  box-shadow: 0 0 4px rgba(255,180,0,0.6);
}

.gl-qth {
  background: rgba(0, 200, 80, 0.95);
  border: 1.5px solid white;
}

.gl-linea {
  background: linear-gradient(to right, rgba(0,10,40,0.7) 50%, rgba(255,255,255,0.3) 50%);
  border: 1px solid #888;
  border-radius: 3px;
  width: 28px;
  height: 14px;
  margin-top: 3px;
}

/* =========================
   APRS
========================= */
.aprs {
  margin: 40px auto;
  max-width: 1000px;
}

.aprs h2 {
  color: #056839;
  margin-bottom: 10px;
}

.aprs-subtitulo {
  margin-top: 0;
  margin-bottom: 16px;
  color: #555;
  font-size: 0.95rem;
}

.aprs-subtitulo a {
  color: #056839;
  text-decoration: none;
}

.aprs-subtitulo a:hover {
  text-decoration: underline;
}

.aprs-box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  padding: 14px;
}

.aprs-status {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 10px;
}

.aprs-error {
  color: #c00;
}

#aprs-map {
  width: 100%;
  height: 380px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}

/* Marcador puntito verde sobre el mapa */
.aprs-dot-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #056839;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,0.45);
}

/* Panel de info debajo del mapa */
.aprs-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 20px;
  text-align: left;
}

.aprs-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aprs-label {
  font-size: 0.72rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.aprs-val {
  font-size: 0.9rem;
  color: #222;
  font-weight: 500;
}

.aprs-path {
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  word-break: break-all;
  font-weight: normal;
}

@media (max-width: 767px) {
  #aprs-map {
    height: 250px;
  }
  .aprs-info-grid {
    grid-template-columns: 1fr 1fr;
  }
  .aprs-box {
    padding: 10px;
  }
}

/* =========================
   HAMFEST CALENDARIO
========================= */

.hamfest {
  max-width: 880px;
  margin: 30px auto;
}

.hamfest h2 {
  color: #056839;
  margin-bottom: 4px;
}

.hamfest-subtitulo {
  color: #555;
  font-size: 0.93em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hamfest-btn-agregar {
  background: #056839;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.9em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.hamfest-btn-agregar:hover { background: #044a28; }

.hamfest-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  padding: 18px 20px 14px;
}

.hamfest-status {
  font-size: 0.82em;
  color: #888;
  margin: 10px 0 0;
  text-align: center;
}

/* ── Navegación de mes ── */

.hf-cal-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}

.hf-cal-mes-label {
  font-size: 1.1em;
  font-weight: bold;
  color: #056839;
  min-width: 200px;
  text-align: center;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.hf-cal-navbtn {
  background: #056839;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 0.9em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.hf-cal-navbtn:hover { background: #044a28; }

/* ── Encabezado días de semana ── */

.hf-cal-semana {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 4px;
}

.hf-cal-semana span {
  text-align: center;
  font-size: 0.72em;
  font-weight: bold;
  color: #999;
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Grilla del calendario ── */

.hf-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}

.hf-cal-day {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #f2f2f2;
  min-height: 58px;
  user-select: none;
}

.hf-cal-empty {
  background: transparent;
}

.hf-cal-num {
  font-size: 1em;
  font-weight: 500;
  color: #444;
  line-height: 1;
}

.hf-cal-pasado .hf-cal-num { color: #ccc; }

.hf-cal-hoy {
  background: #e8f5e9;
  outline: 2px solid #056839;
  outline-offset: -1px;
}
.hf-cal-hoy .hf-cal-num { color: #056839; font-weight: bold; }

/* Día con evento — verde resaltado */
.hf-cal-dia-evento {
  background: #056839;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  box-shadow: 0 2px 5px rgba(5,104,57,0.3);
}
.hf-cal-dia-evento .hf-cal-num {
  color: #fff;
  font-weight: bold;
  font-size: 0.92em;
}
.hf-cal-dia-evento:hover {
  background: #044a28;
  transform: scale(1.1);
  z-index: 2;
}
.hf-cal-dia-evento:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
}

/* Seleccionado (al hacer clic) */
.hf-cal-sel {
  background: #023d1d !important;
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(5,104,57,0.5) !important;
}

/* Punto indicador debajo del número */
.hf-cal-dot {
  width: 5px;
  height: 5px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  margin-top: 2px;
}

/* ── Panel de detalle ── */

.hf-cal-detalle {
  border-top: 2px solid #e0f0e8;
  padding-top: 14px;
  margin-top: 6px;
  animation: hfSlideIn 0.18s ease;
}

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

.hf-detalle-card {
  background: #f9fdf9;
  border: 1px solid #c8e6c9;
  border-left: 5px solid #056839;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  text-align: left;
}

.hf-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.hf-card-club {
  font-size: 1.02em;
  font-weight: bold;
  color: #056839;
}

.hf-card-indicativo {
  background: #056839;
  color: #fff;
  font-size: 0.78em;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 12px;
  font-family: monospace;
}

.hf-card-fecha {
  font-size: 0.9em;
  color: #333;
  font-weight: 500;
  margin-bottom: 3px;
  text-transform: capitalize;
}

.hf-card-lugar {
  font-size: 0.85em;
  color: #555;
  margin-bottom: 2px;
}

.hf-card-dir {
  font-size: 0.85em;
  color: #555;
  margin-bottom: 10px;
}

.hf-card-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}

.hf-btn-mapa,
.hf-btn-web,
.hf-btn-contacto {
  display: inline-block;
  font-size: 0.8em;
  padding: 4px 12px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.2s;
}
.hf-btn-mapa     { background: #e8f5e9; color: #056839; border: 1px solid #a5d6a7; }
.hf-btn-web      { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.hf-btn-contacto { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.hf-btn-aviso    { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; cursor: pointer; font-family: inherit; font-size: 0.82em; }
.hf-card-contacto-texto { font-size: 0.82em; color: #555; display: block; margin-top: 6px; }
.hf-btn-mapa:hover, .hf-btn-web:hover, .hf-btn-contacto:hover, .hf-btn-aviso:hover { opacity: 0.75; }

.hf-card-desc {
  font-size: 0.83em;
  color: #666;
  font-style: italic;
  margin-top: 4px;
}

/* ── Aviso pendiente en el formulario ── */

.hf-aviso-pendiente {
  background: #fffde7;
  border: 1px solid #ffe082;
  border-left: 4px solid #f9a825;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0 0 14px;
  font-size: 0.87em;
  color: #5d4037;
  text-align: left;
  line-height: 1.5;
}

/* ── Modal ── */

.hamfest-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.hamfest-modal-overlay[hidden] { display: none; }

body.modal-abierto { overflow: hidden; }

.hamfest-modal-box {
  background: #fff;
  border-radius: 12px;
  max-width: 640px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 28px 22px;
  position: relative;
  text-align: left;
}

.hamfest-modal-cerrar {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  border: none;
  font-size: 1.3em;
  cursor: pointer;
  color: #888;
  padding: 4px 6px;
  border-radius: 50%;
  line-height: 1;
  transition: background 0.15s;
}
.hamfest-modal-cerrar:hover { background: #f0f0f0; color: #333; }

.hamfest-modal-box h3 {
  color: #056839;
  margin: 0 0 4px;
  font-size: 1.2em;
}

.hamfest-modal-intro {
  font-size: 0.88em;
  color: #777;
  margin: 0 0 18px;
}

/* ── Formulario ── */

.hf-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 14px;
}
.hf-campo-full { grid-column: 1 / -1; }

.hf-campo label {
  display: block;
  font-size: 0.82em;
  font-weight: bold;
  color: #444;
  margin-bottom: 3px;
}
.hf-campo input,
.hf-campo textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.9em;
  color: #333;
  background: #fafafa;
  transition: border-color 0.15s;
  font-family: inherit;
}
.hf-campo input:focus,
.hf-campo textarea:focus { outline: none; border-color: #056839; background: #fff; }
.hf-campo input.hf-error { border-color: #c62828; }

.hf-req { color: #c62828; }

/* ── Captcha ── */

.hf-captcha-box {
  background: #f0f7f0;
  border: 1px dashed #a5d6a7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.hf-captcha-pregunta {
  font-size: 1em;
  font-weight: bold;
  color: #056839;
  margin-bottom: 8px;
}
.hf-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hf-captcha-row label {
  font-size: 0.85em;
  font-weight: bold;
  color: #444;
  white-space: nowrap;
}
.hf-captcha-row input {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 1em;
  width: 75px;
  text-align: center;
}
.hf-captcha-row input:focus { outline: none; border-color: #056839; }

.hf-btn-captcha-refr {
  background: none;
  border: 1px solid #aaa;
  border-radius: 50%;
  width: 28px; height: 28px;
  font-size: 1.1em;
  cursor: pointer;
  color: #555;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background 0.15s;
}
.hf-btn-captcha-refr:hover { background: #e0e0e0; }

/* ── Footer formulario ── */

.hf-form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.hf-msg { font-size: 0.88em; flex: 1; }
.hf-msg-ok    { color: #1b5e20; font-weight: bold; }
.hf-msg-error { color: #b71c1c; font-weight: bold; }

.hf-btn-enviar {
  background: #056839;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 9px 24px;
  font-size: 0.95em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.hf-btn-enviar:hover:not(:disabled) { background: #044a28; }
.hf-btn-enviar:disabled { opacity: 0.6; cursor: default; }

/* ── Responsive ── */

@media (max-width: 600px) {
  .hf-cal-mes-label { min-width: 140px; font-size: 0.95em; }
  .hf-cal-day { min-height: 30px; border-radius: 5px; }
  .hf-cal-num { font-size: 0.78em; }
  .hf-form-grid { grid-template-columns: 1fr; }
  .hf-campo-full { grid-column: 1; }
  .hamfest-modal-box { padding: 20px 14px 16px; }
  .hf-card-acciones { flex-direction: column; align-items: flex-start; }
  .hf-cal-dot { width: 4px; height: 4px; }
}

/* Distintiva del club dentro del día del calendario */
.hf-cal-ind {
  font-size: 0.85em;
  color: rgba(255,255,255,0.92);
  font-weight: bold;
  font-family: monospace;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-top: 2px;
  max-width: 95%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  text-align: center;
}

/* Modal de éxito al enviar HamFest */
.hf-success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: hfFadeIn 0.2s ease;
}
.hf-success-overlay[hidden] { display: none; }

@keyframes hfFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hf-success-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.2);
  padding: 36px 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: hfSlideUp 0.22s ease;
}

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

.hf-success-icono {
  font-size: 3em;
  margin-bottom: 12px;
}

.hf-success-box h3 {
  color: #056839;
  font-size: 1.3em;
  margin-bottom: 12px;
}

.hf-success-box p {
  font-size: 0.95em;
  color: #444;
  line-height: 1.6;
  margin-bottom: 8px;
}

.hf-success-nota {
  font-size: 0.82em !important;
  color: #888 !important;
}

.hf-success-cerrar {
  background: #056839;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 30px;
  font-size: 0.95em;
  font-weight: bold;
  cursor: pointer;
  margin-top: 18px;
  transition: background 0.2s;
}
.hf-success-cerrar:hover { background: #044a28; }
