/* =========================================================
   SR ASOCIADOS — DESPACHO DE ABOGADOS
   Hoja de estilos principal — Glassmorphism / Elegante / Moderno
   ========================================================= */

/* ---------- Fuentes ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }

/* ---------- Design Tokens ---------- */
:root {
  /* Paleta (inspirada en el logotipo SR Asociados) */
  --navy: #142038;
  --navy-2: #1c2c4d;
  --navy-deep: #0c1526;
  --gold: #ab8358;
  --gold-light: #cba977;
  --gold-dark: #8a6a44;
  --cream: #f8f5ef;
  --paper: #fbf9f5;
  --white: #ffffff;
  --text-dark: #1b2233;
  --text-muted: #5c6478;
  --text-on-navy: #eef1f7;
  --text-on-navy-muted: #aab3c8;

  /* Glass */
  --glass-light-bg: rgba(255, 255, 255, 0.52);
  --glass-light-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-light-border: rgba(255, 255, 255, 0.55);
  --glass-navy-bg: rgba(20, 32, 56, 0.62);
  --glass-navy-bg-strong: rgba(12, 21, 38, 0.82);
  --glass-navy-border: rgba(203, 169, 119, 0.25);
  --glass-blur: 18px;

  /* Sombra */
  --shadow-soft: 0 10px 40px rgba(20, 32, 56, 0.10);
  --shadow-mid: 0 18px 50px rgba(20, 32, 56, 0.16);
  --shadow-gold: 0 10px 30px rgba(171, 131, 88, 0.25);

  /* Tipografía */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container-w: 1200px;
  --header-h: 126px;
  --header-h-scrolled: 98px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  /* Espaciado por defecto para safe-area en iOS */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

/* Fondo fijo implementado con un elemento propio en vez de background-attachment:fixed,
   que en iOS Safari no se queda realmente estático y "salta" al hacer scroll. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--paper);
  background-image: url('../img/fondo.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
}

/* Tablet y desktop: textura horizontal en vez de la vertical usada en móvil */
@media (min-width: 993px) {
  body::before { background-image: url('../img/fondo-desktop.jpg'); }
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

p { color: var(--text-muted); line-height: 1.75; }

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

section { position: relative; padding: 110px 0; }
@media (max-width: 768px) { section { padding: 70px 0; } }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 14px;
}
.section-tag::before {
  content: '';
  width: 30px;
  height: 1.5px;
  background: var(--gold);
  display: inline-block;
}

.section-title {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  margin-bottom: 18px;
}
.section-title em {
  font-style: italic;
  color: var(--gold-dark);
}
.section-subtitle {
  max-width: 640px;
  font-size: 1.02rem;
}
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ---------- Glass utilities ---------- */
.glass {
  background: var(--glass-light-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-light-border);
  box-shadow: var(--shadow-soft);
}

.glass-strong {
  background: var(--glass-light-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-light-border);
}

.glass-navy {
  background: var(--glass-navy-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-navy-border);
  box-shadow: var(--shadow-mid);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 34px;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease, background 0.35s ease, color .35s ease;
  white-space: nowrap;
  min-height: 48px;
  max-width: 100%;
}
@media (max-width: 480px) {
  .hero-actions,
  .cta-banner .btn-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn,
  .cta-banner .btn-actions .btn {
    width: 100%;
    white-space: normal;
  }
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: var(--white);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(171,131,88,0.38); }

.btn-outline {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.55);
  color: var(--navy);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn-outline:hover { background: rgba(255,255,255,0.4); transform: translateY(-3px); }

.btn-outline.on-navy { color: var(--text-on-navy); border-color: rgba(203,169,119,0.5); }
.btn-outline.on-navy:hover { background: rgba(203,169,119,0.15); }

.btn-block { width: 100%; }
.btn-sm { padding: 11px 24px; font-size: 0.85rem; min-height: 40px; }

/* ---------- Header / Navbar ---------- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1300;
  padding-top: var(--safe-top);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.navbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: height 0.35s ease;
}
#site-header.scrolled .navbar { height: var(--header-h-scrolled); }
#site-header.scrolled {
  background: var(--glass-light-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  box-shadow: 0 4px 30px rgba(20,32,56,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.4);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 108px; width: auto; transition: height .35s ease; }
#site-header.scrolled .brand img { height: 84px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 38px;
}
.nav-links a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--navy);
  padding: 6px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--gold-dark); }

.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-phone { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.nav-phone svg { width: 18px; height: 18px; stroke: var(--gold); flex-shrink: 0; }

/* Hamburguesa */
.hamburger {
  display: none;
  position: relative;
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  border-radius: 50%;
}
.hamburger span {
  position: absolute;
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.25s ease, top 0.35s ease, background .3s ease;
}
.hamburger span:nth-child(1) { top: 17px; }
.hamburger span:nth-child(2) { top: 23px; }
.hamburger span:nth-child(3) { top: 29px; }
.hamburger.open span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 23px; transform: rotate(-45deg); }

/* Menú hamburguesa activo en tablet y móvil */
@media (max-width: 992px) {
  :root { --header-h: 94px; --header-h-scrolled: 76px; }
  .nav-links { display: none; }
  .nav-right .nav-phone,
  .nav-right .btn-primary { display: none; }
  .hamburger { display: flex; }
  .brand img { height: 72px; }
  #site-header.scrolled .brand img { height: 60px; }
}

/* Menú móvil */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  background: var(--glass-navy-bg-strong);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  backdrop-filter: blur(26px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-16px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  padding: calc(var(--safe-top) + 40px) 24px calc(var(--safe-bottom) + 40px);
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--text-on-navy);
  font-weight: 600;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.mobile-menu.open a { opacity: 1; transform: translateY(0); }
.mobile-menu.open a:nth-child(1) { transition-delay: .08s; }
.mobile-menu.open a:nth-child(2) { transition-delay: .14s; }
.mobile-menu.open a:nth-child(3) { transition-delay: .20s; }
.mobile-menu.open a:nth-child(4) { transition-delay: .26s; }
.mobile-menu.open a:nth-child(5) { transition-delay: .32s; }
.mobile-menu .mobile-call {
  margin-top: 6px;
  padding: 13px 30px;
  min-height: 44px;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease .38s, transform .5s ease .38s, filter .35s ease;
}
.mobile-menu.open .mobile-call { opacity: 1; transform: translateY(0); animation: pulse 2.4s ease-in-out .9s infinite; }
.mobile-menu .mobile-call:active { filter: brightness(0.95); }

body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 60px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}
.hero-grid > * { min-width: 0; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 26px;
}
.hero-eyebrow span.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); display: inline-block; animation: pulse 2s infinite; }

.hero h1 {
  font-size: clamp(1.8rem, 7.5vw, 3.8rem);
  margin-bottom: 22px;
  overflow-wrap: break-word;
}
@media (max-width: 380px) {
  .hero h1 { font-size: 1.6rem; }
}
.hero h1 em { font-style: italic; color: var(--gold-dark); }
.hero p.lead {
  font-size: 1.08rem;
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 0; }
.hero-stats .stat {
  padding: 0 34px;
  border-right: 1px solid rgba(20, 32, 56, 0.14);
}
.hero-stats .stat:first-child { padding-left: 0; }
.hero-stats .stat:last-child { border-right: none; }
.hero-stats .stat b {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.9rem, 2.2vw, 2.4rem);
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 4px;
}
.hero-stats .stat > span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .hero-stats .stat { border-right: none; padding: 0 22px; }
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 34px;
  text-align: center;
}
.hero-visual .visual-badge {
  position: absolute;
  bottom: -22px; left: -22px;
  padding: 18px 26px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  animation: float 5s ease-in-out infinite;
}
.hero-visual .visual-badge .icon-circle { background: var(--gold); }
.hero-visual .visual-badge b { display: block; font-family: var(--font-heading); font-size: 1.3rem; color: var(--navy); }
.hero-visual .visual-badge span { font-size: 0.78rem; color: var(--text-muted); }
.hero-visual img { border-radius: var(--radius-md); }

.icon-circle {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  box-shadow: var(--shadow-gold);
}
.icon-circle svg { width: 26px; height: 26px; stroke: var(--white); }

@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-visual { margin-top: 30px; }
  .hero-visual .visual-badge { left: 50%; transform: translateX(-50%); bottom: -20px; }
}

/* Móvil: la insignia "100% Confidencial" pasa a estar debajo de la foto en vez de flotar encima */
@media (max-width: 576px) {
  .hero-visual .visual-badge {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    margin: 18px auto 0;
    max-width: 300px;
    justify-content: center;
  }
}

/* ---------- Stats band ---------- */
.stats-band { padding: 60px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 40px 20px;
  text-align: center;
}
.stats-grid .stat { position: relative; }
.stats-grid .stat:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 8%; right: 0; bottom: 8%;
  width: 1px;
  background: rgba(20, 32, 56, 0.14);
}
.stats-grid .stat b {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.3rem, 3.2vw, 2.9rem);
  line-height: 1;
  color: var(--navy);
  margin-bottom: 8px;
}
.stats-grid .stat > span { font-size: 1rem; font-weight: 600; color: var(--text-muted); letter-spacing: .3px; }
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 0; }
  .stats-grid .stat:nth-child(2n)::after { display: none; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; gap: 26px 0; padding: 34px 24px; }
  .stats-grid .stat::after { display: none; }
  .stats-grid .stat b { font-size: 2.2rem; }
}

/* ---------- Tarjetas de servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
@media (max-width: 1100px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  padding: 40px 30px;
  border-radius: var(--radius-md);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s ease, background 0.4s ease;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-mid);
  background: var(--glass-light-bg-strong);
}
.service-card .icon-circle { margin-bottom: 22px; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.service-card p { font-size: 0.92rem; margin-bottom: 18px; }
.service-card .card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.service-card .card-link svg { width: 14px; height: 14px; stroke: var(--gold-dark); transition: transform .3s ease; }
.service-card:hover .card-link svg { transform: translateX(4px); }

/* ---------- Ventajas ---------- */
.advantages-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) { .advantages-wrap { grid-template-columns: 1fr; } }
.advantage-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  transition: transform .35s ease, background .35s ease;
}
.advantage-item:hover { transform: translateX(6px); background: var(--glass-light-bg-strong); }
.advantage-item h4 { font-size: 1.05rem; margin-bottom: 6px; }
.advantage-item p { font-size: 0.9rem; }

/* ---------- Proceso ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
@media (max-width: 900px) { .process-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process-grid { grid-template-columns: 1fr; } }
.process-step {
  padding: 34px 26px;
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
}
.process-step .step-num {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: var(--gold);
  opacity: 0.55;
  margin-bottom: 6px;
}
.process-step h4 { font-size: 1.05rem; margin-bottom: 10px; }
.process-step p { font-size: 0.88rem; }

/* ---------- Testimonios ---------- */
.testimonial-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
@media (max-width: 992px) { .testimonial-track { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .testimonial-track { grid-template-columns: 1fr; } }
.testimonial-card { padding: 34px 30px; border-radius: var(--radius-md); }
.testimonial-card .stars { color: var(--gold); letter-spacing: 3px; margin-bottom: 16px; font-size: 0.95rem; }
.testimonial-card p.quote { font-style: italic; font-size: 0.95rem; color: var(--text-dark); margin-bottom: 22px; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }
.avatar-initial {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  color: var(--gold-light);
  font-family: var(--font-heading);
  font-weight: 600;
}
.testimonial-author b { display: block; font-size: 0.92rem; color: var(--navy); }
.testimonial-author span { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: var(--radius-lg);
  padding: 70px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(160deg, #2f4570, #3d5a90), url('../img/cta-bg.jpg');
  background-size: cover;
  background-position: center;
  background-blend-mode: color;
}
.cta-banner h2 { color: var(--text-on-navy); margin-bottom: 16px; }
.cta-banner p { color: var(--text-on-navy-muted); max-width: 560px; margin: 0 auto 36px; }
.cta-banner .btn-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
#site-footer {
  padding-top: 90px;
  color: var(--text-on-navy-muted);
  position: relative;
}
.footer-bg {
  background: var(--glass-navy-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border-top: 1px solid var(--glass-navy-border);
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 50px;
  padding-bottom: 50px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { height: 80px; margin-bottom: 18px; }
.footer-brand p { font-size: 0.88rem; max-width: 280px; margin-bottom: 22px; }
.footer-col h5 { font-family: var(--font-heading); color: var(--text-on-navy); font-size: 1.02rem; margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { font-size: 0.88rem; transition: color .25s ease, padding-left .25s ease; }
.footer-col ul li a:hover { color: var(--gold-light); padding-left: 4px; }
.footer-contact li { display: flex; gap: 12px; font-size: 0.88rem; margin-bottom: 16px; align-items: flex-start; }
.footer-contact svg { width: 17px; height: 17px; stroke: var(--gold-light); flex-shrink: 0; margin-top: 2px; }

.social-row { display: flex; gap: 12px; margin-top: 20px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(203,169,119,0.12);
  border: 1px solid var(--glass-navy-border);
  transition: background .3s ease, transform .3s ease;
}
.social-row a:hover { background: var(--gold); transform: translateY(-4px); }
.social-row svg { width: 16px; height: 16px; stroke: var(--gold-light); }
.social-row a:hover svg { stroke: var(--navy-deep); }

.footer-bottom {
  border-top: 1px solid var(--glass-navy-border);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
}
.footer-bottom .legal-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom a:hover { color: var(--gold-light); }

/* ---------- Page hero (páginas internas) ---------- */
.page-hero {
  padding-top: calc(var(--header-h) + 90px);
  padding-bottom: 70px;
  text-align: center;
}
.page-hero .section-tag { justify-content: center; }
.page-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); margin-bottom: 16px; }
.page-hero p { max-width: 560px; margin: 0 auto; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; font-size: 0.82rem; margin-top: 18px; color: var(--text-muted); }
.breadcrumb a { color: var(--gold-dark); font-weight: 600; }

/* ---------- Servicios (detalle) ---------- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 70px 0;
}
.service-detail:not(:last-child) { border-bottom: 1px solid rgba(20,32,56,0.08); }
.service-detail.reverse .service-detail-text { order: 2; }
.service-detail.reverse .service-detail-visual { order: 1; }
@media (max-width: 900px) {
  .service-detail, .service-detail.reverse { grid-template-columns: 1fr; }
  .service-detail.reverse .service-detail-text,
  .service-detail.reverse .service-detail-visual { order: unset; }
}
.service-detail-visual {
  border-radius: var(--radius-lg);
  padding: 46px;
}
.service-detail-visual .icon-circle { width: 76px; height: 76px; margin-bottom: 24px; }
.service-detail-visual .icon-circle svg { width: 36px; height: 36px; }
.service-detail-text h2 { font-size: 1.8rem; margin-bottom: 16px; }
.service-detail-text p { margin-bottom: 22px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.93rem;
  color: var(--text-dark);
  margin-bottom: 13px;
}
.check-list svg { width: 19px; height: 19px; stroke: var(--gold-dark); flex-shrink: 0; margin-top: 2px; }

/* ---------- Nosotros ---------- */
.values-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
@media (max-width: 900px) { .values-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .values-grid { grid-template-columns: 1fr; } }
.value-card { padding: 34px 26px; border-radius: var(--radius-md); text-align: center; }
.value-card h4 { font-size: 1.02rem; margin: 16px 0 10px; }
.value-card p { font-size: 0.88rem; }
.value-card .icon-circle { margin: 0 auto; }

.team-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; }
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .team-grid { grid-template-columns: 1fr; } }
.team-card { border-radius: var(--radius-md); overflow: hidden; text-align: center; padding-bottom: 30px; transition: transform .4s ease; }
.team-card:hover { transform: translateY(-8px); }
.team-photo {
  aspect-ratio: 4 / 5;
  background: linear-gradient(150deg, var(--navy-2), var(--navy-deep));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.team-photo .initials {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--gold-light);
  opacity: 0.85;
}
.team-card h4 { margin-top: 22px; font-size: 1.08rem; }
.team-card span.role { display: block; font-size: 0.82rem; color: var(--gold-dark); font-weight: 600; margin: 6px 0 14px; letter-spacing: .5px; text-transform: uppercase; }
.team-card p { font-size: 0.86rem; padding: 0 24px; }

.mission-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 900px) { .mission-wrap { grid-template-columns: 1fr; } }
.mission-panel { border-radius: var(--radius-lg); padding: 46px; }
.mission-panel h3 { font-size: 1.3rem; margin-bottom: 14px; }
.mission-panel p { margin-bottom: 0; }

/* ---------- Contacto ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: flex-start;
}
@media (max-width: 950px) { .contact-wrap { grid-template-columns: 1fr; } }

.contact-form-card { padding: 46px; border-radius: var(--radius-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(20,32,56,0.14);
  background: rgba(255,255,255,0.55);
  color: var(--text-dark);
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
  font-size: 0.94rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 4px rgba(171,131,88,0.14);
}
.field textarea { resize: vertical; min-height: 130px; }
.field-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 26px; }
.field-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex-shrink: 0; }
.field-check label { font-size: 0.82rem; color: var(--text-muted); font-weight: 400; }

.form-msg { display: none; padding: 14px 18px; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 20px; }
.form-msg.success { display: block; background: rgba(80,160,110,0.14); color: #2e6b47; border: 1px solid rgba(80,160,110,0.3); }
.form-msg.error { display: block; background: rgba(200,80,80,0.12); color: #a13636; border: 1px solid rgba(200,80,80,0.3); }

.contact-info-card { padding: 40px; border-radius: var(--radius-lg); margin-bottom: 24px; }
.contact-info-card h3 { font-size: 1.15rem; margin-bottom: 22px; }
.info-row { display: flex; gap: 16px; margin-bottom: 22px; align-items: flex-start; }
.info-row:last-child { margin-bottom: 0; }
.info-row .icon-circle { width: 44px; height: 44px; }
.info-row .icon-circle svg { width: 20px; height: 20px; }
.info-row b { display: block; font-size: 0.92rem; color: var(--navy); margin-bottom: 3px; }
.info-row span, .info-row a { font-size: 0.87rem; color: var(--text-muted); }

.map-card { border-radius: var(--radius-lg); overflow: hidden; height: 220px; position: relative; }
.map-card .map-fallback {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--navy-2), var(--navy-deep));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--text-on-navy-muted);
  text-align: center; padding: 20px;
}
.map-card .map-fallback svg { width: 30px; height: 30px; stroke: var(--gold-light); }
.map-card .map-fallback span { font-size: 0.82rem; }

/* ---------- Scroll reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.8s cubic-bezier(.2,.8,.2,1), transform 0.8s cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1.visible { transition-delay: .1s; }
.reveal-delay-2.visible { transition-delay: .2s; }
.reveal-delay-3.visible { transition-delay: .3s; }
.reveal-delay-4.visible { transition-delay: .4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(171,131,88,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(171,131,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(171,131,88,0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Back to top ---------- */
#back-to-top {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 26px);
  right: 26px;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  box-shadow: var(--shadow-gold);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .35s ease, transform .35s ease, visibility .35s;
  z-index: 900;
}
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top svg { width: 20px; height: 20px; stroke: var(--white); }

/* ---------- WhatsApp flotante ---------- */
#whatsapp-float {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 26px);
  left: 26px;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  box-shadow: var(--shadow-gold);
  z-index: 900;
  animation: pulseWA 2.6s infinite;
  transition: transform .3s ease;
}
#whatsapp-float:hover { transform: translateY(-3px); }
#whatsapp-float svg { width: 28px; height: 28px; fill: var(--white); }
@keyframes pulseWA {
  0% { box-shadow: 0 0 0 0 rgba(171,131,88,0.55); }
  70% { box-shadow: 0 0 0 14px rgba(171,131,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(171,131,88,0); }
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 3000;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 50px; height: 50px;
  border: 3px solid rgba(171,131,88,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Accesibilidad táctil (iOS/Android) ---------- */
a, button, .btn, input[type="checkbox"] { touch-action: manipulation; }
@supports (-webkit-touch-callout: none) {
  .hero { min-height: -webkit-fill-available; }
}

/* ---------- Banner de cookies ---------- */
#cookie-banner {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  z-index: 2500;
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 30px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  transform: translateY(140%);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
  padding-bottom: calc(26px + var(--safe-bottom));
}
#cookie-banner.visible { transform: translateY(0); }
#cookie-banner .cookie-text { flex: 1 1 320px; }
#cookie-banner .cookie-text p { font-size: 0.86rem; margin: 0; color: var(--text-muted); }
#cookie-banner .cookie-text a { color: var(--gold-dark); font-weight: 600; }
#cookie-banner .cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Páginas legales ---------- */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 46px 50px;
  border-radius: var(--radius-lg);
}
.legal-content h2 {
  font-size: 1.35rem;
  margin: 38px 0 14px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 16px; font-size: 0.96rem; }
.legal-content ul { margin: 0 0 16px 0; padding-left: 22px; }
.legal-content ul li { list-style: disc; font-size: 0.96rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.7; }
.legal-content strong { color: var(--navy); }
.legal-content table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.88rem; }
.legal-content th, .legal-content td { text-align: left; padding: 10px 14px; border: 1px solid rgba(20,32,56,0.12); color: var(--text-muted); }
.legal-content th { color: var(--navy); font-family: var(--font-heading); font-weight: 600; background: rgba(20,32,56,0.04); }
.legal-content .updated-note { font-size: 0.82rem; color: var(--text-muted); font-style: italic; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(20,32,56,0.1); }
@media (max-width: 600px) {
  .legal-content { padding: 34px 24px; }
}
