/* ============================================================
   MANNERSHIFT™ — Global Stylesheet
   Colors: Navy (#1e3a8a), Blue (#2563eb), Amber (#d97706)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1e3a8a;
  --navy-dark:  #1e3060;
  --blue:       #2563eb;
  --blue-dark:  #1d4ed8;
  --blue-light: #eff6ff;
  --amber:      #d97706;
  --amber-light:#fffbeb;
  --amber-pale: #fde68a;
  --white:      #ffffff;
  --gray-50:    #f9fafb;
  --gray-100:   #f3f4f6;
  --gray-200:   #e5e7eb;
  --gray-400:   #9ca3af;
  --gray-500:   #6b7280;
  --gray-600:   #4b5563;
  --gray-700:   #374151;
  --gray-900:   #111827;
  --green:      #16a34a;
  --green-light:#f0fdf4;
  --red:        #dc2626;
  --red-light:  #fef2f2;
  --radius:     0.5rem;
  --shadow:     0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

html { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16px; }
body { background: linear-gradient(135deg, var(--blue-light) 0%, #fff 50%, var(--amber-light) 100%); min-height: 100vh; color: var(--gray-900); line-height: 1.6; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── LAYOUT ─── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 48rem; margin: 0 auto; padding: 0 1.5rem; }
.container-med { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; }

/* ─── STICKY HEADER ─── */
.site-header { position: sticky; top: 0; z-index: 200; }
.announcement-bar { background: var(--navy); color: var(--white); text-align: center; padding: .5rem 1.5rem; font-size: .85rem; }
.announcement-bar a { color: var(--amber-pale); font-weight: 600; }

.navbar { background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--gray-200); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; max-width: 1280px; margin: 0 auto; }
.nav-logo { font-size: 1.5rem; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.nav-logo-icon { width: 2rem; height: 2rem; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); border-radius: .375rem; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-links a { color: var(--gray-600); font-size: .9rem; font-weight: 500; text-decoration: none; padding: .35rem .5rem; border-radius: var(--radius); transition: color .15s; }
.nav-links a:hover { color: var(--navy); text-decoration: none; }

/* Hamburger — mobile */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 1.5rem; height: 2px; background: var(--gray-700); margin: 4px 0; transition: .3s; }
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: white; padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-200); gap: .5rem; }
  .nav-links.open { display: flex; }
  .navbar { position: relative; }
}

/* ─── BUTTONS ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem 1.25rem; border-radius: var(--radius); font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; border: none; transition: all .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; }

.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: var(--white); }
.btn-primary:hover { background: linear-gradient(135deg, var(--blue-dark), #1a44c8); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-dark); color: var(--white); }

.btn-amber { background: linear-gradient(135deg, var(--amber), #b45309); color: var(--white); }
.btn-amber:hover { background: linear-gradient(135deg, #b45309, #92400e); color: var(--white); }

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

.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }

.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: var(--gray-100); color: var(--navy); }

.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-sm { padding: .4rem .85rem; font-size: .8rem; }
.btn-full { width: 100%; }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }

/* Nav CTA */
.btn-nav-cta { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: var(--white); padding: .45rem 1rem; border-radius: var(--radius); }
.btn-nav-cta:hover { background: linear-gradient(135deg, var(--blue-dark), #1a44c8); color: var(--white); text-decoration: none; }
.btn-speak-cta { background: transparent; border: 2px solid #f59e0b; color: #92400e; padding: .45rem 1rem; border-radius: var(--radius); font-size: .9rem; font-weight: 500; text-decoration: none; }
.btn-speak-cta:hover { background: #f59e0b; color: var(--white); text-decoration: none; }

/* ─── CARDS ─── */
.card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); box-shadow: var(--shadow); }
.card-header { padding: 1.25rem 1.5rem .75rem; }
.card-body { padding: 1rem 1.5rem 1.5rem; }
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: .25rem; }
.card-desc { font-size: .875rem; color: var(--gray-500); }

/* ─── FORMS ─── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .4rem; color: var(--gray-700); }
.form-input { width: 100%; padding: .65rem 1rem; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: .95rem; color: var(--gray-900); background: var(--white); transition: border-color .15s, box-shadow .15s; }
.form-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-input::placeholder { color: var(--gray-400); }

/* ─── ALERTS / TOASTS ─── */
.alert { padding: .85rem 1.1rem; border-radius: var(--radius); font-size: .9rem; display: flex; align-items: flex-start; gap: .6rem; }
.alert-success { background: var(--green-light); border: 1px solid #bbf7d0; color: #166534; }
.alert-error   { background: var(--red-light);   border: 1px solid #fecaca; color: #991b1b; }
.alert-info    { background: var(--blue-light);   border: 1px solid #bfdbfe; color: var(--navy); }
.alert-amber   { background: var(--amber-light);  border: 1px solid var(--amber-pale); color: #92400e; }

/* ─── FOOTER ─── */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 3rem 1.5rem 1.5rem; margin-top: 4rem; }
.footer-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand-name { font-size: 1.4rem; font-weight: 800; color: var(--white); margin-bottom: .5rem; }
.footer-tagline { font-size: .875rem; opacity: .7; }
.footer-col h4 { color: var(--white); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.footer-col a { display: block; color: rgba(255,255,255,.7); font-size: .875rem; margin-bottom: .4rem; text-decoration: none; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { max-width: 1280px; margin: 0 auto; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; color: rgba(255,255,255,.4); text-align: center; }

/* ─── HERO ─── */
.hero { padding: 5rem 0 4rem; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 900; color: var(--navy); line-height: 1.15; margin-bottom: 1.25rem; }
.hero p { font-size: 1.15rem; color: var(--gray-600); max-width: 40rem; margin: 0 auto 2rem; }
.hero-badge { display: inline-block; background: var(--blue-light); color: var(--blue-dark); font-size: .8rem; font-weight: 700; padding: .35rem .85rem; border-radius: 999px; margin-bottom: 1.5rem; border: 1px solid #bfdbfe; }

/* ─── SECTION ─── */
.section { padding: 4rem 0; }
.section-title { font-size: 1.875rem; font-weight: 800; color: var(--navy); text-align: center; margin-bottom: .75rem; }
.section-subtitle { font-size: 1.05rem; color: var(--gray-500); text-align: center; max-width: 36rem; margin: 0 auto 2.5rem; }

/* ─── MODULE GRID ─── */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

.module-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); box-shadow: var(--shadow); padding: 1.25rem; transition: box-shadow .2s; }
.module-card:hover { box-shadow: var(--shadow-md); }
.module-card.completed { border-color: #bbf7d0; background: var(--green-light); }
.module-card.current   { border-color: #bfdbfe; background: var(--blue-light); }
.module-card.locked    { opacity: .6; }

.module-status { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.module-num { font-size: .75rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .04em; }
.module-title { font-size: 1rem; font-weight: 700; color: var(--gray-900); margin-bottom: .4rem; }
.module-desc { font-size: .8rem; color: var(--gray-500); margin-bottom: .75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.module-meta { font-size: .75rem; color: var(--gray-400); display: flex; gap: .5rem; margin-bottom: .85rem; }

/* ─── PROGRESS BAR ─── */
.progress-bar { height: .5rem; background: var(--gray-200); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-dark)); border-radius: 999px; transition: width .4s ease; }
.progress-fill.white { background: rgba(255,255,255,.5); }

/* ─── SCENARIO QUIZ ─── */
.scenario-option { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem; border-radius: var(--radius); border: 2px solid var(--gray-200); cursor: pointer; transition: all .15s; margin-bottom: .75rem; }
.scenario-option:hover { border-color: var(--blue); background: var(--blue-light); }
.scenario-option.selected { border-color: var(--blue); background: var(--blue-light); }
.scenario-option.correct { border-color: var(--green); background: var(--green-light); cursor: default; }
.scenario-option.incorrect { border-color: var(--red); background: var(--red-light); cursor: default; }
.scenario-option.revealed { cursor: default; }
.option-radio { width: 1.1rem; height: 1.1rem; border: 2px solid var(--gray-400); border-radius: 50%; flex-shrink: 0; margin-top: .2rem; display: flex; align-items: center; justify-content: center; }
.scenario-option.selected .option-radio { border-color: var(--blue); }
.scenario-option.selected .option-radio::after { content: ''; width: .5rem; height: .5rem; background: var(--blue); border-radius: 50%; }
.scenario-option.correct .option-radio { border-color: var(--green); background: var(--green); }
.scenario-option.correct .option-radio::after { content: '✓'; color: white; font-size: .65rem; }
.scenario-option.incorrect .option-radio { border-color: var(--red); background: var(--red); }
.scenario-option.incorrect .option-radio::after { content: '✗'; color: white; font-size: .65rem; }
.option-label { font-weight: 700; color: var(--navy); margin-right: .25rem; }
.option-text { font-size: .925rem; color: var(--gray-700); }

/* ─── BLOG ─── */
.blog-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.blog-card-body { padding: 1.5rem; }
.blog-tag { display: inline-block; background: var(--amber-light); color: var(--amber); font-size: .75rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; margin-bottom: .75rem; border: 1px solid var(--amber-pale); }
.blog-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: .5rem; line-height: 1.4; }
.blog-card p  { font-size: .875rem; color: var(--gray-500); margin-bottom: 1rem; }

/* Blog article */
.article-body { font-size: 1.05rem; line-height: 1.8; color: var(--gray-700); }
.article-body h2 { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin: 2rem 0 .75rem; }
.article-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--gray-900); margin: 1.5rem 0 .6rem; }
.article-body p  { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin: 1rem 0 1.25rem 1.5rem; }
.article-body li { margin-bottom: .5rem; }
.article-body blockquote { border-left: 4px solid var(--blue); padding: .75rem 1.25rem; margin: 1.5rem 0; background: var(--blue-light); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--navy); }
.article-body strong { color: var(--gray-900); font-weight: 700; }

/* Alanna lesson expand card */
.lesson-card { border: 1px solid var(--amber-pale); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--white); margin-bottom: .85rem; overflow: hidden; }
.lesson-card-header { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 1.25rem 1.5rem; display: flex; align-items: flex-start; gap: 1rem; }
.lesson-card-header:hover { background: var(--amber-light); }
.lesson-num { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: linear-gradient(135deg, #fbbf24, #f97316); color: white; font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lesson-card-title { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); }
.lesson-card-preview { font-size: .875rem; color: var(--gray-500); margin-top: .2rem; }
.lesson-card-body { padding: 0 1.5rem 1.5rem; display: none; border-top: 1px solid var(--amber-pale); }
.lesson-card.open .lesson-card-body { display: block; padding-top: 1.25rem; }
.chevron { margin-left: auto; flex-shrink: 0; color: var(--amber); transition: transform .2s; }
.lesson-card.open .chevron { transform: rotate(180deg); }

/* ─── DASHBOARD SIDEBAR ─── */
.dash-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
@media (max-width: 1024px) { .dash-layout { grid-template-columns: 1fr; } }

/* ─── ADMIN TABLE ─── */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th { background: var(--gray-50); font-weight: 700; text-align: left; padding: .75rem 1rem; border-bottom: 2px solid var(--gray-200); color: var(--gray-600); text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; }
.data-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-amber { background: #fef9c3; color: #854d0e; }
.badge-red   { background: #fee2e2; color: #991b1b; }
.badge-gray  { background: var(--gray-100); color: var(--gray-600); }

/* ─── UTILITIES ─── */
.text-center { text-align: center; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; }
.gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .justify-center { justify-content: center; }
.gap-2 { gap: .5rem; }
.hidden { display: none; }
.text-sm { font-size: .875rem; } .text-xs { font-size: .75rem; }
.text-gray { color: var(--gray-500); }
.text-navy { color: var(--navy); }
.text-blue { color: var(--blue); }
.text-amber { color: var(--amber); }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; }
.rounded { border-radius: var(--radius); }
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 1.5rem 0; }
.spinner { width: 2.5rem; height: 2.5rem; border: 3px solid var(--gray-200); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { text-align: center; padding: 3rem; color: var(--gray-500); }

/* Sticky header fix */
.site-header .navbar { position: static; }
