/* ==========================================================================
   MARIA RUIZ ABOGADOS — Stylesheet
   ========================================================================== */

:root {
  --navy: #11243C;
  --navy-soft: #1B3452;
  --gold: #9C8050;
  --gold-light: #CFAD73;
  --beige: #D6CEC4;
  --off-white: #F5F3F0;
  --white: #FFFFFF;

  --font-serif: 'Playfair Display', 'Georgia', serif;
  --font-sans: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;

  --max-width: 1180px;
  --radius: 4px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
  color: var(--navy);
}

p { margin: 0 0 16px; }

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
  display: inline-block;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-head h2 {
  font-size: clamp(2rem, 3.6vw, 2.7rem);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(156, 128, 80, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(156, 128, 80, 0.38);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

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

.btn-outline-navy {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn-outline-navy:hover {
  background: var(--navy);
  color: var(--white);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: rgba(17, 36, 60, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

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

.brand img {
  height: 48px;
  width: auto;
}

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

.main-nav a {
  color: var(--off-white);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  position: relative;
  padding: 4px 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1px;
  background: var(--gold-light);
  transition: width 0.3s var(--ease);
}

.main-nav a:hover::after { width: 100%; }

.main-nav .btn-primary {
  padding: 11px 22px;
  font-size: 0.88rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--off-white);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17,36,60,0.94) 0%, rgba(17,36,60,0.78) 38%, rgba(17,36,60,0.35) 68%, rgba(17,36,60,0.55) 100%),
              linear-gradient(0deg, rgba(17,36,60,0.55) 0%, rgba(17,36,60,0.05) 45%);
}

.hero-person {
  position: absolute;
  right: 4%;
  bottom: 0;
  height: 92%;
  width: auto;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.35));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 180px;
  padding-bottom: 100px;
}

.hero-content { max-width: 620px; }

.hero-content .eyebrow { color: var(--gold-light); }

.hero-content h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  margin-bottom: 14px;
}

.hero-content h2 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--gold-light);
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

.hero-content .subtitle {
  color: rgba(245, 243, 240, 0.88);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 36px;
}

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

.icon-inline {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---------- Description ---------- */

.description {
  padding: 110px 0;
  background: var(--off-white);
  background-image: url('images/texture-bg.png');
  background-size: 900px;
  background-repeat: repeat;
  background-blend-mode: multiply;
  position: relative;
}

.description .wrap {
  max-width: 780px;
  text-align: center;
}

.description h3 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  color: var(--gold);
  margin-bottom: 26px;
}

.description p {
  font-size: 1.15rem;
  color: var(--navy-soft);
  line-height: 1.75;
}

.description strong { color: var(--navy); }

/* ---------- Services ---------- */

.services { padding: 110px 0; background: var(--white); }

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

.service-card {
  background: var(--off-white);
  border: 1px solid rgba(156, 128, 80, 0.18);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(17, 36, 60, 0.1);
  border-color: var(--gold-light);
}

.service-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  color: var(--gold);
}

.service-card h4 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.service-tagline {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 22px;
  font-family: var(--font-sans);
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 0.94rem;
  color: var(--navy-soft);
  line-height: 1.45;
}

.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 1.5px;
  background: var(--gold-light);
}

.service-list li:last-child { margin-bottom: 0; }

/* ---------- Final CTA ---------- */

.final-cta {
  padding: 130px 0;
  background: var(--navy);
  background-image: linear-gradient(160deg, var(--navy) 0%, #17324f 100%), url('images/texture-bg.png');
  background-blend-mode: normal, overlay;
  background-size: cover, 700px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(207,173,115,0.14), transparent 60%);
}

.final-cta .wrap { position: relative; z-index: 2; max-width: 720px; }

.final-cta h2 {
  color: var(--white);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 500;
  font-style: italic;
  margin-bottom: 40px;
  line-height: 1.4;
}

/* ---------- FAQ ---------- */

.faq { padding: 110px 0; background: var(--off-white); }

.accordion { max-width: 780px; margin: 0 auto; }

.accordion-item {
  border-bottom: 1px solid rgba(17, 36, 60, 0.14);
}

.accordion-item:first-child { border-top: 1px solid rgba(17, 36, 60, 0.14); }

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 4px;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--navy);
  cursor: pointer;
}

.accordion-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  position: relative;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background: var(--gold);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.accordion-icon::before {
  left: 0; top: 50%; width: 100%; height: 1.5px; transform: translateY(-50%);
}

.accordion-icon::after {
  top: 0; left: 50%; height: 100%; width: 1.5px; transform: translateX(-50%);
}

.accordion-item.open .accordion-icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}

.accordion-panel-inner {
  padding: 0 4px 26px;
  color: var(--navy-soft);
  font-size: 0.98rem;
  max-width: 700px;
  text-align: justify;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: rgba(245, 243, 240, 0.85);
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand img { height: 72px; margin-bottom: 18px; }

.footer-brand p {
  color: rgba(245, 243, 240, 0.6);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-col h5 {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--gold-light);
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-col p, .footer-col a {
  display: block;
  color: rgba(245, 243, 240, 0.82);
  font-size: 0.95rem;
  margin-bottom: 12px;
  transition: color 0.25s ease;
}

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

.social-row {
  display: flex;
  gap: 14px;
  margin-top: 20px;
}

.social-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, color 0.25s ease;
  color: rgba(245, 243, 240, 0.85);
}

.social-btn:hover {
  color: var(--gold-light);
  transform: translateY(-2px);
}

.social-btn svg { width: 22px; height: 22px; display: block; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 0.82rem;
  color: rgba(245, 243, 240, 0.5);
}

.footer-bottom a { color: rgba(245, 243, 240, 0.7); }
.footer-bottom a:hover { color: var(--gold-light); }

/* ---------- Floating WhatsApp ---------- */

.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 600;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(17, 36, 60, 0.35);
  transition: transform 0.25s var(--ease), bottom 0.3s var(--ease);
}

.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; color: var(--navy); }

.wa-float.shifted { bottom: 96px; }

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 700;
  background: var(--navy);
  color: var(--off-white);
  padding: 18px 24px;
  transform: translateY(120%);
  transition: transform 0.5s var(--ease);
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-banner .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 1000px;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(245,243,240,0.85);
  max-width: 640px;
}

.cookie-banner a {
  color: var(--gold-light);
  text-decoration: underline;
}

.cookie-banner .btn-primary {
  padding: 11px 26px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Legal / Privacy page ---------- */

.legal-page {
  padding: 180px 0 100px;
  background: var(--white);
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
}

.legal-content .eyebrow { display: block; margin-bottom: 10px; }

.legal-content h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  margin-bottom: 6px;
}

.legal-content .legal-subtitle {
  color: var(--gold);
  font-family: var(--font-sans);
  font-weight: 600;
  margin-bottom: 40px;
}

.legal-intro {
  font-size: 1.02rem;
  color: var(--navy-soft);
  padding-bottom: 36px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--beige);
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 44px;
  margin-bottom: 14px;
  color: var(--navy);
}

.legal-content p {
  color: var(--navy-soft);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 18px;
}

.legal-content ul {
  color: var(--navy-soft);
  line-height: 1.8;
  padding-left: 22px;
  margin-bottom: 18px;
}

.legal-content li { margin-bottom: 10px; }

.legal-content strong { color: var(--navy); }

.legal-content a { color: var(--gold); text-decoration: underline; }

.legal-updated {
  font-style: italic;
  color: rgba(17,36,60,0.55);
  font-size: 0.92rem;
  margin-top: 44px;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--off-white);
  font-size: 0.92rem;
}

.back-home svg { width: 16px; height: 16px; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 860px) {
  .main-nav { position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px);
    background: var(--navy); flex-direction: column; align-items: flex-start;
    padding: 110px 32px 40px; gap: 26px; transform: translateX(100%);
    transition: transform 0.4s var(--ease); box-shadow: -20px 0 40px rgba(0,0,0,0.25); }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1.05rem; }
  .main-nav .btn-primary { margin-top: 10px; }
  .nav-toggle { display: block; z-index: 501; }

  .main-nav.nav-simple {
    position: static; height: auto; width: auto; background: none;
    flex-direction: row; align-items: center; padding: 0; transform: none;
    box-shadow: none;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 100svh;
  }

  .hero-inner {
    order: 1;
    flex: 0 0 auto;
    padding-top: 112px;
    padding-bottom: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: auto;
  }

  .hero-person {
    order: 2;
    position: static;
    flex: 0 0 auto;
    width: auto;
    max-width: 78%;
    height: 340px;
    object-fit: contain;
    object-position: bottom center;
    margin: 0 auto;
    right: auto;
    transform: none;
    opacity: 1;
  }

  .hero-overlay { background: linear-gradient(180deg, rgba(17,36,60,0.55) 0%, rgba(17,36,60,0.85) 100%); }

  .hero-content { max-width: 100%; }
  .hero-ctas .btn { flex: 1 1 auto; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .description, .services, .final-cta, .faq { padding: 70px 0; }
  .legal-page { padding: 150px 0 70px; }
  .cookie-banner .wrap { flex-direction: column; align-items: flex-start; }
  .cookie-banner .btn-primary { width: 100%; }
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .wa-float svg { width: 24px; height: 24px; }
}
