/* ===== CONSULTORÍA JURÍDICA CRIMINALÍSTICA "CARRIÓN" — Dr. Orlando Lenin Carrión Mg. Sc. ===== */

:root {
  --red: #d7141d;
  --red-dark: #9e0f16;
  --red-light: #ef3b42;
  --charcoal: #3d4241;
  --charcoal-deep: #25292a;
  --ink: #1d1f20;
  --silver: #9d9fa2;
  --silver-light: #d9dadc;
  --paper: #ffffff;
  --paper-soft: #f4f4f5;
  --text: #4a4f52;
  --line: rgba(61, 66, 65, .14);
  --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(--paper);
  color: var(--text);
  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(--ink); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }

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

a { color: var(--red); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--red-dark); }

.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(--red);
  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(--red);
  cursor: pointer;
  transition: all .3s ease;
  text-align: center;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); color: #fff; }
.btn-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-light:hover { background: #fff; color: var(--charcoal); }
.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(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .08); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 96px;
  transition: min-height .3s ease;
}
.site-header.scrolled .header-inner { min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-emblem { height: 70px; width: auto; transition: height .3s ease; }
.site-header.scrolled .brand-emblem { height: 54px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-title);
  font-size: 1.05rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand-sub {
  font-family: var(--font-title);
  font-size: 1.3rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
}

.nav { display: flex; align-items: center; gap: 22px; }
.nav-link {
  color: var(--charcoal);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: bold;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--red); transition: width .3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--red); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta { padding: 9px 18px; font-size: .7rem; white-space: nowrap; }

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

/* ===== Hero ===== */
.hero {
  position: relative; padding: 150px 0 0; overflow: hidden;
  background: linear-gradient(90deg, #f7f7f7 0%, #e6e6e7 45%, #bdbebf 100%);
}

/* Fondo: la Justicia con los ojos vendados, con un zoom lento y continuo */
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: 55% 30%;
  /* la foto ocupa la mitad derecha y se funde hacia la izquierda, detrás del texto */
  left: 34%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%);
          mask-image: linear-gradient(90deg, transparent, #000 22%);
  animation: heroZoom 24s ease-in-out infinite;
  will-change: transform;
}
@keyframes heroZoom {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
/* Velo claro a la izquierda para que el texto se lea; la estatua queda visible a la derecha */
.hero-bg {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, .45) 40%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(61, 66, 65, 0) 70%, rgba(61, 66, 65, .25) 100%);
}
/* Franjas diagonales rojo / gris, como en las esquinas de la tarjeta */
.hero-deco {
  position: absolute; width: 520px; height: 520px; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(135deg,
    transparent 0 26px,
    rgba(157, 159, 162, .35) 26px 40px,
    transparent 40px 58px,
    rgba(215, 20, 29, .28) 58px 66px);
}
.hero-deco-br { bottom: -330px; left: -300px; border-radius: 50%; }

.hero-inner { position: relative; z-index: 2; }
.hero-text { max-width: 680px; padding: 40px 0 110px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .02em; }
.hero h1 span { color: var(--red); }
.hero-sub {
  font-family: var(--font-title);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  color: var(--red-dark);
  font-style: italic;
  font-weight: bold;
  margin-bottom: 22px;
  border-left: 3px solid var(--red);
  padding-left: 16px;
}
.hero-desc { max-width: 600px; margin-bottom: 34px; color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-strip {
  position: relative; z-index: 2;
  background: var(--charcoal);
  border-top: 4px solid var(--red);
}
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item {
  padding: 24px 14px; text-align: center;
  border-right: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.strip-item:last-child { border-right: 0; }
.strip-item strong { font-family: var(--font-title); font-size: 1.6rem; color: #fff; line-height: 1.1; }
.strip-item span {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--silver-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: 160px; }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section-alt { background: var(--paper-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { margin-bottom: 16px; }
.section-head h2::after {
  content: ""; display: block; width: 64px; height: 3px; margin: 16px auto 0;
  background: linear-gradient(90deg, var(--silver) 50%, var(--red) 50%);
}
.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-seal { display: flex; justify-content: center; }
.col-seal img {
  width: 100%; max-width: 340px;
  border-radius: 50%;
  box-shadow: 0 0 0 10px #fff, 0 0 0 11px var(--line), 0 25px 60px rgba(0, 0, 0, .25);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.col-text h2 { margin-bottom: 20px; }
.col-text p { margin-bottom: 16px; }
.col-text strong { color: var(--ink); }
.role {
  color: var(--red) !important;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: bold;
}

.check-list { list-style: none; margin: 18px 0 32px; }
.check-list li { position: relative; padding-left: 26px; margin-bottom: 10px; font-size: .93rem; }
.check-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--red); font-weight: bold;
}
.check-list.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 0;
}
.check-list.grid-list li {
  margin: 0;
  padding: 18px 18px 18px 46px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  color: var(--ink);
  font-weight: bold;
  font-size: .95rem;
  transition: box-shadow .3s ease, transform .3s ease;
}
.check-list.grid-list li::before { left: 20px; top: 18px; }
.check-list.grid-list li:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, .08); transform: translateY(-3px); }

/* ===== Cards (servicios) ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--charcoal);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
  position: relative;
}
.card:hover { transform: translateY(-6px); border-top-color: var(--red); box-shadow: 0 22px 50px rgba(0, 0, 0, .1); }

.card-icon {
  width: 64px; height: 64px;
  margin: 28px 26px 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-soft);
  border-radius: 50%;
  transition: background .35s ease;
}
.card-icon svg {
  width: 32px; height: 32px;
  fill: none; stroke: var(--red); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .35s ease;
}
.card:hover .card-icon { background: var(--red); }
.card:hover .card-icon svg { stroke: #fff; }

.card-body { padding: 18px 26px 28px; flex: 1; }
.card h3 { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.card-list { list-style: none; margin-top: 14px; }
.card-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: .92rem;
}
.card-list li::before {
  content: "▸";
  position: absolute; left: 0; top: -1px;
  color: var(--red);
}

/* Portada: tarjetas solo con icono y nombre del área */
.cards-compact { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.cards-compact .card { flex-direction: row; align-items: center; }
.cards-compact .card-icon { width: 50px; height: 50px; margin: 16px 0 16px 18px; flex-shrink: 0; }
.cards-compact .card-icon svg { width: 26px; height: 26px; }
.cards-compact .card-body { padding: 14px 18px; }
.cards-compact .card h3 { margin: 0; padding: 0; border-bottom: 0; font-size: 1rem; }

/* ===== Ubicaciones ===== */
.center-action { text-align: center; margin-top: 44px; }

.loc-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  max-width: 900px; margin: 0 auto;
}
.quick-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  padding: 30px 26px;
  text-align: center;
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.quick-card:hover { border-color: var(--red); transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .08); }
.quick-ico {
  width: 34px; height: 34px; margin: 0 auto 12px; display: block;
  fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.quick-card h4 {
  font-family: var(--font-body);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--red);
  margin-bottom: 8px;
}
.quick-card p { color: var(--ink); font-size: .95rem; }

.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
/* Una sola oficina: la ficha se centra y no ocupa todo el ancho */
.loc-grid-solo { grid-template-columns: minmax(0, 720px); justify-content: center; }
.loc-grid-solo .loc-map { aspect-ratio: 16 / 9; }
.loc-quick-solo { grid-template-columns: minmax(0, 520px); justify-content: center; }
.loc-card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--red); display: flex; flex-direction: column; }
.loc-map { aspect-ratio: 4 / 3; background: var(--paper-soft); }
.loc-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.loc-body { padding: 26px; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.loc-body p { flex: 1; }

/* ===== Cobertura nacional (cuerpo colegiado) ===== */
.national {
  padding: 64px 0;
  background:
    linear-gradient(135deg, rgba(37, 41, 42, .97), rgba(61, 66, 65, .95)),
    repeating-linear-gradient(135deg, transparent 0 30px, rgba(215, 20, 29, .5) 30px 36px);
  border-top: 4px solid var(--red);
}
.national-inner { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; }
.national-num {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 180px; height: 180px; border-radius: 50%;
  border: 3px solid var(--red);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .06);
}
.national-num strong { font-family: var(--font-title); font-size: 4.2rem; line-height: 1; color: #fff; }
.national-num span {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--silver-light);
  margin-top: 6px;
}
.national-text h2 { color: #fff; margin-bottom: 14px; }
.national-text p { color: var(--silver-light); max-width: 680px; }
.national-text .eyebrow { color: var(--red-light); }

/* ===== CTA ===== */
.cta {
  padding: 90px 0;
  background:
    linear-gradient(135deg, rgba(37, 41, 42, .96), rgba(61, 66, 65, .94)),
    repeating-linear-gradient(135deg, transparent 0 30px, rgba(215, 20, 29, .5) 30px 36px);
  border-top: 4px solid var(--red);
  text-align: center;
}
.cta-inner h2 { color: #fff; margin-bottom: 12px; }
.cta-inner p { color: var(--silver-light); 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 var(--line); }
.info-item:last-child { border-bottom: 0; }
.info-icon {
  width: 28px; height: 28px; flex-shrink: 0; margin-top: 2px;
  fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.info-item h4 {
  font-family: var(--font-body);
  color: var(--ink);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 4px;
}
.info-item > div > a { display: block; font-size: 1.02rem; word-break: break-word; }
.info-item p { font-size: .98rem; }

.contact-form {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  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(--charcoal);
  font-weight: bold;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  margin-top: 7px;
  background: #fff;
  border: 1px solid rgba(61, 66, 65, .25);
  color: var(--ink);
  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(--red); }
.contact-form textarea { resize: vertical; }
.form-note { font-size: .75rem; margin-top: 12px; text-align: center; }

/* ===== Footer ===== */
.site-footer { background: var(--charcoal-deep); border-top: 4px solid var(--red); padding-top: 64px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.3fr;
  gap: 40px;
  padding-bottom: 50px;
}
.footer-logo { width: 150px; height: 150px; border-radius: 50%; margin-bottom: 18px; }
.footer-tag { font-family: var(--font-title); font-style: italic; color: #fff; }
.site-footer h4 {
  font-family: var(--font-body);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--red-light);
  margin-bottom: 18px;
}
.site-footer a { display: block; color: var(--silver-light); font-size: .92rem; margin-bottom: 10px; word-break: break-word; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: .92rem; color: var(--silver-light); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 22px; padding-bottom: 22px;
  text-align: center;
}
.footer-bottom p { font-size: .8rem; color: var(--silver); }

/* ===== 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: 1180px) {
  .nav { gap: 14px; }
  .nav-link { font-size: .68rem; letter-spacing: .05em; }
  .nav-cta { padding: 8px 12px; }
  .brand-emblem { height: 58px; }
  .brand-name { font-size: .8rem; letter-spacing: .04em; }
  .brand-sub { font-size: 1.05rem; }
}

@media (max-width: 980px) {
  .two-col, .contact-grid, .loc-grid { grid-template-columns: 1fr; gap: 44px; }
  .two-col.reverse .col-media { order: 0; }
  .hero-slide { left: 0; background-position: 78% 30%; -webkit-mask-image: none; mask-image: none; }
  .hero-bg { background: linear-gradient(180deg, rgba(255, 255, 255, .9) 0%, rgba(255, 255, 255, .8) 60%, rgba(255, 255, 255, .55) 100%); }
  .hero-text { padding-bottom: 70px; }
  .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 rgba(255, 255, 255, .12); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .col-seal img { max-width: 260px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: 0; right: -100%;
    width: 78%; max-width: 320px; height: 100vh;
    background: #fff;
    border-left: 3px solid var(--red);
    box-shadow: -10px 0 40px rgba(0, 0, 0, .15);
    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; }
}

@media (max-width: 760px) {
  .national-inner { grid-template-columns: 1fr; gap: 26px; text-align: center; justify-items: center; }
  .national-num { width: 140px; height: 140px; }
  .national-num strong { font-size: 3.2rem; }
  .section { padding: 52px 0; }
  .contact-form { padding: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-emblem, .site-header.scrolled .brand-emblem { height: 50px; }
  .brand-name { font-size: .78rem; }
  .brand-sub { font-size: .95rem; }
  .header-inner, .site-header.scrolled .header-inner { min-height: 72px; }
  .hero { padding-top: 110px; }
  .page > .section:first-child { padding-top: 120px; }
  .hero-deco { width: 340px; height: 340px; }
}
