/* ===== Reset y base global ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: "Montserrat", sans-serif;
  background-image: url("../../assets/images/bg1.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Encabezados ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
  font-weight: bold;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2.5rem;
}
h3 {
  font-size: 2rem;
}
h4 {
  font-size: 1.75rem;
}
h5 {
  font-size: 1.5rem;
}
h6 {
  font-size: 1.25rem;
}

/* ===== Párrafos y textos ===== */
p,
span,
li,
label {
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Inputs, textarea y botones ===== */
input,
textarea,
button {
  font-size: 1rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ===== Centrado de secciones y contenedores ===== */
section {
  text-align: center;
}
section > .max-w-6xl,
section > .max-w-4xl,
section > .max-w-3xl {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Enlaces y botones ===== */
a,
button {
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent; /* 🔥 mejora en móvil */
}

/* ===== Fuentes personalizadas ===== */
@font-face {
  font-family: "MiFuentePersonal";
  src: url("../../assets/fonts/tan-nimbus.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}
.mi-fuente {
  font-family: "MiFuentePersonal", sans-serif;
}

/* ===== Animaciones generales ===== */
.emoji {
  position: absolute;
  bottom: -2rem;
  font-size: 2rem;
  animation: rise linear forwards;
  -webkit-animation: rise linear forwards;
}
@-webkit-keyframes rise {
  to {
    -webkit-transform: translateY(-100vh);
    transform: translateY(-100vh);
    opacity: 0;
  }
}
@keyframes rise {
  to {
    -webkit-transform: translateY(-100vh);
    transform: translateY(-100vh);
    opacity: 0;
  }
}

@-webkit-keyframes fadeIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(20px);
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(20px);
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}
.animate-fadeIn {
  -webkit-animation: fadeIn 0.6s forwards;
  animation: fadeIn 0.6s forwards;
}
.fade-in {
  -webkit-animation: fadeIn 0.8s forwards;
  animation: fadeIn 0.8s forwards;
}
.delay-200 {
  animation-delay: 0.2s;
}
.delay-400 {
  animation-delay: 0.4s;
}
.delay-600 {
  animation-delay: 0.6s;
}

/* ===== Navbar ===== */
.nav-link.active {
  color: #00ffd1 !important;
  font-weight: 700;
  text-underline-offset: 6px;
}

/* ===== Hero slides ===== */
#hero .hero-slide {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  -webkit-transition: opacity 0.4s ease;
  transition: opacity 0.4s ease;
}
#hero .hero-slide.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Hero responsive ===== */
#hero h1 {
  font-size: clamp(2.5rem, 8vw, 9rem); /* 🔥 tamaño fluido */
}
#hero h2 {
  font-size: clamp(1.5rem, 5vw, 4rem);
}
#hero p {
  font-size: 1.25rem;
  max-width: 800px;
}

@media (max-width: 1024px) {
  #hero p {
    font-size: 1.1rem;
    max-width: 90%;
  }
}
@media (max-width: 768px) {
  #hero p {
    font-size: 1rem;
  }
}
@media (max-width: 480px) {
  #hero p {
    font-size: 0.9rem;
  }
}

/* Fade-in con retraso para cards */
.card:nth-child(1) {
  animation: fadeIn 0.6s forwards 0.2s;
}
.card:nth-child(2) {
  animation: fadeIn 0.6s forwards 0.4s;
}
.card:nth-child(3) {
  animation: fadeIn 0.6s forwards 0.6s;
}
.card:nth-child(4) {
  animation: fadeIn 0.6s forwards 0.8s;
}

@-webkit-keyframes fade-in {
  0% {
    opacity: 0;
    -webkit-transform: translateY(20px);
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}
@keyframes fade-in {
  0% {
    opacity: 0;
    -webkit-transform: translateY(20px);
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}
.animate-fade-in {
  -webkit-animation: fade-in 2s forwards;
  animation: fade-in 2s forwards;
}

/* ===== Lineas de proceso y pasos ===== */
.proceso-paso .circle {
  font-weight: bold;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  background-color: #a8ff3e;
  color: #000;
}
.proceso-paso p {
  margin: 0;
  color: #fff;
  font-weight: 500;
}
.proceso-paso {
  opacity: 0;
  -webkit-transform: translateY(20px);
  transform: translateY(20px);
}
.proceso-paso.visible {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
  -webkit-transition: opacity 1s ease, -webkit-transform 1s ease;
  transition: opacity 1s ease, transform 1s ease;
}

/* Líneas como imagen estirada */
.linea {
  overflow: hidden;
  display: flex;
  align-items: center;
}
.linea-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  -o-object-fit: fill;
  -webkit-transform: scaleX(0);
  transform: scaleX(0);
  -webkit-transform-origin: left;
  transform-origin: left;
  -webkit-transition: -webkit-transform 3s ease-in-out;
  transition: transform 3s ease-in-out;
}
.linea.active .linea-img {
  -webkit-transform: scaleX(1);
  transform: scaleX(1);
}

/* ===== Typeform ===== */
.tf-container {
  opacity: 0;
  -webkit-transition: opacity 1.5s ease-out, -webkit-transform 1.5s ease-out;
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
  -webkit-transform: translateY(50px);
  transform: translateY(50px);
}
.tf-container.visible {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}
.tf-container iframe {
  display: block !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 100%;
  min-height: 600px;
  border: none !important;
}
@media (max-width: 768px) {
  .tf-container iframe {
    min-height: 500px;
  }
}

/* ===== Sección Diferenciales ===== */
#diferenciales {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#diferenciales h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 2.5rem;
  color: #a8ff3e;
}

/* Grid responsive */
#diferenciales .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 1rem; /* separación vertical */
  column-gap: 3rem;
  width: 100%;
  max-width: 1200px;
  margin-top: 0;
}

/* Cards */
#diferenciales .card {
  background: #111;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  -webkit-transition: -webkit-transform 0.5s, box-shadow 0.5s;
  transition: transform 0.5s, box-shadow 0.5s;
  width: 100%;
  max-width: 420px; /* 🔥 evita que Chrome cambie tamaños */
  flex-shrink: 0; /* 🔥 fix tamaño en grids/flex */
  box-sizing: border-box;
}

#diferenciales .card img {
  max-width: 70%;
  height: auto;
  margin-bottom: 0.5rem;
}

#diferenciales .card h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

#diferenciales .card p {
  font-size: 0.9rem;
  color: #d3d3d3;
  text-align: center;
  margin: 0;
}

/* Hover */
#diferenciales .card:hover {
  -webkit-transform: translateY(-5px);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(168, 255, 62, 0.3);
}

/* Botón */
#diferenciales .cta-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 1.25rem;
  line-height: 1;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 1rem;
  background-color: #a8ff3e;
  color: #000;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}
#diferenciales .cta-btn:hover {
  background-color: #00ffd1;
}

/* Responsive Diferenciales */
@media (max-width: 1024px) {
  #diferenciales .grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  #diferenciales .card img {
    max-width: 60%;
  }
}
@media (max-width: 768px) {
  #diferenciales .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  #diferenciales .card img {
    max-width: 70%;
  }
  #diferenciales h2 {
    font-size: 2rem;
  }
  #diferenciales .card h3 {
    font-size: 1.15rem;
  }
  #diferenciales .card p {
    font-size: 0.85rem;
  }
}
@media (max-width: 480px) {
  #diferenciales .card img {
    max-width: 80%;
  }
  #diferenciales h2 {
    font-size: 1.75rem;
  }
  #diferenciales .card h3 {
    font-size: 1rem;
  }
  #diferenciales .card p {
    font-size: 0.8rem;
  }
}

/* ===== About Us Cards ===== */
#about-us {
  min-height: 100vh;
  padding: 4rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  flex: 1 1 auto; /* Safari fix */
  -webkit-flex: 1 1 auto; /* Safari prefijo */
}

.about-title {
  width: 100%;
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: #a8ff3e;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  -webkit-box-sizing: border-box; /* Safari fix */
  box-sizing: border-box;
}

.about-card {
  background: #111;
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  min-width: 0; /* 🔥 fix Safari */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  width: 100%;
  min-height: 350px;
  box-sizing: border-box;
  cursor: default;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  overflow: hidden; /* Safari fix para contenido dinámico */
}

.about-card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #a8ff3e;
}

.about-card p,
.about-card ul {
  font-size: 0.95rem;
  color: #d3d3d3;
  margin: 0;
}

.about-card .card-content {
  overflow: hidden;
}

.about-card:hover {
  -webkit-transform: translateY(-5px);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(168, 255, 62, 0.3);
}

.about-card .quote {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: #222;
  border-left: 4px solid #a8ff3e;
  font-style: italic;
  color: #a8ff3e;
}

/* Mobile Accordion */
@media (max-width: 768px) {
  .about-cards {
    grid-template-columns: 1fr;
  }
  .about-card {
    min-height: auto;
    padding: 1rem;
    cursor: pointer;
  }
  .about-card .card-content {
    max-height: 0;
    -webkit-transition: max-height 0.4s ease;
    transition: max-height 0.4s ease;
  }
  .about-card.active .card-content {
    max-height: 2000px;
  }
  .about-card h3 {
    cursor: pointer;
  }
}

/* Make "VALORES" card span full width on desktop */
@media (min-width: 769px) {
  .about-card.valores {
    grid-column: 1 / -1;
  }
}
