/* --- CSS RESET & NORMALIZE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body, button, input, textarea, select {
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 16px;
  background: #FFFDFB;
  color: #243270;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
ul, ol { padding-left: 1.2em; }
a { color: #4CA772; text-decoration: none; transition: color .2s; }
a:hover, a:focus { color: #e86d46; text-decoration: underline; }
button, .btn-primary {
  font-family: inherit; font-size: 1rem; cursor: pointer;
  border: none; outline: none;
}
input, textarea, select { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: #243270; font-weight: 700; line-height: 1.2;
}
h1 { font-size: 2.25rem; margin-bottom: 20px; }
h2 { font-size: 1.5rem; margin-bottom: 16px; }
h3 { font-size: 1.17rem; margin-bottom: 12px; }
h4 { font-size: 1.07rem; margin-bottom: 8px; }
p { margin-bottom: 14px; }
strong, b { font-weight: 700; }

/* --- BRAND COLORS --- */
:root {
  --color-primary: #243270;
  --color-secondary: #4CA772;
  --color-accent: #F6FAFF;
  --color-warm1: #FFEDD5;
  --color-warm2: #FFD3B2;
  --color-warm3: #F4A259;
  --color-shadow: rgba(244, 162, 89, 0.10);
  --color-white: #ffffff;
  --color-bg: #FFFDFB;
}

/* --- LAYOUT & CONTAINER --- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  width: 100%;
}

main {
  padding-top: 40px;
  padding-bottom: 40px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-accent);
  border-radius: 30px;
  box-shadow: 0 2px 16px var(--color-shadow);
}

/* HERO BANNER */
.hero {
  background: linear-gradient(88deg, var(--color-warm1), var(--color-accent) 80%);
  border-radius: 0 0 40px 40px;
  margin-bottom: 44px;
  box-shadow: 0 2px 16px var(--color-shadow);
  padding: 36px 0 36px 0;
}
.hero .container {
  align-items: center;
  justify-content: center;
}
.hero .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.hero h1 {
  color: #d76d2d;
  font-size: 2.6rem;
  margin-bottom: 16px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: bold;
}
.hero p {
  font-size: 1.2rem;
  color: #243270;
  margin-bottom: 28px;
}

/* --- NAVIGATION & HEADER --- */
header {
  background: var(--color-bg);
  box-shadow: 0 2px 8px rgba(244,162,89,0.07);
  position: sticky; top: 0; z-index: 40;
  width: 100%;
}
header .container {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.logo img { height: 40px; width: auto; display: block; }
.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.main-nav a {
  padding: 8px 14px;
  border-radius: 20px;
  color: #243270;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--color-warm2);
  color: #d76d2d;
}
.main-nav .btn-primary {
  margin-left: 8px;
  background: var(--color-secondary);
  color: #fff;
  font-weight: bold;
  border-radius: 20px;
  padding: 8px 20px;
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: background 0.22s, box-shadow 0.2s, color 0.15s;
  border: none;
}
.main-nav .btn-primary:hover, .main-nav .btn-primary:focus {
  background: #388d57;
  color: var(--color-warm1);
  box-shadow: 0 6px 18px rgba(252, 189, 103, 0.18);
}

/* --- BURGER MENU --- */
.mobile-menu-toggle {
  display: none;
  background: var(--color-secondary);
  color: #fff;
  font-size: 2rem;
  padding: 10px 18px;
  border-radius: 20px;
  border: none;
  margin-left: 8px;
  z-index: 1202;
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: background 0.2s;
}
.mobile-menu-toggle:active, .mobile-menu-toggle:focus {
  background: #388d57;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: #fffdfa;
  box-shadow: 0 8px 32px #fad48255;
  z-index: 1200;
  flex-direction: column;
  align-items: flex-start;
  padding: 25px 30px 0 30px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.77,0,.175,1);
}
.mobile-menu.open {
  display: flex;
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  background: none;
  color: var(--color-primary);
  border: none;
  font-size: 2rem;
  padding: 6px 15px 6px 6px;
  border-radius: 14px;
  cursor: pointer;
  margin-bottom: 24px;
  transition: background 0.15s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-warm1);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mobile-nav a {
  color: var(--color-primary);
  font-size: 1.18rem;
  font-weight: 600;
  padding: 13px 0;
  border-radius: 18px;
  transition: background 0.18s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-warm1);
}

/* --- SECTIONS & CONTENT --- */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-accent);
  border-radius: 26px;
  box-shadow: 0 2px 16px var(--color-shadow);
}

/* --- FLEXBOX MANDATORY PATTERNS --- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 2px 12px var(--color-shadow);
  margin-bottom: 20px;
  position: relative;
  padding: 28px 24px;
  flex: 1 1 250px;
  min-width: 225px;
}
.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;
  background: var(--color-warm1);
  gap: 20px;
  padding: 20px;
  border-radius: 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px var(--color-shadow);
  min-width: 260px;
  color: #243270;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Blog, courses, support grids */
.feature-grid, .course-overview-grid, .support-options-grid, .testimonial-grid, .post-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  align-items: stretch;
  margin-top: 12px;
  margin-bottom: 6px;
}

.feature-grid > div, .course-overview-grid > div, .support-options-grid > div, .testimonial-grid > div, .post-grid > div {
  background: #fffdfa;
  border-radius: 18px;
  box-shadow: 0 1px 8px var(--color-shadow);
  padding: 24px 18px;
  flex: 1 1 235px;
  min-width: 200px;
  margin-bottom: 20px;
}

.blog-featured {
  background: var(--color-warm1);
  border-radius: 16px;
  box-shadow: 0 2px 10px var(--color-shadow);
  padding: 23px 20px;
  margin-bottom: 22px;
}

.course-categories {
  background: var(--color-warm2);
  border-radius: 18px;
  padding: 20px 18px;
  margin-bottom: 18px;
}

.community-highlights {
  background: var(--color-warm1);
  border-radius: 15px;
  padding: 18px;
  margin-top: 14px;
}

/* --- TESTIMONIAL SLIDER --- */
.testimonial-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 12px;
}
/* --- CARDS & VISUALS --- */
.card {
  background: var(--color-warm2);
  border-radius: 22px;
  padding: 26px 20px;
  box-shadow: 0 2px 12px var(--color-shadow);
  transition: transform 0.13s, box-shadow 0.13s;
}
.card:hover, .card:focus {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 6px 16px #fad48242;
}

/* --- BUTTONS --- */
.btn-primary {
  display: inline-block;
  padding: 13px 26px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 1.07rem;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 24px;
  box-shadow: 0 2px 8px var(--color-shadow);
  border: none;
  transition: background 0.21s, box-shadow 0.18s, color 0.18s, outline 0.18s;
  cursor: pointer;
  margin-top: 14px;
  margin-bottom: 0;
}
.btn-primary:hover, .btn-primary:focus {
  background: #388d57;
  color: #ffd2ad;
  box-shadow: 0 4px 16px #fad48254;
  outline: 2px solid #ffd2ad;
}

button, .btn {
  border-radius: 20px;
  transition: background .2s, color .2s;
}

/* --- FORMS (if any in the future) --- */
input, textarea, select {
  border: 1.5px solid #f4a259;
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
  margin-bottom: 16px;
  color: var(--color-primary);
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.18s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-secondary);
  outline: none;
}

/* --- FOOTER --- */
footer {
  background: #ffedd5;
  border-top: 2px solid #ffb97c12;
  padding: 36px 0 18px 0;
  box-shadow: 0 -2px 10px #fad48212;
  width: 100%;
}
footer .container {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
footer .logo img {
  height: 38px; width: auto;
}
footer nav {
  display: flex; flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
footer nav a {
  color: #243270;
  font-weight: 500;
  transition: color 0.15s;
}
footer nav a:hover {
  color: #d76d2d;
  text-decoration: underline;
}
footer .contact-info {
  color: #243270;
  font-size: 0.96rem;
  opacity: 0.96;
  margin-top: 10px;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10000;
  background: var(--color-warm2);
  box-shadow: 0 -2px 16px #f4a25933;
  padding: 24px 16px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border-radius: 26px 26px 0 0;
  animation: slideUpCookie 0.85s cubic-bezier(.77,0,.175,1);
}
@keyframes slideUpCookie {
  0% { transform: translateY(120%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  color: var(--color-primary);
  font-size: 1.07rem;
  margin-bottom: 0;
}
.cookie-banner .cookie-btn, .cookie-banner .cookie-settings-btn {
  margin: 0 6px;
  padding: 10px 24px;
  border-radius: 20px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  background: var(--color-secondary);
  color: #fff;
  transition: background 0.16s;
  border: none;
}
.cookie-banner .cookie-btn:hover, .cookie-banner .cookie-btn:focus {
  background: #388d57;
}
.cookie-banner .cookie-reject {
  background: #fffdfa;
  color: #d76d2d;
  border: 1.5px solid #f4a259;
}
.cookie-banner .cookie-reject:hover, .cookie-banner .cookie-reject:focus {
  background: #f4a259;
  color: #fff;
}
.cookie-banner .cookie-settings-btn {
  background: var(--color-warm1);
  color: var(--color-primary);
  border: 1.2px solid #ffd3b2;
}
.cookie-banner .cookie-settings-btn:hover, .cookie-banner .cookie-settings-btn:focus {
  background: #ffd3b2;
  color: #d76d2d;
}

/* --- COOKIE MODAL POPUP --- */
.cookie-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 11000;
  background: rgba(36, 50, 112, 0.32);
  align-items: center;
  justify-content: center;
}
.cookie-modal.open {
  display: flex;
  animation: fadeInModal 0.25s;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cookie-modal-content {
  background: var(--color-warm2);
  border-radius: 23px;
  padding: 36px 28px 28px 28px;
  min-width: 300px;
  max-width: 98vw;
  box-shadow: 0 8px 42px #fad482b1;
  color: #243270;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalBump 0.3s;
}
@keyframes modalBump {
  0% { transform: scale(0.88) translateY(60%); opacity: 0; }
  80% { transform: scale(1.02) translateY(-5%); }
  100% { transform: scale(1.0) translateY(0); opacity: 1; }
}
.cookie-modal-content h3 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.cookie-category label {
  font-weight: 600;
}
.cookie-modal .cookie-btn-bar {
  display: flex;
  gap: 18px;
  margin-top: 11px;
  justify-content: flex-end;
}
.cookie-modal .modal-close-btn {
  align-self: flex-end;
  border: none;
  background: none;
  font-size: 1.6rem;
  color: #243270;
  cursor: pointer;
  border-radius: 14px;
  padding: 2px 10px 2px 2px;
}
.cookie-modal .modal-close-btn:hover, .cookie-modal .modal-close-btn:focus {
  background: #ffe1bc;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}
.toggle-switch input {
  opacity: 0;
  width: 0; height: 0;
}
.toggle-slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ffd3b2;
  border-radius: 24px;
  transition: background 0.19s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--color-secondary);
}
.toggle-slider:before {
  content: "";
  position: absolute;
  height: 16px; width: 16px;
  left: 4px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.19s;
  box-shadow: 0 2px 7px #fad48210;
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(14px);
}

/* --- MISC COMPONENTS --- */
ul li { margin-bottom: 10px; }

/* --- VISUAL ENHANCEMENTS --- */
.card, .feature-grid > div, .testimonial-card, .blog-featured, .community-highlights, .course-categories, .section, .cookie-banner, .cookie-modal-content {
  box-shadow: 0 2px 12px var(--color-shadow);
  border-radius: 22px;
}
img, .logo img { border-radius: 12px; }

/* --- MICRO-INTERACTIONS --- */
.card, .btn-primary, .main-nav a, .feature-grid > div, .testimonial-card {
  transition: transform 0.14s, box-shadow 0.15s, background 0.19s, color 0.21s;
}
.card:hover, .feature-grid > div:hover, .testimonial-card:hover, .blog-featured:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px #fad48253;
}

/* --- RESPONSIVE DESIGN (MOBILE FIRST) --- */
@media (max-width: 1020px) {
  .container { max-width: 94vw; }
  .feature-grid, .course-overview-grid, .testimonial-grid, .support-options-grid, .post-grid {
    gap: 14px;
  }
}
@media (max-width: 900px) {
  .feature-grid > div, .course-overview-grid > div, .support-options-grid > div, .post-grid > div {
    min-width: 150px;
    flex: 1 1 230px;
    font-size: 0.97rem;
    padding: 15px 10px;
  }
  .hero .content-wrapper { max-width: 99vw; padding: 0 5vw; }
}
@media (max-width: 768px) {
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.22rem; }
  .container { max-width: 99vw; padding: 0 11px; }
  header .container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 64px;
  }
  .main-nav { display: none; }
  .mobile-menu-toggle { display: block; }
  .feature-grid, .course-overview-grid, .testimonial-grid, .support-options-grid, .post-grid {
    flex-direction: column;
    gap: 16px;
  }
  .card-container, .content-grid {
    flex-direction: column;
    gap: 14px;
  }
  .section {
    padding: 17px 6px;
    border-radius: 17px;
    margin-bottom: 44px;
  }
  .hero { padding: 24px 0; border-radius: 0 0 20px 20px; }
  .hero .content-wrapper { padding: 0 3vw; }
  footer .container {flex-direction: column;gap:18px;}
  footer nav { flex-direction: column; gap: 9px; }
  .cookie-banner { flex-direction: column; gap: 14px; padding: 15px 7px 22px 7px; border-radius: 16px 16px 0 0; }
  .cookie-modal-content { min-width: 92vw; padding: 24px 12px 21px 12px; }
}
@media (max-width: 510px) {
  .feature-grid > div, .course-overview-grid > div, .support-options-grid > div, .testimonial-grid > div, .post-grid > div {
    padding: 10px 5px;
    min-width: 98px;
    font-size: 0.94rem;
  }
  .section {margin-bottom: 28px;}
  .hero h1 { font-size: 1.22rem; }
  .testimonial-card { flex-direction: column; align-items: flex-start; padding: 14px 8px; }
}

/* --- ACCESSIBILITY: FOCUS STATES --- */
a:focus, .btn-primary:focus, .mobile-menu-toggle:focus, .mobile-menu-close:focus, .cookie-btn:focus, .cookie-settings-btn:focus {
  outline: 2.5px solid #F4A259;
  outline-offset: 2px;
}

/* --- SCROLLBAR STYLE (subtle, modern) --- */
::-webkit-scrollbar { width: 9px; background: #fffdfa; }
::-webkit-scrollbar-thumb {
  background: #ffd3b266;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: #FFD3B2; }
::-webkit-scrollbar-corner { background: #fffdfa; }

/* --- OVERRIDES --- */
.hero .btn-primary, .section .btn-primary {
  margin-top: 22px;
}
/* Hide cookie modal and banner with .hidden */
.hidden { display: none !important; }
