/* =========================================================
   APC FOOTER GLOBAL — ABOGADAS PERÚ v2.0
   Diseño jurídico, sobrio y responsive
   ========================================================= */

.apgf-footer,
.apgf-footer * {
  box-sizing: border-box;
}

/* Oculta footers habituales del tema/Elementor sin ocultar el plugin. */
body.apgf-v2-active #colophon,
body.apgf-v2-active .site-footer:not(.apgf-footer),
body.apgf-v2-active .elementor-location-footer,
body.apgf-v2-active footer#footer,
body.apgf-v2-active footer.footer:not(.apgf-footer) {
  display: none !important;
}

.apgf-footer {
  --apgf-red: #c82026;
  --apgf-red-dark: #9d171c;
  --apgf-ink: #151515;
  --apgf-text: #5f5b59;
  --apgf-muted: #7b7774;
  --apgf-line: #ded8d3;
  --apgf-cream: #f6f3f0;
  --apgf-paper: #fffdfb;

  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
  overflow: hidden;
  background: var(--apgf-cream);
  color: var(--apgf-ink);
  font-family: Arial, Helvetica, sans-serif !important;
}

.apgf-footer a {
  color: inherit;
}

.apgf-accent {
  height: 5px;
  width: 100%;
  background: var(--apgf-red);
}

.apgf-shell {
  width: min(1380px, calc(100% - 56px));
  margin: 0 auto;
  padding: 58px 0 24px;
}

/* CTA superior: limpio, no parece banner publicitario. */
.apgf-consultation {
  margin-bottom: 56px;
  padding: 30px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: center;
  border: 1px solid #e0dad5;
  border-radius: 14px;
  background: var(--apgf-paper);
  box-shadow: 0 13px 38px rgba(21, 21, 21, 0.045);
}

.apgf-consultation-copy {
  max-width: 820px;
}

.apgf-eyebrow,
.apgf-column-label {
  display: block;
  color: var(--apgf-red);
  font-size: 11px;
  font-weight: 700 !important;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.apgf-consultation h2 {
  margin: 9px 0 7px;
  max-width: 790px;
  color: var(--apgf-ink);
  font-size: clamp(25px, 2.3vw, 36px);
  font-weight: 700 !important;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.apgf-consultation p {
  margin: 0;
  max-width: 760px;
  color: var(--apgf-text);
  font-size: 15px;
  line-height: 1.62;
}

.apgf-consultation-button {
  min-height: 54px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid var(--apgf-red);
  border-radius: 6px;
  background: var(--apgf-red);
  color: #fff !important;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700 !important;
  line-height: 1;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .25s ease, border-color .25s ease, transform .25s ease, gap .25s ease;
}

.apgf-consultation-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.apgf-consultation-button:hover {
  gap: 23px;
  border-color: var(--apgf-ink);
  background: var(--apgf-ink);
  transform: translateY(-2px);
}

/* Estructura principal */
.apgf-main {
  padding: 0 0 48px;
  display: grid;
  grid-template-columns: 1.12fr .78fr 1fr;
  gap: 58px;
  align-items: start;
}

.apgf-brand-column,
.apgf-practice-column,
.apgf-contact-column {
  min-width: 0;
}

.apgf-brand {
  display: inline-flex;
  align-items: center;
  max-width: 310px;
  text-decoration: none;
}

.apgf-logo-image {
  width: auto;
  max-width: 100%;
  max-height: 92px;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.apgf-logo-fallback {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.apgf-logo-mark {
  color: var(--apgf-red);
  font-size: 17px;
  font-weight: 700 !important;
  letter-spacing: .34em;
}

.apgf-logo-name {
  color: var(--apgf-ink);
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 34px;
  font-weight: 700 !important;
  line-height: 1;
}

.apgf-brand-copy {
  max-width: 460px;
  margin: 27px 0 16px;
  color: var(--apgf-text);
  font-size: 15px;
  line-height: 1.72;
}

.apgf-presence {
  margin: 0;
  max-width: 450px;
  padding-left: 15px;
  position: relative;
  color: #6d6865;
  font-size: 13px;
  line-height: 1.55;
}

.apgf-presence::before {
  content: '';
  width: 3px;
  position: absolute;
  inset: 2px auto 2px 0;
  border-radius: 4px;
  background: var(--apgf-red);
}

.apgf-column-label {
  margin-bottom: 22px;
}

/* Enlaces de áreas: sobrios y editoriales */
.apgf-links {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--apgf-line);
}

.apgf-links li {
  margin: 0;
  padding: 0;
}

.apgf-links a {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--apgf-line);
  color: var(--apgf-ink) !important;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700 !important;
  line-height: 1.3;
  transition: color .22s ease, padding-left .22s ease;
}

.apgf-links a svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: #aaa29d;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .22s ease, transform .22s ease;
}

.apgf-links a:hover {
  padding-left: 7px;
  color: var(--apgf-red) !important;
}

.apgf-links a:hover svg {
  stroke: var(--apgf-red);
  transform: translateX(3px);
}

/* Contacto */
.apgf-contact-list {
  display: grid;
  gap: 10px;
}

.apgf-contact-item {
  min-height: 74px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #e2dcd7;
  border-radius: 9px;
  background: rgba(255, 255, 255, .58);
  color: var(--apgf-ink) !important;
  text-decoration: none;
  transition: border-color .22s ease, background .22s ease, transform .22s ease;
}

.apgf-contact-item:hover {
  border-color: rgba(200, 32, 38, .34);
  background: #fff;
  transform: translateY(-2px);
}

.apgf-contact-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f8e9e9;
  color: var(--apgf-red);
}

.apgf-contact-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.apgf-contact-content {
  min-width: 0;
}

.apgf-contact-content small {
  display: block;
  margin-bottom: 4px;
  color: var(--apgf-muted);
  font-size: 10px;
  font-weight: 700 !important;
  line-height: 1.3;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.apgf-contact-content strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--apgf-ink);
  font-size: 15px;
  font-weight: 700 !important;
  line-height: 1.35;
}

/* Barra inferior */
.apgf-utility {
  min-height: 66px;
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 30px;
  border-top: 1px solid var(--apgf-line);
}

.apgf-utility-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 25px;
}

.apgf-utility-nav a {
  color: #5f5a57 !important;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700 !important;
  line-height: 1.4;
  transition: color .2s ease;
}

.apgf-utility-nav a:hover {
  color: var(--apgf-red) !important;
}

.apgf-legal-line {
  color: #817b77;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .apgf-shell {
    width: calc(100% - 40px);
  }

  .apgf-consultation {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .apgf-consultation-button {
    width: fit-content;
  }

  .apgf-main {
    grid-template-columns: 1fr 1fr;
    gap: 44px;
  }

  .apgf-brand-column {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .apgf-shell {
    width: calc(100% - 26px);
    padding-top: 38px;
  }

  .apgf-consultation {
    margin-bottom: 42px;
    padding: 22px 20px;
    border-radius: 10px;
  }

  .apgf-consultation h2 {
    font-size: 26px;
  }

  .apgf-consultation p {
    font-size: 14px;
  }

  .apgf-consultation-button {
    width: 100%;
    padding-inline: 18px;
  }

  .apgf-main {
    padding-bottom: 36px;
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .apgf-brand-column {
    grid-column: auto;
  }

  .apgf-logo-image {
    max-height: 78px;
  }

  .apgf-logo-name {
    font-size: 29px;
  }

  .apgf-brand-copy {
    margin-top: 21px;
    font-size: 14px;
  }

  .apgf-contact-item {
    min-height: 70px;
  }

  .apgf-utility {
    align-items: flex-start;
    flex-direction: column;
  }

  .apgf-legal-line {
    white-space: normal;
  }
}
