:root {
  --red: #e74c3c;
  --dark: #333233;
  --light: #fafafa;
  --muted: #9a9a9a;
  --container: 1100px;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: #222;
  scroll-behavior: smooth;
}
a {
  color: inherit;
  text-decoration: none;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo img {
  height: 34px;
}
nav ul {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
nav li a {
  font-size: 15px;
  color: #444;
}
.btn-contact {
  padding: 8px 14px;
  border-radius: 18px;
  border: 1px solid var(--red);
  color: var(--red);
  font-weight: 600;
}

/* Hero */
.hero {
  min-height: 560px;
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 72px;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("/img/header/header.jpg");
  background-size: cover;
  background-position: center;
  filter: brightness(0.55);
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--light);
  padding: 60px 20px;
}
.hero small {
  letter-spacing: 6px;
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  opacity: 0.9;
}
.hero h1 {
  font-size: 56px;
  margin: 6px 0 12px;
  letter-spacing: 6px;
}
.hero p {
  margin: 0 0 18px;
  text-transform: uppercase;
  color: #f1f1f1;
  letter-spacing: 2px;
}
.hero .cta {
  background: var(--red);
  color: white;
  padding: 12px 28px;
  border-radius: 28px;
  font-weight: 700;
  display: inline-block;
}

/* Quién soy */
.who {
  background: var(--dark);
  color: #fff;
  padding: 64px 20px;
}
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: center;
}
.who .img {
  background: #222;
  height: fit-content;
  border-radius: 4px;
  overflow: hidden;
}
.who .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.who h2 {
  color: var(--red);
  margin: 0 0 14px;
  letter-spacing: 2px;
  margin-left: 2rem;
  font-weight: bolder;
  font-size: 2rem;
}
.who p {
  color: #ddd;
  line-height: 1.6;
  font-size: 1.3rem;
  width: 70%;
  margin-left: 2rem;
}
.who strong {
  color: #fff;
}

/* Servicios */
.services {
  padding: 72px 20px;
  background: white;
  text-align: center;
}

.services h3 {
  color: var(--red);
  letter-spacing: 6px;
  font-size: 28px;
  margin: 0 0 36px;
  margin-bottom: 5rem;
}
.services .grid {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}
.service {
  width: 220px;
}
.service .icon {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 14px;
  border-radius: 20px;
  /* overflow: hidden; */

  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1; /* imagen encima */
}

/* El fondo rombo con ::before */
.service .icon::before {
  content: "";
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: #d1d1d1;
  border-radius: 20px;

  transform: rotate(45deg);
  transition: transform 1.4s ease;

  z-index: -1;
}

.service .icon img {
  max-width: 70%;
  max-height: 70%;
  display: block;
  position: relative;
  z-index: 2;
}

.hf {
  max-width: 85% !important;
  max-height: 85% !important;
}

.service .icon:hover::before {
  transform: rotate(405deg) scale(0.05);
}

.service h4 {
  margin: 8px 0 8px;
  font-size: 14px;
}
.service p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.service .icon img {
  transition: filter 0.4s ease, transform 0.4s ease;
  filter: none; /* color original */
  transform: scale(1);
}

.service .icon:hover img {
  filter: grayscale(100%) brightness(0.7) sepia(100%) saturate(3000%)
    hue-rotate(-15deg);

  transform: scale(1.2);
}

/* Portfolio */
.portfolio {
  padding: 64px 20px;
  background: white;
  text-align: center;
}
.portfolio h3 {
  color: var(--red);
  letter-spacing: 6px;
  font-size: 28px;
  margin: 0 0 8px;
}
.portfolio p.sub {
  color: var(--muted);
  margin-top: 6px;
}
.gallery {
  max-width: 900px;
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.thumb {
  border-radius: 8px;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

/* Contact */
.contact {
  background: var(--dark);
  color: #fff;
  padding: 72px 20px;
}
.contact .wrap {
  display: flex;
  flex-direction: column;
}
.contact h3 {
  color: var(--red);
  letter-spacing: 6px;
  text-align: center;
  font-size: 28px;
  margin: 0 0 8px;
}
.contact p.sub {
  color: #bbb;
  text-align: center;
  margin-bottom: 28px;
}
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 1000px;
  margin: 0 auto;
}
.form textarea {
  grid-column: 1 / -1;
  height: 7.6rem;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #fff;
}
.form input {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #fff;
}
.send {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}
.contact .meta {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  color: #f2f2f2;
}

/* Footer */
footer {
  background: var(--dark);
  padding: 28px 20px;
  text-align: center;
  color: #ccc;
}

.form-flex-cols {
  display: flex;
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* Cada columna */
.form-flex-cols > .col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.form-flex-cols > .col:nth-child(3) textarea {
  height: 7.6rem;
}

/* Botón centrado y con altura completa */
.enviar-col {
  justify-content: start;
  align-items: start;
  max-width: min-content;
}

/* Inputs y textarea full width */
.form-flex-cols input,
.form-flex-cols textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  padding: 1rem;
  background-color: #333233;
}

/* Recaptcha separado y centrado */
.recaptcha-container {
  max-width: 900px;
  /* margin: 1rem auto 0; */
  display: flex;
  justify-content: center;
}

/* Botón estilo tema */
.theme-btn {
  background-color: var(--red);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.5s ease;
  width: 110%;
  height: 7.6rem;
}

.theme-btn:hover {
  background-color: #b03a2e;
}
.whatsapp a {
  display: flex;
}

.whatsapp a p {
  margin-left: 1rem;
}

.instagram {
  margin-top: 0.7em;
}

.whatsapp-mobile a p {
  margin-left: 0.5rem;
  margin-right: 1rem;
}

.instagram-mobile {
  margin-top: 0.7em;
}

/* Estado inicial: invisible y desplazado hacia abajo */
.animate-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Cuando entra en viewport: visible y en su lugar */
.animate-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.red-text {
  color: var(--red);
  font-weight: bold;
}

.redes-mobile {
  display: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* máximo 3 columnas */
  gap: 15px;
}

.thumb {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.thumb .overlay {
  position: absolute;
  top: 20px; /* espacio arriba */
  left: 20px; /* espacio izquierda */
  right: 20px; /* espacio derecha */
  bottom: 20px; /* espacio abajo */
  background: rgba(255, 255, 255, 0.7); /* fondo blanco semitransparente */
  color: white; /* texto negro para contraste */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  /* font-weight: bold; */
  font-size: 1.2em;
  transition: opacity 0.6s ease;
}

.thumb .overlay span {
  background-color: black;
  padding: 0.5rem;
  border-radius: 5px;
}

.thumb:hover img {
  filter: brightness(70%);
  transform: scale(1.05);
}

.thumb:hover .overlay {
  opacity: 1;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
}

.modal-content {
  position: relative;
  max-width: 800px;
  margin: auto;
}

#modal-img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  font-size: 2em;
  color: white;
  cursor: pointer;
}

.controls button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2em;
  padding: 10px;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

#prev {
  left: 10px;
}
#next {
  right: 10px;
}
/* Contenedor botón flotante */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  cursor: pointer;
  display: flex;
  flex-direction: column; /* Ahora en columna */
  align-items: center;
}

/* Globo arriba */
.whatsapp-bubble {
  background: white;
  color: black;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  position: relative;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  margin-bottom: 10px;
  user-select: none;
}
.whatsapp-float:hover .whatsapp-bubble {
  opacity: 1;
  pointer-events: auto;
}

/* Triángulo apuntando hacia abajo */
.whatsapp-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

/* Ícono WhatsApp */
.whatsapp-icon {
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 12px rgb(37 211 102 / 0.5);
  transition: background 0.3s ease;
}
.whatsapp-icon:hover {
  background: #1ebe57;
}
.whatsapp-icon svg {
  width: 32px;
  height: 32px;
  fill: white;
}

.footer-inner img {
  width: 300px;
}

.alert-success {
  display: flex;
  justify-content: center;
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 980px) {
  .hero {
    height: 80vh;
  }
  .wrap {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero h1 {
    font-size: 44px;
  }
}
@media (max-width: 560px) {
  .nav-inner {
    padding: 12px;
  }
  /* nav ul {
    display: none;
  } */
  .hero {
    height: 80vh;
  }
  .hero h1 {
    font-size: 34px;
  }
  .hero small {
    font-size: 12px;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
  .form {
    grid-template-columns: 1fr;
  }
}

/* Responsive: en móvil apilar todo */
@media (max-width: 720px) {
  .form-flex-cols {
    flex-direction: column;
  }

  .form-flex-cols > .col {
    width: 100%;
    max-width: 100%;
  }

  .theme-btn {
    width: 100%;
    height: 100%;
    max-width: 100%;
  }

  .theme-btn svg {
    width: 1em;
  }
  .redes-mobile {
    display: flex;
  }

  .instagram,
  .whatsapp {
    display: none;
  }

  .redes-mobile .instagram {
    margin-left: 1rem;
  }
  .who p {
    width: 80%;
  }
}
