/* The Interpreter's Path — Islamic Knowledge Resource
   Design: Scholarly, serene, warm blue-and-gold palette
   Framework: Bulma CSS via CDN + custom overrides
*/

:root {
  --primary: #1a3d5c;
  --primary-light: #2a5f8f;
  --primary-dark: #0f2438;
  --gold: #b8922a;
  --gold-light: #d4a843;
  --cream: #fdf8f0;
  --text-dark: #1f2937;
  --text-mid: #4b5563;
  --text-light: #6b7280;
  --border: #e8dfc8;
  --bg-alt: #f5f0e8;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(26, 61, 92, 0.12);
  --shadow-lg: 0 8px 40px rgba(26, 61, 92, 0.18);
  --radius: 8px;
  --radius-lg: 16px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Lora', Georgia, serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.7;
  font-size: 1.05rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== NAVIGATION ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary-dark);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--white);
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

.nav-brand-text {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

.nav-brand-text span {
  color: var(--gold-light);
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  display: block;
}

.nav-links a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--gold-light);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary-dark);
  min-width: 220px;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  list-style: none;
  margin: 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu li a {
  padding: 0.5rem 1rem;
  border-radius: 0;
  font-size: 0.82rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--white);
  font-size: 1.5rem;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--primary-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/images/hero-mosque-light.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,36,56,0.85) 0%, rgba(26,61,92,0.6) 100%);
}

.hero-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  color: var(--white);
}

.hero-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  max-width: 700px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin-bottom: 2rem;
  font-style: italic;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--white);
  text-decoration: none;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s;
}

.hero-cta:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* ===== PILLARS / FEATURE GRID ===== */
.pillars {
  background: var(--bg-alt);
  padding: 4rem 1.5rem;
}

.pillars-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.pillar-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.pillar-card h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.pillar-card p {
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

/* ===== SECTION HEADINGS ===== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--primary-dark);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.section-subtitle {
  color: var(--text-mid);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
  font-style: italic;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ===== MAIN CONTENT WRAPPER ===== */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.content-main {
  max-width: 780px;
  margin: 0 auto;
}

/* ===== ARTICLE CONTENT ===== */
.content-main h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

.content-main h2 {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.content-main h3 {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.content-main p {
  color: var(--text-dark);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.content-main ul, .content-main ol {
  margin: 1rem 0 1.25rem 1.5rem;
  color: var(--text-dark);
}

.content-main li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.content-main a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.content-main em {
  font-style: italic;
  color: var(--text-mid);
}

.content-main strong {
  font-weight: 700;
  color: var(--primary-dark);
}

.content-main blockquote {
  border-left: 4px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-mid);
}

/* Feature image */
.feature-image {
  width: 100%;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

/* ===== PAGE HERO (sub-pages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  color: var(--white);
}

.page-hero-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  display: block;
  margin-bottom: 0.75rem;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero p {
  color: rgba(255,255,255,0.8);
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ===== CARD GRID (courses / articles list) ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.resource-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.resource-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.resource-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.resource-card-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.resource-card h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.resource-card p {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
  margin: 0 0 1rem;
}

.resource-card-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.resource-card-link:hover {
  color: var(--gold);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--bg-alt);
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--primary-light);
  text-decoration: none;
}

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

/* ===== SIDEBAR LAYOUT ===== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-widget {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.sidebar-widget h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-links li {
  border-bottom: 1px solid var(--border);
}

.sidebar-links li:last-child { border-bottom: none; }

.sidebar-links a {
  display: block;
  padding: 0.6rem 0;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.sidebar-quote {
  font-style: italic;
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.7;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 4rem 1.5rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand-text {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  margin-bottom: 0.5rem;
}

.footer-brand-sub {
  color: var(--gold-light);
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer-heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ===== COURSES PAGE ===== */
.courses-section {
  padding: 3rem 0;
}

.courses-section + .courses-section {
  border-top: 1px solid var(--border);
}

.courses-section h2 {
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.courses-section .section-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--primary);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* ===== 404 PAGE ===== */
.not-found {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.not-found h1 {
  font-size: 6rem;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.not-found h2 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.not-found p {
  color: var(--text-mid);
  max-width: 400px;
  margin: 0 auto 2rem;
}

/* ===== UTILITIES ===== */
.section { padding: 4rem 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open .nav-dropdown-menu {
    display: block;
    position: static;
    box-shadow: none;
    padding-left: 1rem;
  }
  .nav-toggle { display: flex; }
  .site-nav { position: relative; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero { min-height: 400px; }
  .hero-content { padding: 3rem 1.5rem; }
}

@media (max-width: 480px) {
  .pillars-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
}
