/* ===================================================
   FUENTES, COLORES Y VARIABLES
   =================================================== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

/* --- Variables de Tema (Dark Theme por defecto) --- */
:root {
  --header-height: 3.5rem;
  --first-color: #7bf408;
  --gradient-green: rgba(123, 244, 8, 0.3);
  --gradient-pink: rgba(188, 104, 122, 0.3);

  --title-color: #fff;
  --text-color: #fff;
  --text-color-light: #e0e0e0;
  --body-color: #000000;
  --section-background: #0b0a0f;

  --border-color: rgba(255, 255, 255, 0.1);
  --liquid-glass-bg: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.05)
  );
  --liquid-glass-shadow: inset 0 0 60px rgba(0, 0, 0, 0.25);
  --liquid-glass-card-shadow: inset 0 0 50px rgba(0, 0, 0, 0.22);
  --button-bg: rgba(255, 255, 255, 0.1);
  --button-text: #fff;

  --input-bg: rgba(0, 0, 0, 0.2);
  --input-border: rgba(255, 255, 255, 0.2);
  --input-placeholder: var(--text-color);

  --modal-overlay-bg: rgba(11, 10, 15, 0.8);
  --modal-content-bg: #0b0a0f;
  --modal-text-color: #ffffff;
  --modal-text-color-light: #e0e0e0;
  --modal-close-color: #fff;

  /* Colores para el switch */
  --switch-track-base-color-dark: rgba(102, 102, 102, 0.3);
  --switch-track-active-color-dark: rgba(123, 244, 8, 0.4);
  --switch-knob-base-color-dark: white;
  --switch-icon-color-dark: #555;

  --body-font: "Poppins", sans-serif;
  --h1-font-size: 5rem;
  --h2-font-size: 2rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --max-content-width: 1200px;
  --standard-border-radius: 1rem;

  /* Sombra de texto hero y about para el tema oscuro */
  --hero-text-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  --hero-description-text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  --hero-gradient-start: rgba(255, 255, 255, 0.4);
  --hero-gradient-end: #ffffff;
}

/* --- Variables de Tema (Light Theme) --- */
html[data-theme="light"] {
  --first-color: #008f00;
  --gradient-green: rgba(0, 175, 0, 0.5);
  --gradient-pink: rgba(255, 100, 150, 0.5);

  --title-color: #333;
  --text-color: #444;
  --text-color-light: #666;
  --body-color: #f0f0f0;
  --section-background: #ffffff;

  --border-color: rgba(0, 0, 0, 0.1);
  --liquid-glass-bg: rgba(255, 255, 255, 0.8);
  --liquid-glass-shadow: inset 0 0 60px rgba(0, 0, 0, 0.05);
  --liquid-glass-card-shadow: inset 0 0 50px rgba(0, 0, 0, 0.03);
  --button-bg: rgba(0, 0, 0, 0.05);
  --button-text: #333;

  --input-bg: rgba(255, 255, 255, 0.8);
  --input-border: rgba(0, 0, 0, 0.15);
  --input-placeholder: #666;

  --modal-overlay-bg: rgba(255, 255, 255, 0.8);
  --modal-content-bg: #f9f9f9;
  --modal-text-color: #333;
  --modal-text-color-light: #666;
  --modal-close-color: #666;

  /* Colores para el switch */
  --switch-track-base-color-light: rgba(204, 204, 204, 0.5);
  --switch-track-active-color-light: rgba(0, 143, 0, 0.5);
  --switch-knob-base-color-light: white;
  --switch-icon-color-light: #333;

  /* Sombra de texto hero y about para el tema claro */
  --hero-text-shadow: none;
  --hero-description-text-shadow: none;
  --hero-gradient-start: rgba(0, 0, 0, 0.6);
  --hero-gradient-end: #333;
}

/* ===================================================
   BASE
   =================================================== */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 90vw;
  height: 90vh;
  z-index: -1;
  filter: blur(180px);
  pointer-events: none;
  transition: background 0.4s ease, filter 0.4s ease;
}

body::before {
  background: var(--gradient-green);
  border-radius: 50%;
  top: -50vh;
  left: -50vw;
  animation: dynamic-green 10s ease-in-out infinite;
}

body::after {
  background: var(--gradient-pink);
  border-radius: 50%;
  bottom: -50vh;
  right: -50vw;
  animation: dynamic-pink 12s ease-in-out infinite;
  animation-delay: -6s;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

/* ===================================================
   CLASES REUTILIZABLES Y HEADER
   =================================================== */
.container {
  max-width: var(--max-content-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding: 6rem 0 4rem;
  background-color: transparent;
}

.section__title {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 500;
  color: var(--title-color);
  transition: color 0.4s ease;
}

.button {
  display: inline-block;
  background-color: var(--button-bg);
  color: var(--button-text);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  transition: 0.3s;
  border: 1px solid var(--border-color);
  transition: background-color 0.4s ease, color 0.4s ease,
    border-color 0.4s ease;
}

.button:hover {
  background-color: var(--first-color);
  color: var(--body-color);
  border-color: var(--first-color);
}

.header {
  width: 90vw;
  max-width: 1400px;
  background: var(--liquid-glass-bg);
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  transition: background 0.4s ease, top 0.4s ease, width 0.4s ease,
    border-color 0.4s ease, box-shadow 0.4s ease;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-color);
  border-radius: var(--standard-border-radius);
  padding: 0 1.5rem;
  box-shadow: var(--liquid-glass-shadow);
  animation: nav-entry-animation 0.8s ease-out forwards;
}

.header:hover {
  border-color: rgba(123, 244, 8, 0.5);
  box-shadow: 0 0 25px rgba(123, 244, 8, 0.3);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.nav__menu {
  display: flex;
  align-items: center;
  column-gap: 1.5rem;
  margin-left: auto;
}

.nav__list {
  display: flex;
  column-gap: 1.5rem;
}

.nav__link {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.nav__link:hover {
  color: var(--title-color);
  background-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .nav__link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--title-color);
}

.nav__logo img {
  height: 38px;
  width: auto;
  display: block;
  transition: filter 0.4s ease;
}

.scroll-header {
  top: 1rem;
}

/* --- Botón de Hamburguesa --- */
.nav__toggle {
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  display: none;
  z-index: 101;
  transition: color 0.3s ease;
}

.nav__toggle:hover {
  color: var(--first-color);
}

.nav__toggle i {
  transition: transform 0.3s ease-in-out;
}

.nav__toggle i::before {
  content: "\f0c9";
  /* Código Unicode para el icono "bars" (hamburguesa) */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  transition: transform 0.3s ease-in-out;
}

/* ===================================================
   HERO
   =================================================== */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero__container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 1rem;
}

.hero__title {
  font-size: var(--h1-font-size);
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.2;
  background: linear-gradient(
    to right,
    var(--hero-gradient-start),
    var(--hero-gradient-end) 50%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(var(--hero-text-shadow));
  transition: filter 0.4s ease, background 0.4s ease;
}

.hero__description {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  color: var(--text-color-light);
  text-shadow: var(--hero-description-text-shadow);
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

/* ===================================================
   SOBRE NOSOTROS
   =================================================== */
.about__container {
  align-items: center;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.about__data {
  text-align: left;
}

.about__data .section__title {
  text-align: left;
  margin-bottom: 1.5rem;
}

.about-us__description {
  line-height: 2;
  margin-bottom: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-light);
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

.about__img {
  position: relative;
  height: 400px;
  border-radius: var(--standard-border-radius);
  overflow: hidden;
  background-color: var(--section-background);
  border: 1px solid var(--border-color);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

#tsparticles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.about-us {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0rem 1rem;
  background-color: transparent;
  transition: background-color 0.4s ease;
}

.about-us__container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 1rem;
}

.about-us__title {
  font-size: var(--h1-font-size);
  margin-bottom: 1rem;
  line-height: 1.2;
  font-weight: 600;
  background: linear-gradient(
    to right,
    var(--hero-gradient-start),
    var(--hero-gradient-end) 50%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(var(--hero-text-shadow));
  transition: filter 0.4s ease, background 0.4s ease;
}

.about-us__description {
  font-size: 1.1rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  color: var(--text-color-light);
  text-shadow: var(--hero-description-text-shadow);
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

/* ===================================================
   SERVICIOS, CLIENTES, CONTACTO, FOOTER...
   =================================================== */
.services__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: flex-start;
}

.services__card {
  background: var(--liquid-glass-bg);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  border-radius: var(--standard-border-radius);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.4s ease-in-out,
    border-color 0.4s ease-in-out, background 0.4s ease;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--liquid-glass-card-shadow);
  opacity: 0;
  animation: card-entry-animation 0.7s ease-out forwards;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  min-height: 24rem;
}

.services__card .services__description {
  flex-grow: 1;
}

.services__card:hover {
  transform: translateY(-0.5rem);
  border-color: var(--first-color);
  box-shadow: 0 0 30px rgba(123, 244, 8, 0.25);
}

.services__icon {
  font-size: 2.5rem;
  color: var(--first-color);
  margin-bottom: 1rem;
}

.services__title {
  font-size: var(--h3-font-size);
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--title-color);
  transition: color 0.4s ease;
}

.services__description {
  flex-grow: 1;
  font-weight: 300;
  color: var(--text-color-light);
  transition: color 0.4s ease;
}

.services__card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.services__card ul li {
  font-size: 0.9em;
  color: var(--text-color-light);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  position: relative;
  padding-left: 1.2em;
}

.services__card ul li::before {
  content: "\f00c";
  /* Icono de checkmark de Font Awesome */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--first-color);
  position: absolute;
  left: 0;
  top: 0.1em;
  font-size: 0.8em;
}

.expandable-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
  padding-top: 0;
  text-align: left;
}

.services__card.expanded .expandable-content {
  max-height: 500px;
  opacity: 1;
  padding-top: 1rem;
}

.services__card .short-description {
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 4rem;
}

.read-more-trigger {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--first-color);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.read-more-trigger:hover {
  color: var(--first-color);
  filter: brightness(1.2);
}

.read-more-trigger i {
  transition: transform 0.3s ease;
}

.services__card.expanded .read-more-trigger i {
  transform: rotate(180deg);
}

.clients__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: flex-start;
}

.client-card {
  background: var(--liquid-glass-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--standard-border-radius);
  box-shadow: var(--liquid-glass-card-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  height: auto;
  transition: transform 0.3s, box-shadow 0.4s ease-in-out,
    border-color 0.4s ease-in-out, background 0.4s ease;
  padding-bottom: 6rem;
  display: flex;
  flex-direction: column;
  min-height: 27rem;
}

.client-card .client-card__description-short {
  flex-grow: 1;
}

.client-card:hover {
  transform: translateY(-0.5rem);
  border-color: var(--first-color);
  box-shadow: 0 0 30px rgba(123, 244, 8, 0.25);
}

.client-card__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.client-card__logo {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: none;
  opacity: 1;
}

.client-card__title {
  font-size: var(--h3-font-size);
  color: var(--title-color);
  margin-bottom: 0.5rem;
}

.client-card__description-short {
  font-size: 0.95rem;
  color: var(--text-color-light);
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: center;
}

.expandable-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
  padding-top: 0;
  text-align: left;
}

.client-card.expanded .expandable-content {
  max-height: 500px;
  opacity: 1;
  padding-top: 1rem;
}

.client-card__description-long {
  font-size: 0.9em;
  color: var(--text-color-light);
  line-height: 1.7;
  text-align: left;
  margin-top: 1rem;
}

.contact__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contact__form {
  width: 100%;
  max-width: 600px;
  display: grid;
  gap: 1.5rem;
  background: var(--liquid-glass-bg);
  padding: 2.5rem;
  border-radius: var(--standard-border-radius);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.2);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.contact__inputs {
  display: grid;
  gap: 1.5rem;
}

.contact__input {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--input-border);
  border-radius: 0.5rem;
  font-family: var(--body-font);
  background-color: var(--input-bg);
  color: var(--input-text);
  transition: background-color 0.4s ease, color 0.4s ease,
    border-color 0.4s ease;
}

.contact__input::placeholder {
  color: var(--input-placeholder);
  transition: color 0.4s ease;
}

.contact__info {
  text-align: center;
}

.contact__info-title {
  margin-bottom: 1rem;
  font-weight: 500;
  color: var(--title-color);
  transition: color 0.4s ease;
}

.footer__logo {
  max-width: 100%;
}

.contact__social,
.footer__social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.contact__social-link,
.footer__social-link {
  font-size: 1.5rem;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.contact__social-link:hover,
.footer__social-link:hover {
  color: var(--first-color);
}

.footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  text-align: center;
  background-color: transparent;
  transition: border-color 0.4s ease;
}

.footer__copy {
  font-size: var(--small-font-size);
  color: var(--text-color);
  transition: color 0.4s ease;
}

/* ===================================================
   FORMULARIO DE CONTACTO
   =================================================== */
#form-button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
  cursor: pointer;
  text-align: center;
}

#form-icon {
  position: relative;
  width: 90px;
  height: 110px;
  background-color: rgba(123, 244, 8, 0.1);
  border-radius: 8px;
  border: 2px solid var(--first-color);
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out,
    background-color 0.4s ease, border-color 0.4s ease;
}

html[data-theme="light"] #form-icon {
  background-color: rgba(0, 143, 0, 0.05);
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.05);
}

#form-icon:hover {
  transform: translateY(-7px);
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.25),
    0 6px 15px rgba(123, 244, 8, 0.4);
}

html[data-theme="light"] #form-icon:hover {
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.1),
    0 6px 15px rgba(0, 143, 0, 0.2);
}

#form-icon::before,
#form-icon::after {
  content: "";
  position: absolute;
  left: 18%;
  width: 64%;
  background-color: var(--first-color);
  border-radius: 3px;
  opacity: 0.8;
  transition: background-color 0.4s ease;
}

#form-icon::before {
  top: 25%;
  height: 7px;
}

#form-icon::after {
  top: 50%;
  height: 7px;
}

#form-icon span {
  position: absolute;
  bottom: 20%;
  right: 18%;
  width: 20px;
  height: 25px;
  border-left: 4px solid var(--first-color);
  border-bottom: 4px solid var(--first-color);
  transform: rotate(-45deg);
  opacity: 0.9;
  transition: border-color 0.4s ease;
}

.form-invitation {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  max-width: 300px;
  transition: color 0.4s ease;
}

.form-invitation span {
  color: var(--first-color);
  font-weight: 600;
  display: block;
  margin-top: 0.5rem;
  animation: subtle-pulse 2s infinite alternate ease-in-out;
}

/* --- Estilos del Modal de Clientes --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--modal-overlay-bg);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s, background-color 0.4s ease;
}

.modal.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.modal__content {
  position: relative;
  background-color: var(--modal-content-bg);
  padding: 2.5rem;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.3s ease, background-color 0.4s ease,
    border-color 0.4s ease;
}

.modal.is-active .modal__content {
  transform: scale(1);
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--modal-close-color);
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal__close:hover {
  color: var(--first-color);
}

.modal__title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--modal-text-color);
  margin-bottom: 1rem;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: color 0.4s ease;
}

.modal__description,
.modal__collaboration {
  font-size: 1rem;
  font-weight: 300;
  color: var(--modal-text-color-light);
  line-height: 1.7;
  transition: color 0.4s ease;
}

.modal__subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--modal-text-color);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  transition: color 0.4s ease;
}

.client-swiper .swiper-slide {
  cursor: pointer;
}

/* ===================================================
   ESTILOS DEL SWITCH DE TEMA
   =================================================== */

.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-left: 1.5rem;
  flex-shrink: 0;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 24px;
  background-color: transparent;
  padding: 0;
  border: none;
}

.theme-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  pointer-events: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--switch-track-base-color-dark);
  transition: background-color 0.4s ease, border-color 0.4s ease;
  border-radius: 34px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.slider:before {
  position: absolute;
  content: "\f185";
  /* Ícono de sol de Font Awesome */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--switch-knob-base-color-dark);
  transition: transform 0.4s ease, background-color 0.4s ease, color 0.4s ease;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--switch-icon-color-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"]:checked + .slider {
  background-color: var(--switch-track-active-color-dark);
}

input[type="checkbox"]:checked + .slider:before {
  transform: translateX(17px);
  content: "\f186";
  /* Ícono de luna de Font Awesome */
  color: var(--switch-icon-color-dark);
}

html[data-theme="light"] .slider {
  background-color: var(--switch-track-base-color-light);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .slider:before {
  background-color: var(--switch-knob-base-color-light);
  color: var(--switch-icon-color-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] input[type="checkbox"]:checked + .slider {
  background-color: var(--switch-track-active-color-light);
}
/* ===================================================
   MEDIA QUERIES
   =================================================== */

/* --- A partir de 1000px o menos, se convierte en menú hamburguesa --- */
@media screen and (max-width: 1000px) {
  .header {
    width: calc(100% - 2rem); /* Hacemos que ocupe casi todo el ancho */
  }
  
  /* Hacemos visible el ícono de la hamburguesa */
  .nav__toggle {
    display: block;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 101;
    color: var(--text-color);
  }

  .nav__toggle i {
    display: inline-block;
    transition: transform 0.3s ease-in-out;
  }

  .nav__toggle i::before {
    content: "\f0c9"; /* Icono de hamburguesa */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
  }

  /* Estilos para cuando el menú está abierto (activo) */
  .nav__toggle.active i {
    transform: rotate(90deg);
    color: var(--first-color);
  }

  .nav__toggle.active i::before {
    content: "\f00d"; /* Icono de 'X' para cerrar */
  }

  /* Estilos del panel del menú lateral */
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%; /* Inicia oculto fuera de la pantalla */
    width: 70%;
    max-width: 300px;
    height: auto;
    min-height: calc(var(--header-height) + 1.5rem * 4 + 2rem + 3.5rem);
    max-height: 100vh;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: var(--standard-border-radius);
    box-shadow: -4px 0 15px var(--shadow-color);
    color: var(--text-color);
    padding: calc(var(--header-height) + 1.5rem) 2rem 1.5rem 1.5rem;
    transition: right 0.4s ease-in-out; /* Transición suave */
    flex-direction: column;
    align-items: flex-start;
    row-gap: 1.5rem;
    margin-left: 0;
    justify-content: flex-start;
  }

  html[data-theme="light"] .nav__menu {
    background-color: rgba(255, 255, 255, 0.99);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.25);
  }

  /* Clase que muestra el menú */
  .nav__menu.show-menu {
    right: 0;
  }

  /* Lista de enlaces en vertical */
  .nav__list {
    flex-direction: column;
    width: 100%;
    row-gap: 1.5rem;
  }

  .nav__list .nav__item .nav__link {
    color: var(--text-color);
    padding: 0.5rem 0;
    width: 100%;
    text-align: left;
    background-color: transparent;
  }
  
  .nav__list .nav__item .nav__link:hover {
    color: var(--first-color);
    background-color: rgba(255, 255, 255, 0.05);
  }

  /* Posición del switch de tema y lenguaje dentro del menú móvil */
  .theme-switch-wrapper,
  .lang-switch-wrapper {
    margin-left: 0;
    margin-top: 1rem;
    align-self: flex-start;
  }
  
  .lang-switch-wrapper {
    width: auto;
  }
}

/* --- Breakpoint para tablets y pantallas más pequeñas --- */
@media screen and (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  /* Aquí solo dejamos los ajustes de tamaño de fuente y otros que no sean del menú */
  .hero__title,
  .about-us__title {
    font-size: 2.5rem;
  }
  .hero__description {
    font-size: 1.1rem;
  }
  .section__title {
    font-size: 2rem;
  }
  .services__card {
    min-height: 14rem;
    padding: 1.5rem 1rem;
  }
  .client-card {
    min-height: 15rem;
  }
  .modal__content {
    padding: 1.5rem;
  }
  .modal__title {
    font-size: 1.5rem;
  }
  .services__container {
    grid-template-columns: 1fr;
  }
}

/* --- Breakpoint para móviles --- */
@media screen and (max-width: 480px) {
  .nav {
    height: 3.5rem;
  }
  .nav__logo img {
    height: 35px;
  }
  :root {
    --h1-font-size: 3rem;
    --h2-font-size: 1.8rem;
    --h3-font-size: 1.1rem;
    --normal-font-size: 0.9rem;
    --small-font-size: 0.75rem;
  }
}

/* ===================================================
   ANIMACIONES
   =================================================== */
@keyframes dynamic-green {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2) rotate(10deg) translate(2vw, -5vh);
    opacity: 1;
  }
}

@keyframes dynamic-pink {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.4) rotate(-10deg) translate(-5vw, 5vh);
    opacity: 1;
  }
}

@keyframes nav-entry-animation {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes card-entry-animation {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animación de entrada escalonada */
.services__card:nth-child(1) {
  animation-delay: 0.2s;
}

.services__card:nth-child(2) {
  animation-delay: 0.4s;
}

.services__card:nth-child(3) {
  animation-delay: 0.6s;
}

.services__card:nth-child(4) {
  animation-delay: 0.8s;
}

.services__card:nth-child(5) {
  animation-delay: 1s;
}

@keyframes subtle-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.02);
    opacity: 0.95;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.lang-switch-wrapper {
  margin-left: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

#lang-toggle-button {
  background: var(--liquid-glass-bg);
  border: 1px solid var(--first-color);
  border-radius: var(--standard-border-radius);
  min-width: 50px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--first-color);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--liquid-glass-card-shadow);
  padding: 0 0.8rem;
  text-transform: uppercase;
}

#lang-toggle-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
  border-color: var(--first-color);
  box-shadow: 0 0 15px rgba(123, 244, 8, 0.2);
}

@media screen and (max-width: 768px) {
  .lang-switch-wrapper {
    margin-left: 0;
    margin-top: 1rem;
    align-self: flex-start;
    width: auto;
  }
}

/* --- Efecto de Desvanecimiento/Desenfoque para Secciones --- */
.section-out-of-focus {
  opacity: 0.2;
  filter: blur(5px);
  transform: scale(0.98);
  transition: opacity 0.8s ease-out, filter 0.8s ease-out,
    transform 0.8s ease-out;
  pointer-events: none;
}

.section-in-focus {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  transition: opacity 0.8s ease-out, filter 0.8s ease-out,
    transform 0.8s ease-out;
  pointer-events: auto;
}

#tsparticles {
  position: fixed;
  inset: 0;
  z-index: -1;
}

main {
  position: relative;
}

.gsap-container {
  min-height: 200svh;
}

#about {
  margin-top: -200svh;
}

.flex-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding-inline: 2rem;
  gap: 12px;
}

/* ===================================================
   AJUSTE FINO PARA PANTALLAS MEDIANAS (1001px a 1050px)
   =================================================== */
@media screen and (min-width: 1001px) and (max-width: 1050px) {

  /* Reduce el espacio ENTRE los enlaces del menú (About, Services, etc.) */
  .nav__list {
    column-gap: 0.5rem; /* Original era 1.5rem */
  }

  /* Reduce el relleno DENTRO de cada enlace para que ocupen menos espacio */
  .nav__link {
    padding: 0.5rem 0.7rem; /* Original era 0.5rem 1rem */
  }

  /* Reduce el espacio entre el grupo de enlaces y los botones de idioma/tema */
  .nav__menu {
    column-gap: 0.8rem; /* Original era 1.5rem */
  }
}