/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colores ==========*/
  /* Colores de marca basados en la imagen de referencia */
  --first-color: hsl(82, 60%, 45%); /* El verde claro específico de encabezados como "Señores:" */
  --first-color-alt: hsl(82, 60%, 40%);
  --title-color: hsl(210, 10%, 20%); /* Gris oscuro neutro para texto */
  --text-color: hsl(210, 8%, 35%);
  --text-color-light: hsl(210, 8%, 55%);
  --body-color: #fcfcfc;
  --container-color: #fff;
  --border-color: hsl(0, 0%, 90%);

  /* Color de marca secundario (Azul claro/gris del icono del logo) */
  --secondary-color: hsl(210, 15%, 85%); 
  
  /*========== Fuente y tipografía ==========*/
  --body-font: 'Inter', sans-serif;
  --biggest-font-size: 2.25rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /*========== Peso de fuente ==========*/
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*========== Márgenes inferiores ==========*/
  --mb-0-5: .5rem;
  --mb-0-75: .75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;
  --mb-3: 3rem;

  /*========== Índices z (Capas) ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Variables del Tema Oscuro ==========*/
body.dark-theme {
  --title-color: hsl(210, 10%, 90%);
  --text-color: hsl(210, 8%, 75%);
  --body-color: hsl(210, 20%, 12%);
  --container-color: hsl(210, 20%, 16%);
  --border-color: hsl(210, 12%, 25%);
  --secondary-color: hsl(210, 20%, 20%);
}

/*========== Botón Cambio de Tema (Oscuro/Claro) ==========*/
.nav__btns {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.change-theme {
  font-size: 1.25rem;
  color: var(--title-color);
  cursor: pointer;
  transition: .3s;
}

.change-theme:hover {
  color: var(--first-color);
}

/* Tipografía Responsiva */
@media screen and (min-width: 968px) {
  :root {
    --biggest-font-size: 4rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
}

.material-icons {
  font-size: inherit;
  line-height: 1;
  vertical-align: middle;
}

h1, h2, h3 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  border: none;
  outline: none;
}

/*=============== CLASES REUTILIZABLES ===============*/
.container {
  max-width: 1024px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding: 4.5rem 0 2rem;
}

.section__title {
  font-size: var(--h1-font-size);
  color: var(--title-color);
  text-align: center;
  margin-bottom: var(--mb-3);
  position: relative;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--first-color);
}

.section__subtitle {
  display: block;
  font-size: var(--normal-font-size);
  color: var(--text-color-light);
  margin-top: -1.5rem;
  margin-bottom: var(--mb-3);
}

.text-center {
  text-align: center;
}

.main {
  overflow: hidden; /* Para animaciones */
}

/*=============== ENCABEZADO Y NAVEGACIÓN ===============*/
.header {
  width: 100%;
  background-color: var(--body-color);
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  transition: .4s;
  border-bottom: 1px solid transparent;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  color: var(--title-color);
  font-weight: var(--font-bold);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.nav__logo-img {
  width: 40px;
  height: auto;
}

.nav__logo span {
  font-weight: 400;
  color: var(--text-color-light);
}

.nav__toggle,
.nav__close {
  font-size: 1.5rem;
  color: var(--title-color);
  cursor: pointer;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    background-color: var(--container-color);
    top: -100%;
    left: 0;
    width: 100%;
    padding: 4rem 0 3rem;
    box-shadow: 0 4px 20px hsla(210, 24%, 15%, .1);
    transition: .4s;
    border-radius: 0 0 1.5rem 1.5rem;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 2rem;
}

.nav__link {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  transition: .3s;
}

.nav__link:hover {
  color: var(--first-color);
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* Mostrar menú */
.show-menu {
  top: 0;
}

/* Cambiar fondo del encabezado al hacer scroll */
.scroll-header {
  background-color: var(--container-color);
  box-shadow: 0 1px 4px hsla(210, 24%, 15%, .1);
  border-color: var(--border-color);
}

/* Enlace activo */
.active-link {
  color: var(--first-color);
}

/*=============== BOTONES ===============*/
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  padding: 1rem 1.75rem;
  border-radius: .25rem;
  font-weight: var(--font-medium);
  transition: .3s;
  box-shadow: 0 4px 12px hsla(82, 60%, 45%, .2);
}

.button:hover {
  background-color: var(--first-color-alt);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px hsla(82, 60%, 45%, .3);
}

.button--ghost {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.button--ghost:hover {
  background-color: var(--first-color);
  border-color: var(--first-color);
  color: #fff;
}

/*=============== INICIO (HOME) ===============*/
.home__container {
  row-gap: 3rem;
  padding-top: 2rem;
}

.home__title {
  font-size: var(--biggest-font-size);
  line-height: 1.1;
  margin-bottom: var(--mb-1-5);
}

.home__description {
  margin-bottom: var(--mb-2-5);
}

.home__visual {
  position: relative;
  justify-self: center;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual__blob {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--secondary-color);
  border-radius: 1rem;
  transform: rotate(-5deg);
  opacity: 0.5;
}

.home__img {
  position: relative;
  z-index: 1;
  border-radius: 1rem;
  box-shadow: 0 20px 40px hsla(0, 0%, 0%, .1);
  border: 4px solid var(--container-color);
  max-width: 90%;
  transition: .3s;
}

.home__img:hover {
  transform: scale(1.02);
}

/*=============== SERVICIOS ===============*/
.services__container {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.services__card {
  background-color: var(--container-color);
  padding: 3rem 2rem;
  border-radius: .5rem;
  border: 1px solid var(--border-color);
  transition: .3s;
  text-align: center;
}

.services__card:hover {
  border-color: var(--first-color);
  box-shadow: 0 8px 24px hsla(0, 0%, 0%, .05);
}

.services__icon {
  font-size: 2rem;
  margin-bottom: var(--mb-1-5);
  color: var(--first-color);
  background-color: hsl(82, 60%, 95%);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  margin-left: auto;
  margin-right: auto;
}

/*=============== PRODUCTOS ===============*/
.products__container {
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media screen and (min-width: 767px) {
  .products__container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.product__card {
  background-color: var(--container-color);
  padding: 3rem 2.5rem;
  border-radius: .5rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product__header {
  margin-bottom: var(--mb-1-5);
  padding-bottom: var(--mb-1);
  border-bottom: 2px solid var(--secondary-color);
}

.product__name {
  font-size: var(--h1-font-size);
  color: var(--first-color);
}

.product__description {
  margin-bottom: var(--mb-2);
  flex-grow: 1;
}

.product__features {
  margin-bottom: var(--mb-2);
  display: grid;
  gap: .75rem;
}

.product__features li {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.product__features li::before {
  content: '';
  width: 12px;
  height: 2px;
  background-color: var(--first-color);
}

/*=============== NOSOTROS (ABOUT) ===============*/
.about__container {
  background-color: var(--secondary-color);
  padding: 5rem 2rem;
  border-radius: .5rem;
  text-align: center;
}

.about__description {
  margin-bottom: var(--mb-2);
}

/*=============== CLIENTES ===============*/
.clients__container-wrapper {
  position: relative;
  margin-bottom: var(--mb-2);
}

.clients__cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  max-height: 220px; /* Altura inicial aproximada para 3-4 filas */
  overflow: hidden;
  transition: max-height .5s ease;
}

.clients__cloud.expanded {
  max-height: 2000px; /* Suficiente para mostrar todos */
}

.clients__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to top, var(--body-color), transparent);
  pointer-events: none;
  transition: opacity .3s ease;
}

.clients__overlay.hidden {
  opacity: 0;
}

.clients__button-container {
  display: flex;
  justify-content: center;
}

.client__card {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 2rem;
  transition: background-color .2s ease, color .2s ease;
}

.client__card:hover {
  background-color: var(--first-color);
  color: #fff;
}

.client__name {
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  line-height: 1.4;
  color: inherit;
}

/*=============== CONTACTO ===============*/
.contact__container {
  row-gap: 3rem;
}

.contact__form {
  display: grid;
  gap: 1rem;
}

.contact__inputs {
  display: grid;
  gap: 1rem;
}

.contact__input {
  width: 100%;
  background-color: var(--container-color);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: .25rem;
  color: var(--text-color);
  resize: none;
}

.contact__info {
  display: grid;
  gap: 2rem;
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact__icon {
  font-size: 1.5rem;
  color: var(--first-color);
  margin-top: 0.25rem;
  display: flex;
}

.contact__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.contact__title {
  font-size: var(--normal-font-size);
  margin-bottom: 0.25rem;
}

.contact__details {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

.contact__link {
  color: var(--first-color);
  font-weight: var(--font-medium);
}

.contact__link:hover {
  text-decoration: underline;
}

/*=============== VENTANA EMERGENTE (MODAL) ===============*/
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: hsla(210, 24%, 15%, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-fixed);
  opacity: 0;
  visibility: hidden;
  transition: .3s;
  padding: 0 1rem;
}

.modal__content {
  position: relative;
  background-color: var(--container-color);
  padding: 3rem 2rem 2rem;
  border-radius: .5rem;
  text-align: center;
  width: 100%;
  max-width: 400px;
  transform: translateY(-20%);
  transition: .4s;
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.25rem;
  color: var(--title-color);
  cursor: pointer;
}

.modal__icon {
  font-size: 3rem;
  margin-bottom: var(--mb-1);
}

.modal__title {
  font-size: var(--h1-font-size);
  margin-bottom: var(--mb-0-5);
}

.modal__message {
  margin-bottom: var(--mb-2);
}

.modal__button {
  width: 100%;
}

/* Mostrar modal */
.show-modal {
  opacity: 1;
  visibility: visible;
}

.show-modal .modal__content {
  transform: translateY(0);
}

/*=============== BOTÓN FLOTANTE WHATSAPP ===============*/
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25d366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: var(--z-fixed);
  transition: .3s;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Dispositivos pequeños */
@media screen and (max-width: 320px) {
  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

/*=============== PIE DE PÁGINA (FOOTER) ===============*/
.footer {
  padding: 4rem 0 3rem;
  background-color: var(--title-color);
  color: #fff;
}

.footer__copy {
  text-align: center;
  color: var(--text-color-light);
}

/*=============== PUNTOS DE INTERRUPCIÓN (BREAKPOINTS) ===============*/
/* Dispositivos medianos */
@media screen and (min-width: 767px) {
  body {
    margin: 0;
  }
  .container {
    margin-left: auto;
    margin-right: auto;
  }
  .nav {
    height: calc(var(--header-height) + 1.5rem);
    column-gap: 3rem;
  }
  .nav__toggle,
  .nav__close {
    display: none;
  }
  .nav__list {
    flex-direction: row;
    column-gap: 3rem;
  }
  .nav__menu {
    margin-left: auto;
  }

  .home__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  .home__data {
    text-align: initial;
  }
  .home__visual {
    width: 400px;
    height: 400px;
  }

  .contact__container {
    grid-template-columns: 1.5fr 1fr;
    column-gap: 4rem;
    background-color: var(--container-color);
    padding: 4rem 2.5rem;
    border-radius: .5rem;
    border: 1px solid var(--border-color);
  }
  .contact__inputs {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Dispositivos grandes */
@media screen and (min-width: 1024px) {
  .section {
    padding: 7rem 0 2rem;
  }
}

