/* ==========================================================================
   Red Mammoth — shared site stylesheet
   Loaded by every standalone page (index.html + all converted pages).
   Contains: design tokens, base reset, header, footer, buttons, and the
   handful of section/card patterns that are byte-for-byte identical across
   two or more pages. Anything that varies between pages — even by a single
   pixel — stays out of this file and lives in that page's own CSS instead,
   so nothing here silently changes another page's look.
   ========================================================================== */

:root {
  /* brand colors */
  --color-navy: #14213D;
  --color-navy-light: #1A2A47;
  --color-navy-dark: #101B33;
  --color-oxblood: #6E1D26;
  --color-oxblood-dark: #5A1720;
  --color-oxblood-deep: #3E1A28;
  --color-gold: #C4A35A;
  --color-gold-tint: rgba(196, 163, 90, .16);
  --color-cream: #F6F2E8;
  --color-slate: #6E7A8A;
  --color-slate-light: #A7B0BE;
  --color-muted-link: #DDD7C8;
  --color-footer-body: #B9C1CE;

  /* cream at the exact opacities used throughout the site */
  --text-70: rgba(246, 242, 232, .7);
  --text-75: rgba(246, 242, 232, .75);
  --text-82: rgba(246, 242, 232, .82);
  --text-85: rgba(246, 242, 232, .85);

  --font-body: 'Vazirmatn', 'Inter', system-ui, sans-serif;
  --font-heading: 'Noto Naskh Arabic', 'Lora', Georgia, serif;

  --container: 1240px;
}

/* ---- base / reset (was the inline <style> block repeated in every page) ---- */
*, *::before, *::after { box-sizing: border-box }

html {
  background: var(--color-navy);
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  direction: rtl;
  background: var(--color-navy);
  color: var(--color-cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

@keyframes dcFade { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }

.container { max-width: var(--container); margin: 0 auto }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; text-decoration: none;
  font-weight: 700; font-family: inherit; border: 0; border-radius: 12px;
  white-space: nowrap; cursor: pointer;
}
.btn-primary { background: var(--color-oxblood); color: var(--color-cream) }
.btn-outline { background: transparent; border: 1px solid var(--color-gold); color: var(--color-cream) }
.btn-light { background: var(--color-cream); color: #23262B }
.btn--sm { gap: 9px; font-size: 15px; padding: 12px 22px }
.btn--md { gap: 10px; font-size: 16px; padding: 16px 30px }
.btn--lg { gap: 10px; font-size: 16px; padding: 17px 32px }
.btn i { width: 17px; height: 17px }

/* ---- reusable placeholder image box (every "[ تصویر: ... ]" slot) ---- */
.figure-frame { margin: 0; height: 100%; display: flex }
.placeholder-box {
  flex: 1; height: 100%; aspect-ratio: 4 / 3; min-height: 300px; overflow: hidden;
  border: 1px solid var(--color-gold); border-radius: 20px;
  background: var(--color-navy-light);
  background-image: repeating-linear-gradient(135deg, rgba(246,242,232,.07) 0 2px, transparent 2px 12px);
  display: grid; place-items: center; padding: 24px;
}
.placeholder-box span {
  font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--text-70);
  text-align: center; line-height: 1.9;
}

/* ==========================================================================
   Site announcement bar (بند ۵) — optional, sits above the header
   ========================================================================== */
.site-announcement {
  background: var(--color-gold); color: #23262B; text-align: center;
  font-size: 13.5px; font-weight: 600; padding: 9px 20px;
}
.site-announcement a, .site-announcement span { color: inherit; text-decoration: none }
.site-announcement a:hover { text-decoration: underline }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(20, 33, 61, .96);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -18px rgba(20, 33, 61, .55);
  font-family: var(--font-body);
}
.site-header__bar {
  max-width: var(--container); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px);
  height: 76px; display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
}
.site-header__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--color-cream); flex: none }
.site-header__logo-img { height: 40px; width: auto; display: block; flex: none }

.site-header__nav { display: flex; align-items: center; gap: 30px; margin-inline: auto; font-size: 15px; color: var(--color-muted-link) }
.site-header__nav-link { text-decoration: none; color: inherit; white-space: nowrap }

.site-header__college { position: relative; display: flex; align-items: center; padding-block: 27px; margin-block: -27px }
.site-header__college-btn {
  display: flex; align-items: center; gap: 7px; background: transparent; border: 0; padding: 0;
  cursor: pointer; font-family: var(--font-heading); font-weight: 700; font-size: 16px;
  color: var(--color-gold); white-space: nowrap;
}
.site-header__chevron { width: 15px; height: 15px; display: block }

.site-header__college-panel {
  position: absolute; top: 100%; inset-inline-end: -24px; width: min(560px, 80vw);
  background: var(--color-navy); border: 1px solid var(--color-gold); border-radius: 20px; padding: 26px;
  box-shadow: 0 30px 60px -30px rgba(20, 33, 61, .85);
  animation: dcFade .26s ease both;
  display: none;
}
.site-header__college.is-open .site-header__college-panel { display: block }
.site-header__college-title { font-family: var(--font-heading); font-weight: 700; font-size: 21px; color: var(--color-gold); margin: 0 0 22px }
.site-header__college-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 26px }
.site-header__college-item { display: flex; align-items: flex-start; gap: 12px; text-decoration: none; color: var(--color-cream); padding: 12px 14px; border-radius: 12px }
.site-header__college-item i { width: 19px; height: 19px; color: var(--color-gold); flex: none; margin-top: 2px }
.site-header__college-item-title { display: block; font-size: 15px }
.site-header__college-item-desc { display: block; font-size: 12.5px; color: var(--color-slate-light); margin-top: 4px }

.site-header__actions { display: flex; align-items: center; gap: 20px; flex: none }
.site-header__login { text-decoration: none; color: var(--color-muted-link); font-size: 15px; white-space: nowrap }

.site-header__mobile-toggle {
  display: none; margin-inline-start: auto; align-items: center; gap: 9px;
  background: transparent; border: 1px solid var(--color-gold); border-radius: 12px;
  color: var(--color-cream); font-family: var(--font-body); font-size: 14px; padding: 10px 16px; cursor: pointer;
}
.site-header__mobile-toggle i { width: 17px; height: 17px; display: block }

.site-header__mobile-panel {
  display: none; padding: 8px clamp(20px, 4vw, 40px) 34px; flex-direction: column; gap: 20px;
  font-size: 16px; background: linear-gradient(180deg, rgba(196, 163, 90, .14), transparent 40%);
}
.site-header.is-menu-open .site-header__mobile-panel { display: flex }
.site-header__mobile-link { text-decoration: none; color: var(--color-cream); display: flex; align-items: center; gap: 12px }
.site-header__mobile-link i { width: 18px; height: 18px; color: var(--color-gold) }
.site-header__mobile-link--spaced { margin-top: 6px }
.site-header__mobile-label { font-size: 11.5px; letter-spacing: .16em; color: var(--color-gold); margin: 6px 0 0 }
.site-header__mobile-cta { text-decoration: none; background: var(--color-oxblood); color: var(--color-cream); font-family: var(--font-body); font-weight: 700; padding: 14px 20px; border-radius: 12px; text-align: center }

@media (max-width: 1000px) {
  .site-header__nav, .site-header__actions { display: none }
  .site-header__mobile-toggle { display: flex }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: linear-gradient(180deg, var(--color-oxblood-dark) 0, #2A2C43 18%, #182642 46%, var(--color-navy) 100%); font-family: var(--font-body); color: var(--color-footer-body) }
.site-footer__grid { max-width: var(--container); margin: 0 auto; padding: clamp(61px, 8vw, 93px) clamp(20px, 4vw, 40px) 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 48px }
.site-footer__brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px }
.site-footer__logo-img { height: 40px; width: auto; display: block }
.site-footer__tagline { font-size: 14px; line-height: 1.85; margin: 0; max-width: 30ch }
.site-footer__col-title { font-size: 12px; letter-spacing: .14em; color: var(--color-gold); margin: 0 0 16px; font-weight: 500 }
.site-footer__links { display: flex; flex-direction: column; gap: 12px; font-size: 14px }
.site-footer__links a { text-decoration: none; color: var(--color-muted-link) }
.site-footer__legal { max-width: var(--container); margin: 0 auto; padding: 26px clamp(20px, 4vw, 40px) 53px }
.site-footer__disclaimer { font-size: 13px; line-height: 1.9; margin: 0; max-width: 100ch; color: var(--color-slate-light) }
.site-footer__copyright { font-size: 13px; margin: 20px 0 0; color: var(--color-slate-light) }

/* ==========================================================================
   Shared sub-page patterns (used by every page under the header, other than
   the home page, whose sections are large enough to stay in css/home.css)
   ========================================================================== */

/* larger eyebrow label (16px text, 18px icon) — used by the home page's own
   sections and by the login hero, which borrows the same treatment */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; letter-spacing: .18em; color: var(--color-gold);
  margin: 0 0 20px; font-weight: 500;
}
.eyebrow i { width: 18px; height: 18px; flex: none }

/* the short hero every inner page opens with */
.page-hero { background: linear-gradient(180deg, var(--color-navy-light), var(--color-navy)); padding: clamp(64px, 9vw, 116px) clamp(20px, 4vw, 40px) clamp(48px, 6vw, 80px) }
.page-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .18em; color: var(--color-gold); margin: 0 0 26px; font-weight: 500 }
.page-eyebrow i { width: 16px; height: 16px }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .16em; color: var(--color-slate); margin: 0 0 22px; flex-wrap: wrap }
.breadcrumb a { text-decoration: none; color: var(--color-gold) }
.breadcrumb i { width: 14px; height: 14px; color: var(--color-gold) }
.page-hero__title { font-family: var(--font-heading); font-weight: 700; font-size: clamp(28px, 4vw, 40px); line-height: 1.32; margin: 0 0 26px }
.page-hero__lead { font-size: 17px; line-height: 1.9; color: var(--text-82); max-width: 58ch; margin: 0 }

/* the content section that follows the hero on every inner page */
.page-section { background: linear-gradient(180deg, var(--color-navy), var(--color-navy-dark)); padding: clamp(56px, 7vw, 96px) clamp(20px, 4vw, 40px) }
.page-section--alt { background: linear-gradient(180deg, var(--color-navy-dark), var(--color-navy)) }

/* the two-column "list + figure" layout (How it works / Mechanical setups / About) */
.split-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(36px, 6vw, 80px); align-items: center }

/* card shell reused by every card/tile grid */
.card-box { background: var(--color-navy-light); border: 1px solid var(--color-gold); border-radius: 20px }
.card-box--tile { padding: 26px }
.card-box--row { padding: 22px; display: flex; gap: 14px; align-items: flex-start }

/* vertical "icon on top" card text (College / Specialized courses / Library /
   Reference docs / About / Support — Support overrides the title size) */
.tile-card__title { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 19px; margin: 14px 0 10px }
.tile-card__desc { font-size: 14.5px; line-height: 1.85; color: var(--color-slate) }

/* horizontal "icon beside text" card text (How it works / Mechanical setups) */
.info-row__title { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 18px; margin-bottom: 6px }
.info-row__desc { display: block; font-size: 14.5px; line-height: 1.85; color: var(--color-slate) }

/* بند ۴: blog post card — reused on library.html, index.html and college.html */
.library__post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px }
.library__post-card { display: block; text-decoration: none; color: inherit }
.library__post-image { width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; margin-bottom: 16px; background: var(--color-navy) }
.library__post-image img { width: 100%; height: 100%; object-fit: cover; display: block }
.library__post-image--empty { display: flex; align-items: center; justify-content: center }
.library__post-image--empty i { width: 28px; height: 28px; color: var(--color-gold) }
.library__post-category {
  display: inline-block; font-size: 11.5px; color: var(--color-gold); border: 1px solid var(--color-gold);
  border-radius: 20px; padding: 3px 12px; margin-bottom: 10px;
}
.library__post-card .tile-card__desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden }
