/* ============================================================
   CENTRO JURÍDICO RIOSECO ABOGADOS
   Estilo: elegante y sobrio
   Paleta del logotipo:
     - Crema/marfil   #F5F1E6  (fondo del logo)
     - Marrón profundo #684830 / #583028 / #2E2116
     - Dorado/bronce   #B89860 / #B8A070
   Tipografías: Playfair Display (títulos) + Source Sans 3 (texto)
   ============================================================ */

:root {
  /* Colores del logotipo */
  --cream:        #F5F1E6;
  --cream-light:  #FBF8F1;
  --cream-deep:   #EAE3D2;
  --brown-dark:   #2E2116;
  --brown-mid:    #583028;
  --brown:        #684830;
  --brown-soft:   #7A5A3E;
  --gold:         #B89860;
  --gold-light:   #C9AD7E;
  --gold-pale:    #E3D3AE;
  --ink:          #33261A;
  --ink-soft:     #5C4F40;
  --white:        #FFFFFF;

  /* Medidas */
  --container: 1200px;
  --radius: 4px;
  --shadow: 0 10px 40px rgba(46, 33, 22, 0.12);
  --shadow-lg: 0 24px 60px rgba(46, 33, 22, 0.18);
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream-light);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--brown-dark);
}

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-gold {
  background: var(--gold);
  color: var(--brown-dark);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 152, 96, 0.35);
}

.btn-outline-light {
  background: transparent;
  color: var(--cream-light);
  border-color: rgba(245, 241, 230, 0.55);
}
.btn-outline-light:hover {
  background: rgba(245, 241, 230, 0.12);
  border-color: var(--cream-light);
}

.btn-outline-dark {
  background: transparent;
  color: var(--brown-dark);
  border-color: var(--brown);
}
.btn-outline-dark:hover {
  background: var(--brown);
  color: var(--cream-light);
}

.btn-whatsapp {
  background: #1FAF54;
  color: var(--white);
  border-color: #1FAF54;
}
.btn-whatsapp:hover {
  background: #178F45;
  border-color: #178F45;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 175, 84, 0.35);
}

.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--brown-dark);
  color: var(--gold-pale);
  font-size: 13.5px;
  padding: 8px 0;
  position: relative;
  z-index: 1001;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar-item { display: flex; align-items: center; gap: 7px; }
.topbar-item a { color: var(--cream-light); transition: var(--transition); }
.topbar-item a:hover { color: var(--gold-light); }
.topbar-phones a { font-weight: 600; }
.topbar-sep { color: var(--gold); margin: 0 4px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251, 248, 241, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 6px 30px rgba(46, 33, 22, 0.12);
  border-bottom-color: var(--cream-deep);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand-logo { height: 52px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-link {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
  transition: var(--transition);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: var(--transition);
}
.nav-link:hover { color: var(--brown); }
.nav-link:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--brown-dark);
  transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(46, 33, 22, 0.93) 0%,
    rgba(58, 36, 24, 0.82) 45%,
    rgba(88, 48, 40, 0.45) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: var(--cream-light);
  padding-top: 90px;
  padding-bottom: 70px;
  max-width: 780px;
  margin-left: 0;
}
.hero-eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 600;
  color: var(--cream-light);
  margin-bottom: 22px;
}
.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}
.hero-sub {
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 300;
  color: rgba(245, 241, 230, 0.88);
  max-width: 620px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(245, 241, 230, 0.2);
  padding-top: 28px;
}
.hero-meta-item strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  color: var(--gold-light);
  margin-bottom: 3px;
}
.hero-meta-item span { font-size: 14.5px; color: rgba(245, 241, 230, 0.75); }

/* ---------- Secciones ---------- */
.section { padding: 110px 0; }
.section-light { background: var(--cream-light); }
.section-dark {
  background: var(--brown-dark);
  position: relative;
}
.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(184, 152, 96, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.section-dark .section-title { color: var(--cream-light); }
.section-dark .section-lead { color: rgba(245, 241, 230, 0.78); }

.section-head { max-width: 720px; margin-bottom: 64px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.section-dark .section-eyebrow { color: var(--gold-light); }

.section-title {
  font-size: clamp(32px, 3.6vw, 46px);
  margin-bottom: 20px;
}
.section-lead {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* ---------- Bienvenida ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 64px;
  align-items: start;
}
.intro-text .section-title { margin-bottom: 22px; }
.intro-text p { margin-bottom: 18px; color: var(--ink-soft); }
.intro-text strong { color: var(--brown); }

.intro-card {
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.intro-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  margin-bottom: 16px;
}
.intro-card-head h3 { font-size: 22px; }
.intro-card > p { color: var(--ink-soft); margin-bottom: 18px; }

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 7px 0;
  color: var(--ink-soft);
}
.check-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--gold-pale);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23684830' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.service-card {
  background: rgba(251, 248, 241, 0.04);
  border: 1px solid rgba(245, 241, 230, 0.12);
  border-radius: var(--radius);
  padding: 40px 36px;
  position: relative;
  transition: var(--transition);
}
.service-card:hover {
  background: rgba(251, 248, 241, 0.07);
  border-color: rgba(184, 152, 96, 0.5);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.service-num {
  position: absolute;
  top: 26px; right: 30px;
  font-family: 'Playfair Display', serif;
  font-size: 46px;
  font-weight: 700;
  color: rgba(184, 152, 96, 0.18);
  line-height: 1;
}
.service-icon {
  width: 62px; height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(184, 152, 96, 0.55);
  border-radius: 50%;
  color: var(--gold-light);
  margin-bottom: 24px;
  transition: var(--transition);
}
.service-card:hover .service-icon {
  background: var(--gold);
  color: var(--brown-dark);
  border-color: var(--gold);
}
.service-card h3 {
  font-size: 24px;
  color: var(--cream-light);
  margin-bottom: 14px;
  padding-right: 40px;
}
.service-desc {
  color: rgba(245, 241, 230, 0.75);
  margin-bottom: 18px;
  font-size: 16px;
}
.service-sub { margin: 18px 0 6px; }
.service-sub h4 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.service-list li {
  position: relative;
  padding: 5px 0 5px 24px;
  color: rgba(245, 241, 230, 0.85);
  font-size: 15.5px;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 15px;
  width: 8px; height: 8px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
}
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-light);
  transition: var(--transition);
}
.service-link:hover { color: var(--white); gap: 12px; }

/* ---------- Consulta legal ---------- */
.consulta-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: center;
}
.consulta-visual { position: relative; }
.consulta-visual img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.consulta-badge {
  position: absolute;
  left: -18px; bottom: 26px;
  background: var(--brown-dark);
  border-left: 4px solid var(--gold);
  color: var(--cream-light);
  padding: 20px 26px;
  box-shadow: var(--shadow-lg);
}
.consulta-badge-price {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.1;
}
.consulta-badge-label {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 241, 230, 0.8);
}
.consulta-content .section-title { margin-bottom: 18px; }
.consulta-content .section-lead { margin-bottom: 26px; }
.consulta-list li {
  flex-direction: column;
  gap: 2px;
  padding: 9px 0;
  border-bottom: 1px solid var(--cream-deep);
}
.consulta-list li:last-child { border-bottom: none; }
.consulta-list li strong { color: var(--brown); font-size: 16.5px; }
.consulta-list li span { color: var(--ink-soft); font-size: 15.5px; }
.consulta-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- Equipo ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.team-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  background: rgba(251, 248, 241, 0.04);
  border: 1px solid rgba(245, 241, 230, 0.12);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.team-card:hover {
  border-color: rgba(184, 152, 96, 0.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.team-photo img {
  width: 100%;
  max-height: 300px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  filter: saturate(0.92) contrast(1.02);
}
.team-role {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(184, 152, 96, 0.12);
  border: 1px solid rgba(184, 152, 96, 0.35);
  padding: 5px 12px;
  border-radius: 2px;
  margin-bottom: 14px;
}
.team-info h3 {
  font-size: 26px;
  color: var(--cream-light);
  margin-bottom: 10px;
}
.team-info p {
  color: rgba(245, 241, 230, 0.78);
  font-size: 15.5px;
  margin-bottom: 20px;
}
.team-contact { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: stretch;
}
.contact-cards { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: var(--transition);
}
.contact-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}
.contact-icon {
  flex: 0 0 auto;
  width: 50px; height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--brown);
  transition: var(--transition);
}
.contact-card:hover .contact-icon {
  background: var(--gold);
  color: var(--brown-dark);
}
.contact-card h4 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown-soft);
  margin-bottom: 2px;
}
.contact-card p { font-size: 16.5px; font-weight: 600; color: var(--brown-dark); }

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 360px;
  border: 1px solid var(--cream-deep);
}
.contact-map iframe { display: block; width: 100%; height: 100%; min-height: 360px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--brown-dark);
  color: rgba(245, 241, 230, 0.7);
  border-top: 4px solid var(--gold);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-top: 70px;
  padding-bottom: 56px;
}
.footer-logo { height: 48px; width: auto; margin-bottom: 18px; }
.footer-brand p { font-size: 15px; line-height: 1.7; max-width: 300px; }
.footer-col h4 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 20px;
}
.footer-col li { margin-bottom: 10px; font-size: 15px; }
.footer-col a { transition: var(--transition); }
.footer-col a:hover { color: var(--gold-light); padding-left: 4px; }
.footer-cta-col p { font-size: 15px; margin-bottom: 18px; }
.footer-bottom {
  border-top: 1px solid rgba(245, 241, 230, 0.1);
  padding: 20px 0;
  font-size: 13.5px;
  text-align: center;
}
.footer-note { opacity: 0.65; margin-top: 4px; font-size: 12.5px; }

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 900;
  width: 60px; height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1FAF54;
  color: var(--white);
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(31, 175, 84, 0.45);
  transition: var(--transition);
}
.wa-float:hover {
  transform: scale(1.1) translateY(-3px);
  background: #178F45;
}

/* ---------- Animaciones de aparición ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .team-card { grid-template-columns: 200px 1fr; gap: 24px; }
  .consulta-grid { gap: 48px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .section { padding: 80px 0; }

  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 0; right: -100%;
    width: min(340px, 82vw);
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    background: var(--cream-light);
    box-shadow: -20px 0 60px rgba(46, 33, 22, 0.25);
    padding: 40px;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1002;
  }
  .nav-menu.open { right: 0; }
  .nav-link { font-size: 22px; font-family: 'Playfair Display', serif; padding: 10px 0; }
  .nav-cta { margin-top: 20px; align-self: flex-start; }

  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: 1fr; }
  .consulta-grid { grid-template-columns: 1fr; }
  .consulta-visual img { aspect-ratio: 16 / 11; }
  .team-grid { grid-template-columns: 1fr; }
  .team-card { grid-template-columns: 160px 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .topbar { font-size: 12.5px; }
  .topbar-phones { flex-wrap: wrap; }
  .hero { min-height: 92vh; }
  .hero-meta { gap: 22px; }
  .team-card { grid-template-columns: 1fr; }
  .team-photo img { aspect-ratio: 16 / 10; max-height: 220px; }
  .consulta-badge { left: 10px; bottom: 14px; padding: 14px 18px; }
  .consulta-badge-price { font-size: 26px; }
  .footer-inner { grid-template-columns: 1fr; gap: 34px; }
  .btn { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .consulta-cta .btn { width: 100%; }
  .team-contact .btn { flex: 1; }
}

/* ---------- Reducción de movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
}
