/* ===== Abogados Cuenca — Dr. Luis Mora Samaniego ===== */

:root {
  --black: #000000;
  --black-soft: #0b0b0c;
  --panel: #121213;
  --panel-2: #17171a;
  --gold: #c9a227;
  --gold-light: #e6c65c;
  --gold-deep: #8a6d12;
  --white: #ffffff;
  --muted: #b9b9bd;
  --line: rgba(201, 162, 39, .25);
  --font-title: Georgia, "Times New Roman", serif;
  --font-body: Arial, Helvetica, sans-serif;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { font-family: var(--font-title); color: var(--gold); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { color: var(--muted); }

a { color: var(--gold-light); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--white); }

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

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: bold;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 30px;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: bold;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: all .3s ease;
  text-align: center;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold), var(--gold-light));
  color: #14100a;
}
.btn-gold:hover { filter: brightness(1.15); color: #000; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: #14100a; }
.btn-lg { padding: 17px 44px; font-size: .95rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
  padding: 6px 0;
}
.site-header.scrolled {
  background: rgba(0, 0, 0, .95);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: flex-end; gap: 20px;
  /* el logo va posicionado en absoluto, así que la altura la reserva el propio header */
  min-height: 145px;
  transition: min-height .3s ease;
}
.site-header.scrolled .header-inner { min-height: 109px; }
/* El logo se ancla al borde izquierdo de la pantalla, fuera del contenedor central */
.brand {
  position: absolute;
  left: 150px;
  top: 50%;
  transform: translateY(-50%);
  display: flex; align-items: center;
}
.brand-logo {
  height: 137px; width: auto;
  transition: height .3s ease;
  /* el archivo original trae fondo negro sólido: se funde con el header oscuro en vez de mostrarse como un cuadro */
  mix-blend-mode: lighten;
}
.site-header.scrolled .brand-logo { height: 101px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav-link {
  color: var(--white);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: bold;
  position: relative;
  padding: 6px 0;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--gold); transition: width .3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--gold); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta { padding: 11px 22px; font-size: .75rem; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--gold); margin: 5px 0; transition: .3s; }

/* ===== Hero ===== */
.hero { position: relative; padding: 200px 0 0; overflow: hidden; background: #000; }

/* Fondo: una sola fotografía del abogado, con zoom lento y continuo (efecto Ken Burns) */
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  /* encuadre horizontal: prioriza el ancho de la escena del despacho, sin recortarla en vertical */
  background-position: center 45%;
  opacity: .68;
  animation: heroZoom 22s ease-in-out infinite;
  will-change: transform;
}
@keyframes heroZoom {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* Velo sobre las fotos para que el texto dorado siga legible */
.hero-bg {
  position: absolute; inset: 0; z-index: 1;
  /* velo uniforme: deja ver la fotografía de fondo en todo el ancho, no solo a la derecha */
  background:
    radial-gradient(circle at 78% 30%, rgba(201, 162, 39, .12), transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, .58) 0%, rgba(0, 0, 0, .38) 32%, rgba(0, 0, 0, .72) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: block;
  width: 100%;
  padding-bottom: 80px;
}
.hero h1 { margin-bottom: 12px; text-shadow: 0 2px 20px rgba(0, 0, 0, .8), 0 2px 30px rgba(201, 162, 39, .25); }
.hero-sub {
  font-family: var(--font-title);
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  color: var(--white);
  font-style: italic;
  margin-bottom: 22px;
  border-left: 3px solid var(--gold);
  padding-left: 16px;
}
.hero-desc { max-width: 900px; margin-bottom: 34px; text-shadow: 0 1px 12px rgba(0, 0, 0, .9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-seal { display: flex; justify-content: center; }
.hero-seal img {
  width: 100%; max-width: 380px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line), 0 25px 70px rgba(201, 162, 39, .18);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.hero-strip {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(4px);
}
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item {
  padding: 26px 14px; text-align: center;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.strip-item:last-child { border-right: 0; }
.strip-ico { font-size: 1.5rem; line-height: 1; }
.strip-item strong {
  font-family: var(--font-body);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold-light);
}

/* ===== Pestañas (páginas) ===== */
main { min-height: 72vh; }
.page { display: none; }
.page.active { display: block; animation: pageIn .5s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* La primera sección de cada pestaña (que no sea el hero) debe librar el header fijo */
.page > .section:first-child { padding-top: 200px; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section-alt { background: var(--black-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head h2 { margin-bottom: 16px; }
.section-lead { font-size: 1.02rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.two-col.reverse .col-media { order: 2; }
.col-media img {
  width: 100%;
  border: 1px solid var(--line);
  box-shadow: 0 25px 60px rgba(0, 0, 0, .6);
}
.col-text h2 { margin-bottom: 20px; }
.col-text p { margin-bottom: 16px; }
.col-text strong { color: var(--white); }
.role {
  color: var(--gold-light) !important;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: bold;
}

.sub-head {
  font-family: var(--font-body);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
  margin-top: 26px;
}
.check-list { list-style: none; margin: 18px 0 32px; }
.check-list li {
  position: relative; padding-left: 26px; margin-bottom: 10px;
  color: var(--muted); font-size: .93rem;
}
.check-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--gold); font-weight: bold;
}
/* Lista de áreas de experiencia en cuadrícula */
.check-list.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 0;
}
.check-list.grid-list li {
  margin: 0;
  padding: 18px 18px 18px 46px;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255, 255, 255, .07);
  color: var(--white);
  font-size: .95rem;
  transition: border-color .3s ease, transform .3s ease;
}
.check-list.grid-list li::before { left: 20px; top: 18px; }
.check-list.grid-list li:hover { border-color: var(--gold); transform: translateY(-3px); }

/* ===== Misión / Visión ===== */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.mv-card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  padding: 44px 38px;
  position: relative;
}
.mv-card::after {
  content: ""; position: absolute; left: 38px; bottom: 0; width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
}
.mv-icon { font-size: 2rem; margin-bottom: 14px; }
.mv-card h2 { margin-bottom: 16px; }
.mv-card strong { color: var(--white); }

/* ===== Valores ===== */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: rgba(201, 162, 39, .18);
  border: 1px solid var(--line);
}
.value {
  background: var(--black);
  padding: 32px 28px;
  transition: background .3s ease;
}
.value:hover { background: var(--panel); }
.value h3 { margin-bottom: 10px; font-size: 1.1rem; }
.value p { font-size: .9rem; }

/* ===== ¿Por qué elegirnos? ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}
.why {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: var(--black);
  padding: 22px 20px;
  transition: border-color .3s ease, transform .3s ease;
}
.why:hover { border-color: var(--gold); transform: translateY(-4px); }
.why span { font-size: 1.35rem; }
.why p { color: var(--white); font-size: .92rem; font-weight: bold; }

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 26px;
}
.card {
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255, 255, 255, .06);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-8px); border-color: var(--gold); box-shadow: 0 22px 50px rgba(0, 0, 0, .6); }

/* Foto de cabecera */
.card-media {
  position: relative;
  height: 190px;
  overflow: hidden;
  border-bottom: 2px solid var(--gold);
  background: #000;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.85) contrast(1.05);
  transition: transform .6s ease, filter .4s ease;
}
.card:hover .card-media img { transform: scale(1.07); filter: saturate(1) contrast(1.05); }
/* Velo oscuro para que la foto no compita con el texto dorado */
.card-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .1) 45%, rgba(0, 0, 0, .75) 100%);
  pointer-events: none;
}
/* Cabecera provisional mientras no exista la fotografía del área */
.card-media.pending {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(201, 162, 39, .22), transparent 65%),
    linear-gradient(160deg, #141414, #0a0a0a);
}
.card-media.pending span { font-size: 3rem; opacity: .9; }

.card-body { padding: 26px 26px 30px; flex: 1; }

/* Portada: tarjetas solo con foto y nombre del área */
.cards-compact .card-body { padding: 22px 24px; text-align: center; }
.cards-compact .card h3 { margin: 0; padding: 0; border-bottom: 0; }
.card h3 { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.card p { font-size: .93rem; margin-bottom: 18px; }
.card-list { list-style: none; margin-top: 16px; }
.card-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: .92rem;
}
.card-list li::before {
  content: "▪";
  position: absolute; left: 0; top: -1px;
  color: var(--gold);
}

/* ===== Contacto rápido (portada) ===== */
.center-action { text-align: center; margin-top: 44px; }

.contact-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}
.quick-card {
  display: block;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255, 255, 255, .07);
  padding: 30px 26px;
  text-align: center;
  transition: border-color .3s ease, transform .3s ease;
}
.quick-card:hover { border-color: var(--gold); transform: translateY(-6px); }
.quick-ico { font-size: 1.8rem; display: block; margin-bottom: 12px; }
.quick-card h4 {
  font-family: var(--font-body);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 8px;
}
.quick-card p { color: var(--white); font-size: .95rem; word-break: break-word; }

/* ===== CTA ===== */
.cta {
  padding: 90px 0;
  background:
    linear-gradient(rgba(0, 0, 0, .82), rgba(0, 0, 0, .9)),
    radial-gradient(circle at 50% 0%, rgba(201, 162, 39, .3), transparent 60%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.cta-inner h2 { margin-bottom: 12px; }
.cta-inner p { margin-bottom: 30px; }

/* ===== Contacto ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; }
.info-item { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.info-item:last-child { border-bottom: 0; }
.info-icon { font-size: 1.4rem; line-height: 1.4; }
.info-item h4 {
  font-family: var(--font-body);
  color: var(--white);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 4px;
}
.info-item a, .info-item p { font-size: 1.02rem; color: var(--gold-light); }
.info-item p { color: var(--muted); }

.contact-form {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  padding: 38px;
}
.contact-form h3 { margin-bottom: 22px; }
.contact-form label {
  display: block;
  margin-bottom: 16px;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: bold;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  margin-top: 7px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--white);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: .95rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: normal;
  outline: none;
  transition: border-color .25s ease;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--gold); }
.contact-form textarea { resize: vertical; }
.form-note { font-size: .75rem; margin-top: 12px; text-align: center; }

/* ===== Footer ===== */
.site-footer { background: #000; border-top: 1px solid var(--line); padding-top: 70px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 50px;
}
.footer-logo {
  height: 190px; width: 190px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 18px;
  box-shadow: 0 0 0 1px var(--line), 0 16px 40px rgba(201, 162, 39, .15);
}
.footer-tag { font-family: var(--font-title); font-style: italic; color: var(--gold-light); }
.site-footer h4 {
  font-family: var(--font-body);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
  margin-bottom: 18px;
}
.site-footer a { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.site-footer a:hover { color: var(--gold); }
.site-footer p { font-size: .92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding-top: 22px; padding-bottom: 22px;
  text-align: center;
}
.footer-bottom p { font-size: .8rem; color: #6d6d72; }

/* ===== WhatsApp flotante ===== */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 120;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .35);
  transition: transform .3s ease;
}
.wa-float:hover { transform: scale(1.08); color: #fff; }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .nav { gap: 20px; }
  .brand { left: 70px; }
  .brand-logo { height: 110px; }
  .site-header.scrolled .brand-logo { height: 88px; }
  .header-inner { min-height: 118px; }
  .site-header.scrolled .header-inner { min-height: 96px; }
}

@media (max-width: 980px) {
  .hero-inner, .two-col, .contact-grid, .mv-grid { grid-template-columns: 1fr; gap: 44px; }
  .mv-grid { gap: 24px; }
  .two-col.reverse .col-media { order: 0; }
  .hero { padding-top: 140px; }
  .brand { left: 24px; }
  .hero-seal img { max-width: 300px; }
  .strip-grid { grid-template-columns: 1fr 1fr; }
  .strip-item:nth-child(2) { border-right: 0; }
  .strip-item:nth-child(1), .strip-item:nth-child(2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: 0; right: -100%;
    width: 78%; max-width: 320px; height: 100vh;
    background: #050505;
    border-left: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 40px;
    transition: right .35s ease;
  }
  .nav.open { right: 0; }
  .nav-link { font-size: 1rem; }
  .section { padding: 48px 0; }
  .contact-form { padding: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .mv-card { padding: 32px 26px; }
  .strip-grid { grid-template-columns: 1fr 1fr; }
  .brand-logo, .site-header.scrolled .brand-logo { height: 82px; }
  .header-inner, .site-header.scrolled .header-inner { min-height: 90px; }
  .hero { padding-top: 140px; }
  .page > .section:first-child { padding-top: 140px; }
}
