:root {
  --color-primary: rgb(23, 66, 122);
  --color-primary-dark: #0f2c52;
  --color-accent: #ff9f43;
  --color-gold: #d4af37;
  --color-bg: #f5f7fb;
  --color-text: #2b2f38;
  --color-text-light: #6b7280;
  --shadow-soft: 0 10px 30px rgba(15, 44, 82, 0.1);
  --shadow-strong: 0 20px 45px rgba(15, 44, 82, 0.18);
  --radius: 14px;
}

* {
  /*aquí se le quitan todas las configuraciones del navegador para
    comenzar a trabajar las propias, una limpieza de configuraciones*/
  margin: 0;
  border: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: "Poppins", "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

main {
  flex: 1;
}

header {
  position: relative;
  height: 16em;
  padding: 3em 5em;
  background-image: linear-gradient(
      135deg,
      rgba(23, 66, 122, 0.88),
      rgba(15, 44, 82, 0.8)
    ),
    url(../img/tech.jpg);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.header {
  height: 22em;
}

.logo {
  margin: 0 auto 0.8em;
  width: 120px;
  padding: 0.6em;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-strong);
  background: rgba(255, 255, 255, 0.12);
}

header .title {
  margin: 0;
  color: #ffffff;
  margin-bottom: 0.3em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

header h1.title {
  font-size: 2.4em;
  font-weight: 700;
  letter-spacing: 0.5px;
}

header h2.title {
  font-size: 1.1em;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}

.navegacion {
  background: var(--color-primary-dark);
  text-align: right;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0 2em;
}

.navegacion ul {
  list-style: none;
}

.menu > li {
  display: inline-block;
  position: relative;
  padding: 0;
}
.menu > li > a {
  display: block;
  padding: 1em 1.1em;
  color: #fff;
  font-family: "Poppins", "Open sans";
  font-weight: 400;
  text-decoration: none;
  position: relative;
  transition: color 0.25s ease;
}

.menu > li > a::after {
  content: "";
  position: absolute;
  left: 1.1em;
  right: 1.1em;
  bottom: 0.6em;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.menu > li > a:hover {
  background: transparent;
  color: var(--color-accent);
}

.menu > li > a:hover::after {
  transform: scaleX(1);
}

.welcome {
  width: 70%;
  max-width: 900px;
  margin: -3em auto 3em;
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.5em 2em;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
}
.welcome h2 {
  font-size: 2em;
  color: var(--color-primary);
  font-weight: 700;
}
.welcome h2 + h2 {
  font-size: 1.2em;
  color: var(--color-text-light);
  font-weight: 400;
  margin-bottom: 0.8em;
}
.welcome article p {
  font-size: 1.05em;
  color: var(--color-text);
  font-weight: 300;
  margin-bottom: 0.6em;
}

.servicios {
  width: 90%;
  margin: 3em auto;
  text-align: center;
}

.servicios h3 {
  font-size: 1.6em;
  color: var(--color-primary);
  margin-bottom: 1.2em;
}

.servicios-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2em;
  width: 100%;
}

.servicio-card {
  display: flex;
  flex-direction: column;
  width: 300px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

.servicio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

.servicio-info {
  padding: 1.2em 1.4em 1.6em;
}

.servicio-info p:first-child {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.4em;
}

.servicio-info p:last-child {
  color: var(--color-accent);
  font-weight: 600;
}

.item {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

footer {
  padding: 2.5em 1em;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  text-align: center;
  font-weight: 400;
}

footer p {
  line-height: 1.8;
}

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

.legal-link {
  margin-top: 1.2em;
  font-size: 0.85em;
}

.legal-link a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}

.legal-link a:hover {
  color: #fff;
}

.social {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-top: 0.8em;
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6em;
  height: 2.6em;
  padding: 0.6em;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease;
}

.social a:hover {
  transform: translateY(-4px);
  background: var(--color-accent);
}

.rrss {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.arriba {
  position: fixed;
  right: 1.5em;
  bottom: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6em;
  height: 2.6em;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: var(--shadow-strong);
  color: #fff;
  z-index: 20;
  transition: transform 0.25s ease;
  /* Ancla el tamaño a 16px real: el botón del chat (chatbot.css) ya se fija
     a 16px para no encogerse con los html { font-size: 60%/58%/55% }
     responsivos de este archivo. Si "arriba" siguiera encogiéndose con el
     root, en mobile terminaba mucho más pequeño y se metía debajo del botón
     de chat, superponiéndose. */
  font-size: 16px;
}

.arriba:hover {
  transform: translateY(-4px);
}

main table td {
  padding: 0.45em 0.7em;
  vertical-align: top;
}

.titulo {
  font-size: 1.5em;
  font-weight: 900;
  color: rgb(0, 0, 0);
  text-align: center;
  margin: 1.5em 0;
}
.titulo img {
  margin: 1em;
  padding: 0.5em;
  background-color: rgb(23, 66, 122);
  width: 20%;
  border: solid 1px rgb(23, 66, 122);
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}
.contacto {
  max-width: 600px;
  margin: 1.5em auto 3em;
  padding: 2em;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.legal {
  max-width: 760px;
  margin: 1.5em auto 3em;
  padding: 2em 2.2em;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
}

.legal-updated {
  color: var(--color-text-light);
  font-size: 0.95em;
  margin-bottom: 1.6em;
}

.legal h3 {
  font-size: 1.15em;
  color: var(--color-primary);
  margin: 1.6em 0 0.6em;
}

.legal h3:first-of-type {
  margin-top: 0;
}

.legal p {
  margin-bottom: 0.9em;
}

.legal ul {
  margin: 0 0 0.9em 1.3em;
}

.legal li {
  margin-bottom: 0.4em;
}

.legal a {
  color: var(--color-primary);
  text-decoration: underline;
}

.legal a:hover {
  color: var(--color-accent);
}

.legal-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1.4em;
}

.legal table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.9em;
}

.legal th,
.legal td {
  text-align: left;
  padding: 0.6em 0.8em;
  border-bottom: 1px solid #e7ebf2;
  vertical-align: top;
}

.legal th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.legal tbody tr:nth-child(even) td {
  background-color: var(--color-bg);
}

.contacto-intro {
  margin-bottom: 1.2em;
  color: var(--color-text-light);
  text-align: center;
}

.contacto-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.contacto-form label {
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 0.6em;
}

.contacto-form input,
.contacto-form textarea {
  padding: 0.7em 0.9em;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1em;
  color: var(--color-text);
  resize: vertical;
  transition: border-color 0.25s ease;
}

.contacto-form input:focus,
.contacto-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.btn-enviar {
  align-self: flex-start;
  margin-top: 1em;
  padding: 0.8em 1.8em;
  background: var(--color-primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-family: inherit;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.btn-enviar:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.btn-enviar:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 0.8em;
  font-weight: 600;
  min-height: 1.2em;
}

.form-status--ok {
  color: #1e9e63;
}

.form-status--error {
  color: #d64545;
}

.form-privacy-note {
  margin-top: 0.8em;
  font-size: 0.82em;
  color: var(--color-text-light);
  text-align: center;
}

.form-privacy-note a {
  color: var(--color-primary);
}

.resumen {
  margin: 1em auto;
  padding: 1.5em;
  max-width: 800px;
  text-align: justify;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.datos,
.edu,
.hab,
.exp {
  margin: 1.5em auto;
  padding: 1.5em;
  max-width: 900px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.datos h3 {
  font-size: 1.2em;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 0.6em;
}
.datos table {
  width: 52%;
  border-collapse: collapse;
}

.edu h3 {
  font-size: 1.2em;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 0.6em;
}
.edu table {
  width: 100%;
  border-collapse: collapse;
}

.hab h3 {
  font-size: 1.2em;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 0.6em;
}
.hab ul {
  list-style: lower-greek;
  font-size: 1em;
  margin-left: 1.2em;
}

.exp h3 {
  font-size: 1.2em;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 0.6em;
}

.datos tr:nth-child(even),
.edu tr:nth-child(even),
.exp tr:nth-child(even) {
  background-color: var(--color-bg);
}

.port h3 {
  font-size: 1.2em;
  font-weight: 900;
}

.img_table {
  margin: 0.5em;
  padding: 0.5em;
  width: 95%;
  border-collapse: collapse;
}

.hola {
  width: 100%;
  margin: 1em;
  padding: 1em;
}

.hola .texto {
  background-color: rgb(23, 66, 122);
  font-family: "Times New Roman", Times, serif;
  color: #fff;
  font-weight: bold;
  display: flex;
  justify-content: center;
  width: 95%;
  text-align: justify;
}

ol li .flag {
  width: 20px;
}

.radio {
  margin: 1em;
  padding: 1em;
  display: flex;
  justify-content: center;
}

.radio-player {
  width: 100%;
  max-width: 800px;
  padding: 2em 1.5em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  background: var(--color-primary-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: #f6f5f4;
  text-align: center;
}

.radio-cover {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-gold);
  box-shadow: var(--shadow-soft);
}

.radio-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.radio-status {
  color: var(--color-gold);
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.radio-track {
  font-size: 1.2em;
  font-weight: 700;
}

.radio-artist {
  color: #cbd5e1;
  font-size: 0.95em;
}

.radio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5em;
  width: 100%;
  flex-wrap: wrap;
}

.radio-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-primary-dark);
  font-size: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.radio-play-btn:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.radio-volume {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: var(--color-gold);
}

.radio-volume input[type="range"] {
  width: 120px;
  accent-color: var(--color-gold);
}

/* 1200px / 16px = 75em */
@media (max-width: 75em) {
  html {
    font-size: 60%;
  }
}

/* 980px / 16px = 61.25em */
@media (max-width: 61.25em) {
  html {
    font-size: 58%;
  }
  .welcome {
    width: 85%;
  }
}

/* 460px / 16px = 28.75em */
@media (max-width: 28.75em) {
  html {
    font-size: 55%;
  }
  .navegacion {
    text-align: center;
  }
  .welcome {
    margin-top: -2em;
    width: 88%;
    padding: 1.6em 1.2em;
  }
  .datos table {
    width: 100%;
  }
}
