/* ============================================================
   AbogadosOn — Hoja de estilos
   Paleta basada en el color exacto del logo: navy #10334F
   ============================================================ */

:root {
  --navy: #043663;          /* color exacto del logo (PNG) */
  --navy-deep: #022840;     /* navy más oscuro para profundidad */
  --navy-soft: #0A4F86;     /* navy intermedio para degradados */
  --gold: #C9A961;          /* acento dorado elegante */
  --gold-bright: #D8BC7C;
  --cream: #F4F3EF;         /* off-white cálido */
  --ink: #1A2733;
  --muted: #5C6B78;
  --line: rgba(16, 51, 79, 0.12);
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(16, 51, 79, 0.16);
  --radius: 14px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.18; color: var(--navy); font-weight: 600; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============ BOTONES ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 28px; border-radius: 50px;
  font-weight: 600; font-size: 0.98rem; cursor: pointer;
  border: 1.6px solid transparent; transition: all 0.35s var(--ease);
  letter-spacing: 0.2px; white-space: nowrap;
}
.btn-accent { background: var(--gold); color: var(--navy-deep); }
.btn-accent:hover { background: var(--gold-bright); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(201, 169, 97, 0.4); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--white); transform: translateY(-3px); }
.btn-block { width: 100%; }

.kicker {
  display: inline-block; text-transform: uppercase; letter-spacing: 2.5px;
  font-size: 0.78rem; font-weight: 600; color: var(--gold);
  margin-bottom: 14px; font-family: 'Inter', sans-serif;
}

/* ============ HEADER ============ */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  transition: all 0.4s var(--ease); padding: 18px 0;
}
.site-header.scrolled {
  background: rgba(16, 51, 79, 0.97); backdrop-filter: blur(12px);
  padding: 10px 0; box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; transition: width .4s, height .4s; }
.site-header.scrolled .brand-logo { width: 42px; height: 42px; }
.brand-name { font-family: 'Playfair Display', serif; font-size: 1.45rem; color: var(--white); font-weight: 600; letter-spacing: 0.5px; }
.brand-name strong { color: var(--gold); }

.main-nav ul { display: flex; gap: 30px; list-style: none; }
.main-nav a {
  color: rgba(255,255,255,0.88); font-weight: 500; font-size: 0.96rem;
  position: relative; padding: 4px 0; transition: color 0.3s;
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--gold); transition: width 0.35s var(--ease);
}
.main-nav a:hover { color: var(--white); }
.main-nav a:hover::after { width: 100%; }

.nav-cta { padding: 11px 22px; font-size: 0.9rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 2.5px; background: var(--white); border-radius: 2px; transition: 0.3s; }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  color: var(--white); overflow: hidden; padding: 120px 0 80px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(circle at 78% 20%, rgba(201,169,97,0.18), transparent 45%),
    radial-gradient(circle at 12% 85%, rgba(27,73,110,0.55), transparent 50%),
    linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, #0B5390 100%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(circle at 70% 40%, black, transparent 75%);
}
.hero-content { max-width: 760px; }
.hero-eyebrow {
  color: var(--gold); text-transform: uppercase; letter-spacing: 3px;
  font-size: 0.82rem; font-weight: 600; margin-bottom: 22px;
}
.hero h1 {
  color: var(--white); font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 700;
  letter-spacing: -0.5px; margin-bottom: 24px;
}
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: rgba(255,255,255,0.85); max-width: 620px; margin-bottom: 38px; font-weight: 300; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-trust { display: flex; gap: 44px; list-style: none; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 28px; }
.hero-trust li { font-size: 0.95rem; color: rgba(255,255,255,0.75); }
.hero-trust strong { display: block; font-family: 'Playfair Display', serif; font-size: 1.9rem; color: var(--gold); font-weight: 700; }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.6); font-size: 1.6rem; animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100%{transform:translate(-50%,0);} 50%{transform:translate(-50%,10px);} }

/* ============ SECCIONES ============ */
.section { padding: 110px 0; }
.section-alt { background: var(--cream); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 64px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.grid { display: grid; gap: 26px; }
.services { grid-template-columns: repeat(3, 1fr); }

/* ============ CARDS SERVICIOS ============ */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 32px; transition: all 0.4s var(--ease); position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 62px; height: 62px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; background: linear-gradient(135deg, var(--navy), var(--navy-soft)); margin-bottom: 22px;
}
.card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* ============ SOBRE NOSOTROS ============ */
.nosotros-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.nosotros-media { display: flex; justify-content: center; }
.nosotros-logo {
  width: min(360px, 80%); border-radius: 24px; box-shadow: var(--shadow);
  border: 6px solid var(--white); background: var(--navy);
}
.nosotros-text h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 18px; }
.nosotros-text p { color: var(--muted); margin-bottom: 16px; }
.check-list { list-style: none; margin: 24px 0 30px; }
.check-list li { position: relative; padding-left: 32px; margin-bottom: 12px; color: var(--ink); font-weight: 500; }
.check-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0; width: 22px; height: 22px;
  background: var(--gold); color: var(--navy-deep); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700;
}

/* ============ POR QUÉ ELEGIRNOS ============ */
.why { background: var(--navy); color: var(--white); }
.why .section-head h2 { color: var(--white); }
.why-grid { grid-template-columns: repeat(4, 1fr); }
.why-item { padding: 28px 22px; border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); transition: all 0.4s var(--ease); }
.why-item:hover { background: rgba(255,255,255,0.04); transform: translateY(-6px); border-color: rgba(201,169,97,0.5); }
.why-num { font-family: 'Playfair Display', serif; font-size: 2.4rem; color: var(--gold); font-weight: 700; display: block; margin-bottom: 10px; }
.why-item h3 { color: var(--white); font-size: 1.25rem; margin-bottom: 10px; }
.why-item p { color: rgba(255,255,255,0.72); font-size: 0.95rem; }

/* ============ RESEÑAS ============ */
.reviews-summary { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.reviews-summary .rs-score { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: var(--navy); }
.reviews-summary .rs-stars { color: var(--gold); font-size: 1.2rem; letter-spacing: 2px; }
.reviews-summary .rs-count { color: var(--muted); font-size: 0.95rem; }

.reviews { grid-template-columns: repeat(3, 1fr); margin-bottom: 60px; }
.review-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: all 0.4s var(--ease); display: flex; flex-direction: column; gap: 14px;
}
.review-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.review-stars { color: var(--gold); font-size: 1.05rem; letter-spacing: 3px; }
.review-text { color: var(--ink); font-size: 0.99rem; font-style: italic; line-height: 1.6; flex-grow: 1; }
.review-author { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.review-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  color: var(--white); display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.05rem;
}
.review-meta strong { display: block; color: var(--navy); font-size: 0.98rem; font-family: 'Inter', sans-serif; }
.review-meta span { color: var(--muted); font-size: 0.82rem; }
.review-card.is-new { animation: reviewIn 0.6s var(--ease); }
@keyframes reviewIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: none; } }

/* Formulario de reseña */
.review-form-wrap {
  max-width: 640px; margin: 0 auto; background: var(--cream);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 40px;
}
.review-form-wrap h3 { font-size: 1.6rem; text-align: center; margin-bottom: 6px; }
.review-form-intro { text-align: center; color: var(--muted); font-size: 0.95rem; margin-bottom: 26px; }
.rating-label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 7px; color: var(--navy); }
.star-input { display: inline-flex; gap: 4px; }
.star-input .star {
  background: none; border: none; cursor: pointer; font-size: 2rem; line-height: 1;
  color: #d8d8d8; padding: 0 2px; transition: color 0.2s, transform 0.15s;
}
.star-input .star:hover { transform: scale(1.15); }
.star-input .star.active { color: var(--gold); }
.review-feedback { text-align: center; margin-top: 14px; font-size: 0.92rem; font-weight: 600; color: #1a7f4b; min-height: 20px; }

/* ============ CONTACTO ============ */
.contacto-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.contacto-info h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.contacto-info > p { color: var(--muted); margin-bottom: 26px; }
.contact-list { list-style: none; }
.contact-list li { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font-size: 1.02rem; }
.contact-list a:hover { color: var(--gold); }

.contacto-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 38px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 7px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 0.98rem; color: var(--ink); transition: border 0.3s, box-shadow 0.3s; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,169,97,0.15);
}
.field textarea { resize: vertical; }
.form-note { font-size: 0.82rem; color: var(--muted); text-align: center; margin-top: 14px; }

/* ============ FOOTER ============ */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.8); padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.footer-brand img { width: 56px; height: 56px; border-radius: 50%; margin-bottom: 16px; }
.footer-brand p { font-size: 0.94rem; max-width: 300px; color: rgba(255,255,255,0.65); }
.footer-col h4 { color: var(--white); font-family: 'Inter', sans-serif; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 18px; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 11px; font-size: 0.94rem; color: rgba(255,255,255,0.65); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* ============ WHATSAPP FLOTANTE ============ */
.whatsapp-float {
  position: fixed; bottom: 26px; right: 26px; z-index: 900;
  width: 58px; height: 58px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
  box-shadow: 0 10px 30px rgba(37,211,102,0.45); transition: transform 0.3s; animation: pulse 2.5s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(37,211,102,0.5);} 70%{box-shadow:0 0 0 16px rgba(37,211,102,0);} 100%{box-shadow:0 0 0 0 rgba(37,211,102,0);} }

/* ============ ANIMACIÓN REVEAL AL SCROLL ============ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.services .card:nth-child(2) { transition-delay: 0.08s; }
.services .card:nth-child(3) { transition-delay: 0.16s; }
.why-grid .why-item:nth-child(2) { transition-delay: 0.08s; }
.why-grid .why-item:nth-child(3) { transition-delay: 0.16s; }
.why-grid .why-item:nth-child(4) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .nosotros-grid, .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 0; right: -100%; width: 78%; max-width: 320px; height: 100vh;
    background: var(--navy-deep); flex-direction: column; padding: 100px 32px;
    transition: right 0.4s var(--ease); box-shadow: -10px 0 40px rgba(0,0,0,0.3);
  }
  .main-nav.open { right: 0; }
  .main-nav ul { flex-direction: column; gap: 22px; }
  .main-nav a { font-size: 1.1rem; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .section { padding: 80px 0; }
  .hero-trust { gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .services, .reviews, .why-grid { grid-template-columns: 1fr; }
  .review-form-wrap { padding: 26px; }
  .hero-actions .btn { flex: 1; }
  .contacto-form { padding: 26px; }
}
