:root {
  --beige: #faf0e6;
  --rojo: #d65228;
  --azul-m: #002f3b;
  --azul-p: #005f6b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--beige);
  font-size: 18px;
  line-height: 1.6;
  color: #333;
}

#main-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
  transition: transform 0.3s ease-in-out;
}

.header-container {
  background-color: var(--azul-m);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 20px;
  color: var(--beige);
}

nav ul {
  display: flex;
  list-style: none;
  margin-left: auto;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: var(--beige);
  font-weight: 500;
}

.contacto {
  background: var(--azul-p);
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  margin-left: 20px;
  color: var(--beige);
}

.header-hidden {
  transform: translateY(-100%);
}

.hero {
  position: relative;
  height: 100vh;
  background: url("images/mountain.jpeg") center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  color: #fff;
  overflow: hidden;
  padding: 0 20px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1300px;
}

.hero-content h2 {
  font-size: 5rem;
  margin-bottom: 10px;
}

.hero-content h3 {
  font-size: 4rem;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-content h4 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 30px;
}

.hero-btn {
  background-color: var(--rojo);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 15px 30px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.hero-btn:hover {
  background-color: #bf421f;
}

.why-andes__grid {
    list-style:none; 
    margin:0; 
    padding:0;
    display:grid; 
    gap:18px;
    grid-template-columns: repeat(1, minmax(0,1fr));
}

@media (min-width:700px) { 
    .why-andes__grid { 
        grid-template-columns: repeat(2,1fr);
    } 
}

@media (min-width:1000px) { 
    .why-andes__grid { 
        grid-template-columns: repeat(4,1fr);
    } 
}

.why-andes__item {
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.06));
    border: 1px solid rgba(255,255,255,.12);
    border-radius:16px; padding:22px 16px; height:100%;
    text-align: center;
}

.why-andes__icon {
    width:56px; 
    height:56px; 
    opacity:.95; 
    margin-bottom:12px;
}

.clients{
    background: var(--beige);
    padding: clamp(24px, 5vw, 48px) 16px;
  }
  .clients__container{
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
  }
  .clients h2{
    margin: 0 0 clamp(18px, 3vw, 28px);
    font-size: clamp(18px, 3.5vw, 24px);
    color: var(--azul-m);
    font-weight: 600;
  }

  .clients__grid{
    --columns: 2;
    display: grid;
    grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
    gap: clamp(16px, 2.5vw, 28px);
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
  }
  @media (min-width: 540px){ .clients__grid{ --columns: 3; } }
  @media (min-width: 820px){ .clients__grid{ --columns: 5; } }

  .clients__item{ display: flex; justify-content: center; }

  .clients__logo{
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 1.8vw, 16px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(0,0,0,.05);
    transition: transform .15s ease;
  }
  .clients__logo:focus-visible{ outline: 3px solid var(--rojo); outline-offset: 3px; }
  .clients__logo:hover{ transform: translateY(-1px); }

  .clients__logo img{
    /* tamaño máximo del logo dentro del bloque */
    max-width: clamp(110px, 12vw, 160px);
    max-height: clamp(28px, 4vw, 42px);
    width: auto; height: auto;
    display: block;

    /* estado inicial: tintado */
    filter: grayscale(1) contrast(1.05) brightness(1.05) saturate(0.2);
    transition: filter .25s ease, opacity .25s ease;
    /* superponemos un tinte sin perder detalle del logo */
    mix-blend-mode: multiply;
    opacity: .9;
  }
  /* capa de tinte (fondo) para multiplicar el color sobre el logo en gris */
  .clients__logo::before{
    content: "";
    position: absolute; inset: 0;
    border-radius: 12px;
    background: var(--clients-tint);
    pointer-events: none;
    opacity: .25;            /* intensidad del tinte */
    transition: opacity .25s ease;
    mix-blend-mode: multiply;
  }

  /* Al hover/focus: colores originales */
  .clients__logo:hover img,
  .clients__logo:focus img{
    filter: none;
    mix-blend-mode: normal;
    opacity: 1;
  }
  .clients__logo:hover::before,
  .clients__logo:focus::before{
    opacity: 0;
  }

  /* Respeta usuarios con reducción de movimiento */
  @media (prefers-reduced-motion: reduce){
    .clients__logo, .clients__logo img, .clients__logo::before{
      transition: none;
    }
  }

.container-principal {
  max-width: 1250px;
  margin: 120px auto;
  padding: 0 70px;
  position: relative;
}

.container-principal h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
  color: #333;
}

.container-principal p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #555;
}

.section-wrapper {
  width: 100%;
  padding: 10px 0;
}

.bg-beige {
  background-color: var(--beige);
}

.bg-azulm {
  background-color: var(--azul-p);
  color: var(--beige);
}

.bg-claro {
  background-color: var(--beige);
}

.bg-azulm h2,
.bg-azulm p {
  color: var(--beige);
}

.bg-claro h2 {
  color: var(--azul-p);
}

.site-footer {
  position: relative;
  background-color: var(--azul-m);
  color: white;
  padding: 100px 20px 40px;
  text-align: center;
  overflow: hidden;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin: 30px auto;
  max-width: 800px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.footer-bottom p {
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 15px;
  align-items: center;
}

.footer-social a {
  color: white;
  font-size: 1.5rem;
  transition: opacity 0.3s ease;
}

.social-icon {
  width: 28px;
  height: auto;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s ease;
}

.footer-social a:hover .social-icon {
  opacity: 0.7;
}

.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 55px;
  height: 55px;
  background-color: var(--rojo);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  z-index: 999;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.scroll-top:hover {
  background-color: #bf421f;
}

#servicios h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
}

#servicios > p {
  text-align: justify;
  margin-bottom: 40px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.service-card {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.2s ease-in-out;
}

.service-card:hover {
  transform: translateY(-3px);
}

.service-card img {
  width: 50px;
  height: auto;
  margin-bottom: 10px;
}

.service-card h3 {
  font-size: 1.3rem;
  color: var(--azul-p);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 1rem;
  color: #444;
  line-height: 1.5;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 40px;
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--azul-m);
}

.contact-form input,
.contact-form textarea {
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background-color: #f9f9f9;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--azul-p);
  outline: none;
}

.contact-form .form-group:nth-child(6) {
  grid-column: 1 / -1;
}

.btn-enviar {
  grid-column: 1 / -1;
  justify-self: start;
  background: var(--rojo);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-enviar:hover {
  background: #bf421f;
  transform: translateY(-2px);
}

.bg-azulm .contact-form label {
  color: var(--beige);
}

.bg-azulm .contact-form input,
.bg-azulm .contact-form textarea {
  background-color: #f5f5f5;
  color: #222;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 32px;
  color: #faf0e6;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}


.menu-toggle:focus,
.menu-toggle:active {
  outline: none;
  color: #faf0e6;
}

@media (min-width: 600px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .container-principal {
    padding: 0 20px;
    margin: 60px auto;
  }
  .container-principal h2 {
    font-size: 1.6rem;
  }

  .services-grid {
    gap: 15px;
  }
  .service-card {
    padding: 15px;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .btn-enviar {
    justify-self: stretch;
    text-align: center;
  }

  .header-container {
    max-width: 100%;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    position: relative;
    border-radius: 0%;
  }

  .menu-toggle {
    display: block;
    font-size: 32px;
    color: #faf0e6;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #002f3b;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
    padding: 0 20px;
  }

  .nav-menu.active {
    max-height: 300px;
    padding: 20px;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 15px;
  }

  .nav-menu ul li a {
    color: #faf0e6;
    font-size: 1rem;
  }

  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }

  .footer-social {
    justify-content: center;
  }
}