/* ======================
   RESET
====================== */
html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ======================
   BASE
====================== */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1f2933;
  line-height: 1.6;
  background-color: #fdf6e3;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ======================
   UTILIDADES
====================== */
.container {
  width: 90%;
  max-width: 1100px;
  margin-inline: auto;
}

section {
  position: relative;
}

h1, h2, h3 {
  margin-bottom: 1rem;
  line-height: 1.15;
}

h2 {
  line-height: 1.2;
}

p {
  margin-bottom: 1.5rem;
}

/* ======================
   BOTONES
====================== */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.btn-primary {
  background-color: #25d366;
  color: #fff;
}

.btn-primary:hover {
  background-color: #1ebe5d;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

.btn-secondary {
  border: 2px solid #1f2933;
  color: #1f2933;
  background: transparent;
}

.btn-secondary:hover {
  background: #1f2933;
  color: #fff;
  transform: translateY(-1px);
}

.btn-large {
  font-size: 1.05rem;
}

/* ======================
   HEADER
====================== */
.header {
  background: rgba(255,255,255,0.9);
  padding: 1.2rem 0;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(180%) blur(6px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo img {
  height: 44px;
}

.logo span {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* NAV */
.nav a {
  margin-left: 1.4rem;
  text-decoration: none;
  color: #1f2933;
  font-weight: 500;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #25d366;
  transition: width 0.25s ease;
}

.nav a:hover::after {
  width: 100%;
}

/* ======================
   HERO
====================== */
.hero {
  padding: 4.5rem 0;
  background: #fff3d6;
}

.hero-content {
  max-width: 720px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* ======================
   SERVICIOS
====================== */
.services {
  padding: 4.5rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.8rem;
}

.service-card {
  background: #ffffff;
  padding: 1.6rem;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

/* ======================
   ABOUT
====================== */
.about {
  padding: 4.5rem 0;
}

/* ======================
   CTA
====================== */
.cta {
  background: #1f2933;
  color: #ffffff;
  text-align: center;
  padding: 4.5rem 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.cta p {
  color: #e5e7eb;
}

/* ======================
   FOOTER
====================== */
.footer {
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: #4b5563;
  text-decoration: none;
}

.footer-links a:hover {
  color: #1f2933;
}

/* ======================
   WHATSAPP FLOAT
====================== */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: #ffffff;
  padding: 0.8rem 1.3rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  transition: transform 0.25s ease;
}

.whatsapp-float:hover {
  transform: scale(1.05);
}

/* ======================
   BLOG / ASESORAMIENTO
====================== */
.blog {
  background: #fdf6e3;
  padding: 5rem 0;
}

.blog-layout {
  max-width: 900px;
}

.blog-header {
  margin-bottom: 3.5rem;
}

.blog-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.blog-header h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #25d366;
  margin-top: 1rem;
  border-radius: 4px;
}

.blog-header p {
  font-size: 1.05rem;
  color: #374151;
  max-width: 720px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.faq-item {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.5rem 1.8rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.faq-item summary {
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 1.8rem;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.4rem;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin-top: 1rem;
}

/* BLOG CTA */
.blog-cta {
  margin-top: 4.5rem;
  padding: 2.8rem;
  background: #1f2933;
  color: #ffffff;
  border-radius: 20px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ======================
   PROYECTOS
====================== */
.projects {
  background: #fdf6e3;
  padding: 5rem 0;
}

.projects-header {
  max-width: 700px;
  margin-bottom: 4rem;
}

.projects-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.projects-header h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #25d366;
  margin-top: 1rem;
  border-radius: 4px;
}

.projects-header p {
  font-size: 1.05rem;
  color: #374151;
}

/* GRID */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

/* CARD */
.project-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover img {
  transform: scale(1.03);
}

/* CONTENT */
.project-content {
  padding: 1.8rem;
}

.project-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.project-description {
  color: #374151;
  margin-bottom: 1.2rem;
}

/* TESTIMONIO */
.project-quote {
  font-style: italic;
  color: #4b5563;
  border-left: 4px solid #25d366;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  background: rgba(37, 211, 102, 0.05);
  margin-bottom: 1.2rem;
}

.project-quote span {
  display: block;
  margin-top: 0.4rem;
  font-weight: 600;
  font-style: normal;
  color: #1f2933;
}

/* DETALLES */
.project-details {
  list-style: none;
  padding-left: 0;
}

.project-details li {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

/* CTA */
.projects-cta {
  margin-top: 5rem;
  padding: 3rem;
  background: #1f2933;
  color: #ffffff;
  border-radius: 22px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.projects-cta p {
  color: #d1d5db;
  margin-bottom: 1.6rem;
}

/* ======================
   HERO SLIDER
====================== */
.hero-slider {
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
  background: none;
}

/* Contenedor de imágenes */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Cada slide */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  filter: contrast(1.06) saturate(1.05);
}

/* Slide activo */
.hero-slide.active {
  opacity: 1;
}

/* Overlay elegante (menos difuminado) */
.hero-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(253, 246, 227, 0.92) 0%,
    rgba(253, 246, 227, 0.78) 40%,
    rgba(253, 246, 227, 0.45) 70%,
    rgba(253, 246, 227, 0.25) 100%
  );
  z-index: 2;
}

/* Contenido encima */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 720px;
}

/* ======================
   LEGALES – DISEÑO CORPORATIVO
====================== */

.legal {
  background: #f8f9fb;
  padding: 6rem 1rem;
}

.legal-wrapper {
  max-width: 860px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 4.5rem 5rem;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.04),
    0 1px 4px rgba(0,0,0,0.06);
}

/* Header */
.legal-header {
  margin-bottom: 3.5rem;
}

.legal-eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 0.6rem;
}

.legal-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
}

/* Contenido */
.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: #111827;
}

.legal-content p,
.legal-content li {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #374151;
}

.legal-content ul {
  margin-top: 1rem;
  padding-left: 1.2rem;
}

.legal-content li {
  margin-bottom: 0.6rem;
}

/* Footer legal */
.legal-footer {
  margin-top: 4.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

/* Botón volver */
.legal-back {
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}

.legal-back:hover {
  text-decoration: underline;
}

/* Links secundarios */
.legal-secondary {
  display: flex;
  gap: 1.5rem;
}

.legal-secondary a {
  font-size: 0.9rem;
  color: #6b7280;
  text-decoration: none;
}

.legal-secondary a:hover {
  color: #111827;
}

/* Responsive */
@media (max-width: 768px) {
  .legal-wrapper {
    padding: 3rem 2rem;
  }

  .legal-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ======================
   ABOUT – BLOQUE DESTACADO
====================== */
.about {
  padding: 5rem 0;
  background: #fdf6e3;
}

.about-box {
  max-width: 820px;
  background: #ffffff;
  padding: 3rem 3.5rem;
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
  position: relative;
}

/* Línea de acento de marca */
.about-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3rem;
  width: 4px;
  height: calc(100% - 6rem);
  background: #25d366;
  border-radius: 4px;
}

.about-box h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1.4rem;
  letter-spacing: -0.3px;
}

.about-box p {
  font-size: 1.05rem;
  color: #374151;
}

/* ======================
   LIGHTBOX PROYECTOS
====================== */

.project-image {
  cursor: pointer;
}

/* Fondo del lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
}

/* Imagen ampliada */
.lightbox-img {
  max-width: 95%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* Botón cerrar */
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}

/* Animación suave */
.lightbox.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
