/* ==========================================================================
   Kundli AI — Modern Legal & Regulatory Compliance Portal Theme
   Inspired by the sleek, dark-mode architecture of Smaran (Reminder App)
   ========================================================================== */

:root {
  --bg-primary: #0B0F19;
  --bg-surface: #111827;
  --bg-card: #1F2937;
  --bg-card-hover: #263345;
  --border-color: #374151;
  --border-color-light: #4B5563;
  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;

  /* Vedic Gold & Warm Accents */
  --brand-gold: #F59E0B;
  --brand-gold-light: #FBBF24;
  --brand-gold-dark: #D97706;
  --brand-gold-subtle: rgba(245, 158, 11, 0.15);
  --brand-gold-border: rgba(245, 158, 11, 0.35);

  /* Functional Accents */
  --accent-emerald: #10B981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.15);
  --accent-crimson: #EF4444;
  --accent-crimson-bg: rgba(239, 68, 68, 0.15);
  --accent-blue: #3B82F6;
  --accent-blue-bg: rgba(59, 130, 246, 0.15);
  --accent-purple: #8B5CF6;
  --accent-purple-bg: rgba(139, 92, 246, 0.15);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Cinzel", Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header & Sticky Navigation
   ========================================================================== */

header, .site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1.1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-content, .header-container {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo, .brand, .logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.logo-badge {
  background-color: var(--brand-gold);
  color: #0B0F19;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.brand-icon {
  font-size: 1.5rem;
  color: var(--brand-gold);
}

.header-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

nav, .nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  flex-wrap: wrap;
}

nav a, .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

nav a:hover, .nav-links a:hover,
nav a.active, .nav-links a.active {
  color: var(--brand-gold-light);
  background-color: var(--brand-gold-subtle);
}

/* ==========================================================================
   Main Layout & Hero Section
   ========================================================================== */

main, .main-wrapper {
  flex: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  width: 100%;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
}

.hero {
  text-align: center;
  margin-bottom: 3.5rem;
  padding: 1.5rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #F9FAFB 0%, var(--brand-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 760px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.certification-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-gold-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Document Inner Hero Banner */
.hero-banner, .doc-header {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(17, 24, 39, 0.9) 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
}

.hero-banner h1, .doc-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.doc-meta, .effective-date {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ==========================================================================
   Badges & Tags
   ========================================================================== */

.badge, .card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-gold-light);
  background-color: var(--brand-gold-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid var(--brand-gold-border);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-global {
  color: #60A5FA;
  background-color: var(--accent-blue-bg);
  border-color: rgba(59, 130, 246, 0.3);
}

.badge-india {
  color: #FBBF24;
  background-color: var(--brand-gold-subtle);
  border-color: var(--brand-gold-border);
}

.badge-gdpr {
  color: #34D399;
  background-color: var(--accent-emerald-bg);
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-warning, .badge-danger {
  color: #F87171;
  background-color: var(--accent-crimson-bg);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   Card Grid (Index Hub)
   ========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-gold);
  box-shadow: 0 12px 28px -6px rgba(245, 158, 11, 0.22);
  background-color: var(--bg-card);
}

.card:hover::before {
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-gold-light));
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-icon {
  font-size: 1.85rem;
  line-height: 1;
}

.card h2, .card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex: 1;
  line-height: 1.6;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-gold-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s ease;
}

.card:hover .card-link {
  color: #FFFFFF;
}

/* ==========================================================================
   Statutory Multi-Jurisdiction Compliance Matrix
   ========================================================================== */

.compliance-matrix {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 3.5rem;
}

.compliance-matrix h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.matrix-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: 0.75rem;
  transition: border-color 0.2s ease;
}

.matrix-box:hover {
  border-color: var(--border-color-light);
}

.matrix-box h4 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.matrix-box ul {
  list-style-type: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 0;
}

.matrix-box li {
  margin-bottom: 0.45rem;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.45;
}

.matrix-box li::before {
  content: "✓";
  color: var(--accent-emerald);
  font-weight: bold;
  flex-shrink: 0;
}

/* ==========================================================================
   Inner Document Cards & Callouts
   ========================================================================== */

.summary-card {
  background-color: var(--bg-surface);
  border-left: 4px solid var(--brand-gold);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
  font-size: 1.05rem;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.alert-banner, .callout-warning {
  background-color: var(--accent-crimson-bg);
  border: 2px solid var(--accent-crimson);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
}

.alert-banner h4, .callout-warning h4 {
  font-size: 1.15rem;
  color: #FCA5A5;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-banner p, .callout-warning p {
  color: #FEE2E2;
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.callout-info {
  background-color: var(--brand-gold-subtle);
  border: 1px solid var(--brand-gold-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.callout-info h4 {
  font-size: 1.1rem;
  color: var(--brand-gold-light);
  margin-bottom: 0.4rem;
}

.callout-info p {
  color: #FDE68A;
  margin-bottom: 0;
  font-size: 0.92rem;
}

.region-card, .doc-section {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

.region-card h3, .doc-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-gold-light);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.region-card h4 {
  font-size: 1.1rem;
  color: #F3F4F6;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Document Typography */
h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--brand-gold-light);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #E5E7EB;
}

p {
  margin-bottom: 1.25rem;
  color: #D1D5DB;
  font-size: 0.95rem;
  line-height: 1.7;
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: #D1D5DB;
  font-size: 0.95rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

strong {
  color: #FFFFFF;
}

a {
  color: var(--brand-gold-light);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: #FFFFFF;
}

code {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--brand-gold-light);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
}

/* ==========================================================================
   Modern Tables
   ========================================================================== */

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin: 1.5rem 0;
  background-color: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

thead {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

th {
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: #F9FAFB;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: #D1D5DB;
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer, .site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

.footer-content, .footer-container {
  max-width: 1120px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  list-style: none;
  margin-bottom: 1.25rem;
  padding: 0;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--brand-gold-light);
}

.footer-credit {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 0.75rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 768px) {
  header, .site-header {
    padding: 1rem;
  }

  .header-content, .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav, .nav-links {
    gap: 0.75rem;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .matrix-grid {
    grid-template-columns: 1fr;
  }
}
