:root {
  --nav-h: 72px;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #ffffff;
  color: #4a4444;
}

/* Para que los anclajes no queden tapados por el navbar */
section {
  scroll-margin-top: var(--nav-h);
}

h1 {
  color: #FFFFFF;
}

h2,
h3 {
  font-weight: 900;
  color: #4a4444;
}

/* ================= Navbar ================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(0, 0, 0, 0.265);
  backdrop-filter: blur(6px);
  color: #fff;
  z-index: 1000;
}

.logo img {
  height: 56px;
  filter: drop-shadow(0 0 1px white);
  display: block;
}

/* Menú desktop */
nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
}

nav a {
  color: #FFF;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  color: #ea0da8ae;
}

/* Botón hamburguesa */
.menu-toggle {
  display: none;
  margin-left: auto;
  font-size: 1.9rem;
  cursor: pointer;
  color: #fff;
  background: transparent;
  border: 0;
}

/* ================= Hero ================= */
.hero {
  height: 100vh;
  background: url('img/Diseño\ sin\ título.jpg') no-repeat center center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3rem;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.hero-buttons a {
  margin: 10px;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
}

.btn-primary {
  color: #f9f9f9;
  background: #ea0da833;
}

.btn-primary:hover {
  background: #ffffff;
  color: rgb(189, 31, 147);
}

.btn-secondary {
  color: #f9f9f9;
  background: #ea0da833;
}

.btn-secondary:hover {
  background: #ffffff;
  color: rgb(189, 31, 147);
}

/* ================= Contador ================= */
.counter {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center;
}

.counter-item {
  flex: 1;
}

.counter-number {
  font-size: 3rem;
  font-weight: 900;
  color: #b70c84;
  display: inline-block;
}

.counter-item p {
  margin-top: 10px;
  font-size: 1.2rem;
  color: #333;
}

.plus {
  font-size: 2rem;
  font-weight: 900;
  color: #ea0da8;
}

/* ================= Servicios ================= */
.services {
  padding: 60px 20px;
  text-align: center;
}

.services p {
  color: black;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.service-card {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.service-card:hover {
  box-shadow: 0 0 10px rgb(190, 39, 125);
}

.service-icon {
  width: 250px;
  height: 250px;
  margin-bottom: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgb(112, 108, 110);
}

/* ================= Formulario ================= */
.form-section {
  padding: 60px 20px;
  text-align: center;
  background: #f4f4f4;
}

.form-section h2 {
  margin-bottom: 40px;
  font-weight: 900;
  color: #4a4444;
}

form {
  max-width: 600px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

form input,
form textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
}

form button {
  padding: 12px;
  background: #ff4da6;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
}

form button:hover {
  background: #c21878;
}

/* ================= Testimonios ================= */
.testimonials {
  padding: 60px 20px;
  background: white;
  text-align: center;
  color: #000;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.testimonial-card {
  border-radius: 10px;
  font-style: italic;
}

.stars {
  display: block;
  color: rgb(227, 195, 14);
  font-size: 1.2rem;
  margin-top: 5px;
}

/* ================= Contacto ================= */
.contact {
  padding: 80px 20px;
  text-align: center;
  background: #f4f4f4;
}

.contact h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #4a4444;
  font-weight: 900;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
}

.contact-card {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  flex: 1 1 250px;
  max-width: 300px;
  transition: transform 0.2s ease;
}

.contact-card:hover {
  transform: translateY(20px);
  box-shadow: 0 0 10px rgba(190, 39, 125, 0.49);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #c21878;
}

.contact a {
  color: #000;
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

.map iframe {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ================= Botón WhatsApp flotante ================= */
.whatsapp-float {
  position: fixed;
  width: 64px;
  height: 64px;
  bottom: 100px;
  right: 26px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 28px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

/* ================= Responsive ================= */
/* Tablets (<= 992px) */
@media (max-width: 992px) {
  .navbar {
    padding: 0 20px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero p {
    font-size: 1.05rem;
  }

  .counter {
    gap: 30px;
  }
}

/* Celulares (<= 768px) */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.723);
    padding: 18px 0;
    text-align: center;
    z-index: 999;
  }

  nav.active {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 18px;
  }

  .hero {
    padding: 40px 15px;
    height: 420px;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .services-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    flex-direction: column;
  }

  .counter {
    flex-direction: column;
    gap: 20px;
  }

  form {
    width: 100%;
    padding: 0 10px;
  }

  /* 🔹 Cards de contacto más chicas en mobile */
  .contact-card {
    flex: none;        /* 🔹 Ya no fuerza el ancho */
    width: 90%;        /* 🔹 Que ocupe casi todo pero sin exagerar */
    max-width: 280px;  /* 🔹 Limita el ancho máximo */
    padding: 18px;     /* 🔹 Menos padding para que no quede inflada */
    margin: 0 auto;    /* 🔹 Centrada */
    font-size: 0.9rem; /* 🔹 Texto más acorde */
  }

  .contact-card .contact-icon {
    font-size: 2rem;
  }
}

/* Celulares chicos (<= 480px) */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-buttons a {
    display: block;
    margin: 10px auto;
    width: 80%;
  }

  .counter-number {
    font-size: 2.2rem;
  }

  .contact-card {
    max-width: 100%;
    padding: 15px;
    font-size: 0.85rem;
  }

  .contact-card .contact-icon {
    font-size: 1.8rem;
  }
}

/* ================= Animaciones ================= */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes zoomIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Aplicaciones */
h1,
h2,
h3 {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
}

h1 {
  animation-delay: 0.2s;
}

h2 {
  animation-delay: 0.4s;
}

h3 {
  animation-delay: 0.6s;
}

p {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 0.8s;
}

.btn-primary,
.btn-secondary,
form button {
  transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
form button:hover {
  transform: scale(1.05);
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.25);
}

.service-card,
.testimonial-card {
  opacity: 0;
  animation: zoomIn 0.8s ease forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 10px rgba(190, 39, 125, 0.217);}

.testimonial-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0px 6px 16px rgba(6, 6, 6, 0.143);
}

.hero-content {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.5s;
}

section {
  position: relative;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 0.3s;
}


/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.9s ease-out;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.9s ease-out;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Hero especial */
.hero h1 {
  opacity: 0;
  transform: translateX(-80px);
  transition: all 1s ease-out;
}

.hero h1.active {
  opacity: 1;
  transform: translateX(0);
}

.hero p {
  opacity: 0;
  transform: translateX(80px);
  transition: all 1s ease-out 0.2s;
}

.hero p.active {
  opacity: 1;
  transform: translateX(0);
}

.hero .hero-buttons {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease-out 0.4s;
}

.hero .hero-buttons.active {
  opacity: 1;
  transform: translateY(0);
}

.contact-card:hover { transform: translateY(-5px); }

/* Líneas divisorias entre contadores con animación */
.counter-item {
  position: relative;
  padding: 0 20px;
}

.counter-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 2px;
  height: 0;
  background: #ea0da82e;
  opacity: 0.8;
  transform: translateY(-50%);
  animation: growLine 10s ease forwards;
}

/* 🔹 Línea extra en móviles, al costado derecho del último contador */
@media (max-width: 768px) {
  .counter-item:last-child::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 2px;
    height: 0;
    background: #ea0da82e;
    opacity: 0.8;
    transform: translateY(-50%);
    animation: growLine 10s ease forwards;
  }
}


@keyframes growLine {
  from {
    height: 0;
  }
  to {
    height: 80%; /* ocupa del 10% al 90% aprox. */
  }
}

.testimonial-card {
  position: relative;
  padding: 25px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-left: 6px solid transparent;
  border-image: linear-gradient(180deg, #ffffff70, #ff00b31e) 1;
}

.testimonial-card {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 0.8s ease forwards;
}
.testimonial-card:nth-child(1) { animation-delay: 0.2s; }
.testimonial-card:nth-child(2) { animation-delay: 0.4s; }
.testimonial-card:nth-child(3) { animation-delay: 0.6s; }

/* ================= Footer ================= */
.footer {
  background: linear-gradient(180deg, #f9f9f9, #f4f4f4);
  padding: 60px 20px 20px;
  color: #4a4444;
  font-size: 0.95rem;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  max-width: 1200px;
  margin: auto;
}

.footer-about {
  flex: 1 1 250px;
  max-width: 300px;
}

.footer-logo {
  width: 160px;
  margin-bottom: 15px;
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-links {
  margin-left: auto;
}

.footer-links h3,
.footer-social h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #b70c84;
  font-weight: 700;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 8px;
}

.footer-links ul li a {
  color: #4a4444;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links ul li a:hover {
  color: #b70c84;
}

.footer-social .social-icons {
  display: flex;
  gap: 15px;
}

.footer-social .social-icons a {
  font-size: 1.3rem;
  color: #4a4444;
  transition: transform 0.3s, color 0.3s;
}

.footer-social .social-icons a:hover {
  color: #b70c84;
  transform: scale(1.2);
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  border-top: 1px solid #ddd;
  padding-top: 20px;
  font-size: 0.85rem;
  color: #777;
}

/* ================= Responsive Footer ================= */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
    align-items: center; /* 🔹 centra todos los bloques */
  }

  .footer-about,
  .footer-links,
  .footer-social {
    margin-left: 0;   /* 🔹 anula el auto del escritorio */
    max-width: 100%;  /* 🔹 ocupa todo el ancho */
  }

  .footer-social .social-icons {
    justify-content: center;
  }
}

body {
  overflow-x: hidden;
}

.footer {
  overflow-x: hidden;
}

/* ================= Clientes ================= */
.clients {
  padding: 70px 20px;
  text-align: center;
  background: #ffffff;
  overflow: hidden;
}

.clients h2 {
  margin-bottom: 40px;
  font-weight: 900;
  color: #4a4444;
}

.clients-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.clients-track {
  display: flex;
  gap: 60px;
  animation: scrollClients 30s linear infinite;
  will-change: transform;
}

.clients-track img {
  height: 120px;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

/* En hover se destacan en un mismo color */
.clients-track img:hover {
  filter: grayscale(0%) brightness(1) invert(0) opacity(1);
  transform: scale(1.1);
}


/* Animación infinita */
@keyframes scrollClients {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .clients-track {
    gap: 100px;
    animation-duration: 15s;
  }

  .clients-track img {
    height: 120px;
  }
}

@media (max-width: 480px) {
  .clients-track {
    gap: 100px;
    animation-duration: 10s;
  }

  .clients-track img {
    height: 120px;
  }
}

.clients-track {
  animation: scrollClients 30s linear infinite;
}

@keyframes scrollClients {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-1 * var(--track-width)));
  }
}
