/* 
  Global Styles for Justice Sanjeev Prakash Sharma
  Tone: Formal, Balanced, Calm, Authoritative
  Colors: Deep Navy/Charcoal, Ivory/Off-White, Alternating Light Grey, Minimal Gold Accents
  Typography: Serif Headings, Sans-serif Body Text
  Layout: Sectioned Editorial Layout with Alternating Bands (Full-width horizontal sections)
*/

:root {
  --navy: #0F172A;
  --charcoal: #1e293b;
  --ivory: #FDFBF7;
  --light-grey: #F3F4F6;
  --dark-grey: #475569;
  --gold: #B4975A;
  --gold-hover: #9c8049;
  --border: #E2E8F0;
  
  --font-serif: "Merriweather", "Times New Roman", Times, serif;
  --font-sans: "Inter", "Helvetica Neue", Helvetica, sans-serif;
  
  --spacing-section: 5rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--charcoal);
  background-color: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--dark-grey);
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold-hover);
}

/* Base Layout & Sections */
.section {
  padding: var(--spacing-section) 0;
  width: 100%;
}

.section-alt {
  background-color: var(--light-grey);
}

.section-navy {
  background-color: var(--navy);
  color: var(--ivory);
}

.section-navy h1, .section-navy h2, .section-navy h3, .section-navy p {
  color: var(--ivory);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

/* Top Navigation (STRICT: TOP NAVIGATION ONLY) */
.navbar {
  background-color: var(--navy);
  color: var(--ivory);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ivory);
  text-transform: uppercase;
  letter-spacing: 0px;
  text-align: left;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: var(--ivory);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .nav-container {
    flex-direction: column;
    justify-content: center;
  }
}

.nav-links li a:hover, .nav-links li a.active {
  color: var(--gold);
}

/* Footer (MANDATORY INFO) */
.footer {
  background-color: var(--navy);
  color: var(--ivory);
  padding: 4rem 0 2rem;
  border-top: 3px solid var(--gold);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-section p {
  color: rgba(253, 251, 247, 0.8);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--ivory);
}

.footer-section.managed-by a {
  color: var(--gold);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(253, 251, 247, 0.5);
}

/* Utility Layouts */
.row-divider {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}

.split-section {
  display: flex;
  gap: 4rem;
}

.split-left {
  flex: 1;
  border-right: 1px solid var(--border);
  padding-right: 4rem;
}

.split-right {
  flex: 2;
}

@media (max-width: 768px) {
  .split-section {
    flex-direction: column;
    gap: 2rem;
  }
  .split-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 2rem;
  }
}

/* Structured Rows for Tables/Lists (NO CARDS) */
.structured-row {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.structured-row:last-child {
  border-bottom: none;
}

.row-label {
  font-weight: 600;
  color: var(--charcoal);
  width: 30%;
}

.row-value {
  width: 70%;
  color: var(--dark-grey);
}

/* Card Components */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  border-color: var(--gold);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.card-text {
  color: var(--dark-grey);
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

/* Forms */
input, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  background-color: var(--ivory);
  font-family: var(--font-sans);
  color: var(--charcoal);
  margin-bottom: 1rem;
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--gold);
}

button, .btn {
  background-color: var(--gold);
  color: var(--ivory);
  border: none;
  padding: 0.75rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
}

button:hover, .btn:hover {
  background-color: var(--gold-hover);
  color: var(--ivory);
}

/* Gateway Form */
.gateway-wrapper {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ivory);
}

.gateway-box {
  max-width: 400px;
  width: 100%;
  padding: 3rem;
  text-align: center;
}

.gateway-box h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.error-msg {
  color: #DC2626;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

/* Expandable Content */
.expandable-item {
  border-bottom: 1px solid var(--border);
}

.expandable-header {
  padding: 1.5rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.expandable-header h4 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--charcoal);
}

.expand-icon {
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}

.expandable-content {
  display: none;
  padding: 0 0 1.5rem 0;
}

.expandable-content.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Document & List Style (Resources, Media) */
.document-list {
  list-style: none;
}

.document-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 2rem;
}

.document-date {
  font-weight: 600;
  color: var(--gold);
  width: 120px;
  flex-shrink: 0;
}

.document-title {
  color: var(--charcoal);
  font-size: 1.1rem;
}

/* Hero Section */
.hero-section {
  padding: 8rem 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
}

.hero-text {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.hero-image-wrapper {
  margin-top: 3rem;
}

.hero-image {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  display: block;
}

.profile-image-wrapper {
  margin-bottom: 2rem;
}

.profile-image {
  max-width: 100%;
  height: auto;
  display: block;
  border: 4px solid var(--ivory);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Table layout */
.table-structured {
  width: 100%;
  border-collapse: collapse;
}

.table-structured th, .table-structured td {
  padding: 1rem 0;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table-structured th {
  font-family: var(--font-serif);
  color: var(--navy);
  font-weight: 400;
}

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