/* ================================================================
   DGDDI - Module Cadre Juridique
   ================================================================ */

.legal-page-hero .page-hero-tag {
  background: var(--dgddi-gold);
}

.legal-section {
  padding: 70px 0 80px;
  background: var(--dgddi-gray);
}

.legal-nav-card,
.legal-help-card,
.legal-intro-panel,
.legal-pillar-card,
.legal-content-card,
.legal-step,
.legal-process article,
.taxpayer-right-card,
.legal-notice-band {
  background: #fff;
  border: 1px solid var(--dgddi-gray-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.legal-nav-card {
  overflow: hidden;
  position: sticky;
  top: 108px;
}

.legal-nav-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--dgddi-green);
  color: #fff;
  padding: 15px 18px;
  margin: 0;
  font-size: .86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.legal-nav-card h3 i {
  color: var(--dgddi-gold-light);
}

.legal-nav-card ul {
  padding: 8px;
}

.legal-nav-card a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: var(--radius);
  color: var(--dgddi-text);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-nav-card a i {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(27,94,32,.08);
  color: var(--dgddi-green);
}

.legal-nav-card a:hover,
.legal-nav-card a.active {
  background: rgba(200,150,46,.12);
  color: var(--dgddi-green);
}

.legal-nav-card a.active i {
  background: var(--dgddi-green);
  color: var(--dgddi-gold-light);
}

.legal-help-card {
  margin-top: 18px;
  padding: 22px 18px;
}

.legal-help-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dgddi-gold);
  color: #fff;
  margin-bottom: 14px;
}

.legal-help-card h4 {
  color: var(--dgddi-green);
  font-size: .96rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-help-card p {
  color: var(--dgddi-muted);
  font-size: .82rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.legal-help-card a,
.legal-notice-band a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dgddi-green);
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 15px;
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}

.legal-help-card a:hover,
.legal-notice-band a:hover {
  background: var(--dgddi-gold);
  color: #fff;
}

.legal-intro-panel {
  padding: 32px;
  margin-bottom: 22px;
}

.legal-intro-panel h2 {
  color: var(--dgddi-green);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-intro-panel .section-divider {
  margin: 12px 0 0;
}

.legal-intro-panel p {
  color: var(--dgddi-muted);
  font-size: .94rem;
  line-height: 1.8;
  margin: 20px 0 0;
}

.legal-pillars-grid,
.legal-content-grid,
.taxpayer-rights-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.legal-pillars-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legal-content-grid,
.taxpayer-rights-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legal-pillar-card,
.legal-content-card,
.taxpayer-right-card {
  padding: 24px 20px;
}

.legal-pillar-card,
.taxpayer-right-card {
  transition: transform var(--transition), box-shadow var(--transition);
}

.legal-pillar-card:hover,
.taxpayer-right-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.legal-pillar-icon,
.taxpayer-right-card > i {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dgddi-green);
  color: var(--dgddi-gold-light);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.legal-pillar-card h3,
.legal-content-card h3,
.legal-step h3,
.legal-process h3,
.taxpayer-right-card h3 {
  color: var(--dgddi-green);
  font-size: .98rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-content-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-content-card h3 i {
  color: var(--dgddi-gold);
}

.legal-pillar-card p,
.legal-content-card p,
.legal-step p,
.legal-process p,
.taxpayer-right-card p {
  color: var(--dgddi-muted);
  font-size: .84rem;
  line-height: 1.75;
  margin: 0;
}

.legal-content-card ul {
  margin: 12px 0 0;
  padding: 0;
}

.legal-content-card li {
  position: relative;
  color: var(--dgddi-muted);
  font-size: .84rem;
  line-height: 1.75;
  padding-left: 18px;
  margin-bottom: 8px;
}

.legal-content-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dgddi-gold);
}

.legal-wide-card {
  margin-bottom: 22px;
}

.legal-domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.legal-domain-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--radius);
  background: rgba(27,94,32,.08);
  color: var(--dgddi-green);
  font-size: .78rem;
  font-weight: 800;
}

.legal-timeline {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.legal-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border-left: 4px solid var(--dgddi-green);
}

.legal-step > span {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dgddi-green);
  color: var(--dgddi-gold-light);
  font-weight: 800;
}

.legal-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.legal-process article {
  padding: 22px 18px;
  position: relative;
  overflow: hidden;
}

.legal-process article::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(to right, var(--dgddi-green), var(--dgddi-gold));
}

.legal-process span {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(27,94,32,.08);
  color: var(--dgddi-green);
  margin-bottom: 14px;
}

.legal-notice-band {
  margin-top: 22px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #fff 0%, #f8fbf8 100%);
}

.legal-notice-band span {
  display: block;
  color: var(--dgddi-gold);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.legal-notice-band strong {
  display: block;
  color: var(--dgddi-green);
  font-size: .96rem;
  line-height: 1.5;
}

@media (max-width: 991px) {
  .legal-nav-card {
    position: static;
    top: auto;
  }

  .legal-pillars-grid,
  .legal-process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .legal-section {
    padding: 48px 0 60px;
  }

  .legal-intro-panel,
  .legal-pillar-card,
  .legal-content-card,
  .taxpayer-right-card,
  .legal-step,
  .legal-notice-band {
    padding: 22px 18px;
  }

  .legal-pillars-grid,
  .legal-content-grid,
  .taxpayer-rights-grid,
  .legal-process {
    grid-template-columns: 1fr;
  }

  .legal-step,
  .legal-notice-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-notice-band a {
    width: 100%;
  }
}
