/* --- 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,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  vertical-align: baseline;
  box-sizing: border-box;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  line-height: 1.6;
  background: #F7F9FB;
  color: #183153;
  font-family: 'Roboto', Arial, sans-serif;
  min-height: 100vh;
  font-size: 16px;
}
img {
  max-width: 100%;
  display: block;
}
input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
}
ul, ol {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}

/* --- FONT IMPORTS --- */
@import url('https://fonts.googleapis.com/css?family=Montserrat:700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap');

/* --- COLOR VARIABLES --- */
:root {
  --brand-primary: #183153;
  --brand-secondary: #F5B041;
  --brand-accent: #E6ECF3;
  --brand-background: #F7F9FB;
  --brand-white: #fff;
  --brand-black: #141d24;
  --text-main: #183153;
  --text-darker: #111824;
  --text-muted: #6d7893;
  --border-default: #E6ECF3;
  --card-shadow: rgba(24, 49, 83, 0.07);
  --shadow-hover: rgba(24, 49, 83, 0.13);
}

/* =========================
    TYPOGRAPHY
=========================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: 0.01em;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}
h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}
h4 {
  font-size: 1.125rem;
  margin-bottom: 12px;
}
p, ul, ol, li, span, a, label {
  font-family: 'Roboto', Arial, sans-serif;
  font-weight: 400;
  color: var(--text-main);
  font-size: 1rem;
}
p {
  margin-bottom: 16px;
  line-height: 1.6;
}
strong {
  font-weight: 700;
}

/* == LINKS == */
a {
  transition: color 0.2s;
  color: var(--brand-primary);
}
a:hover, a:focus {
  color: var(--brand-secondary);
  text-decoration: underline;
}

/* ===============
     LAYOUT
================= */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--brand-white);
  border-radius: 18px;
  box-shadow: 0 2px 8px 0 var(--card-shadow);
}
@media (max-width: 768px) {
  .section {
    padding: 24px 10px;
    margin-bottom: 32px;
  }
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0 -12px;
}

.card {
  margin-bottom: 20px;
  position: relative;
  padding: 24px 20px;
  background: var(--brand-white);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: 0 2px 8px 0 var(--card-shadow);
  transition: box-shadow 0.2s, transform 0.15s;
  min-width: 260px;
}
.card:hover, .card:focus-within {
  box-shadow: 0 4px 24px 0 var(--shadow-hover);
  transform: translateY(-3px);
}

.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;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* FEATURE GRID (for / cards) */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 10px;
}
.feature-grid > div {
  background: var(--brand-accent);
  border-radius: 13px;
  box-shadow: 0 2px 8px 0 var(--card-shadow);
  padding: 24px 18px 22px 18px;
  flex: 1 1 230px;
  min-width: 220px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  transition: box-shadow 0.2s, background-color 0.14s;
}
.feature-grid > div:hover {
  background: #f8dca9;
  box-shadow: 0 4px 22px 0 var(--shadow-hover);
}
.feature-grid img {
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
}

/* TESTIMONIALS */
.testimonial-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
  margin-bottom: 12px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 24px;
  background: var(--brand-accent);
  border-radius: 14px;
  box-shadow: 0 2px 8px 0 var(--card-shadow);
  min-width: 210px;
  max-width: 330px;
  color: var(--brand-primary);
  font-size: 1rem;
  transition: box-shadow 0.2s, background 0.16s;
  border: 1px solid var(--border-default);
}
.testimonial-card p {
  color: var(--text-darker);
  font-size: 1.04rem;
  margin-bottom: 6px;
}
.testimonial-card .rating {
  color: #EBB200;
  letter-spacing: 1.5px;
  font-size: 1.12rem;
}
.testimonial-card:hover, .testimonial-card:focus-within {
  background: #f6faff;
  box-shadow: 0 4px 22px 0 var(--shadow-hover);
}

/* ========== BUTTONS / CTA ========== */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 32px;
  padding: 12px 32px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: bold;
  font-size: 1.15rem;
  cursor: pointer;
  border: none;
  outline: none;
  box-shadow: 0 2px 8px 0 var(--card-shadow);
  transition: box-shadow 0.18s, background 0.18s, color 0.18s, transform 0.14s;
  margin: 8px 0 0 0;
}
.cta.primary {
  background: var(--brand-primary);
  color: var(--brand-white);
}
.cta.primary:hover, .cta.primary:focus {
  background: #234472;
  box-shadow: 0 4px 18px 0 var(--shadow-hover);
  color: var(--brand-secondary);
}
.cta.secondary {
  background: var(--brand-secondary);
  color: var(--brand-primary);
}
.cta.secondary:hover, .cta.secondary:focus {
  background: #fff3e3;
  color: var(--brand-primary);
  box-shadow: 0 4px 18px 0 var(--shadow-hover);
}

button.cta {
  border: none;
}
button.cta:focus {
  outline: 2px solid var(--brand-primary);
}

/* ================== HEADER / NAVIGATION ================= */
header {
  background: var(--brand-white);
  box-shadow: 0 2px 10px 0 var(--card-shadow);
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 5px;
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0 10px 0;
}
.main-nav > a img {
  width: 140px;
  height: auto;
}
.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.main-nav li {
  padding: 0 0 0 0;
}
.main-nav li a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
  color: var(--brand-primary);
  font-size: 1.06rem;
  padding: 4px 13px;
  border-radius: 22px;
  transition: background 0.15s, color 0.13s;
}
.main-nav li a:hover, .main-nav li a:focus {
  background: var(--brand-accent);
  color: var(--brand-secondary);
}

header .cta.primary {
  margin-left: 16px;
}
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--brand-primary);
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 120;
  transition: background 0.18s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--brand-accent);
  color: var(--brand-secondary);
  outline: none;
}

@media (max-width: 1024px) {
  .main-nav ul {
    gap: 10px;
  }
}
@media (max-width: 900px) {
  .main-nav ul {
    gap: 5px;
    font-size: 0.97rem;
  }
  .main-nav > a img {
    width: 110px;
  }
}
@media (max-width: 900px) {
  .main-nav {
    padding: 14px 0 8px 0;
  }
}
@media (max-width: 768px) {
  .main-nav ul {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .main-nav {
    gap: 5px;
  }
  header .cta.primary {
    display: none;
  }
}

/* ================ MOBILE MENU =============== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  background: var(--brand-white);
  box-shadow: -6px 0 40px 0 rgba(24,49,83,.10);
  z-index: 300;
  transform: translateX(105%);
  transition: transform 0.34s cubic-bezier(.5,0,.45,1);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  margin: 26px 26px 18px 0;
  background: none;
  border: none;
  font-size: 2.35rem;
  color: var(--brand-primary);
  vertical-align: middle;
  border-radius: 8px;
  padding: 4px 14px;
  cursor: pointer;
  align-self: flex-end;
  transition: background 0.16s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--brand-accent);
  color: var(--brand-secondary);
  outline: none;
}
.mobile-nav {
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0;
  padding: 0 0 0 30px;
}
.mobile-nav a {
  display: flex;
  align-items: center;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.24rem;
  color: var(--brand-primary);
  padding: 14px 8px 14px 5px;
  width: 90vw;
  min-height: 38px;
  border-bottom: 1px solid var(--brand-accent);
  transition: color 0.14s, background 0.15s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--brand-accent);
  color: var(--brand-secondary);
  outline: none;
}
@media (min-width: 769px) {
  .mobile-menu {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: none !important;
  }
}

/* ===== MAIN ===== */
main {
  margin-top: 12px;
  margin-bottom: 32px;
}
section {
  margin-bottom: 60px;
}
@media (max-width: 768px) {
  main {
    margin-bottom: 20px;
  }
  section {
    margin-bottom: 32px;
  }
}

/* =================== FOOTER =================== */
footer {
  background: var(--brand-accent);
  border-top: 1px solid var(--border-default);
  padding: 30px 0 16px 0;
  color: var(--text-main);
  width: 100%;
}
footer .container {
  padding-bottom: 0;
}
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-branding img {
  width: 90px;
  margin-bottom: 16px;
}
.footer-contact {
  flex: 1 1 210px;
}
.footer-contact h3 {
  margin-bottom: 10px;
  font-size: 1.11rem;
}
.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
}
.footer-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}
.footer-contact img {
  width: 18px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 14px;
  font-size: 1rem;
  opacity: .8;
}
.footer-links a {
  color: var(--brand-primary);
  text-decoration: underline;
  transition: color 0.17s;
}
.footer-links a:hover {
  color: var(--brand-secondary);
  text-decoration: underline;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
}
.footer-social a img {
  width: 28px;
  opacity: 0.95;
  transition: opacity 0.14s;
}
.footer-social a:hover img, .footer-social a:focus img {
  opacity: 1;
}
@media (max-width: 900px) {
  footer .content-wrapper {
    flex-direction: column;
    gap: 26px;
    align-items: flex-start;
  }
  .footer-contact {
    margin-top: 12px;
  }
}

/* ======================= UTILS & MICRO-INTERACTIONS ==================== */
.community-highlight {
  background: #fff8ea;
  color: var(--brand-secondary);
  padding: 8px 20px;
  border-radius: 16px;
  font-weight: 500;
  font-family: "Montserrat", Arial, sans-serif;
  margin-bottom: 12px;
  font-size: 1.09rem;
  letter-spacing: 0.02em;
  display: inline-block;
}

/* ======================== COOKIE CONSENT BANNER ============================ */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  min-height: 72px;
  background: var(--brand-accent);
  color: var(--brand-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 500;
  gap: 10px;
  box-shadow: 0 -3px 18px 0 rgba(24,49,83,0.07);
  padding: 13px 20px 16px 20px;
  animation: slideInUp 0.33s cubic-bezier(.6,0,.48,1);
}
.cookie-banner p {
  font-size: 1rem;
  margin-bottom: 0;
  color: var(--brand-primary);
}
.cookie-banner .cookie-buttons {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.cookie-banner button {
  border-radius: 32px;
  border: 1.2px solid var(--brand-primary);
  padding: 8px 26px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.13rem;
  background: var(--brand-white);
  color: var(--brand-primary);
  box-shadow: 0 2px 8px 0 var(--card-shadow);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.17s, color 0.13s, border 0.13s;
}
.cookie-banner button.accept {
  background: var(--brand-primary);
  color: var(--brand-white);
  border-color: var(--brand-primary);
}
.cookie-banner button.accept:hover, .cookie-banner button.accept:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-color: var(--brand-secondary);
}
.cookie-banner button.reject {
  background: var(--brand-white);
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.cookie-banner button.reject:hover, .cookie-banner button.reject:focus {
  background: #ffeede;
  color: var(--brand-primary);
}
.cookie-banner button.settings {
  background: var(--brand-accent);
  color: var(--brand-primary);
  border-color: var(--brand-accent);
}
.cookie-banner button.settings:hover, .cookie-banner button.settings:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
}
@keyframes slideInUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* == COOKIE PREFERENCES MODAL == */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(27,40,63,0.34);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.28s cubic-bezier(.5,0,.45,1);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal {
  background: var(--brand-white);
  border-radius: 22px;
  box-shadow: 0 8px 34px 0 var(--shadow-hover);
  padding: 38px 26px 28px 26px;
  max-width: 420px;
  width: 92vw;
  color: var(--brand-primary);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  animation: modalPopIn 0.27s cubic-bezier(.46,0,.55,1);
}
@keyframes modalPopIn {
  from { transform: scale(0.93); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}
.cookie-modal h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.cookie-modal .cookie-category label {
  font-weight: 500;
  font-size: 1.06rem;
}
.cookie-modal .switch {
  position: relative;
  width: 40px;
  height: 23px;
  display: inline-block;
}
.cookie-modal .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-modal .slider {
  position: absolute;
  cursor: pointer;
  background: #dbe4ee;
  border-radius: 16px;
  top: 0; left: 0;
  right: 0; bottom: 0;
  transition: .3s;
}
.cookie-modal .slider:before {
  position: absolute;
  content: "";
  left: 4px; top: 4px;
  width: 15px; height: 15px;
  background: var(--brand-primary);
  border-radius: 50%;
  transition: .3s;
}
.cookie-modal .switch input:checked + .slider {
  background: var(--brand-secondary);
}
.cookie-modal .switch input:checked + .slider:before {
  transform: translateX(16px);
  background: var(--brand-primary);
}
.cookie-modal .cookie-buttons {
  margin-top: 24px;
  align-self: flex-end;
  gap: 15px;
}
.cookie-modal .close-modal {
  position: absolute;
  top: 19px;
  right: 17px;
  background: none;
  border: none;
  font-size: 1.65rem;
  color: var(--brand-primary);
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.cookie-modal .close-modal:hover, .cookie-modal .close-modal:focus {
  background: var(--brand-accent);
  color: var(--brand-secondary);
  outline: none;
}

/* ================ RESPONSIVE ================ */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.45rem; }
  .feature-grid > div { font-size: .98rem; }
  .card, .testimonial-card { min-width: 0; width: 100%; }
  .container { padding: 0 7px; }
  .cookie-modal { padding: 18px 5vw 18px 5vw; }
}

/* Spacing between sections and cards */
section, .section {
  margin-bottom: 60px;
  padding-bottom: 0;
}
@media (max-width: 768px){
  section, .section {
    margin-bottom: 32px;
    padding-bottom: 0;
  }
}

/* Utility Flex Layouts according to spec */
.card-container,
.content-grid,
.feature-grid,
.testimonial-list {
  gap: 24px;
}
.card,
.feature-grid > div,
.testimonial-card {
  margin-bottom: 20px;
}
.text-image-section {
  gap: 30px;
}

/* Specific alignment for homepage teaser */
@media (min-width: 900px) {
  .feature-grid {
    justify-content: flex-start;
  }
}

/* === Accessibility: Focus states === */
a:focus, button:focus, .cta:focus {
  outline: 2px solid var(--brand-secondary);
  outline-offset: 2px;
}

/* ================= ANIMATIONS & HOVER ================== */
.card, .feature-grid > div, .testimonial-card, .cta, .cookie-banner, .mobile-menu, .mobile-menu-toggle {
  will-change: transform, box-shadow, background, color, opacity;
}

@media (hover: hover) {
  .card:hover, .feature-grid > div:hover, .testimonial-card:hover {
    box-shadow: 0 6px 32px 0 var(--shadow-hover);
    transform: translateY(-4px) scale(1.014);
    background: #f6faff;
  }
  .cta:hover, .cta:focus {
    transform: scale(1.04);
  }
}

/* =========================
  Misc
========================== */
::-webkit-scrollbar {
  width: 9px;
  background: #E6ECF3;
}
::-webkit-scrollbar-thumb {
  background: #d4dbe2;
  border-radius: 6px;
}

/* Ensure icons/ul lists align well */
ul, ol {
  list-style: none;
  padding-left: 0;
  margin-bottom: 12px;
  font-size: 1rem;
}
ul > li, ol > li {
  margin-bottom: 8px;
}

/* FAQ, Legal, Policy Pages: content sections */
.container > .content-wrapper > h1, .container > .content-wrapper > h2 {
  margin-top: 8px;
}

/* Images in content */
.content-wrapper img {
  margin-bottom: 8px;
}

/* Hidden utility class */
.d-none { display: none !important; }

/* ======================== END ========================== */
