/* =============================
   Shadow Arcade Academy — style.css
   Playful Dynamic Theme (Flex-only)
   ============================= */

/* -----------------------------
   0) CSS Reset / Normalize
----------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 20px; }
p { margin: 0 0 16px; }
:focus { outline: none; }
:focus-visible { outline: 3px solid #FF4D8D; outline-offset: 2px; }

/* -----------------------------
   1) Design Tokens (with fallbacks)
----------------------------- */
:root {
  /* Brand */
  --color-primary: #0A1B2E; /* Navy */
  --color-secondary: #B68C2A; /* Gold */
  --color-accent: #F6F4EC; /* Light */
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-text: #0A1B2E;
  --color-muted: #5C6A7A;

  /* Playful support palette (bright) */
  --c-pink: #FF4D8D;
  --c-violet: #7C3AED;
  --c-teal: #2DD4BF;
  --c-yellow: #FFD84D;
  --c-blue: #3B82F6;
  --c-lime: #A3E635;

  /* Surfaces */
  --surface-0: #FFFFFF;
  --surface-1: #FCFBF7; /* soft paper */
  --surface-2: #F1F5F9; /* light gray */

  /* Shadows */
  --shadow-1: 0 4px 12px rgba(10,27,46,0.08);
  --shadow-2: 0 10px 24px rgba(10,27,46,0.12);

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Motion */
  --t-fast: 150ms;
  --t-base: 220ms;
  --t-slow: 380ms;
  --easing: cubic-bezier(.2,.8,.2,1);
}

/* -----------------------------
   2) Base Typography
----------------------------- */
body {
  font-family: Arial, Helvetica, sans-serif; /* brand body */
  color: var(--color-text);
  background: var(--surface-1);
  line-height: 1.55;
  font-size: 16px;
}
.h1, h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 40px; line-height: 1.15; margin: 0 0 16px; }
.h2, h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 28px; line-height: 1.2; margin: 0 0 16px; }
.h3, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 20px; line-height: 1.3; margin: 0 0 10px; }
.small { font-size: 14px; }
.subheadline { color: var(--color-muted); font-size: 18px; }
.kicker { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; background: var(--c-yellow); color: #1A1A1A; padding: 6px 12px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.supporting-note { color: var(--color-muted); font-size: 14px; margin-top: 12px; }

/* Responsive type adjustments */
@media (min-width: 768px) {
  .h1, h1 { font-size: 56px; }
  .h2, h2 { font-size: 32px; }
  .h3, h3 { font-size: 22px; }
}
@media (min-width: 1024px) {
  .h1, h1 { font-size: 64px; }
}

/* -----------------------------
   3) Layout Primitives (Flex-only)
----------------------------- */
.container {
  display: flex; flex-direction: column; align-items: stretch; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px;
}
.content-wrapper {
  display: flex; flex-direction: column; gap: 20px; width: 100%;
}
section { padding: 40px 0; }

/* Mandatory spacing patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Utility spacing */
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }

/* -----------------------------
   4) Header & Navigation
----------------------------- */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--surface-0); box-shadow: var(--shadow-1); }
.site-header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.logo img { height: 40px; }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { padding: 8px 12px; border-radius: var(--r-pill); color: var(--color-primary); transition: background var(--t-base) var(--easing), transform var(--t-fast) var(--easing); }
.main-nav a:hover { background: var(--c-teal); transform: translateY(-1px); color: #0A1B2E; }
.main-nav a:active { transform: translateY(0); }

.header-ctas { display: none; align-items: center; gap: 12px; flex-wrap: wrap; }

.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--c-pink); color: #0A1B2E; font-size: 22px; box-shadow: var(--shadow-1); transition: transform var(--t-fast) var(--easing), background var(--t-base) var(--easing); }
.mobile-menu-toggle:hover { background: #FF3A80; transform: rotate(-3deg) scale(1.03); }

/* Mobile menu overlay */
.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; width: 86%; max-width: 380px; background: var(--surface-0); box-shadow: var(--shadow-2); transform: translateX(100%); transition: transform var(--t-slow) var(--easing); z-index: 1200; display: flex; flex-direction: column; padding: 20px; gap: 16px; }
.mobile-menu.open, .mobile-menu.active, .mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); color: var(--color-primary); font-size: 18px; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-1); }
.mobile-nav { display: flex; flex-direction: column; gap: 10px; }
.mobile-nav a { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--color-primary); font-weight: 600; transition: background var(--t-base) var(--easing), transform var(--t-fast) var(--easing); }
.mobile-nav a:hover { background: var(--c-yellow); transform: translateX(4px); }

/* Show desktop nav at >= 992px */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* -----------------------------
   5) Buttons & Links
----------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: var(--r-pill); font-weight: 700; letter-spacing: .01em; transition: background var(--t-base) var(--easing), color var(--t-base) var(--easing), transform var(--t-fast) var(--easing), box-shadow var(--t-base) var(--easing); box-shadow: var(--shadow-1); border: 2px solid transparent; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--c-pink); color: #0A1B2E; }
.btn-primary:hover { background: #FF3A80; }

.btn-secondary { background: var(--surface-0); color: var(--color-primary); border-color: var(--color-secondary); }
.btn-secondary:hover { background: var(--color-secondary); color: #0A1B2E; }

/* Subtle link style */
a:hover { text-decoration: underline; }

/* -----------------------------
   6) Hero Section (Playful)
----------------------------- */
.hero { position: relative; overflow: hidden; background: var(--surface-0); }
.hero .content-wrapper { padding: 24px 0 8px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Decorative bubbles (allowed as decorative absolute) */
.hero::before, .hero::after { content: ''; position: absolute; z-index: 0; width: 180px; height: 180px; border-radius: 50%; opacity: .18; filter: blur(0.5px); }
.hero::before { background: var(--c-teal); top: -40px; left: -40px; animation: floaty 8s var(--easing) infinite; }
.hero::after { background: var(--c-violet); bottom: -50px; right: -50px; animation: floater 10s var(--easing) infinite; }
.hero .container, .hero .content-wrapper, .hero * { position: relative; z-index: 1; }

@keyframes floaty { 0%, 100% { transform: translateY(0) scale(1);} 50% { transform: translateY(10px) scale(1.03);} }
@keyframes floater { 0%, 100% { transform: translate(0,0) rotate(0deg);} 50% { transform: translate(-10px, 6px) rotate(2deg);} }

/* -----------------------------
   7) Cards, Lists, Grids
----------------------------- */
/* Generic article cards inside known containers */
.service-cards, .format-cards, .track-grid, .program_overview_cards, .lecture-list, .speaker_list, .event_list, .differentiators_grid { display: flex; flex-wrap: wrap; gap: 20px; }
.service-cards article,
.format-cards article,
.track-grid article,
.program_overview_cards article,
.lecture-list article,
.speaker_list article,
.event_list article,
.differentiators_grid > div {
  flex: 1 1 100%;
  background: var(--surface-0);
  border: 2px solid var(--surface-2);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-base) var(--easing), box-shadow var(--t-base) var(--easing), border-color var(--t-base) var(--easing);
}
.service-cards article:hover,
.format-cards article:hover,
.track-grid article:hover,
.program_overview_cards article:hover,
.lecture-list article:hover,
.speaker_list article:hover,
.event_list article:hover,
.differentiators_grid > div:hover {
  transform: translateY(-4px) rotate(-.3deg);
  box-shadow: var(--shadow-2);
  border-color: var(--c-teal);
}

/* Feature grid and items */
.feature-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.feature-item { background: var(--surface-0); border: 2px solid var(--surface-2); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-1); }

/* Icon bullets and standard lists */
.icon-bullets ul, .delivery-modes ul, .level-breakdown ul, .outcome-highlights ul, .outcome-bullets, .capstone_examples ul, .skills_map ul, .career_alignment_points ul, .before_after_summaries ul, .stat-list ul, .stat_list ul { display: flex; flex-direction: column; gap: 10px; padding-left: 0; list-style: none; }
.icon-bullets li, .contact-details p, .address_block p, .phone_number p, .email_address p, .office_hours p { display: flex; align-items: center; gap: 10px; }
.icon-bullets li img, .contact-details img, .address_block img, .phone_number img, .email_address img, .office_hours img { width: 20px; height: 20px; }

/* Quote sliders/lists and testimonial cards */
.quote-slider, .quote-list { display: flex; flex-wrap: wrap; gap: 20px; }
.testimonial-card { background: #FFFDF2; border: 2px solid #FFEAA0; border-radius: var(--r-lg); color: #1C1C1C; box-shadow: var(--shadow-1); }
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--color-primary); }

/* Rating summary badge */
.rating-summary { display: inline-flex; align-items: center; gap: 10px; background: var(--c-lime); color: #0A1B2E; border-radius: var(--r-pill); padding: 8px 12px; font-weight: 700; box-shadow: var(--shadow-1); }

/* Attribution lists (two variants) */
.attribution-list, .attribution_list { display: flex; flex-direction: column; gap: 8px; padding-left: 18px; }

/* Grids responsive sizing */
@media (min-width: 768px) {
  .service-cards article,
  .format-cards article,
  .track-grid article,
  .program_overview_cards article,
  .lecture-list article,
  .speaker_list article,
  .event_list article,
  .differentiators_grid > div { flex: 1 1 calc(50% - 10px); }
  .feature-item { flex: 1 1 calc(50% - 10px); }
}
@media (min-width: 1024px) {
  .service-cards article,
  .format-cards article,
  .track-grid article,
  .program_overview_cards article,
  .lecture-list article,
  .speaker_list article,
  .event_list article,
  .differentiators_grid > div { flex: 1 1 calc(25% - 15px); }
  .feature-item { flex: 1 1 calc(25% - 15px); }
  /* Some lists should stay two-column for readability */
  .lecture-list article { flex: 1 1 calc(50% - 10px); }
  .speaker_list article { flex: 1 1 calc(50% - 10px); }
}

/* -----------------------------
   8) Informational Blocks
----------------------------- */
.mission_statement, .pedagogy_principles, .partner_universities, .accreditation_notes,
.search-bar, .filter-controls, .topic-tags, .credit_info, .duration-matrix, .assessment-methods, .credit-transfer-guidance,
.reading_list_highlights, .featured_success_story, .inquiry-guidance, .inquiry_guidance,
.cohort_sizes, .mentor_support, .project_briefs, .assessment_rubrics, .certification_outline,
.portfolio_outcomes, .prerequisite_tags, .tooling_list, .project_examples_list,
.affiliation_tags, .highlighted_speaker, .booking_process_steps, .session_formats, .honorarium_guidelines, .custom_topic_request, .partner_endorsements,
.date_filters, .location_filters, .modality_toggle, .timezone_switcher,
.ticket_types, .group_booking_info, .access_instructions, .cancellation_policy_summary,
.address_block, .phone_number, .email_address, .office_hours, .privacy_note,
.faq_list, .response_times, .support_channels,
.summary_points, .data_collected_list, .processing_purposes, .retention_periods,
.access_rights, .rectification_rights, .erasure_rights, .data_portability, .complaint_process,
.privacy_contact_details, .request_form_fields, .lawful_basis_list, .consent_management_notes, .dpa_overview, .subprocessor_disclosure,
.request_types, .verification_process, .response_timeframes, .appeal_steps,
.eligibility_terms, .user_obligations, .acceptable_use, .ip_rights_summary, .disclaimer_points, .limitation_of_liability, .indemnity_summary, .governing_law,
.legal_contact_details, .confirmation_message, .next_steps_list, .timeline_points, .support_contacts, .faq_link,
.values_list, .approach_pedagogy, .partnership_logos_text, .quality_assurance_notes, .pathway_diagrams_text, .advising_info, .stat-list, .stat_list {
  display: flex; flex-direction: column; gap: 10px; background: var(--surface-0); border: 1px solid var(--surface-2); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-1);
}

/* Ordered/Unordered lists inside info blocks */
.booking_process_steps ol, .timeline_points ol { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* -----------------------------
   9) Contact & CTA rows
----------------------------- */
.contact-details { display: flex; flex-direction: column; gap: 10px; background: var(--surface-0); border: 1px solid var(--surface-2); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-1); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* -----------------------------
   10) Footer
----------------------------- */
.site-footer { background: var(--color-primary); color: var(--color-accent); padding: 30px 0; margin-top: 20px; }
.site-footer .content-wrapper { flex-direction: column; gap: 20px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { width: 48px; height: 48px; filter: brightness(100%); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { color: var(--color-accent); background: rgba(255,255,255,0.06); padding: 8px 12px; border-radius: var(--r-pill); transition: background var(--t-base) var(--easing), transform var(--t-fast) var(--easing); }
.footer-nav a:hover { background: var(--c-teal); color: #0A1B2E; transform: translateY(-2px); }
.footer-contact, .newsletter-signup { display: flex; flex-direction: column; gap: 6px; }

@media (min-width: 768px) {
  .site-footer .content-wrapper { flex-direction: row; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
}

/* -----------------------------
   11) Page-specific small touches
----------------------------- */
/* Trust badges as playful strip */
.trust-badges { display: flex; flex-direction: column; gap: 10px; background: var(--surface-0); border: 1px solid var(--surface-2); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-1); }

/* Rating and stats prominence */
.stat-list ul, .stat_list ul { gap: 8px; }
.stat-list li, .stat_list li { background: var(--surface-2); border-radius: var(--r-pill); padding: 8px 12px; display: inline-flex; align-items: center; }

/* Search / filter hints */
.search-bar p, .filter-controls ul, .topic-tags p { color: var(--color-muted); }

/* -----------------------------
   12) Responsive alignment rules
----------------------------- */
/* Text-image sections already align center */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* -----------------------------
   13) Micro-interactions
----------------------------- */
.hover-wiggle:hover { animation: wiggle .4s ease-in-out; }
@keyframes wiggle { 0% { transform: rotate(0deg);} 25% { transform: rotate(2deg);} 50% { transform: rotate(-2deg);} 75% { transform: rotate(1.4deg);} 100% { transform: rotate(0);} }

.badge-bounce { animation: badgeBounce 2.8s var(--easing) infinite; }
@keyframes badgeBounce { 0%, 100% { transform: translateY(0);} 50% { transform: translateY(-4px);} }

/* -----------------------------
   14) Mobile-First Responsive Tweaks
----------------------------- */
@media (min-width: 768px) {
  .container { padding: 0 24px; }
  section { padding: 60px 0; }
}
@media (min-width: 1200px) {
  .container { max-width: 1240px; }
}

/* -----------------------------
   15) Accessibility & Contrast in testimonials/reviews
----------------------------- */
/* Ensure dark text on light backgrounds */
.quote-slider .testimonial-card, .quote-list .testimonial-card { background: #FFFDF2; color: #0A1B2E; }

/* -----------------------------
   16) Mobile Menu Backdrop (optional overlay)
----------------------------- */
.body-lock { overflow: hidden; }

/* -----------------------------
   17) Cookie Consent Banner & Modal
----------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; background: var(--surface-0); color: var(--color-text); border-top: 3px solid var(--c-pink); box-shadow: 0 -12px 24px rgba(10,27,46,0.12); display: flex; }
.cookie-banner .container { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn-accept { background: var(--c-pink); color: #0A1B2E; border-radius: var(--r-pill); padding: 10px 14px; font-weight: 700; }
.cookie-banner .btn-reject { background: var(--surface-0); color: var(--color-primary); border: 2px solid var(--surface-2); border-radius: var(--r-pill); padding: 10px 14px; font-weight: 700; }
.cookie-banner .btn-settings { background: var(--surface-2); color: var(--color-primary); border-radius: var(--r-pill); padding: 10px 14px; font-weight: 700; }
.cookie-banner.hide { display: none; }

/* Cookie modal overlay */
.cookie-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: none; align-items: center; justify-content: center; z-index: 1600; }
.cookie-modal.open, .cookie-modal.active, .cookie-modal.is-open { display: flex; }
.cookie-modal .cookie-dialog { background: var(--surface-0); width: 92%; max-width: 640px; border-radius: var(--r-lg); box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 16px; padding: 18px; transform: translateY(20px); transition: transform var(--t-slow) var(--easing); }
.cookie-modal.open .cookie-dialog { transform: translateY(0); }
.cookie-dialog .cookie-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cookie-dialog .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-dialog .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-toggle { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: var(--r-pill); padding: 8px 12px; }

/* -----------------------------
   18) Header/Footer helpers for spacing
----------------------------- */
footer .footer-contact p, footer .newsletter-signup p { margin: 0; }

/* -----------------------------
   19) Additional safety spacing
----------------------------- */
/* Ensure minimum 20px spacing between content elements */
.content-wrapper > * + * { margin-top: 12px; }
section .content-wrapper > * { margin-bottom: 8px; }
.card-container > * { margin-bottom: 0; }

/* -----------------------------
   20) Tables (if any appear)
----------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--surface-2); }

/* -----------------------------
   21) Forms (if any appear)
----------------------------- */
input[type="text"], input[type="email"], input[type="tel"], textarea, select { width: 100%; background: var(--surface-0); border: 2px solid var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; transition: border-color var(--t-base) var(--easing), box-shadow var(--t-base) var(--easing); }
input:focus, textarea:focus, select:focus { border-color: var(--c-teal); box-shadow: 0 0 0 4px rgba(45,212,191,0.25); }

/* -----------------------------
   22) Page Hero spacing alignment improvements
----------------------------- */
.hero .subheadline { max-width: 72ch; }
.hero .supporting-note { max-width: 72ch; }

/* -----------------------------
   23) Desktop Layout Enhancements (Flex-only)
----------------------------- */
@media (min-width: 992px) {
  /* Header cluster alignment already row */
  .content-wrapper.row { flex-direction: row; }
}

/* -----------------------------
   24) Visual Accents for Playful Dynamic Feel
----------------------------- */
/* Colored top accents for certain cards */
.service-cards article::before,
.format-cards article::before,
.program_overview_cards article::before,
.track-grid article::before,
.speaker_list article::before {
  content: ''; display: block; height: 6px; width: 60px; border-radius: 6px; background: var(--c-blue);
  margin-bottom: 12px;
}
.service-cards article:nth-child(2)::before { background: var(--c-teal); }
.service-cards article:nth-child(3)::before { background: var(--c-pink); }
.track-grid article:nth-child(1)::before { background: var(--c-yellow); }
.track-grid article:nth-child(2)::before { background: var(--c-violet); }
.track-grid article:nth-child(3)::before { background: var(--c-teal); }
.track-grid article:nth-child(4)::before { background: var(--c-pink); }

/* -----------------------------
   25) Header CTA highlight
----------------------------- */
.header-ctas .btn-primary { box-shadow: 0 8px 18px rgba(255,77,141,0.35); }

/* -----------------------------
   26) Ensure no overlapping/adequate spacing
----------------------------- */
section + section { margin-top: 8px; }

/* -----------------------------
   27) Print minimal styles
----------------------------- */
@media print {
  .site-header, .site-footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}
