/* === Webfonts === */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../webfonts/PlusJakartaSans-VariableFont_wght.ttf")
    format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../webfonts/PlusJakartaSans-Italic-VariableFont_wght.ttf")
    format("truetype");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "PPNeueCorp";
  src: url("../webfonts/PPNeueCorp-NormalUltralight.otf") format("opentype");
  font-style: normal;
  font-weight: 200;
  font-display: swap;
}
@font-face {
  font-family: "PPNeueCorp";
  src: url("../webfonts/PPNeueCorp-NormalMedium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "PPNeueCorp";
  src: url("../webfonts/PPNeueCorp-NormalUltrabold.otf") format("opentype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

/* === Theme variables === */
:root {
  --main-color: #232323;
  --secondary-color: #31b8f0;
  --input-height: 60px;
  --title-font: "PPNeueCorp";
  --main-font: "Plus Jakarta Sans";
}

/* === Base === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--main-font);
}
html,
body {
  height: 100%;
  width: 100%;
  position: relative;
}
body {
  font-family: var(--main-font), sans-serif;
    background: #f2f2f2
}
.grecaptcha-badge {
  visibility: hidden;
}

/* === Header === */
header {
  background: #fff;
  padding-bottom: 0.5em;
  padding-top: 0.5em;
}
.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.5rem;
  flex-wrap: wrap;
}
.logo {
  width: 150px;
  display: block;
}
.social-icons {
  display: none;
  align-items: center;
  gap: 1.2rem;
  margin-left: auto;
}
.social-icons img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
@media (max-width: 576px) {
  .header-flex {
    justify-content: center;
    row-gap: 0.5rem;
  }
}

/* Results header layout (body.results) */
.results header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
@media (min-width: 992px) {
  .results header {
    flex-direction: row;
  }
}

/* === Hero / form section === */
.form-sec {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
  padding: 2em 0 2em 0;
}
.form-sec::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: var(--secondary-color);
  background-size: 100% auto;
}
.form-sec::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6em;
  z-index: -1;
  background: #f2f2f2;
}
.form-sec .alert {
  margin: 10px 0 0;
  z-index: 10;
}

/* Optional background modifier present in post-form */
.caja {
  flex: 0;
}

/* Container width helpers */
.container .content {
  position: relative;
}
@media (min-width: 550px) {
  .container .content {
    width: 470px;
    padding: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
  }
}
@media (min-width: 992px) {
  .container .content {
    width: 100%;
    max-width: 1000px;
    padding: 0;
    margin: 0 auto;
  }
}

/* === Footer === */
.site-footer {
  background: #ffffff;
  padding: 1.5em 0;
}
.site-footer .footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer .logo {
  width: 150px;
  display: block;
}
.site-footer .social-icons {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-left: auto;
}
.site-footer .social-icons img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  /* filter: invert(1); */
}
@media (max-width: 576px) {
    /* Centra los items de la tarjeta de dirección */
  .seccion_address .item {
    align-items: center;          /* antes: flex-start */
    text-align: center;
  }

  /* Centra específicamente las etiquetas y sus íconos */
  .seccion_address .item .label {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;      /* centra el texto + icono */
    text-align: center;
  }

  /* Asegura que el valor quede centrado también */
  .seccion_address .item .value, .seccion_address .item .mesa_orden {
      width: 100%;
      align-items: center;          /* antes: flex-start */
      text-align: center;
  }


  .site-footer .footer-flex {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .site-footer .logo {
    margin: 0 auto;
  }
  .site-footer .social-icons {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}
@media (min-width: 1200px) {
    .seccion_address .item .value {
        text-align: left;
    }
  .container .content {
    width: 100%;
    max-width: 960px;
    padding: 0;
    margin: 0 auto;
  }
  .container {
    max-width: 960px;
  }
}

/* Title block */
#subtitle {
  display: block;
  margin: 0 auto 1em;
}
#subtitle h1 {
  color: #fff;
  font-size: 2.8em;
  font-weight: 800;
  text-align: center;
  font-family: var(--title-font);
  line-height: 1em;
}
#subtitle h5 {
  font-family: var(--main-font);
}
@media (min-width: 992px) {
  #subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Intro text */
.form-sec p {
  color: #fff;
  text-align: center;
  margin: 0 0 1.5em;
  font-size: 1.2em;
  line-height: 1.2em;
  font-weight: 300;
}
.form-sec p span {
  text-decoration: underline;
  font-weight: 300;
}

/* Custom CTA above results */
.customMessage {
  display: block;
  width: 100%;
  margin: 0 auto;
  position: relative;
  top: -40px;
  text-align: center;
  border: 2px solid #b54053;
  background: #fff;
  border-radius: 1rem;
  padding: 1em 2em;
}
.customMessage a {
  background: #1ca245;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.4em 1.2em;
  color: #fff;
  font-weight: 700;
}
.customMessage a img {
  height: 20px;
}

/* Two-block wrapper (title + form) */
.desktop-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.desktop-layout .text-column,
.desktop-layout .form-column {
  width: 100%;
}

.text-column p {
  font-family: var(--main-font);
}

/* === Main form === */
.form-sec form {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  margin: 0 auto 2em;
  background: #fff;
  padding: 1em;
  width: 85%;
}
.form-sec form .btn.btn-primary {
  background: var(--main-color);
  color: #fff;
  border: none;
  align-self: center;
  padding: 0.5em 1em;
  font-size: 1.2em;
  margin-top: 0;
  width: 100%;
  height: var(--input-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--title-font);
  font-weight: 700;
}
.form-sec form .btn.btn-primary:active {
  box-shadow: none;
}
.form-sec form .btn.btn-primary img {
  height: 1.6em;
  margin-left: 0.5em;
}
.form-sec form .btn.btn-primary.btn-resultados {
  font-size: 17px;
}

/* DNI container */
.container-dni {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 0 1em;
  border: 1px solid #999;
}
.container-dni fieldset span {
  display: block;
  font-size: 0.8em;
  margin: 0.25em 0 0;
  color: #999;
  padding: 0;
  font-family: var(--title-font);
}
.container-dni input {
  color: #555;
  flex: 1 1 auto;
  font-size: 24px;
  font-weight: 700;
  padding: 0.5em 0;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  margin: 0;
  font-family: var(--title-font);
}
.container-dni input:focus {
  outline: 0;
  box-shadow: none;
}
/* Autofill colors */
.container-dni input:-webkit-autofill,
.container-dni input:-webkit-autofill:hover,
.container-dni input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #000 inset;
  transition: background-color 5000s ease-in-out 0s;
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  -webkit-text-fill-color: var(--main-color) !important;
}
.container-dni input::placeholder {
  color: #bbb;
}

/* Gender radios (optional) */
.radio-group {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}
.custom-radio {
  position: relative;
  padding-left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.custom-radio input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}
.radio-btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 20px;
  background: #f7f7f7;
  border-radius: 50%;
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.3);
}
.radio-group label {
  margin-bottom: 0;
}
.custom-radio input:checked ~ .radio-btn {
  border-color: var(--secondary-color);
}
.custom-radio input:checked ~ .radio-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary-color);
  transform: translate(-50%, -50%);
}

/* Share block (mobile-first) */
.share_mobile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.share_mobile h4 {
  color: black;
  font-weight: 700;
  font-family: var(--title-font);
}
.share_mobile .redes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding-bottom: 1rem;
}
.share_mobile .redes a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 1em 1.2em;
  flex: 1;
  color: #fff;
  background: var(--main-color);
  box-shadow: rgba(149, 157, 165, 0.2) 0 8px 24px;
}
.share_mobile .redes a img {
  height: 20px;
}

/* Candidates banner */
.candidatos {
  margin: 0 0.5em 2em;
}
.candidatos .container {
  padding-left: 0;
  padding-right: 0;
}
.candidatos img {
  width: 100%;
  margin: 0 auto;
  border: 5px solid white;
}

/* Mobile: imagen cuadrada max 315x265px */
.banner-mobile {
  display: block;
  max-width: 315px;
  max-height: 265px;
  margin: 0 auto;
}

/* Desktop: imagen horizontal max 750x100px */
.banner-desktop {
  display: none;
  max-width: 750px;
  max-height: 100px;
  margin: 0 auto;
}

/* YouTube video container - Responsive 16:9 aspect ratio */
.video-block {
  width: 100%;
  max-width: 100%;
}
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Result header name */
.form-sec .name {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.form-sec .name h3 {
  font-size: 2.3em;
  color: #fff;
  font-weight: 800;
  margin: 0;
  line-height: 1.1em;
  font-family: var(--title-font);
  text-align: center;
}
.separator {
  border-bottom: 1px solid #fff;
  width: 100%;
  margin: 0 auto;
}
/* Override separators inside address card for mobile */
.seccion_address .separator {
  border-bottom: 1px solid #ddd;
  width: 100%;
  margin: 0.5em 0;
}
.form-sec h5 {
  text-align: center;
  font-size: 1.05em;
  color: #fff;
  line-height: 1;
  margin: 1em 0 0.9em;
  font-weight: 200;
}

/* Sección/Circuito (summary bar) */
.seccion_circuito {
  display: flex;
  justify-content: space-around;
  background-color: var(--main-color);
  width: 50%;
  min-width: 18em;
  margin: 0 auto;
  padding: 0.5em;
}
.seccion_circuito .item {
  display: flex;
  flex-direction: column;
  color: #fff;
  font-size: 0.9em;
}
.seccion_circuito .item .label {
  text-align: center;
  font-weight: 400;
}
.seccion_circuito .item .label img {
  height: 1.8em;
  margin: 0.5em;
}
.seccion_circuito .item .value {
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  line-height: 0.8em;
  color: #fff;
}

/* Address card */
.seccion_address {
  padding: 2em;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 1em;
}
.seccion_address .item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #333;
  font-size: 0.9em;
  gap: 0.2em;
}
.seccion_address .item .label {
  font-weight: 400;
  background: transparent;
  color: #bbb;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.seccion_address .item .label span {
  display: inline-block;
  font-size: 1em;
}
.seccion_address .item .value {
  color: #333;
  font-size: 1.2em;
  font-weight: 700;
}
.seccion_address .item.mesa_orden {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
}
.seccion_address .item.mesa_orden > div {
  display: flex;
  flex-direction: column;
  width: 50%;
  text-transform: uppercase;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.mesa_orden .mesa .value,
.mesa_orden .order .value {
  font-size: 1.7em;
  font-weight: 800;
}

/* Info DNI tag (post-form) */
#infodni {
  position: relative;
  display: inline-block;
  margin-top: 0em;
  padding: 0.5em;
  margin-bottom: 1em;
  text-align: center;
  font-size: 1.3em;
  font-weight: 900;
  color: white;
}
#infodni::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* Share options (post-form) */
.form-sec .share_options {
  width: 100%;
  display: contents;
}
.form-sec .share_options select {
  width: 100%;
}
#send_type,
.inputs_switch input.form-control {
  height: var(--input-height);
}
#pushEmailForm .btn {
  height: var(--input-height);
}

/* Icons for seccion_address labels */
.seccion_address .item.title .label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("../images/icon-establecimiento.svg") no-repeat center/contain;
}
.seccion_address .item.address .label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("../images/icon-direccion.svg") no-repeat center/contain;
}
.seccion_address .mesa .label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("../images/icon-informacion.svg") no-repeat center/contain;
}
.seccion_address .order .label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("../images/icon-orden.svg") no-repeat center/contain;
}

@media (min-width: 550px) {
  .share_mobile .redes {
    flex-direction: row;
  }
  .banner-desktop {
    display: block;
  }
  .banner-mobile {
    display: none;
  }
}

/* === Desktop enhancements (>=992px) === */
@media (min-width: 992px) {
  .banner-desktop {
    display: block;
  }
  .banner-mobile {
    display: none;
  }

  .social-icons {
    display: flex;
  }
  .header-flex {
    justify-content: center;
  }

  /* Keep layout in a single centered column on desktop */
  .desktop-layout {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .desktop-layout .text-column,
  .desktop-layout .form-column {
    margin-right: 0;
    width: 100%;
  }

  /* Put DNI + Consultar on one row */
  .form-sec form {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-auto-rows: auto;
    gap: 12px;
    align-items: center;
  }
  .form-sec form .container-dni {
    grid-column: 1;
    grid-row: 1;
    height: var(--input-height);
  }
  .form-sec form .btn.btn-primary {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    margin-top: 0;
    white-space: nowrap;
    padding: 0.5em 3.5em;
    font-size: 1.3em;
    font-weight: 700;
  }
  .form-sec form .btn.btn-primary.btn-resultados {
    font-size: 20px;
  }

  /* Make the blue background end earlier on desktop for a stronger effect */
  .form-sec::after {
    height: 6em;
  }

  /* Desktop: equalize DNI control height to match button */
  .container-dni fieldset {
    width: 100%;
  }
  .container-dni fieldset span {
    display: none;
  }
  .container-dni input {
    height: 100%;
    padding: 0;
  }

  /* Results card (post-form): 4 columns in one row */
  .seccion_address {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.6fr 0.6fr;
    gap: 1em;
    align-items: start;
  }
  .seccion_address .separator {
    display: none;
  }
  .seccion_address .item.title {
    grid-column: 1;
  }
  .seccion_address .item.address {
    grid-column: 2;
  }
  .seccion_address .item.mesa_orden {
    display: contents;
  }
  .seccion_address .mesa,
  .seccion_address .order {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.2em;
  }
  .seccion_address .mesa {
    grid-column: 3;
  }
  .seccion_address .order {
    grid-column: 4;
  }
  .seccion_address .mesa .value,
  .seccion_address .order .value {
    color: #333;
    font-size: 2.3em;
    text-align: left;
  }
  /* Vertical separators between columns */
  .seccion_address .item.address,
  .seccion_address .mesa,
  .seccion_address .order {
    border-left: 1px solid #ccc;
    padding-left: 1.5em;
    font-weight: 800;
  }

  /* Share options row (post-form): select + input + button */
  #pushEmailForm {
    display: grid;
    grid-template-columns: 1fr 1.2fr auto;
    gap: 12px;
    align-items: center;
    padding: 1.5em;
  }
  #pushEmailForm .share_options {
    display: contents;
  }
  #pushEmailForm .text-center {
    grid-column: 3;
    text-align: right;
  }
  #pushEmailForm .btn.btn-primary {
    grid-column: 3;
    width: auto;
    white-space: nowrap;
    padding: 0.5em 2em;
  }
}

body.landing {
  background-color: var(--secondary-color);
  font-size: 20px;
}

#landingMessage {
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* centra verticalmente */
  align-items: center;
  /* centra horizontalmente */
  text-align: center;

  /* ocupa todo el alto visible */
  height: 50vh;
  /* ocupa todo el alto visible */
  font-family: "PPNeueCorp";

  box-sizing: border-box;

  /* añade aire para que texto e imagen no peguen al borde */
  padding: 2.5rem 1.2rem;
  overflow: hidden;
  /* evita que el pequeño rounding cause scroll */

  gap: 2rem;
  font-size: 2.2rem;
}

#landingMessage p {
  margin: 0;
  /* elimina margen que empujaba el alto */
}
