/* --- CSS RESET & NORMALIZE --- */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, main, section, article, aside, nav, header, footer, figure, figcaption, details, summary {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
article, aside, details, figcaption, figure, footer, header, main, nav, section {
  display: block;
}
body {
  line-height: 1.6;
  color: #374151;
  background: #F7F8FC;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}
a { color: inherit; text-decoration: none; transition: color 0.18s; }
ul { list-style: disc; padding-left: 1.5em; }
ol { list-style: decimal; padding-left: 1.5em; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; font-size: 100%; border: none; outline: none; background: none; }

/* --- COLOR PALETTE, SOFT PASTEL THEME --- */
:root {
  --primary: #1F2937;
  --secondary: #FFFFFF;
  --accent: #087649;
  --pastel-blue: #e8f0fb;
  --pastel-mint: #d0f4e7;
  --pastel-pink: #fde4ec;
  --pastel-yellow: #fff9e5;
  --pastel-lavender: #eae6fd;
  --pastel-purple: #ede7f6;
  --text-main: #212237;
  --text-heading: #1F2937;
  --card-bg: #fff;
  --border-radius: 18px;
  --shadow-soft: 0 2px 12px rgba(74,119,155,0.08);
  --section-pad: 40px 20px;
  --container-max: 1200px;
  --focus-outline: #c7e4fa;
}

/* --- TYPOGRAPHY: SOFT, DREAMY, AND ELEGANT --- */
body, p, li {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: 0.01em;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Open Sans', Arial, Helvetica, sans-serif;
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.01em;
}
h1 { font-size: 2.2rem; margin-bottom: 16px; }
h2 { font-size: 1.7rem; margin-bottom: 16px; }
h3 { font-size: 1.3rem; margin-bottom: 10px; }
h4 { font-size: 1.1rem; margin-bottom: 6px; }
.subheadline { color: #604b6f; font-size: 1.05rem; letter-spacing: 0.02em; opacity: 0.87; margin-bottom: 20px; }
strong { font-weight: 600; }

@media (min-width: 700px) {
  h1 { font-size: 2.9rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.25rem; }
}

/* --- GENERAL SECTION/PAGE LAYOUTS --- */
.container {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}
section {
  margin-bottom: 60px;
  padding: var(--section-pad);
  background: transparent;
  border-radius: var(--border-radius);
}
@media (min-width: 900px) {
  section { padding: 60px 0; }
}

.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.text-section {
  background: var(--pastel-blue);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  padding: 32px 20px;
  margin-bottom: 20px;
}

/* --- FLEXBOX CARDS / CONTENT LAYOUTS --- */
.card-container, .card-grid, .feature-grid, .blog-post-list, .author-bios {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card, .feature, .bio, .testimonial-card, .event-calendar, .event-highlights {
  margin-bottom: 20px;
  position: relative;
}
.card, .feature, .bio {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  padding: 28px 20px 26px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  transition: box-shadow 0.25s, transform 0.20s;
}
.feature:hover, .bio:hover, .card:hover {
  box-shadow: 0 6px 28px rgba(74, 119, 155, 0.13);
  transform: translateY(-4px) scale(1.025);
}

.feature img, .feature svg {
  height: 40px; width: 40px;
  margin-bottom: 2px;
  filter: drop-shadow(0 1px 4px rgba(74,119,155,0.05));
}

@media (max-width: 768px) {
  .feature-grid, .card-container, .card-grid, .blog-post-list, .author-bios {
    flex-direction: column;
    gap: 16px;
  }
  .container { padding: 0 6px; }
}
@media (min-width: 769px) {
  .feature-grid, .card-container, .card-grid, .blog-post-list, .author-bios {
    flex-direction: row;
    gap: 32px;
    justify-content: flex-start;
  }
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; gap: 18px; }
}

/* --- BUTTONS & CTA LINKS --- */
.button, .cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  padding: 12px 30px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  transition: background 0.18s, color 0.18s, box-shadow 0.16s, transform 0.14s;
  box-shadow: 0 2px 8px rgba(32,48,81,.05);
  cursor: pointer;
}
.button.primary {
  background: linear-gradient(90deg, #e8f0fb 0%, #d0f4e7 65%, #fde4ec 100%);
  color: var(--primary);
}
.button.primary:hover, .cta-link:hover {
  background: #eae6fd;
  color: var(--accent);
}
.button:focus { outline: 2px solid var(--focus-outline); }
.button.secondary {
  background: #fff9e5;
  color: var(--accent);
  border: 1px solid #eae6fd;
}
.cta-link {
  padding: 0 0 2px 0;
  color: var(--accent);
  font-size: 1.02em;
  background: none;
  border: none;
  border-radius: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  box-shadow: none;
  text-decoration: underline dotted var(--accent);
}
.cta-link:after {
  content: '→';
  font-weight: 600;
  margin-left: 4px;
  color: #6DD6B5;
  opacity: 0.65;
  transition: margin-left 0.15s;
}
.cta-link:hover:after { margin-left: 10px; }

/* --- HEADER/NAVIGATION --- */
.site-header {
  background: #e8f0fb;
  box-shadow: 0 2px 12px rgba(74,119,155,0.10);
  position: sticky;
  top: 0; left: 0;
  z-index: 31;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 18px;
  height: 72px;
}
.logo-link img { height: 38px; width: auto; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.main-nav a {
  padding: 8px 12px;
  color: var(--primary);
  border-radius: 6px;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.04em;
  transition: background 0.17s, color 0.16s;
  opacity: 0.92;
}
.main-nav a:hover:not(.button) {
  background: var(--pastel-mint);
  color: var(--accent);
}
.main-nav .button.primary {
  margin-left: 12px;
}
.mobile-menu-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  font-size: 1.65rem;
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 12px rgba(74,119,155,0.10);
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.18s, color 0.16s, box-shadow 0.17s;
}
.mobile-menu-toggle:focus { outline: 2px solid var(--focus-outline); }

@media (min-width: 1025px) {
  .mobile-menu-toggle { display: none !important; }
}
@media (max-width: 1024px) {
  .main-nav { display: none !important; }
  .mobile-menu-toggle { display: flex !important; }
}

/* --- MOBILE MENU --- */
.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  width: 100vw; height: 100vh;
  background: rgba(232,240,251,0.98);
  box-shadow: -5px 2px 24px rgba(74,119,155,0.11);
  z-index: 1101;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.55,0,.1,1), background 0.22s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 32px 20px 0 20px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end;
  background: none;
  color: var(--accent);
  font-size: 2.2rem;
  border: none;
  margin-bottom: 16px;
  margin-top: 2px;
  cursor: pointer;
  padding: 6px 12px;
  transition: color 0.17s, background 0.17s;
  border-radius: 50%;
}
.mobile-menu-close:hover { background: var(--pastel-mint); color: var(--primary); }
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin-top: 20px;
}
.mobile-nav a {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.12em;
  color: var(--text-heading);
  background: none;
  border-radius: 8px;
  padding: 12px 8px 12px 0;
  transition: background 0.13s, color 0.13s;
}
.mobile-nav a:hover {
  color: var(--accent);
  background: var(--pastel-lavender);
}

/* --- HERO & CTA SECTIONS (SOFT, PASTEL) --- */
section:first-of-type, .confirmation-message, .next-steps {
  background: linear-gradient(145deg, #e8f0fb 65%, #fde4ec 100%);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}
section .button.primary { margin-top: 18px; }

/* --- TESTIMONIALS --- */
.testimonial-card {
  background: #fff5fa;
  border-left: 5px solid var(--accent);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 12px rgba(173,143,160,0.05);
  color: #312942;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  margin-bottom: 20px;
  min-width: 260px;
  max-width: 700px;
}
.testimonial-card blockquote {
  font-family: 'Montserrat', sans-serif;
  font-style: italic;
  font-size: 1.05em;
  color: #574b57;
  opacity: 0.93;
  margin-bottom: 8px;
}
.testimonial-card footer {
  font-family: 'Open Sans',sans-serif;
  font-size: 0.99em;
  color: #086e43;
  opacity: 0.83;
  margin-left: 5px;
  font-style: normal;
}
@media (max-width: 700px) {
  .testimonial-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 16px; }
}

/* --- BLOG POSTS */
.blog-post-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 10px;
}
.blog-post-list article {
  flex: 1 1 260px;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  padding: 24px 16px;
  margin-bottom: 20px;
  min-width: 220px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.20s, transform 0.19s;
}
.blog-post-list article:hover {
  box-shadow: 0 5px 18px rgba(32,48,81,.08);
  transform: translateY(-4px) scale(1.015);
}

.categories-filter {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 24px 0 0 0;
}
.categories-filter a {
  color: var(--accent);
  font-weight: 500;
  background: var(--pastel-mint);
  padding: 5px 17px;
  border-radius: 24px;
  font-size: 1em;
  transition: background 0.15s, color 0.14s;
}
.categories-filter a:hover {
  background: #fff9e5;
  color: var(--primary);
}

/* --- FOOTER --- */
.site-footer {
  background: #e8f0fb;
  color: var(--primary);
  border-top: 1px solid #c9e5f9;
  padding-top: 38px;
  margin-top: 26px;
  box-shadow: 0 0 16px rgba(74,119,155,0.05);
}
.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #dde8f6;
}
.footer-brand img { height: 36px; }
.footer-brand p { color: #686c7c; font-size: 0.96em; margin: 8px 0 0 0; display: flex; align-items: center; gap: 6px; }
.footer-links, .footer-legal, .footer-social {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 120px;
}
.footer-nav a, .footer-legal a {
  color: #395171;
  font-family: 'Montserrat', sans-serif;
  font-size: 1em;
  padding: 0 0 3px 0;
  border-radius: 4px;
  transition: background 0.14s, color 0.13s;
}
.footer-nav a:hover, .footer-legal a:hover { background: var(--pastel-mint); color: var(--accent); }
.footer-social a { display: inline-block; }
.footer-social img { height: 26px; width: 26px; margin-right: 3px; }
.footer-bottom { text-align: center; margin-top: 10px; font-size: 0.96em; color: #9399a8; }

@media (max-width: 900px) {
  .footer-columns { flex-direction: column; gap: 26px; }
}

/* --- EVENTS section layouts --- */
.event-calendar, .event-highlights {
  background: var(--pastel-yellow);
  padding: 14px 16px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(251,220,170,0.08);
}
.event-calendar ul, .event-highlights ul { padding-left: 1.5em; }
.event-calendar li, .event-highlights li { margin-bottom: 6px; font-size: 1.06em; }

/* --- AUTHOR BIOS (Blog) --- */
.author-bios {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 8px 0 24px 0;
}
.bio {
  background: var(--pastel-mint);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 12px rgba(74,119,155,0.09);
  padding: 18px 14px;
  min-width: 150px; max-width: 340px;
  flex: 1 1 150px;
  font-family: 'Open Sans', sans-serif;
  color: #226756;
}

.guest-contributors ul { padding-left: 1.3em; margin-top: 8px; }
.guest-contributors li { margin-bottom: 5px; }

/* --- CONTENT LISTS --- */
ul, ol {
  margin-bottom: 0.9em;
}
li {
  font-size: 1em;
  margin-bottom: 9px;
}
.text-section ul li { line-height: 1.66; }

/* --- MISC SPACING CONVENTIONS --- */
.card {
  margin-bottom: 20px;
  position: relative;
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card-container, .card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/******************************
  COOKIE CONSENT BANNER & MODAL
******************************/
.cookie-banner {
  position: fixed;
  left: 0; bottom: 0; width: 100vw;
  background: linear-gradient(96deg, #d0f4e7 75%, #e8f0fb 100%);
  box-shadow: 0 -3px 24px rgba(23,45,67,0.07);
  padding: 24px 20px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1301;
  gap: 16px;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  animation: cookieIn 0.65s cubic-bezier(.67,0,.16,1);
}
.cookie-banner p { color: #18523c; margin-bottom: 8px; text-align: center; }
.cookie-banner .cookie-btns {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.cookie-banner button {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 1em;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  border: none;
  transition: background 0.17s, color 0.15s;
}
.cookie-banner .accept {
  background: var(--accent);
  color: #fff;
}
.cookie-banner .accept:hover { background: #0ea16d; }
.cookie-banner .reject {
  background: #fde4ec;
  color: var(--accent);
}
.cookie-banner .reject:hover { background: #fff9e5; color: #967;
}
.cookie-banner .settings {
  background: var(--pastel-blue);
  color: var(--primary);
  border: 1px solid #c7e4fa;
}
.cookie-banner .settings:hover {
  background: #fff;
  color: var(--accent);
}
@keyframes cookieIn {
  0% { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.cookie-modal-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(32,44,59,.5);
  z-index: 1302;
  display: none;
}
.cookie-modal-bg.open { display: block; }
.cookie-modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 30px rgba(23,45,67,.22);
  max-width: 340px;
  width: 96%;
  padding: 32px 22px 22px 22px;
  z-index: 1303;
  display: flex;
  flex-direction: column;
  gap: 17px;
  animation: modalIn 0.3s cubic-bezier(.51,0,.44,1);
}
@keyframes modalIn {
  0% { transform: translate(-50%,-44%) scale(.92); opacity: 0; }
  100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
.cookie-modal h3 {
  color: var(--accent);
  font-size: 1.19em;
  margin-bottom: 10px;
}
.cookie-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 3px 10px 2px;
  border-radius: 8px;
  background: var(--pastel-mint);
  margin-bottom: 6px;
}
.cookie-category.essential { background: #fff9e5; }
.cookie-category label {
  font-weight: 500; color: var(--primary); letter-spacing: 0;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px; height: 20px;
}
.toggle-switch input { display: none; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background: #eae6fd;
  border-radius: 16px;
  transition: background 0.17s;
}
.toggle-switch input:checked + .toggle-slider {
  background: #4cc88a;
}
.toggle-slider:before {
  position: absolute;
  content: '';
  height: 16px; width: 16px;
  left: 2px; bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s;
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
}
.cookie-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}
/* --- Hide modal by default --- */
.cookie-modal-bg, .cookie-modal { display: none; }
.cookie-modal-bg.open, .cookie-modal.open { display: flex; }

/***********************
   MEDIA QUERIES
***********************/
@media (max-width: 700px) {
  body, p, li, input, button { font-size: 1em; }
  h1 { font-size: 1.48rem; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1.07rem; }
  section { padding: 32px 6px; }
  .container { padding: 0 5px; }
}

/* ---- ACCESSIBILITY ---- */
a:focus, button:focus, input:focus {
  outline: 2px solid var(--focus-outline); outline-offset: 2px;
}
a:active { color: var(--accent); }

/* Hide visually but keep for screen readers */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* --- MISC MICRO INTERACTIONS --- */
button, .button, .cta-link, a, .mobile-menu-toggle {
  transition: color 0.16s, background 0.16s, box-shadow 0.15s, transform 0.12s;
  cursor: pointer;
}
.button:active, .cta-link:active {
  transform: scale(.965);
}
img, svg { vertical-align: middle; }

/* -- End of comprehensive CSS for SparkleTrek Academy (Soft Pastel Theme, Flexbox Only) -- */
