:root {
  --color-primary: #5B9BD5;
  --color-primary-dark: #3F7FBA;
  --color-text: #1a2030;
  --color-text-muted: #5a6678;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8fc;
  --color-border: #e3e8ef;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #1FB957;
  --shadow-md: 0 4px 16px rgba(20, 40, 80, 0.08);
  --shadow-lg: 0 12px 32px rgba(20, 40, 80, 0.14);
  --radius: 14px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 14px 24px;
}

.header-divider {
  width: 1px;
  height: 22px;
  background: var(--color-border);
  flex: 0 0 auto;
}

.logo { display: inline-block; }

.logo img {
  height: 32px;
  display: block;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.15s ease;
}

.nav a:hover { color: var(--color-primary); }

/* Hero */
.hero {
  padding: 96px 0 72px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(91, 155, 213, 0.10), transparent 60%),
    linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  margin: 0 auto 20px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 820px;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--color-text-muted);
  max-width: 660px;
  margin: 0 auto 36px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--color-bg-alt); }

/* "Servicios" — heading + lead centered */
#servicios > .container > h2,
#servicios > .container > .section-lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* "Contacto" — heading + lead + cards centered */
#contacto > .container > h2,
#contacto > .container > .section-lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.cta-card { text-align: center; }
.cta-card .cta-arrow { display: none; }

/* "Quiénes somos" — editorial minimal */
#quienes-somos {
  text-align: center;
  padding: 112px 0;
}

#quienes-somos h2 {
  position: relative;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 auto 48px;
  padding-top: 36px;
}

#quienes-somos h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

#quienes-somos > .container > p {
  max-width: 640px;
  margin: 0 auto 24px;
  font-size: 18px;
  line-height: 1.75;
}

#quienes-somos > .container > p:last-child {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
  max-width: 520px;
  font-size: 22px;
}

@media (max-width: 640px) {
  #quienes-somos { padding: 80px 0; }
  #quienes-somos h2 {
    padding-top: 30px;
  }
}

.section h2 {
  font-size: clamp(26px, 4vw, 36px);
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section > .container > p {
  font-size: 17px;
  color: var(--color-text-muted);
  max-width: 720px;
}

.section-lead {
  font-size: 18px !important;
  margin-bottom: 40px !important;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.service-card {
  background: white;
  padding: 32px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.service-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 20px;
  margin: 0 0 12px;
  color: var(--color-text);
}

.service-card p {
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.55;
}

/* CTA grid */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.cta-card {
  display: block;
  padding: 32px;
  border-radius: var(--radius);
  text-decoration: none;
  color: white;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.cta-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.cta-whatsapp { background: var(--color-whatsapp); }
.cta-whatsapp:hover { background: var(--color-whatsapp-dark); }
.cta-email { background: var(--color-primary); }
.cta-email:hover { background: var(--color-primary-dark); }

.cta-icon {
  display: block;
  margin-bottom: 16px;
  opacity: 0.95;
}

.cta-card h3 {
  font-size: 22px;
  margin: 0 0 6px;
  color: white;
}

.cta-card p {
  margin: 0;
  opacity: 0.95;
  color: white;
  font-size: 15px;
}

.cta-arrow {
  position: absolute;
  top: 32px;
  right: 32px;
  font-size: 24px;
  transition: transform 0.2s ease;
}

.cta-card:hover .cta-arrow { transform: translateX(4px); }

/* Email modal */
.modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(720px, 95vw);
  max-height: 90vh;
  background: white;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal::backdrop {
  background: rgba(15, 25, 40, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, background 0.15s ease;
}

.modal-close:hover {
  background: white;
  transform: scale(1.08);
}

.modal-iframe {
  display: block;
  border: 0;
  width: 100%;
  height: 80vh;
  min-height: 540px;
}

/* Footer */
.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Mobile */
@media (max-width: 640px) {
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }
  .logo img { height: 28px; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 64px 0; }
  .cta-card { padding: 28px 24px; }
  .cta-arrow { top: 28px; right: 24px; }
}

@media (max-width: 380px) {
  .nav { gap: 12px; }
  .nav a { font-size: 13px; }
}
