/* ============================================================
   DALLA COSTA ODONTOLOGÍA — Ultra Premium Landing Page
   Design System & Styles
   ============================================================ */

/* ---- CUSTOM PROPERTIES ---- */
:root {
  --primary:        #751470;
  --primary-dark:   #4a0c47;
  --primary-light:  #9a1d95;
  --accent:         #4ecdc4;
  --accent-light:   #D6F8D6;
  --accent-dark:    #38a89d;

  --dark:           #0d0413;
  --dark-2:         #190c28;
  --dark-card:      #1e0e30;

  --white:          #ffffff;
  --off-white:      #fafafa;
  --gray-50:        #f6f6f8;
  --gray-100:       #ebebf0;
  --gray-400:       #9999aa;
  --gray-600:       #666677;
  --text:           #1a1a2e;

  --font-heading:   'Oswald', system-ui, -apple-system, sans-serif;
  --font-body:      'Inter', system-ui, -apple-system, sans-serif;

  --nav-h:          80px;
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --radius-xl:      40px;

  --shadow-sm:      0 2px 12px rgba(117,20,112,.08);
  --shadow-md:      0 8px 32px rgba(117,20,112,.14);
  --shadow-lg:      0 20px 60px rgba(117,20,112,.22);
  --shadow-accent:  0 8px 32px rgba(78,205,196,.25);

  --ease-out:       cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, button { font-family: inherit; }
textarea { resize: vertical; }

/* ---- LAYOUT UTILS ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  position: relative;
  padding: 110px 0;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-tag::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.section-tag--light { color: var(--accent-light); }
.section-tag--light::before { background: var(--accent-light); }

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.section-title em {
  font-style: normal;
  color: inherit;
}

.section-title--light { color: var(--white); }
.section-title--light em { color: inherit; }

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.7;
  max-width: 560px;
}

.section-subtitle--light { color: rgba(255,255,255,.7); }

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .section-tag { display: inline-flex; }
.section-header .section-subtitle { margin: 0 auto; }
.section-header .section-tag::before { display: none; }
.section-header .section-tag::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: var(--radius-xl);
  font-size: 0.925rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.12);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::before { opacity: 1; }

.btn--primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(117,20,112,.35);
}

.btn--primary:hover {
  background: var(--primary-light);
  box-shadow: 0 8px 28px rgba(117,20,112,.45);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.4);
}

.btn--ghost:hover {
  border-color: var(--white);
  background: rgba(255,255,255,.1);
  transform: translateY(-2px);
}

.btn--full { width: 100%; justify-content: center; }

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease-spring);
  flex-shrink: 0;
}

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

/* ---- SCROLL REVEAL ---- */
/* Only animate when JS has loaded (js-ready class on <html>) */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), backdrop-filter 0.4s;
}

.navbar.scrolled {
  background: rgba(13, 4, 19, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo img {
  height: 58px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s;
}

.nav-logo:hover img { opacity: 0.85; }

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

.nav-link {
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  border-radius: var(--radius-sm);
  transition: color 0.25s, background 0.25s;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,.08);
}

.nav-link.active { color: var(--white); }

.nav-link--cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: var(--radius-xl);
  margin-left: 8px;
  box-shadow: 0 4px 14px rgba(117,20,112,.4);
}

.nav-link--cta:hover {
  background: var(--primary-light) !important;
  box-shadow: 0 6px 20px rgba(117,20,112,.5);
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.35s;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--dark);
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(13,4,19,0.92) 0%,
    rgba(13,4,19,0.72) 45%,
    rgba(13,4,19,0.28) 100%
  );
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 580px;
  padding: calc(var(--nav-h) + 60px) 0 80px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 28px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent-light);
  border-radius: 2px;
}

.js-ready .hero-eyebrow {
  animation: heroSlideUp 0.7s var(--ease-out) both;
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.js-ready .hero-title {
  animation: heroSlideUp 0.8s var(--ease-out) 0.1s both;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,.65);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 460px;
}

.js-ready .hero-subtitle {
  animation: heroSlideUp 0.8s var(--ease-out) 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.js-ready .hero-actions {
  animation: heroSlideUp 0.8s var(--ease-out) 0.3s both;
}

@keyframes heroSlideUp {
  from { transform: translateY(20px); opacity: 0.3; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  padding: 0;
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 110px;
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  gap: 6px;
}

.stat-number {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-sup {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

.stat-sep {
  width: 1px;
  align-self: stretch;
  margin: 20px 0;
  background: var(--gray-100);
}

/* ============================================================
   ABOUT — QUIÉNES SOMOS
   ============================================================ */
.about { background: var(--off-white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text .section-title { margin-bottom: 24px; }

.about-lead {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-body {
  font-size: 0.975rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 40px;
}

.values-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.value-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.value-icon svg {
  width: 22px;
  height: 22px;
  color: var(--white);
}

.value-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.value-text strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.value-text span {
  font-size: 0.85rem;
  color: var(--gray-400);
}

/* About visual */
.about-visual {
  position: relative;
}

.about-img-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-img-main img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.about-img-main:hover img { transform: scale(1.03); }

.about-img-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.about-img-badge svg {
  width: 24px;
  height: 24px;
  color: var(--accent-dark);
  flex-shrink: 0;
}

.about-img-badge strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.about-img-badge span {
  font-size: 0.78rem;
  color: var(--gray-400);
}

.about-img-secondary {
  margin-top: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about-img-secondary img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.about-img-secondary:hover img { transform: scale(1.03); }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery { background: var(--gray-50); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 300px 300px;
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: default;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.gallery-item:hover img { transform: scale(1.04); }

/* ============================================================
   TEAM
   ============================================================ */
.team { background: var(--dark); }

.team .section-tag    { color: var(--accent-light); }
.team .section-tag::before { background: var(--accent-light); }
.team .section-title  { color: var(--white); }
.team .section-title em { color: var(--accent-light); }
.team .section-subtitle { color: rgba(255,255,255,.55); }
.team .section-header .section-tag::after { background: var(--accent-light); }
.team .section-header .section-tag::before { display: none; }

.team-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.team-card {
  width: 200px;
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(117,20,112,.4);
  border-color: rgba(117,20,112,.4);
}

.team-photo {
  position: relative;
  aspect-ratio: 1 / 1.1;
  overflow: hidden;
  background: var(--primary-dark);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s var(--ease-out);
}

.team-card:hover .team-photo img { transform: scale(1.07); }

.team-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,4,19,.85) 0%, transparent 45%);
  transition: opacity 0.35s;
}

/* Initials avatar for team members without photo */
.team-photo--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.initials-avatar {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: rgba(255,255,255,.6);
  letter-spacing: 0.05em;
}

.team-info {
  padding: 18px 16px;
  text-align: center;
}

.team-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.3;
}

.team-info p {
  font-size: 0.78rem;
  color: var(--accent);
  line-height: 1.5;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-dark) 100%);
  background-size: 200% 200%;
  animation: gradientFlow 12s ease infinite;
  overflow: hidden;
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.services-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.service-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: default;
  transition: background 0.35s var(--ease-out), border-color 0.35s, transform 0.35s var(--ease-out), box-shadow 0.35s;
  backdrop-filter: blur(8px);
}

.service-card:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(214,248,214,.35);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.25), 0 0 0 1px rgba(214,248,214,.2);
}

.service-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: rgba(214,248,214,.12);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.35s, transform 0.35s var(--ease-spring);
}

.service-card:hover .service-icon {
  background: rgba(214,248,214,.22);
  transform: scale(1.1) rotate(-3deg);
}

.service-icon svg {
  width: 30px;
  height: 30px;
  color: var(--accent-light);
}

.service-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.3;
  font-family: var(--font-body);
}

.service-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--white); padding-bottom: 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.contact-intro {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* WhatsApp CTA button */
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 28px;
  background: #25D366;
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-xl);
  margin-bottom: 32px;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 20px rgba(37,211,102,.3);
  width: 100%;
  justify-content: center;
}

.whatsapp-btn:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,.4);
}

.whatsapp-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  background: var(--off-white);
}

a.contact-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.contact-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 20px;
  height: 20px;
  color: var(--white);
}

.contact-item strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.contact-item span {
  font-size: 0.88rem;
  color: var(--gray-600);
}

/* Map strip — full-width at bottom of contact section */
.contact-map-strip {
  position: relative;
  height: 360px;
  overflow: hidden;
}

.contact-map-strip iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: saturate(0.9);
}

.map-card {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.map-card-pin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(117,20,112,.4);
}

.map-card-pin svg {
  width: 18px;
  height: 18px;
  color: var(--white);
}

.map-card-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.map-card-text span {
  font-size: 0.82rem;
  color: var(--gray-400);
}

.map-card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border-left: 1px solid var(--gray-100);
  padding-left: 16px;
  transition: color 0.2s;
  flex-shrink: 0;
}

.map-card-link:hover { color: var(--primary-light); }

.map-text strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 3px;
}

.map-text span {
  font-size: 0.8rem;
  color: rgba(255,255,255,.5);
}

.map-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 0.04em;
}

/* Contact form */
.contact-form-wrap {
  background: var(--off-white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-sm);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.form-group label span { color: var(--primary); }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-400);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(117,20,112,.1);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231,76,60,.08);
}

.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(78,205,196,.1);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-success.show { display: flex; }

.form-success svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Contact CTA card (replaces form) */
.contact-cta-card {
  background: var(--off-white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 52px 40px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.cta-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(37,211,102,.3);
  flex-shrink: 0;
}

.cta-icon svg {
  width: 38px;
  height: 38px;
  fill: var(--white);
}

.contact-cta-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

.contact-cta-card > p {
  font-size: 0.975rem;
  color: var(--gray-600);
  line-height: 1.75;
  max-width: 300px;
}

.cta-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--gray-400);
}

.cta-note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,.6);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.footer-logo {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
  opacity: .85;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 260px;
}

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

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
}

.social-link svg { width: 18px; height: 18px; }

.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li,
.footer-col ul a {
  font-size: 0.88rem;
  color: rgba(255,255,255,.5);
  transition: color 0.25s;
}

.footer-col ul a:hover { color: var(--accent-light); }

.footer-bottom {
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,.3);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  transform: scale(0.9);
  transition: transform 0.4s var(--ease-spring);
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
}

.lightbox.open img { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, transform 0.25s;
}

.lightbox-close svg { width: 20px; height: 20px; }

.lightbox-close:hover {
  background: rgba(255,255,255,.2);
  transform: rotate(90deg);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .about-grid { gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 900px) {
  :root { --nav-h: 68px; }
  .section { padding: 80px 0; }

  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(160deg, rgba(13,4,19,.99) 0%, rgba(30,14,48,.99) 100%);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 40px 0 60px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
    z-index: 999;
    border-top: 1px solid rgba(117,20,112,.4);
    overflow-y: auto;
  }

  .nav-menu::before {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    margin: 0 auto 32px;
    flex-shrink: 0;
  }

  .nav-menu.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .nav-menu li {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .nav-link {
    font-size: 1.2rem;
    font-weight: 400;
    padding: 16px 0;
    width: 100%;
    max-width: 260px;
    text-align: center;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,.07);
    border-radius: 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.88rem;
    color: rgba(255,255,255,.65);
    transition: color 0.25s;
  }

  .nav-link:hover {
    color: var(--white);
    background: none;
  }

  .nav-link--cta {
    display: flex;
    justify-content: center;
    width: 220px;
    max-width: 220px;
    border-bottom: none;
    border-radius: var(--radius-xl);
    padding: 14px 36px;
    margin: 28px 0 0;
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.95rem;
    font-size: 1rem;
  }

  .hamburger { display: flex; }

  /* Navbar siempre oscuro en mobile; sin backdrop-filter para que el menú
     fixed se posicione correctamente respecto al viewport */
  .navbar {
    background: rgba(13,4,19,0.92);
  }
  .navbar.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .hero { align-items: flex-start; }
  .hero-content { padding-top: calc(var(--nav-h) + 20px); padding-bottom: 52px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .contact-map-strip { height: 280px; }
  .map-card { white-space: normal; max-width: calc(100vw - 48px); }

  .about-grid { grid-template-columns: 1fr; }
  .about-visual { order: -1; }
  .about-img-main img { height: 300px; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 220px 220px 220px;
  }

  .team-grid { gap: 16px; }
  .team-card { width: 170px; }

  .services-grid { grid-template-columns: repeat(3, 1fr); }

  .contact-grid { grid-template-columns: 1fr; gap: 48px; }

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

@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .container { padding: 0 16px; }

  .hero-title { font-size: clamp(2.2rem, 9vw, 3rem); }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-photo { object-position: 68% center; }
  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(13,4,19,0.82) 0%,
      rgba(13,4,19,0.55) 55%,
      rgba(13,4,19,0.25) 100%
    );
  }

  .stats-grid { flex-wrap: wrap; }
  .stat-item { width: 50%; flex: none; }
  .stat-sep:nth-child(2) { display: none; }
  .stat-sep:nth-child(4) { display: none; }

  .about-img-main img { height: 240px; }
  .about-img-secondary { display: none; }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
  }
  .gallery-item { height: 200px; }

  .team-grid { gap: 12px; }
  .team-card { width: calc(50% - 6px); }

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

  .form-row { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 28px 20px; }
  .contact-cta-card { padding: 36px 24px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand p { max-width: 100%; }
}
