:root {
  --bg: #ffffff;
  --muted: #f4f6fb;
  --text: #111827;
  --sub: #6b7280;
  --line: #e5e7eb;
  --blue: #16a3ff;
  --green: #22c55e;
  --nav: #ffffff;
  --footer: #0b1220;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Scroll suave nativo */
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  /* Sutil sombra para separar */
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 58px;
  width: auto;
  /* Eliminado clip-path innecesario */
}

.nav {
  display: flex;
  gap: 22px;
  align-items: center;
}

.nav a {
  font-size: 14px;
  color: #111827;
  opacity: .85;
  transition: opacity 0.2s;
}

.nav a:hover {
  opacity: 1;
  color: var(--blue);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform .06s ease, filter .2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-green {
  background: var(--green);
  color: #0b1220;
  box-shadow: 0 8px 18px rgba(34, 197, 94, .25);
}

.btn-green:hover {
  filter: brightness(.98);
}

.btn-lg {
  padding: 12px 18px;
  border-radius: 12px;
}

.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.nav-burger span {
  display: block;
  height: 2px;
  width: 20px;
  background: #111827;
  margin: 2px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* === CORRECCIÓN MENÚ MÓVIL === */
.mobile-nav {
  border-top: 1px solid var(--line);
  padding: 12px 20px 16px;
  background: #fff;
  display: none;
  /* Por defecto oculto */
  flex-direction: column;
  gap: 10px;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Esta regla es clave: Si NO tiene el atributo hidden, muéstralo */
.mobile-nav:not([hidden]) {
  display: flex;
}

.mobile-nav a {
  padding: 12px 10px;
  border-radius: 10px;
}

.mobile-nav a:hover {
  background: var(--muted);
}

/* Hero */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/hero.jpg");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, .35));
}

.hero-content {
  position: relative;
  padding: 70px 0 60px;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-pill {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
}

.hero-title {
  margin: 0;
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: -.5px;
  font-weight: 900;
  text-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}

.hero-title .accent {
  color: var(--blue);
}

.hero-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 16px;
  max-width: 720px;
}

.hero-actions {
  margin-top: 8px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.link-ghost {
  color: #fff;
  font-weight: 700;
  opacity: .9;
}

.link-ghost:hover {
  opacity: 1;
  text-decoration: underline;
}

.hero-note {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, .78);
}

/* Sections */
.section {
  padding: 70px 0;
}

.section-muted {
  background: var(--muted);
}

.section-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: 34px;
  letter-spacing: -.3px;
}

.section-subtitle {
  margin: 0 0 28px;
  text-align: center;
  color: var(--sub);
  font-size: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

/* Cards */
.card,
.service-card,
.faq,
.img-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card {
  padding: 22px;
  text-align: center;
  transition: transform 0.2s;
}

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

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: var(--sub);
  font-size: 13px;
}

/* Services */
.service-grid {
  margin-top: 28px;
}

.service-card {
  padding: 22px;
}

.service-card h3 {
  margin: 0 0 12px;
  text-align: center;
  font-size: 15px;
}

.service-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.8;
}

.service-card p {
  margin: 0;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}

/* Gallery */
.gallery .img-card {
  margin: 0;
  overflow: hidden;
}

.img-card img {
  height: 260px;
  width: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.img-card:hover img {
  transform: scale(1.05);
}

.img-card figcaption {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: #374151;
  font-weight: 500;
}

/* FAQ */
.faq {
  padding: 14px 16px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-size: 18px;
  color: var(--sub);
}

.faq[open] summary::after {
  content: '-';
}

.faq-body {
  margin-top: 10px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--footer);
  color: #e5e7eb;
  padding: 54px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: start;
}

.site-footer h3 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -.3px;
}

.site-footer p {
  margin: 0 0 14px;
  color: rgba(229, 231, 235, .85);
}

.footer-lines {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.site-footer a {
  color: #e5e7eb;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-box {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  padding: 24px;
}

.footer-box h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #fff;
}

.footer-box ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(229, 231, 235, .86);
  font-size: 13px;
  line-height: 1.8;
}

.footer-badge {
  margin: 10px 0 15px;
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}

.footer-middle {
  margin: 32px auto 16px;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-middle a {
  color: rgba(229, 231, 235, .85);
  font-size: 14px;
}

.footer-bottom {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: rgba(229, 231, 235, .75);
  font-size: 13px;
}

/* Redes Sociales y Tooltips */
.social-row {
  margin-top: 16px;
  margin-bottom: 18px;
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: all .2s ease;
  position: relative;
  /* CRÍTICO PARA EL TOOLTIP */
}

.social-icon svg {
  width: 20px;
  height: 20px;
  fill: #e5e7eb;
}

.social-icon:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .15);
}

/* Tooltip corregido */
.social-icon[aria-label]:hover::after {
  content: attr(aria-label);
  position: absolute;
  bottom: -35px;
  /* Ajustado */
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  /* Cambiado a flex para centrar líneas */
  .hero-title {
    font-size: 36px;
  }

  .grid-3,
  .grid-2,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}