:root {
  --primaryFont: "Inter", sans-serif;
  --principalColor: #0052d4;
  --segColor: #00497e;
  --naranjColor: #ef7e04;
  --verColor: #008251;
  --grisColor: darkgray;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style-type: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--primaryFont);
  margin: 0;
  padding: 0;
  width: 100%;
}

.log {
  background-image: linear-gradient(
    175deg,
    #d6fbff 0,
    #a5d9f4 25%,
    #6cb4d8 50%,
    #1d90bd 75%,
    #0052d4 100%
  );
  background-size: cover;
  font-family: var(--primaryFont);
  margin: 0;
  padding: 1vh;
  position: relative;
}

.log-in-bttn {
  background-color: var(--verColor);
  font-family: var(--primaryFont);
  border: #c9e1f6;
  margin: 0;
  padding: 2vh;
  color: #ffffff;
  border-radius: 40px;
  font-size: 3vh;
}

.login-s {
  color: var(--segColor);
  text-align: center;
  padding: 8vh;
  position: center;
}

.login-s h2 {
  color: #ffffff;
  font-size: 4.5vh;
}

.log-in {
  color: var(--grisColor);
  border-radius: 40px;
  border-color: #c9e1f6;
  padding: 3vh;
  width: 75%;
  height: 75%;
  margin-bottom: 5vh;
  font-size: 30px;
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.loader-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem 3rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: loaderFadeIn 0.3s ease;
}

.loader-card p {
  margin: 1rem 0 0 0;
  color: #334155;
  font-weight: 500;
  font-size: 0.95rem;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--principalColor, #0052d4);
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loaderFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.header,
.header-f {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0052d4 0%, #4364f7 50%, #6fb1fc 100%);
  border-radius: 0 0 20px 20px;
  position: relative;
  padding-bottom: 0;
  height: auto;
  min-height: auto;
  box-shadow: 0 4px 20px rgba(0, 82, 212, 0.15);
}

/* Fila superior con logo y partners */
.header-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(0.75rem, 2vw, 1.25rem) clamp(1rem, 3vw, 2rem);
  gap: clamp(0.5rem, 2vw, 1rem);
}

.logo {
  width: auto;
  height: auto;
  margin: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
}

.logo img {
  width: clamp(70px, 18vw, 140px);
  height: auto;
  object-fit: contain;
}

/* Logos de partners inline con logo principal */
.header-partners {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  flex-wrap: nowrap;
}

.titulo {
  width: 90%;
  height: auto;
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  margin: 1rem auto 0 auto;
  text-align: center;
}

.title {
  color: aliceblue;
  font-family: var(--primaryFont);
  font-size: clamp(16px, 5vw, 32px);
  font-weight: 600;
}

.redondo,
.redondo-f {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 1rem 1rem 1rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

.segundos {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: default;
  transition: all 0.3s ease;
}

.segundos:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.segundos i {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.segundos h5 {
  margin: 0;
  font-weight: 600;
}

.segundos h2 {
  font-family: var(--primaryFont);
  margin: 0;
  font-weight: 700;
}

.segundos h4 {
  margin: 0;
  text-align: center;
  font-weight: 600;
}

.cardp {
  display: flex;
  justify-content: center;
  width: 100%;
}

.cards {
  background-color: #0052d4;
  background-image: linear-gradient(to left, #4364f7, #6fb1fc);
  width: clamp(250px, 90%, 600px);
  height: auto;
  padding: 1rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-radius: 20px;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card1 {
  width: 20%;
  height: auto;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card1 img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.formulario {
  margin-top: 2rem;
  color: var(--principalColor);
  padding: 0 1rem;
  max-width: 100%;
}

.formulario h2 {
  color: #ef7e04;
  letter-spacing: 0.05em;
  animation-name: animacion-letras;
  animation-duration: 2s;
  animation-delay: 0.5s;
  animation-fill-mode: forwards;
  position: relative;
  display: block;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: clamp(20px, 6vw, 30px);
  text-align: center;
}

.formulario h2:hover {
  font-size: clamp(22px, 6.5vw, 35px);
}

/* Estilos para inputs y selects responsivos */
.form-control,
.form-select {
  font-size: clamp(14px, 4vw, 16px);
  padding: 0.75rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--principalColor);
  box-shadow: 0 0 0 0.2rem rgba(0, 82, 212, 0.25);
}

.label-control {
  font-size: clamp(12px, 3.5vw, 14px);
  font-weight: 600;
  color: var(--principalColor);
  margin-bottom: 0.5rem;
  display: block;
}

.div-button {
  margin: 1.5rem 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 1rem;
}

.bttn {
  padding: 0.75rem 2rem;
  background-color: var(--verColor);
  color: #ffffff;
  font-size: clamp(14px, 4vw, 18px);
  border-radius: 25px;
  width: auto;
  min-width: 140px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.bttn:hover {
  background-color: var(--principalColor);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.bttn:active {
  transform: translateY(0);
}

.acepto {
  width: auto;
  height: auto;
  margin: 0.5rem 0;
  text-decoration: none;
  background-color: transparent;
  cursor: pointer;
}

@keyframes animacion-letras {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(5px);
  }
}

.formu {
  padding: 20px;
}

.formu input:hover {
  background-color: #c9e1f6;
}

.formu select:hover {
  background-color: #b3dbfe;
}

.formu #prima_a {
  color: #00497e;
  font-size: 30px;
  text-align: center;
}

/**********fin formu*********/

/******footer para todos*****/

/*****inicio footer moderno*****/

.footer {
  margin-top: auto;
  width: 100%;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-top: 1px solid #e2e8f0;
  padding: 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-social-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--principalColor);
}

.social-links {
  display: flex;
  gap: 0.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.social-links a:hover {
  background: var(--principalColor);
  color: #fff;
  border-color: var(--principalColor);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 82, 212, 0.25);
}

.social-links i {
  font-size: 0.9rem;
}

/* Backward compat: old footer classes */
.footer .social-section {
  width: 100%;
  text-align: center;
}

.social-section h3,
.social-section p {
  font-size: clamp(12px, 3vw, 16px);
  font-weight: 700;
  color: var(--principalColor);
  margin-bottom: 1rem;
}

/*****fin footer moderno*****/

/**fin de footer para todos**/

/***** header formu******/

.seg {
  width: auto;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 1 auto;
}

.seg img {
  width: clamp(60px, 20vw, 120px);
  height: auto;
  object-fit: contain;
}

.fi {
  width: auto;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 1 auto;
}

.fi img {
  width: clamp(60px, 20vw, 120px);
  height: auto;
  object-fit: contain;
}

.titul {
  margin: 0;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  font-family: var(--primaryFont);
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/**** fin de header formu******/

/******formulario registro********/

.formulario_reg {
  width: auto;
  height: auto;
  margin-top: 2vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#basicForm {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.btnPersona {
  background-color: var(--principalColor);
  padding: 1%;
  width: 40%;
  height: 15vh;
  padding-top: 2.5vh;
  text-align: center;
  border-radius: 20%;
  color: #ffffff;
  font-size: 2.5vh;
  border: none;
  text-decoration-line: none;
}

.formulario_reg .btnPersona .icon {
  height: 200px;
  width: 200px;
  font-size: 80px;
  background-color: #008251;
}

.formulario_reg .btnPersona:hover {
  z-index: 1;
  transform: scale(1.09);
  background-color: #0052d4;
  background-image: linear-gradient(to left, #4364f7, #6fb1fc);
  border: none;
}

.formulario_reg h2 {
  color: #ffffff;
  font-family: var(--primaryFont);
}

.formulario_reg #basicForm i {
  color: #ffffff;
  font-size: 40px;
  padding: 15px;
}

.formulario_reg h4 {
  color: #ffffff;
}

#basicForm h2 {
  color: #ffffff;
}

#formContainer {
  margin: 8vh;
  width: 70%;
  background-color: #ffcb7c;
  /* For browsers that do not support gradients */
  background-image: linear-gradient(180deg, #ffb542, #ffcb7c);
  padding: 10px;
  border-radius: 5px;
  text-decoration: none;
  border-radius: 15px;
}

/******fin formulario registro********/

/***********inicio formulario personales****/

.formContainer {
  margin-top: 1vh;
  display: flex;
  justify-content: center;
}

.formContainerFidelio {
  margin: 8vh;
  background-color: #ffb542;
  /* For browsers that do not support gradients */
  padding: 5px 10px;
  border-radius: 5px;
  text-decoration: none;
  color: #ffffff;
  font-size: 1.9vh;
  width: 60vh;
}

.formContainerFidelio h4 {
  font-size: 2.5vh;
}

.formContainerFidelio .elementoFidelio {
  display: flex;
  flex-direction: column;
}

.formContainerFidelio .form-control {
  color: var(--grisColor);
  font-size: 2.5vh;
  text-transform: uppercase;
}

.formContainerFidelio .form-controlcorreo {
  color: var(--grisColor);
  font-size: 2.5vh;
  width: 100%;
  margin-bottom: 2vh;
  border-radius: 10px;
  border: none;
}

.formContainerFidelio select {
  color: var(--grisColor);
  font-size: 2.5vh;
  width: 100%;
}

/*Espacio para firma*/

#canvasContainer {
  border: 2px dashed var(--principalColor);
  background-color: #ffffff;
  width: 100%;
  max-width: 100%;
  height: clamp(150px, 40vh, 250px);
  overflow: hidden;
  touch-action: none;
  border-radius: 8px;
  cursor: crosshair;
  margin-bottom: 0.75rem;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  background-color: white;
  cursor: crosshair;
}

/*Fin de Espacio para firma*/

/***********fin formulario personales****/

/********* Cargar documentos file********/

/*********fin file******/

/* Estilos para dispositivos moviles CON TECLADO */

/* ====================== */
/* RESPONSIVE DESIGN */
/* ====================== */

/* Mobile First - Extra Small Devices (< 576px) */
@media (max-width: 575px) {
  body {
    font-size: 14px;
  }

  .header,
  .header-f {
    border-radius: 0 0 16px 16px;
  }

  .header-top {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .header-partners {
    align-self: center;
  }

  .redondo,
  .redondo-f {
    padding: 0 0.75rem 0.75rem 0.75rem;
  }

  .segundos {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
  }

  .cards {
    width: clamp(250px, 95%, 600px);
  }

  .formulario {
    padding: 0 0.75rem;
  }

  .row > [class*="col-"] {
    padding: 0.25rem;
  }

  .mb-3 {
    margin-bottom: 1rem !important;
  }

  .form-control,
  .form-select {
    font-size: 16px; /* Prevenir zoom en iOS */
  }

  .div-button {
    flex-direction: column;
  }

  .bttn {
    width: 100%;
    min-width: auto;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-social {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Small Devices (≥ 576px) */
@media (min-width: 576px) {
  .formulario {
    padding: 0 1.5rem;
  }
}

/* Tablets (≥ 768px) */
@media (min-width: 768px) {
  .formulario {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .div-button {
    flex-direction: row;
    justify-content: center;
  }

  .bttn {
    width: auto;
  }
}

/* Desktop (≥ 992px) */
@media (min-width: 992px) {
  .formulario {
    max-width: 1000px;
  }
}

/* Mobile First - Extra Small Devices (< 576px) */
@media (max-width: 575px) {
  body {
    font-size: 14px;
  }

  .header,
  .header-f {
    border-radius: 0 0 16px 16px;
  }

  .header-top {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .header-partners {
    align-self: center;
  }

  .logo img {
    width: clamp(60px, 16vw, 100px);
  }

  .seg img,
  .fi img {
    width: clamp(50px, 18vw, 80px);
  }

  .cards {
    width: clamp(250px, 95%, 600px);
  }

  .formulario {
    padding: 0 0.75rem;
  }

  .row > [class*="col-"] {
    padding: 0.25rem;
  }

  .mb-3 {
    margin-bottom: 1rem !important;
  }

  .form-control,
  .form-select {
    font-size: 16px; /* Prevenir zoom en iOS */
  }

  .div-button {
    flex-direction: column;
  }

  .bttn {
    width: 100%;
    min-width: auto;
  }

  .detalle,
  .formu {
    width: 100%;
  }
  #basicForm .col-md-6 {
    flex-basis: 100%;
    margin-right: 0;
  }
  .formContainerFidelio {
    margin: 1rem 0;
  }
  .formContainerFidelio h4 {
    font-size: clamp(14px, 4vw, 18px);
  }
  .formContainerFidelio input {
    font-size: 16px;
  }
}

/* Small Devices (≥ 576px) */
@media (min-width: 576px) {
  .formulario {
    padding: 0 1.5rem;
  }
}

/* Tablets (≥ 768px) */
@media (min-width: 768px) {
  .header-top {
    padding: 1rem 1.5rem;
  }

  .logo img {
    width: clamp(80px, 18vw, 140px);
  }

  .header-partners {
    gap: clamp(1rem, 3vw, 2rem);
  }

  .seg img,
  .fi img {
    width: clamp(70px, 18vw, 120px);
  }

  .formulario {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .div-button {
    flex-direction: row;
    justify-content: center;
  }

  .bttn {
    width: auto;
  }

  .col-md-4 {
    flex: 0 0 auto !important;
    width: auto !important;
  }
}

/* Landscape Orientation */
@media (orientation: landscape) {
  .header,
  .header-f {
    min-height: auto;
  }

  .header-top {
    padding: 0.5rem 1rem;
  }

  .logo img {
    width: clamp(50px, 14vw, 100px);
  }

  .seg img,
  .fi img {
    width: clamp(45px, 14vw, 80px);
  }
}

/**fin dispositivos moviles****/

/*--------- Loading animation - Truck --------*/

/********************************************/
