/* ════════════════════════════════════════════════════════════════════
   MINDBLOOM — GLOBAL STYLESHEET
   All shared styles live here. Page-specific styles stay in each
   HTML file inside a <style> tag at the top of that page.
   ════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════
   1. COLOR SYSTEM
      EDIT COLORS HERE — change a value once, it updates everywhere.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  /* — Brand colors — */
  --coral:      #FF6B6B;   /* Primary accent (buttons, headings) */
  --coral-soft: #FFE5E5;   /* Light coral tint */
  --mint:       #4CAF50;   /* Secondary accent (green) */
  --mint-soft:  #E8F5E9;   /* Light mint tint */
  --sun:        #FFD93D;   /* Warm yellow (borders, pills, hover) */
  --sun-soft:   #FFF8D0;   /* Light yellow background tint */

  /* — Extended palette — */
  --sky:        #4D96FF;
  --sky-soft:   #D6E9FF;
  --peach:      #FF9A3C;
  --peach-soft: #FFEDD5;
  --lav:        #C77DFF;
  --lav-soft:   #EFD9FF;
  --teal:       #00C9A7;
  --teal-soft:  #CCFAF2;
  --rose:       #FF6FA0;
  --rose-soft:  #FFD6E7;

  /* — Neutrals — */
  --bg:   #FFFBF0;   /* Warm off-white page background */
  --card: #FFFFFF;   /* Card / surface white */
  --ink:  #2D2D2D;   /* Primary text */
  --ink2: #5A5A6A;   /* Secondary text */
  --ink3: #9898A8;   /* Muted / hint text */

  /* — Spacing tokens — */
  --r:  20px;  /* Standard border-radius */
  --rs: 12px;  /* Small border-radius */

  /* — Shadow tokens — */
  --sh:  0 4px 24px rgba(0,0,0,0.07);   /* Resting card shadow */
  --shl: 0 8px 40px rgba(0,0,0,0.11);   /* Lifted card shadow (hover) */
}


/* ═══════════════════════════════════════════════════════════════════
   2. TYPOGRAPHY
      CHANGE FONT HERE — swap the @import URL for any Google Font.
   ═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Fraunces:ital,wght@0,700;1,700&display=swap');

/* Body font — friendly and readable */
body {
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* Heading font — elegant serif */
h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  line-height: 1.2;
}


/* ═══════════════════════════════════════════════════════════════════
   3. RESET & BASE
   ═══════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

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

a { color: inherit; }

/* Thin warm scrollbar */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--sun-soft); }
::-webkit-scrollbar-thumb { background: var(--sun); border-radius: 3px; }


/* ═══════════════════════════════════════════════════════════════════
   4. NAVIGATION BAR
   ═══════════════════════════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(255, 251, 240, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2.5px solid var(--sun);
}

/* Logo */
.logo {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--coral);
  text-decoration: none;
  white-space: nowrap;
  /* ADD LOGO HERE: swap text for <img src="logo.png" alt="MindBloom"> */
}
.logo span { color: var(--mint); font-size: 0.9em; }

/* Desktop nav links */
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink2);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: var(--sun-soft); color: var(--ink); }
.nav-links a.active { background: var(--sun); color: var(--ink); }

/* Hamburger — hidden on desktop, shown on tablet/mobile */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink);
  line-height: 1;
  padding: 0.25rem;
}

/* Mobile dropdown */
.mob-menu {
  display: none;
  position: fixed;
  top: 62px; left: 0; right: 0;
  z-index: 199;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border-bottom: 2px solid var(--sun);
}
.mob-menu.open { display: flex; }
.mob-menu a {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: var(--rs);
  background: var(--card);
  transition: background 0.2s;
}
.mob-menu a:hover,
.mob-menu a.active { background: var(--sun-soft); }


/* ═══════════════════════════════════════════════════════════════════
   5. LAYOUT
   ═══════════════════════════════════════════════════════════════════ */

/* Offset for fixed nav */
.main-content {
  padding-top: 62px;
  min-height: 100vh;
}

/* Standard section padding */
.section {
  padding: 3.5rem 1.5rem;
}

/* Centered content wrapper */
.container {
  max-width: 1080px;
  margin: 0 auto;
}

/* Alternating section background */
.bg-soft { background: var(--card); }

/* Thin decorative divider between sections */
.section-divider {
  height: 2px;
  border: none;
  margin: 0 1.5rem;
  background: linear-gradient(to right, transparent, var(--sun), transparent);
}


/* ═══════════════════════════════════════════════════════════════════
   6. PAGE HEADER  (inner pages: games, tests, blog)
      Shared by all three listing pages.
   ═══════════════════════════════════════════════════════════════════ */
.page-header {
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Soft decorative radial gradients — purely visual, no editing needed */
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 80% at 15% 50%, rgba(255,217,61,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 85% 35%, rgba(255,107,107,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 55% at 50% 85%, rgba(76,175,80,0.09) 0%, transparent 55%);
}

.page-header > * { position: relative; z-index: 1; }

/* Small pill label above the title */
.page-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 0.9rem;
  /* EDIT COLORS HERE: override background/color per page using inline style or a modifier class */
  background: var(--sun-soft);
  color: var(--ink2);
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--ink);
  margin-bottom: 0.65rem;
}

.page-header p {
  font-size: 0.95rem;
  color: var(--ink2);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.75;
}


/* ═══════════════════════════════════════════════════════════════════
   7. SECTION HEADERS  (used inside .section blocks)
   ═══════════════════════════════════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

/* Small coloured pill label */
.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.32rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 0.6rem;
  background: var(--sun);
  color: var(--ink);
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.section-description {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--ink2);
  max-width: 560px;
  margin: 0 auto;
}


/* ═══════════════════════════════════════════════════════════════════
   8. BUTTONS
   ═══════════════════════════════════════════════════════════════════ */

/* Primary — solid coral */
.btn-primary {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(255,107,107,0.35);
}
.btn-primary:hover { background: #f05050; transform: translateY(-2px); }

/* Secondary — white with sun border */
.btn-secondary {
  display: inline-block;
  background: var(--card);
  color: var(--ink);
  border: 2.5px solid var(--sun);
  padding: 0.82rem 2rem;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.btn-secondary:hover { background: var(--sun-soft); transform: translateY(-2px); }


/* ═══════════════════════════════════════════════════════════════════
   9. HERO  (homepage only)
   ═══════════════════════════════════════════════════════════════════ */
.hero {
  min-height: calc(100vh - 62px);
  padding: 5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 45% at 15% 25%, rgba(255,217,61,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 45% 50% at 85% 70%, rgba(255,107,107,0.16) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 55% 15%, rgba(76,175,80,0.13) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 660px;
}


/* ═══════════════════════════════════════════════════════════════════
   10. AD SLOTS
       Shared across games, tests, and blog pages.
       Replace inner content with your ad code (e.g. Google AdSense).
   ═══════════════════════════════════════════════════════════════════ */
.ad-wrap {
  display: flex;
  justify-content: center;
  padding: 0.75rem 1.5rem;
}

.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  background: linear-gradient(135deg, #f7f5ee, #eeeae0);
  border: 2px dashed #d8d3c5;
  border-radius: var(--rs);
  color: #b0ab9e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-slot::before {
  content: '[ AD ]';
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

/* Leaderboard banner — 728×90 */
.ad-banner {
  height: 90px;
  max-width: 728px;
  margin: 0 auto;
}

/* Medium rectangle — 300×250 */
.ad-rect {
  height: 250px;
  max-width: 300px;
}

/* In-grid ad — fills one card slot */
.ad-in-grid {
  height: 100%;
  min-height: 280px;
}


/* ═══════════════════════════════════════════════════════════════════
   11. DEVELOPER TIP BANNER
       Yellow instruction box shown while editing.
       To hide on your live site: add style="display:none" to .dev-tip
   ═══════════════════════════════════════════════════════════════════ */
.dev-tip {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1.4rem;
  margin-bottom: 2.25rem;
  background: var(--sun-soft);
  border: 2px dashed var(--sun);
  border-radius: var(--rs);
}

.dev-tip-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.dev-tip-text {
  font-size: 0.84rem;
  color: var(--ink2);
  line-height: 1.65;
}

.dev-tip-text strong { color: var(--ink); font-weight: 800; }

.dev-tip-text code {
  background: var(--sun);
  color: var(--ink);
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}


/* ═══════════════════════════════════════════════════════════════════
   12. SHARED CARD BASE
       Used as a foundation for game, test, and blog cards.
       Each page extends this with its own specifics.
   ═══════════════════════════════════════════════════════════════════ */
.base-card {
  background: var(--card);
  border-radius: var(--r);
  border: 2.5px solid var(--sun);
  box-shadow: var(--sh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.base-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shl);
}

/* Shared card thumbnail area */
.card-thumb {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  flex-shrink: 0;
}

/* Small floating badge on a card thumbnail */
.card-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.7rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: 50px;
  background: rgba(255,255,255,0.88);
  color: var(--ink2);
}

/* Shared card body */
.card-body {
  padding: 1.2rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
}

.card-title-text {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.card-desc-text {
  font-size: 0.875rem;
  color: var(--ink2);
  line-height: 1.65;
  flex: 1;
}

/* Small metadata row (time, questions, difficulty) */
.card-meta-row {
  display: flex;
  gap: 0.6rem;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}
.card-meta-row span + span::before { content: '· '; }

/* Coming-soon card state */
.card--soon {
  border-style: dashed;
  border-color: #ddd;
  box-shadow: none;
  opacity: 0.7;
}
.card--soon:hover { transform: none; box-shadow: none; }
.card--soon .card-thumb { background: #f5f3ed !important; }


/* ═══════════════════════════════════════════════════════════════════
   13. GAME / TEST ACTION BUTTONS  (full-width, inside cards)
   ═══════════════════════════════════════════════════════════════════ */

/* "Play Now" — green */
.btn-play {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background: var(--mint);
  color: #fff;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 0.85rem;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 3px 12px rgba(76,175,80,0.28);
}
.btn-play:hover { background: #3d9940; transform: translateY(-2px); }

/* Disabled state for coming-soon cards */
.btn-play:disabled,
.btn-play--disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

/* "Start Test" — coral */
.btn-start {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background: var(--coral);
  color: #fff;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 0.85rem;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 3px 12px rgba(255,107,107,0.28);
}
.btn-start:hover { background: #f05050; transform: translateY(-2px); }

.btn-start:disabled,
.btn-start--disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

/* "Read More" — sky blue, outlined */
.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  color: var(--sky);
  border: 2px solid var(--sky-soft);
  padding: 0.6rem 1.25rem;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  margin-top: 0.75rem;
  align-self: flex-start;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-read:hover {
  background: var(--sky-soft);
  border-color: var(--sky);
  transform: translateX(3px);
}
.btn-read .arrow { display: inline-block; transition: transform 0.2s; }
.btn-read:hover .arrow { transform: translateX(4px); }


/* ═══════════════════════════════════════════════════════════════════
   14. PLACEHOLDER BLOCK
       Used while content isn't ready yet.
   ═══════════════════════════════════════════════════════════════════ */
.placeholder {
  background: var(--sun-soft);
  border: 2px dashed var(--sun);
  border-radius: var(--r);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--ink2);
  font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════════
   15. FOOTER
   ═══════════════════════════════════════════════════════════════════ */
footer {
  background: var(--card);
  border-top: 2.5px solid var(--sun);
  padding: 2.5rem 1.5rem 3rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--coral);
  margin-bottom: 1.1rem;
}
.footer-brand span { color: var(--mint); }

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink2);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--coral); }

.footer-text {
  font-size: 0.78rem;
  color: var(--ink3);
}


/* ═══════════════════════════════════════════════════════════════════
   16. RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════ */

/* Tablet and below — show hamburger, hide desktop nav */
@media (max-width: 1024px) {
  .hamburger    { display: block; }
  .nav-links    { display: none; }
}

/* Small phones */
@media (max-width: 480px) {
  nav { padding: 0 1rem; }

  .section { padding: 2.5rem 1rem; }

  .page-header { padding: 2.5rem 1rem 2rem; }

  .hero { padding: 4rem 1rem 2.5rem; }

  .btn-primary,
  .btn-secondary { padding: 0.75rem 1.5rem; font-size: 0.9rem; }

  .footer-links { gap: 0.5rem 1rem; }
}
