/* FUENTES Y COLORES */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --header-height: 3.5rem;
  --primary-color: #4CAF50;
  --secondary-color: #FFC107;
  --title-color: #333;
  --text-color: #555;
  --body-color: #FFFFFF;
  --container-color: #F9F9F9;
  --dark-color: #1A1A1A;
  --body-font: 'Poppins', sans-serif;
  --h1-font-size: 2.5rem;
  --h2-font-size: 2rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
}

/* 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);
}

h1, h2, h3 {
  color: var(--title-color);
  font-weight: 600;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* LAYOUT */
.container {
  max-width: 1120px;
  /* Cambio para centrar el contenido */
  margin-left: auto;
  margin-right: auto;
  /* Mantenemos un padding para que no se pegue a los bordes en pantallas pequeñas */
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 4.5rem 0 2rem;
}

.section__title {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: 3rem;
}

/* HEADER Y NAVEGACIÓN */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  z-index: 100;
  transition: background-color 0.4s, box-shadow 0.4s;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo img {
  height: 40px;
}

.nav__toggle {
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

.nav__list {
  display: flex;
  gap: 2rem;
}

.nav__link {
  color: var(--title-color);
  font-weight: 500;
  transition: color 0.3s;
}

.nav__link:hover {
  color: var(--primary-color);
}

.scrolled {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav__link.active-link {
  color: var(--primary-color);
  font-weight: 700;
}

/* HERO SECTION */
.hero {
  background-image: linear-gradient(rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.9)), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  padding: 8rem 0;
  text-align: center;
}

.hero__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero__title {
  font-size: var(--h1-font-size);
  color: white;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: #ccc;
}

/* BOTÓN */
.button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
}

.button:hover {
  background-color: #3e8e41;
}

/* SERVICIOS */
.services__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service__card {
  background-color: var(--container-color);
  padding: 2.5rem 2rem;
  border-radius: 0.5rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.service__card:hover {
  transform: translateY(-10px);
}

.service__icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.service__title {
  font-size: var(--h3-font-size);
  margin-bottom: 0.5rem;
}

/* SOBRE NOSOTROS */
.about {
  background-color: var(--container-color);
}

.about__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}

.about__description {
  line-height: 1.6;
}

.about__image img {
  border-radius: 0.5rem;
}

/* CONTACTO */
.contact__container {
  max-width: 600px;
  margin: 0 auto;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form__group {
  display: flex;
  flex-direction: column;
}

.form__label {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form__input {
  width: 100%;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

.form__input:focus {
  outline: none;
  border-color: var(--primary-color);
}

textarea.form__input {
  resize: vertical;
}

.contact__message {
  text-align: center;
  font-weight: 500;
}

/* FOOTER */
.footer {
  background-color: var(--dark-color);
  color: #ccc;
  padding: 2rem 0;
}

.footer__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__social-link {
  color: #ccc;
  font-size: 1.5rem;
  margin-left: 1.5rem;
  transition: color 0.3s;
}

.footer__social-link:hover {
  color: var(--primary-color);
}

/* ANIMACIÓN DE SCROLL */
.hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

/* MEDIA QUERIES */
@media screen and (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    padding: 4rem 0;
    text-align: center;
    box-shadow: 0 4px 4px rgba(0,0,0,0.1);
    transition: top 0.4s;
  }

  .show-menu {
    top: var(--header-height);
  }

  .nav__list {
    flex-direction: column;
    gap: 2.5rem;
  }
  
  .nav__toggle {
    display: block;
  }
  
  .hero__title {
    font-size: 2rem;
  }
  
  .about__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about__image {
    order: -1;
  }

  .footer__container {
    flex-direction: column;
    gap: 1rem;
  }
}

@media screen and (max-width: 375px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero__title {
    font-size: 1.75rem;
  }
}