/* ============================================================
   SwedishCandy.com — Premium Editorial Magazine Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Tajawal:wght@400;500;700&display=swap');

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --blue: #006AA7;
  --yellow: #FECC02;
  --bg: #FAFAF8;
  --dark: #1C1C1E;
  --gray: #6B6B6B;
  --red: #E8284A;
  --border: #E8E8E4;
  --white: #FFFFFF;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 6px 28px rgba(0,0,0,0.13);
  --radius: 10px;
  --radius-sm: 6px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --max-width: 1200px;
  --reading-width: 700px;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--dark);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--red); }
ul, ol { padding-left: 1.5rem; }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.22;
  color: var(--dark);
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin-bottom: 0.6rem; margin-top: 2.5rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); margin-bottom: 0.5rem; margin-top: 1.75rem; }
h4 { font-size: 1.05rem; margin-bottom: 0.4rem; margin-top: 1.25rem; }
p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.18rem; color: var(--gray); line-height: 1.65; margin-bottom: 1.5rem; }

blockquote {
  border-left: 4px solid var(--yellow);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: #FFF9E6;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--dark);
}
blockquote cite { display: block; font-style: normal; font-family: var(--font-body); font-size: 0.82rem; color: var(--gray); margin-top: 0.5rem; }

.drop-cap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 0.82;
  margin: 0.08em 0.14em 0 0;
  color: var(--blue);
}

.pull-quote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--blue);
  border-top: 3px solid var(--blue);
  border-bottom: 3px solid var(--blue);
  padding: 1.25rem 0;
  margin: 2.5rem auto;
  text-align: center;
  max-width: 600px;
}

/* ============================================================
   Layout
   ============================================================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-lg { padding: 6rem 0; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   Reading Progress Bar
   ============================================================ */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%; height: 3px;
  background: linear-gradient(to right, var(--blue), var(--yellow));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================================
   Site Header & Navigation
   ============================================================ */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--yellow);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  letter-spacing: -1px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.1;
}
.logo-text small {
  display: block;
  font-size: 0.65rem;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.main-nav > li { position: relative; }
.main-nav > li > a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.main-nav > li > a:hover,
.main-nav > li > a.active { background: var(--blue); color: var(--white); }

.main-nav li:hover .nav-dropdown { display: block; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  z-index: 200;
  padding: 0.5rem;
  list-style: none;
}
.nav-dropdown a {
  display: block;
  padding: 0.5rem 0.9rem;
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--dark);
  border-radius: var(--radius-sm);
}
.nav-dropdown a:hover { background: var(--bg); color: var(--blue); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: all 0.3s; }

@media (max-width: 960px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 2px solid var(--yellow);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    gap: 0;
  }
  .main-nav.open { display: flex; }
  .main-nav > li { width: 100%; }
  .main-nav > li > a { padding: 0.65rem 0.5rem; }
  .nav-toggle { display: flex; }
  .nav-dropdown { position: static; box-shadow: none; border: none; padding-left: 1rem; }
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0;
  font-size: 0.8rem;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0; margin: 0;
  gap: 0.25rem;
  align-items: center;
}
.breadcrumb li { display: flex; align-items: center; gap: 0.25rem; color: var(--gray); }
.breadcrumb li:not(:last-child)::after { content: '›'; color: var(--border); }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb li:last-child { color: var(--dark); font-weight: 600; }

/* ============================================================
   Homepage Hero
   ============================================================ */
.homepage-hero {
  background: linear-gradient(135deg, #004d7a 0%, var(--blue) 60%, #0088cc 100%);
  color: var(--white);
  padding: 5.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.homepage-hero::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -5%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(254,204,2,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.homepage-hero h1 { color: var(--white); margin-bottom: 1rem; }
.homepage-hero .lead { color: rgba(255,255,255,0.88); max-width: 600px; }

.hero-badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3em 0.9em;
  border-radius: 100px;
  margin-bottom: 1.1rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.72rem 1.5rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(0,106,167,0.4); color: var(--white); }
.btn-yellow { background: var(--yellow); color: var(--dark); }
.btn-yellow:hover { box-shadow: 0 6px 20px rgba(254,204,2,0.45); color: var(--dark); }
.btn-outline-white { background: transparent; border: 2px solid rgba(255,255,255,0.6); color: var(--white); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); color: var(--white); }

/* ============================================================
   Section Headers
   ============================================================ */
.section-header { margin-bottom: 2.5rem; }
.section-header h2 { margin-top: 0; }
.section-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 2px;
  margin-bottom: 0.75rem;
}
.section-divider { width: 56px; height: 3px; background: var(--yellow); margin-top: 0.5rem; }

/* ============================================================
   Pillar Cards
   ============================================================ */
.pillar-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.pillar-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.pillar-card-img { width: 100%; height: 220px; object-fit: cover; }
.pillar-card-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.pillar-card-body h3 { font-size: 1.25rem; color: var(--dark); margin: 0 0 0.5rem; }
.pillar-card-body p { font-size: 0.9rem; color: var(--gray); flex: 1; margin-bottom: 0.8rem; }
.pillar-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
}
.pillar-label::after { content: ' →'; }

/* ============================================================
   Candy Cards
   ============================================================ */
.candy-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.candy-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.candy-card img { width: 100%; height: 165px; object-fit: cover; }
.candy-card-body { padding: 1rem 1.1rem; flex: 1; }
.candy-card-body h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.3rem;
  color: var(--dark);
}
.candy-card-body p { font-size: 0.84rem; color: var(--gray); margin: 0; line-height: 1.5; }

/* ============================================================
   Blog Grid & Cards
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.blog-card img { width: 100%; height: 185px; object-fit: cover; }
.blog-card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
  font-size: 0.76rem;
  color: var(--gray);
}
.blog-tag {
  background: #EEF5FF;
  color: var(--blue);
  padding: 0.15em 0.65em;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.blog-card-body h3 { font-size: 1rem; margin: 0 0 0.45rem; line-height: 1.35; color: var(--dark); }
.blog-card-body p { font-size: 0.86rem; color: var(--gray); margin: 0; flex: 1; }

/* Magazine asymmetric grid */
.magazine-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}
.magazine-grid .feat { grid-row: 1 / 3; }
.magazine-grid .feat img { height: 380px; }
@media (max-width: 768px) {
  .magazine-grid { grid-template-columns: 1fr; }
  .magazine-grid .feat { grid-row: auto; }
  .magazine-grid .feat img { height: 220px; }
}

/* ============================================================
   Tradition Cards
   ============================================================ */
.tradition-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow 0.25s, transform 0.25s;
}
.tradition-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.tradition-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.tradition-card h3 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.tradition-card p { font-size: 0.88rem; color: var(--gray); margin: 0; }

/* ============================================================
   FAQ Component
   ============================================================ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  overflow: hidden;
  background: var(--white);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.05rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.2s;
}
.faq-question:hover { background: #f5f5f3; }
.faq-question.open { background: var(--blue); color: var(--white); }
.faq-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.3s;
}
.faq-question.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding: 1.05rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.93rem;
  line-height: 1.7;
}
.faq-answer.open { display: block; }

/* FAQ page (always visible) */
.faq-page-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
}
.faq-page-item h2 { margin-top: 0; font-size: 1.25rem; color: var(--blue); border-bottom: none; padding-bottom: 0; }
.faq-page-item p { margin-bottom: 0; font-size: 0.95rem; }

/* ============================================================
   Article Layout with Sidebar TOC
   ============================================================ */
.article-outer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 256px;
  gap: 3rem;
  align-items: start;
}
.article-body { min-width: 0; max-width: var(--reading-width); }
.article-body h2 { border-bottom: 2px solid var(--border); padding-bottom: 0.45rem; }
.article-body ul, .article-body ol { margin-bottom: 1.1rem; }
.article-body li { margin-bottom: 0.38rem; }

.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.88rem; }
.article-body th { background: var(--blue); color: var(--white); padding: 0.65rem 1rem; text-align: left; font-family: var(--font-body); font-weight: 600; }
.article-body td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--border); }
.article-body tr:hover td { background: #F5F5F3; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  font-size: 0.83rem;
  color: var(--gray);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.article-meta .author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.article-hero {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
  height: 400px;
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }

/* Sticky TOC Sidebar */
.toc-sidebar {
  position: sticky;
  top: 80px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  font-size: 0.85rem;
}
.toc-sidebar h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--yellow);
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 0.3rem; }
.toc-list a {
  color: var(--gray);
  font-size: 0.83rem;
  line-height: 1.4;
  display: block;
  padding: 0.2rem 0 0.2rem 0.7rem;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.toc-list a:hover, .toc-list a.active { color: var(--blue); border-left-color: var(--blue); }

@media (max-width: 960px) {
  .article-outer { grid-template-columns: 1fr; }
  .toc-sidebar { position: static; display: none; }
  .article-body { max-width: 100%; }
}

/* TOC mobile strip */
.toc-mobile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 2rem;
  display: none;
}
@media (max-width: 960px) { .toc-mobile { display: block; } }
.toc-mobile summary {
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--blue);
  list-style: none;
}
.toc-mobile summary::marker { display: none; }
.toc-mobile ol { margin-top: 0.75rem; margin-bottom: 0; padding-left: 1.25rem; }
.toc-mobile li { margin-bottom: 0.3rem; }
.toc-mobile a { font-size: 0.86rem; color: var(--gray); }

/* ============================================================
   Highlight / Info Boxes
   ============================================================ */
.highlight-box {
  background: #EEF5FF;
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.15rem 1.4rem;
  margin: 1.5rem 0;
}
.highlight-box h4 { margin-top: 0; color: var(--blue); font-size: 0.95rem; }
.highlight-box p { margin-bottom: 0; font-size: 0.92rem; }

.tip-box {
  background: #F0FFF4;
  border-left: 4px solid #22c55e;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.15rem 1.4rem;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.warning-box {
  background: #FFF8E1;
  border-left: 4px solid var(--yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.15rem 1.4rem;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

/* ============================================================
   Stat Boxes
   ============================================================ */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.stat-box {
  background: linear-gradient(135deg, var(--blue) 0%, #004d7a 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--yellow);
  display: block;
  line-height: 1;
}
.stat-label { font-size: 0.82rem; opacity: 0.88; margin-top: 0.35rem; }

/* ============================================================
   Glossary
   ============================================================ */
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.glossary-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--blue);
}
.glossary-item dt { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--dark); }
.glossary-item .translation {
  font-size: 0.78rem;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0.2rem 0 0.55rem;
}
.glossary-item dd { font-size: 0.88rem; color: var(--gray); line-height: 1.6; margin: 0; }

.alpha-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 2rem; }
.alpha-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--dark);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.alpha-nav a:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* ============================================================
   Related Articles
   ============================================================ */
.related-section {
  background: #F3F3F0;
  padding: 3rem 0;
  margin-top: 3rem;
}
.related-section h2 { font-size: 1.4rem; margin-top: 0; }

/* ============================================================
   Brand Header
   ============================================================ */
.brand-hero {
  background: linear-gradient(135deg, #004d7a 0%, var(--blue) 100%);
  color: var(--white);
  padding: 3.5rem 0 3rem;
}
.brand-hero h1 { color: var(--white); }
.brand-hero .lead { color: rgba(255,255,255,0.85); }
.brand-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.5rem; }
.brand-meta-item {
  background: rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
}
.brand-meta-item strong {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
  margin-bottom: 0.18rem;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.72);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .logo-text { color: var(--white); }
.footer-brand .logo-text small { color: rgba(255,255,255,0.45); }
.footer-tagline { font-size: 0.86rem; line-height: 1.6; margin-top: 1rem; opacity: 0.72; }

.footer-col h5 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--yellow);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 0.38rem; }
.footer-col ul a { color: rgba(255,255,255,0.62); font-size: 0.86rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--white); }

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

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-block;
  padding: 0.18em 0.65em;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-blue { background: var(--blue); color: var(--white); }
.badge-yellow { background: var(--yellow); color: var(--dark); }
.badge-red { background: var(--red); color: var(--white); }

/* ============================================================
   Pillar Page Editorial Banner
   ============================================================ */
.pillar-hero {
  background: linear-gradient(135deg, #004d7a 0%, var(--blue) 100%);
  color: var(--white);
  padding: 4.5rem 0 3.5rem;
}
.pillar-hero h1 { color: var(--white); max-width: 760px; }
.pillar-hero .lead { color: rgba(255,255,255,0.85); max-width: 620px; }

/* ============================================================
   Flag Divider
   ============================================================ */
.flag-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0;
  color: var(--gray);
  font-size: 0.82rem;
}
.flag-divider::before, .flag-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ============================================================
   Misc / Utilities
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

[lang="ar"] body, body[lang="ar"] {
  font-family: 'Tajawal', 'Source Sans 3', sans-serif;
}

/* ============================================================
   Mobile Enhancements — 480px and below
   ============================================================ */
@media (max-width: 480px) {
  html { font-size: 16px; }

  .container { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
  .section-sm { padding: 1.5rem 0; }

  /* Hero */
  .homepage-hero { padding: 3rem 0 2.5rem; }
  .homepage-hero h1 { font-size: 2rem; }
  .homepage-hero .lead { font-size: 1rem; }
  .hero-badge { font-size: 0.68rem; }
  .hero-actions { flex-direction: column; gap: 0.6rem; }
  .hero-actions .btn { width: 100%; justify-content: center; text-align: center; }

  /* Pillar cards */
  .pillar-card-img { height: 175px; }
  .pillar-card-body { padding: 1rem; }
  .pillar-card-body h3 { font-size: 1.1rem; }

  /* Candy cards */
  .candy-card img { height: 140px; }

  /* Blog */
  .blog-card img { height: 160px; }
  .blog-card-body { padding: 1rem; }
  .magazine-grid .feat img { height: 200px; }

  /* Article layout */
  .article-outer { padding: 1.5rem 1rem; }
  .article-hero { height: 200px; }
  .article-body h2 { font-size: 1.3rem; }
  .article-meta { gap: 0.5rem; font-size: 0.78rem; flex-wrap: wrap; }

  /* FAQ */
  .faq-question { font-size: 0.9rem; padding: 0.85rem 1rem; }
  .faq-answer { padding: 0.85rem 1rem; }
  .faq-page-item { padding: 1.25rem 1.1rem; }
  .faq-page-item h2 { font-size: 1.1rem; }

  /* Stats */
  .stat-number { font-size: 1.9rem; }

  /* Tables — horizontal scroll */
  .article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }

  /* Glossary */
  .glossary-grid { grid-template-columns: 1fr; }
  .alpha-nav a { width: 30px; height: 30px; font-size: 0.8rem; }

  /* Footer */
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Brand hero */
  .brand-hero { padding: 2.5rem 0 2rem; }
  .brand-meta { gap: 0.6rem; }
  .brand-meta-item { padding: 0.4rem 0.75rem; font-size: 0.78rem; }

  /* Headings */
  h2 { font-size: 1.35rem; margin-top: 2rem; }
  h3 { font-size: 1.1rem; }

  /* Pull quote */
  .pull-quote { font-size: 1.1rem; padding: 0.9rem 0; margin: 1.5rem 0; }

  /* Pillar hero */
  .pillar-hero { padding: 3rem 0 2.5rem; }

  /* Section header spacing */
  .section-header { margin-bottom: 1.5rem; }

  /* Drop cap smaller on mobile */
  .drop-cap::first-letter { font-size: 3rem; }
}

/* ============================================================
   Tablet — 601px to 960px
   ============================================================ */
@media (min-width: 601px) and (max-width: 960px) {
  .homepage-hero { padding: 4rem 0 3rem; }
  .article-outer { padding: 2rem 1.5rem; }
  .article-hero { height: 300px; }
  .pillar-card-img { height: 195px; }
  .magazine-grid { grid-template-columns: 1fr 1fr; }
  .magazine-grid .feat { grid-column: 1 / -1; grid-row: auto; }
  .magazine-grid .feat img { height: 280px; }
}

/* ============================================================
   Touch targets
   ============================================================ */
@media (max-width: 960px) {
  .btn { min-height: 44px; padding: 0.8rem 1.4rem; }
  .faq-question { min-height: 50px; }
  .nav-dropdown { display: block; }
}

/* ============================================================
   Image shimmer placeholder while loading
   ============================================================ */
.pillar-card-img,
.candy-card img,
.blog-card img,
.article-hero img {
  background: #ebebeb;
  min-height: 40px;
}

/* ============================================================
   Horizontal scroll for wide tables on mobile
   ============================================================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; }
.table-wrap table { margin: 0; min-width: 500px; }

/* ============================================================
   Print styles
   ============================================================ */
@media print {
  .site-header, .site-footer, .toc-sidebar, .related-section, #reading-progress { display: none !important; }
  .article-outer { grid-template-columns: 1fr; padding: 0; }
  a { color: inherit; text-decoration: underline; }
  body { font-size: 12pt; line-height: 1.5; }
}

/* ============================================================
   Hero image support
   ============================================================ */
.homepage-hero {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.homepage-hero::after {
  display: none; /* Remove old radial gradient overlay — replaced by inline bg */
}

/* ============================================================
   Skip to content accessibility link
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--yellow);
  color: var(--dark);
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 10000;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus { top: 0; color: var(--dark); }

/* ============================================================
   Smooth image reveal
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.pillar-card-img,
.candy-card img,
.blog-card img {
  animation: fadeIn 0.4s ease both;
}

/* ============================================================
   Fix nav dropdown visibility on mobile  
   — override the "always show" rule to keep it tidier
   ============================================================ */
@media (max-width: 960px) {
  .nav-dropdown {
    display: block;
    background: #f7f7f5;
    border-radius: var(--radius-sm);
    margin: 0.15rem 0 0.5rem 0.5rem;
    padding: 0.25rem 0;
    border: none;
    box-shadow: none;
  }
  .nav-dropdown a {
    font-size: 0.85rem;
    color: var(--gray);
    padding: 0.45rem 1rem;
    border-radius: 4px;
  }
  .nav-dropdown a:hover { color: var(--blue); background: var(--white); }
  .main-nav > li { border-bottom: 1px solid var(--border); }
  .main-nav > li:last-child { border-bottom: none; }
  .main-nav > li > a { border-bottom: none; }
}
