/* ==========================================================================
   WAL Developments - Legal Pages Stylesheet (Privacy, Terms, Disclaimer)
   ========================================================================== */

.legal-page {
  background: var(--ivory, #f8f3eb);
  color: var(--ink, #181613);
  font-family: var(--font-body, 'DM Sans', sans-serif);
}

/* Header link indicator */
.legal-page .header .nav a.active {
  color: var(--gold, #bb9257);
}

/* Legal Hero Section */
.legal-hero {
  position: relative;
  padding: 40px 0 !important;
  background: radial-gradient(ellipse at 85% 15%, rgba(220, 195, 155, 0.28), transparent 55%),
              linear-gradient(180deg, #fdfaf5 0%, #f7f1e7 100%);
  border-bottom: 1px solid #e7dac8;
  overflow: hidden;
}

.legal-hero::before {
  content: 'WAL';
  position: absolute;
  right: 5%;
  bottom: -40px;
  font-family: var(--font-heading, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(120px, 18vw, 240px);
  font-weight: 700;
  color: rgba(187, 146, 87, 0.05);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.legal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #847766;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.legal-breadcrumb a {
  color: #4f4335;
  transition: color 0.2s;
}

.legal-breadcrumb a:hover {
  color: var(--gold, #bb9257);
}

.legal-breadcrumb span[aria-hidden="true"] {
  color: #bfae96;
}

.legal-hero-content {
  max-width: 820px;
  position: relative;
  z-index: 1;
}

.legal-hero h1 {
  font-family: var(--font-heading, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(38px, 4.8vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  color: #1a1612;
  margin: 14px 0 16px;
  letter-spacing: -0.5px;
}

.legal-hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold, #bb9257);
}

.legal-hero-lead {
  font-size: 15px;
  line-height: 1.75;
  color: #6a5e50;
  margin: 0 0 26px;
}

.legal-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-top: 18px;
  border-top: 1px solid #e5d6c2;
  font-size: 12px;
  color: #796c5b;
}

.legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legal-meta-item strong {
  color: #241d16;
  font-weight: 600;
}

.legal-meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #efe3d0;
  border: 1px solid #dcc9af;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  color: #634e32;
  letter-spacing: 0.4px;
}

/* Quick Page Switcher Tabs */
.legal-tabs-bar {
  background: #fffcf7;
  border-bottom: 1px solid #e7dac8;
  position: sticky;
  top: 78px;
  z-index: 30;
  backdrop-filter: blur(10px);
}

.legal-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none;
}

.legal-tabs::-webkit-scrollbar {
  display: none;
}

.legal-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 30px;
  border: 1px solid #e2d2bc;
  background: #fbf7f0;
  font-size: 12px;
  font-weight: 600;
  color: #6c5f4f;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.legal-tab:hover {
  border-color: #bb9257;
  color: #181613;
  background: #fff;
}

.legal-tab.active {
  background: #181613;
  color: #fff;
  border-color: #181613;
  box-shadow: 0 4px 12px rgba(24, 22, 19, 0.12);
}

/* Main Legal Body Grid */
.legal-main-section {
  padding: 40px 0 !important;
}

.legal-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* Sticky Sidebar Table of Contents */
.legal-sidebar {
  position: sticky;
  top: 148px;
  background: #fffdfa;
  border: 1px solid #e6d8c5;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 35px rgba(40, 31, 20, 0.04);
}

.legal-sidebar-head {
  padding-bottom: 14px;
  border-bottom: 1px solid #ebdcc8;
  margin-bottom: 16px;
}

.legal-sidebar-head h3 {
  font-family: var(--font-heading, 'Cormorant Garamond', Georgia, serif);
  font-size: 21px;
  font-weight: 600;
  color: #211c16;
  margin: 0;
}

.legal-sidebar-head p {
  font-size: 11px;
  color: #8b7d6a;
  margin: 4px 0 0;
}

.legal-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.legal-nav-list::-webkit-scrollbar {
  width: 4px;
}

.legal-nav-list::-webkit-scrollbar-thumb {
  background: #d8c5ad;
  border-radius: 4px;
}

.legal-nav-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #635645;
  transition: all 0.2s ease;
}

.legal-nav-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold, #bb9257);
  flex-shrink: 0;
  width: 20px;
}

.legal-nav-link:hover {
  background: #f7eee2;
  color: #171512;
  transform: translateX(3px);
}

.legal-nav-link.active {
  background: #efe3d0;
  color: #171512;
  font-weight: 600;
}

/* Sidebar Help Card */
.legal-sidebar-card {
  margin-top: 20px;
  padding: 18px;
  background: #fbf7ef;
  border: 1px dashed #d6c3aa;
  border-radius: 14px;
}

.legal-sidebar-card h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: #241c14;
  margin: 0 0 6px;
}

.legal-sidebar-card p {
  font-size: 11px;
  line-height: 1.55;
  color: #796c5a;
  margin: 0 0 12px;
}

.legal-sidebar-card a.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #8b6533;
}

.legal-sidebar-card a.link-btn:hover {
  text-decoration: underline;
}

/* Main Content Column */
.legal-content {
  min-width: 0;
}

/* Sections */
.legal-section {
  background: #fffdfa;
  border: 1px solid #e7dac9;
  border-radius: 24px;
  padding: 38px 42px;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(40, 31, 20, 0.03);
  scroll-margin-top: 140px;
  position: relative;
  transition: border-color 0.2s ease;
}

.legal-section:target,
.legal-section.focused {
  border-color: #bb9257;
  box-shadow: 0 0 0 3px rgba(187, 146, 87, 0.15), 0 12px 36px rgba(40, 31, 20, 0.06);
}

.legal-sec-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee1d1;
}

.legal-sec-num {
  font-family: var(--font-heading, 'Cormorant Garamond', Georgia, serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--gold, #bb9257);
  line-height: 1.1;
  flex-shrink: 0;
  padding-top: 2px;
}

.legal-sec-header h2 {
  font-family: var(--font-heading, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  color: #1a1612;
  margin: 0;
}

.legal-section h3 {
  font-family: var(--font-heading, 'Cormorant Garamond', Georgia, serif);
  font-size: 22px;
  font-weight: 600;
  color: #27211a;
  margin: 26px 0 12px;
}

.legal-section h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #3b3227;
  margin: 18px 0 8px;
  letter-spacing: 0.2px;
}

.legal-section p {
  font-size: 13.5px;
  line-height: 1.85;
  color: #5d5244;
  margin: 0 0 16px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section strong {
  color: #1f1913;
  font-weight: 600;
}

.legal-section ul,
.legal-section ol {
  margin: 14px 0 20px 20px;
  padding: 0;
  color: #5d5244;
  font-size: 13.5px;
  line-height: 1.8;
}

.legal-section li {
  margin-bottom: 10px;
}

.legal-section li strong {
  color: #221a14;
}

/* Callout Boxes */
.legal-callout {
  padding: 20px 24px;
  border-radius: 14px;
  background: #fbf6ec;
  border-left: 4px solid #b48c4c;
  margin: 22px 0;
}

.legal-callout h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #644923;
  font-size: 13px;
  font-weight: 700;
}

.legal-callout p {
  font-size: 12.5px;
  line-height: 1.75;
  color: #675743;
  margin: 0;
}

.legal-callout-warning {
  background: #fdf5f3;
  border-left-color: #c95640;
}

.legal-callout-warning h4 {
  color: #9c2e17;
}

.legal-callout-warning p {
  color: #7d4437;
}

.legal-callout-info {
  background: #f3f7fa;
  border-left-color: #4b8aa8;
}

.legal-callout-info h4 {
  color: #235872;
}

.legal-callout-info p {
  color: #3b5a6c;
}

/* Structured Key-Value Table / RERA Grid */
.legal-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #e5d7c5;
  border-radius: 14px;
  background: #fff;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.legal-table th,
.legal-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #eee2d3;
}

.legal-table th {
  background: #f8f1e6;
  color: #3f3325;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table td:first-child {
  font-weight: 600;
  color: #221c16;
}

.legal-table td:nth-child(2) {
  color: #5c5042;
}

/* Contact / Grievance Card Box */
.legal-contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, #fbf7f1 0%, #f4eadc 100%);
  border: 1px solid #decbb4;
  border-radius: 18px;
  margin-top: 24px;
}

.legal-contact-card-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-contact-card-item small {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #92754e;
  font-weight: 700;
}

.legal-contact-card-item strong {
  font-size: 14px;
  color: #1a1612;
}

.legal-contact-card-item a {
  color: #8f6733;
  font-weight: 600;
  transition: color 0.2s;
}

.legal-contact-card-item a:hover {
  color: #181613;
  text-decoration: underline;
}

/* Bottom Fast-Navigation between Legal Pages */
.legal-bottom-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
}

.legal-bottom-card {
  padding: 24px 28px;
  background: #fffdfa;
  border: 1px solid #e4d6c4;
  border-radius: 18px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.legal-bottom-card:hover {
  border-color: #bb9257;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(40, 31, 20, 0.06);
}

.legal-bottom-card span.sub {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #a48253;
  font-weight: 700;
}

.legal-bottom-card h3 {
  font-family: var(--font-heading, 'Cormorant Garamond', Georgia, serif);
  font-size: 22px;
  font-weight: 600;
  color: #201a14;
  margin: 6px 0 8px;
}

.legal-bottom-card p {
  font-size: 12px;
  color: #796e5f;
  line-height: 1.6;
  margin: 0 0 14px;
}

.legal-bottom-card .card-arrow {
  font-size: 12px;
  font-weight: 700;
  color: #8b6534;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Responsive Media Queries */
@media (max-width: 980px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  
  .legal-sidebar {
    position: static;
    top: auto;
    max-height: none;
  }
  
  .legal-nav-list {
    max-height: 240px;
  }
}

@media (max-width: 768px) {
  .legal-hero {
    padding: 32px 0 42px;
  }

  .legal-tabs-bar {
    top: 70px;
  }

  .legal-section {
    padding: 26px 22px;
    border-radius: 18px;
    margin-bottom: 20px;
  }

  .legal-sec-num {
    font-size: 22px;
  }

  .legal-sec-header h2 {
    font-size: 22px;
  }

  .legal-bottom-nav {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .legal-contact-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
}

/* Standardized Y-direction padding */
.legal-main-section,
.legal-hero {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}

@media (max-width: 880px) {
  .legal-main-section,
  .legal-hero {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
  }
}
