:root {
  --color-navy: #0A0B0D;
  --color-navy-dark: #000000;
  --color-heading: var(--color-navy);
  --color-gold: #1E9FE0;
  --color-bg: #F4F5F7;
  --color-card: #FFFFFF;
  --color-text: #2B333B;
  --color-text-muted: #6B7480;
  --color-border: #E6E8EC;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(15, 39, 64, 0.08);
}

:root[data-theme="dark"] {
  --color-bg: #0E1013;
  --color-card: #181B20;
  --color-heading: #F1F3F6;
  --color-text: #E7E9EC;
  --color-text-muted: #A2A9B3;
  --color-border: #2A2E35;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .lawyer-exp,
:root[data-theme="dark"] .contact-row .icon,
:root[data-theme="dark"] .btn-contactar { background: #23272E; color: var(--color-heading); }
:root[data-theme="dark"] .lawyer-exp strong { color: var(--color-heading); }
:root[data-theme="dark"] .btn-contactar:hover { background: #2B303A; }
:root[data-theme="dark"] .map-embed { background: #23272E; }
:root[data-theme="dark"] .lawyer-photo-wrap { background: #23272E; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
}

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

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

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

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(30, 159, 224, 0.5);
}

.brand span {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: #EDEFF2;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--color-gold); }

.theme-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-links {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--color-navy);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 420px; overflow-y: auto; }
  .nav-links a {
    padding: 14px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links .theme-toggle {
    margin: 14px 24px;
  }
  .nav-toggle { display: block; }
}

/* Hero */
.hero {
  text-align: center;
  padding: 64px 24px 40px;
}

.hero .logo-circle {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  margin: 0 auto 28px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-size: 42px;
  margin: 0 0 14px;
}

.hero .subtitle {
  color: var(--color-text-muted);
  font-size: 19px;
  margin: 0 0 28px;
}

.hero .intro {
  max-width: 760px;
  margin: 0 auto;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 28px;
  font-size: 16px;
}

/* Team grid */
.team-section { padding: 20px 0 70px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 20px;
}

.lawyer-card {
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.lawyer-photo-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #E4E8ED;
}

.lawyer-photo-wrap .lawyer-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lawyer-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  object-fit: cover;
  background: var(--color-navy);
}

.lawyer-body { padding: 24px 24px 26px; flex: 1; display: flex; flex-direction: column; }

.lawyer-name {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-size: 22px;
  margin: 0 0 6px;
}

.lawyer-role {
  color: var(--color-gold);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.lawyer-exp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F1F3F6;
  border-radius: 30px;
  padding: 6px 14px;
  width: fit-content;
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.lawyer-exp strong { color: var(--color-heading); }

.lawyer-desc {
  color: var(--color-text-muted);
  font-size: 14.5px;
  margin: 0 0 18px;
}

.lawyer-contact {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  margin-top: auto;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14.5px;
  word-break: break-word;
}

.contact-row .icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F3F6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-heading);
}

.btn-contactar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #F1F3F6;
  color: var(--color-heading);
  font-weight: 600;
  padding: 13px;
  border-radius: 10px;
  margin-top: 6px;
  transition: background 0.2s;
}

.btn-contactar:hover { background: #E4E8ED; }

/* Office / location */
.office-section {
  background: var(--color-card);
  padding: 60px 0;
  border-top: 1px solid var(--color-border);
}

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

@media (max-width: 780px) {
  .office-grid { grid-template-columns: 1fr; }
}

.office-section h2 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-size: 30px;
  margin-top: 0;
}

.office-item { margin-bottom: 22px; }

.office-item h4 {
  margin: 0 0 6px;
  color: var(--color-heading);
  font-size: 15px;
}

.office-item p {
  margin: 0;
  color: var(--color-text-muted);
  white-space: pre-line;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 320px;
  background: #E4E8ED;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  text-align: center;
  padding: 24px;
}

.map-embed iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* CTA */
.cta-section {
  background: var(--color-navy);
  color: #fff;
  text-align: center;
  padding: 56px 24px;
}

.cta-section h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  margin: 0 0 14px;
}

.cta-section p {
  max-width: 600px;
  margin: 0 auto 26px;
  color: #C9D2DC;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.cta-phone,
.cta-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  padding: 14px 30px;
  border-radius: 40px;
  font-size: 17px;
}

.cta-phone {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}

.cta-whatsapp {
  background: #25D366;
  color: #06301A;
}

/* Footer */
.site-footer {
  background: var(--color-navy-dark);
  color: #A9B3BF;
  padding: 56px 0 0;
  font-size: 14px;
}

.site-footer .brand span { color: #fff; }

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

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.footer-col a {
  display: block;
  color: #A9B3BF;
  margin-bottom: 10px;
  transition: color 0.2s;
}

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

.footer-text { color: #A9B3BF; margin: 0 0 10px; line-height: 1.6; }

.footer-bottom {
  text-align: center;
  padding: 20px 24px;
  font-size: 13px;
  color: #7C8593;
}

/* ===== Componentes compartidos entre páginas ===== */

.page-hero {
  text-align: center;
  padding: 60px 24px 44px;
}

.page-hero h1 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-size: 40px;
  margin: 0 0 14px;
}

.page-hero p {
  color: var(--color-text-muted);
  font-size: 18px;
  max-width: 680px;
  margin: 0 auto;
}

.section { padding: 60px 0; }
.section.alt { background: var(--color-card); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

.section-title {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 44px;
}

.section-title h2 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-size: 32px;
  margin: 0 0 12px;
}

.section-title p { color: var(--color-text-muted); font-size: 16.5px; margin: 0; }

/* Panel visual de marca (sección historia/misión) */
.historia-visual {
  position: relative;
  overflow: hidden;
  margin-top: 36px;
  height: 300px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--color-navy) 0%, #16324A 55%, var(--color-gold) 160%);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.historia-visual-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.historia-visual-icon {
  width: 92px;
  height: 92px;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.historia-visual-caption {
  position: absolute;
  left: 24px;
  bottom: 20px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.historia-visual-caption strong {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 20px;
}

.historia-visual-caption span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.historia-visual-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 10px 18px;
  text-align: center;
}

.historia-visual-badge .num {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.historia-visual-badge .label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11.5px;
  margin-top: 2px;
}

@media (max-width: 560px) {
  .historia-visual { height: 260px; }
  .historia-visual-icon { width: 72px; height: 72px; }
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 36px;
}

@media (max-width: 780px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }

.stat-tile { text-align: center; }

.stat-tile .num {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 700;
  color: var(--color-gold);
}

.stat-tile .label {
  color: var(--color-text-muted);
  font-size: 13.5px;
  margin-top: 4px;
}

.cta-section .stats-bar .stat-tile .num { color: var(--color-gold); }
.cta-section .stats-bar .stat-tile .label { color: #C9D2DC; }

/* Grid genérica de tarjetas (especialidades, valores, por qué elegirnos) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}

.info-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.info-card .icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(30,159,224,0.12);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.info-card h3 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-size: 19px;
  margin: 0 0 10px;
}

.info-card p { color: var(--color-text-muted); font-size: 14.5px; margin: 0; }

.info-card .btn-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--color-gold);
  font-weight: 600;
  font-size: 14px;
}

/* Checklist (home: por qué elegirnos) */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
@media (max-width: 640px) { .checklist { grid-template-columns: 1fr; } }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--color-text);
  font-size: 15.5px;
}
.checklist li:before {
  content: "\2713";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-gold);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* Testimonios */
.testimonial-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.testimonial-card .quote {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 20px;
}

.testimonial-card .quote:before { content: "\201C"; color: var(--color-gold); font-size: 28px; font-family: var(--font-heading); }

.testimonial-card .autor {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}

.testimonial-card .autor strong { display: block; color: var(--color-heading); font-family: var(--font-heading); font-size: 16px; }
.testimonial-card .autor span { color: var(--color-gold); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.3px; font-weight: 700; }

/* Áreas de práctica (página completa) */
.practice-area-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
  padding: 46px 0;
  border-bottom: 1px solid var(--color-border);
}
.practice-area-block:last-child { border-bottom: none; }

@media (max-width: 780px) { .practice-area-block { grid-template-columns: 1fr; gap: 24px; } }

.practice-area-block .icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(30,159,224,0.12);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
}

.practice-area-block h3 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-size: 26px;
  margin: 0 0 12px;
}

.practice-area-block p { color: var(--color-text-muted); font-size: 15.5px; margin: 0 0 18px; }

.services-list { list-style: none; margin: 0; padding: 0; }
.services-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  color: var(--color-text);
}
.services-list li:last-child { border-bottom: none; }
.services-list li:before { content: "\2713"; color: var(--color-gold); font-weight: 700; }
.services-list h4 { margin: 0 0 4px; color: var(--color-heading); font-size: 14px; text-transform: uppercase; letter-spacing: 0.3px; }

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.blog-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.blog-card .fecha { color: var(--color-gold); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 10px; }
.blog-card h3 { font-family: var(--font-heading); color: var(--color-heading); font-size: 20px; margin: 0 0 12px; }
.blog-card p { color: var(--color-text-muted); font-size: 14.5px; margin: 0 0 18px; flex: 1; }

.blog-post-body {
  max-width: 760px;
  margin: 0 auto;
  color: var(--color-text);
  font-size: 16.5px;
  line-height: 1.85;
}
.blog-post-body p { margin: 0 0 22px; white-space: pre-line; }

.disclaimer-box {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--color-text-muted);
  font-size: 13.5px;
  max-width: 760px;
  margin: 30px auto 0;
}

/* Formulario de contacto */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 46px;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form .field { margin-bottom: 18px; }
.contact-form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--color-heading); margin-bottom: 6px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 15px;
  background: var(--color-card);
  color: var(--color-text);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(30,159,224,0.15);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form button {
  background: var(--color-navy);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 15.5px;
  cursor: pointer;
}
.contact-form button:hover { background: #000; }
.contact-form .form-hint { font-size: 12.5px; color: var(--color-text-muted); margin-top: 10px; }

.contact-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
