/* ==========================================================================
   Madrasa 2 — Modern Minimal Theme
   Navy + Teal + Copper, Inter for headings (cleaner, contemporary)
   Layout differences: split hero, image-top cards, tighter sections
   ========================================================================== */
/* --------------------------------------------------------------------------
   1. Color System
   -------------------------------------------------------------------------- */
:root {
  /* Primary — Deep Navy */
  --color-primary: #0F172A;
  --color-primary-dark: #020617;
  --color-primary-light: #1E293B;

  /* Secondary — Teal */
  --color-secondary: #0D9488;
  --color-secondary-dark: #0F766E;

  /* Accent — Copper/Amber */
  --color-accent: #D97706;

  /* Neutrals — cooler, cleaner */
  --color-bg: #F8FAFC;
  --color-card: #FFFFFF;
  --color-text: #1E293B;
  --color-muted: #64748B;
  --color-border: #E2E8F0;
  --color-white: #FFFFFF;

  /* Semantic */
  --color-focus: #D97706;
  --color-danger: #DC2626;

  /* ------------------------------------------------------------------ */
  /* 2. Typography — Modern: Inter for both, cleaner weight scale      */
  /* ------------------------------------------------------------------ */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --fs-hero: 56px;
  --fs-display: 42px;
  --fs-title: 36px;
  --fs-section: 30px;
  --fs-h3: 24px;
  --fs-h4: 20px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-xs: 12px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semi: 600;
  --fw-bold: 700;

  --lh-tight: 1.15;
  --lh-normal: 1.65;
  --lh-loose: 1.8;

  /* ------------------------------------------------------------------ */
  /* 3. Layout — slightly tighter, more generous whitespace             */
  /* ------------------------------------------------------------------ */
  --container: 1180px;
  --gutter: 24px;

  --section-pad: clamp(72px, 9vw, 112px);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* ------------------------------------------------------------------ */
  /* 4. Shadows & Borders — softer, more layered                        */
  /* ------------------------------------------------------------------ */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
  --border: 1px solid var(--color-border);

  /* ------------------------------------------------------------------ */
  /* 5. Motion                                                          */
  /* ------------------------------------------------------------------ */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur: 240ms;
  --dur-slow: 400ms;

  /* ------------------------------------------------------------------ */
  /* 6. Z-index scale                                                   */
  /* ------------------------------------------------------------------ */
  --z-header: 100;
  --z-drawer: 200;
  --z-overlay: 190;
  --z-top: 300;
}

/* ==========================================================================
   7. Minimal CSS Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text);
  margin-bottom: 0.5em;
}

p {
  margin-bottom: 1rem;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   8. Base helpers & utility tokens
   ========================================================================== */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-pad);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -48px;
  z-index: var(--z-top);
  padding: 12px 20px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   9. Modern Minimal Layout Overrides (applied via classes on elements)
   ========================================================================== */

/* Hero: split layout — image left, content right */
.hero--split .hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero--split .hero__media {
  display: block;
}
.hero--split .hero__content {
  text-align: left;
}
.hero--split .hero__actions {
  justify-content: flex-start;
}
.hero--split .hero__media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
@media (max-width: 900px) {
  .hero--split .hero__inner {
    grid-template-columns: 1fr;
  }
  .hero--split .hero__media {
    order: -1;
  }
  .hero--split .hero__content {
    text-align: center;
  }
  .hero--split .hero__actions {
    justify-content: center;
  }
}

/* Page banner: minimal, left aligned, no background panel */
.page-banner--minimal {
  background: var(--color-bg);
  border-bottom: var(--border);
}
.page-banner--minimal .page-banner__inner {
  text-align: left;
  padding-block: 52px;
}
.page-banner--minimal .page-banner__title {
  font-size: var(--fs-display);
  margin-bottom: 8px;
}
.page-banner--minimal .page-banner__sub {
  color: var(--color-muted);
  font-size: var(--fs-body);
  margin-bottom: 0;
}
.page-banner--minimal .breadcrumb {
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--color-muted);
}

/* Section header: left-aligned, minimal */
.section-header--minimal {
  text-align: left;
  margin-bottom: 44px;
}
.section-header--minimal .section-header__kicker {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-secondary);
  margin-bottom: 8px;
}
.section-header--minimal .section-header__title {
  font-size: var(--fs-section);
}
.section-header--minimal .section-header__text {
  color: var(--color-muted);
  max-width: 560px;
  margin-inline: 0;
}

/* Buttons: pill, cleaner */
.btn--modern {
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  font-weight: var(--fw-medium);
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
}

/* CTA banner: solid modern card */
.cta-banner--modern {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
}
.cta-banner--modern .cta-banner__title {
  color: var(--color-white);
  margin-bottom: 12px;
}
.cta-banner--modern .cta-banner__text {
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 26px;
}

/* Gallery grid: tighter, rounded */
.gallery-grid--modern {
  display: grid;
  gap: 16px;
}
.gallery-grid--modern img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius);
  transition: transform var(--dur-slow) var(--ease);
}
@media (min-width: 768px) {
  .gallery-grid--modern {
    grid-template-columns: repeat(3, 1fr);
  }
}