/* ── Company Legal Documents Page Styles ──────────────────────────────────────── */

:root {
  --legal-primary: #001B2F;
  --legal-primary-dark: #03132A;
  --legal-accent: #2775BD;
  --legal-accent-hover: #1f5e99;
  --legal-green: #43704A;
  --legal-green-dark: #325537;
  --legal-bg: #F4F7F5;
  --legal-card-bg: #ffffff;
  --legal-text-dark: #0f172a;
  --legal-text-muted: #475569;
  --legal-border: #e2e8f0;
  --legal-radius: 12px;
}

.legal-page-wrapper {
  font-family: 'Calibri', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--legal-text-dark);
  background-color: #ffffff;
  line-height: 1.6;
}

/* ── Hero Banner ────────────────────────────────────────────────────────── */
.legal-hero {
  position: relative;
  background: linear-gradient(135deg, #001B2F 0%, #03132A 60%, #072846 100%);
  color: #ffffff;
  padding: 48px 20px 56px;
  text-align: center;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(39, 117, 189, 0.18), transparent 70%);
  pointer-events: none;
}

.legal-hero__container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.legal-hero__breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 16px;
}

.legal-hero__breadcrumb a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-hero__breadcrumb a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.legal-hero__title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-align: center;
}

@media (min-width: 768px) {
  .legal-hero__title {
    font-size: 3rem;
  }
}

/* ── Legal Documents Section (Vertical Layout) ─────────────────────────── */
.legal-documents-section {
  padding: 48px 20px 72px;
  background: #ffffff;
}

.legal-documents-container {
  max-width: 860px;
  margin: 0 auto;
}

.legal-page-intro-content {
  margin-bottom: 40px;
  padding: 24px;
  background: var(--legal-bg);
  border-radius: var(--legal-radius);
  border: 1px solid var(--legal-border);
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.7;
}

.legal-docs-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* Individual Document Item (Title -> Image -> Description) */
.legal-doc-item {
  display: flex;
  flex-direction: column;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 52px;
}

.legal-doc-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* 1. Title */
.legal-doc-item__title {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--legal-primary);
  margin: 0 0 18px 0;
  line-height: 1.3;
  text-align: center;
}

@media (min-width: 768px) {
  .legal-doc-item__title {
    font-size: 1.875rem;
  }
}

/* 2. Image Wrapper */
.legal-doc-item__media {
  position: relative;
  width: 100%;
  background: #fbfcfd;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 27, 47, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.legal-doc-item__media:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 27, 47, 0.09);
  border-color: #cbd5e1;
}

.legal-doc-item__img {
  max-width: 100%;
  max-height: 650px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  background: #ffffff;
  display: block;
}

/* Fallback Mockup when no scan is uploaded yet */
.legal-doc-mockup {
  width: 100%;
  max-width: 440px;
  min-height: 280px;
  background: #fffdfa;
  border: 2px solid #e0d0b0;
  box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 7px #e5d8c3, 0 4px 12px rgba(0,0,0,0.06);
  border-radius: 6px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  margin: 12px 0;
}

.legal-doc-mockup__emblem {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #92400e;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.legal-doc-mockup__header {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #78350f;
  margin-top: 8px;
}

.legal-doc-mockup__title {
  font-size: 1.0625rem;
  font-weight: 800;
  color: #1e293b;
  margin: 6px 0;
  line-height: 1.3;
}

.legal-doc-mockup__seal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  border-radius: 9999px;
}

/* Subtle Zoom Indicator */
.legal-doc-item__zoom-overlay {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 27, 47, 0.85);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
  opacity: 0.8;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.legal-doc-item__media:hover .legal-doc-item__zoom-overlay {
  opacity: 1;
  background: var(--legal-accent);
  transform: scale(1.03);
}

/* 3. Description */
.legal-doc-item__desc {
  margin-top: 18px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--legal-text-muted);
  text-align: left;
}

.legal-doc-item__desc p {
  margin: 0;
}

/* ── Interactive Lightbox Modal ────────────────────────────────────────── */
.legal-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 19, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.legal-modal.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.legal-modal__backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.legal-modal__dialog {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  max-width: 900px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-modal.is-active .legal-modal__dialog {
  transform: scale(1) translateY(0);
}

.legal-modal__header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--legal-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.legal-modal__title-wrap {
  flex: 1;
  padding-right: 16px;
}

.legal-modal__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--legal-primary);
  margin: 0;
  line-height: 1.3;
}

.legal-modal__close {
  background: #f1f5f9;
  border: none;
  color: #475569;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.legal-modal__close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.legal-modal__body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #f8fafc;
  align-items: center;
}

.legal-modal__img-wrapper {
  max-width: 100%;
  display: flex;
  justify-content: center;
  background: #ffffff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.legal-modal__img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.legal-modal__details {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px 22px;
}

.legal-modal__details-p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
}

.legal-modal__footer {
  padding: 14px 24px;
  border-top: 1px solid var(--legal-border);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-btn-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--legal-primary);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  justify-content: center;
}

.legal-btn-view:hover {
  background: var(--legal-accent);
}

.legal-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  color: var(--legal-primary);
  border: 1px solid #cbd5e1;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.legal-btn-download:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--legal-accent);
}

/* ── Verification Support Box ─────────────────────────────────────────── */
.legal-support-section {
  padding: 40px 20px 80px;
  background: var(--legal-bg);
}

.legal-support-container {
  max-width: 860px;
  margin: 0 auto;
}

.legal-support-box {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 36px 30px;
  box-shadow: 0 10px 30px rgba(0, 27, 47, 0.05);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

@media (min-width: 768px) {
  .legal-support-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 36px 40px;
  }
}

.legal-support-box__content {
  flex: 1;
}

.legal-support-box__title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--legal-primary);
  margin: 0 0 10px;
  line-height: 1.3;
}

.legal-support-box__text {
  font-size: 0.95rem;
  color: var(--legal-text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.legal-support-box__affiliations {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.legal-support-box__affiliations img {
  max-height: 36px;
  width: auto;
  opacity: 0.85;
}

.legal-support-box__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  shrink: 0;
}

@media (min-width: 540px) {
  .legal-support-box__actions {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .legal-support-box__actions {
    flex-direction: column;
  }
}

.legal-btn-contact-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--legal-green);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.2s ease;
  white-space: nowrap;
}

.legal-btn-contact-whatsapp:hover {
  background: var(--legal-green-dark);
  color: #ffffff;
}

.legal-btn-contact-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--legal-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.2s ease;
  white-space: nowrap;
}

.legal-btn-contact-email:hover {
  background: var(--legal-accent);
  color: #ffffff;
}
