/* === 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%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
  color: #162033;
  background: #FFFFFF;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: inherit; }

img, svg { display: inline-block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
button { cursor: pointer; font-family: inherit; font-size: 16px; border: none; background: none; outline: none; }
ul, ol { margin-left: 1.5em; }

/* === BRAND & TYPOGRAPHY === */
:root {
  --color-primary: #17426E;
  --color-secondary: #F3F6FA;
  --color-accent: #FFD240;
  --color-bg: #fff;
  --color-card-bg: #FAFBFC;
  --color-border: #DEE5EE;
  --color-muted: #526074;
  --shadow-sm: 0 2px 8px rgba(23,66,110,0.08);
  --shadow-md: 0 4px 16px rgba(23,66,110,0.12);
  --radius: 10px;
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: #162033;
  margin-bottom: 12px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
h1 { font-size: 2.25rem; margin-bottom: 24px; }
h2 { font-size: 1.5rem; margin-top: 32px; margin-bottom: 16px; font-weight: 700; }
h3 { font-size: 1.15rem; margin-top: 18px; margin-bottom: 8px; font-weight: 700; }
h4, h5, h6 { font-size: 1rem; font-weight: 600; }

p, li, blockquote, label, select { font-family: var(--font-body); color: #162033; font-size: 1rem; }
p { margin-bottom: 18px; }
strong { font-weight: 700; }
blockquote {
  font-style: italic;
  font-size: 1.08rem;
  color: #273449;
  background: #F8FAFC;
  border-left: 4px solid var(--color-primary);
  padding: 12px 18px 12px 24px;
  margin-bottom: 12px;
}

ul, ol {
  padding-left: 24px;
  margin-bottom: 18px;
}
ul li, ol li {
  margin-bottom: 8px;
}

/* Utility typography for tags, details, meta */
.category-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.category-tags li {
  background: var(--color-secondary);
  color: var(--color-primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* === LAYOUT & SPACING === */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 0px;
}
.section, section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
}
.content-wrapper {
  margin: 0 auto;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: none;
}
.hero { gap: 28px; }

.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: flex-start;
  margin-top: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--color-card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px 20px 26px;
  min-width: 240px;
  flex: 1 1 220px;
  transition: box-shadow 0.22s;
}
.feature-item img { width: 36px; height: 36px; margin-bottom: 8px; }
.feature-item:hover { box-shadow: var(--shadow-md); }

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  padding: 24px 28px;
  position: relative;
  flex: 1 1 280px;
  transition: box-shadow 0.21s;
}
.card:hover { box-shadow: var(--shadow-md); }

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.bestseller-list {
  margin-top: 6px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.newsletter-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--color-secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 38px 32px;
}

.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 32px 18px 32px;
  border-radius: var(--radius);
  background: #FFF;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}
.testimonial-card blockquote {
  border-left: 4px solid var(--color-primary);
  background: transparent;
  color: #162033;
  margin: 0;
  padding: 4px 14px 2px 20px;
  font-size: 1.02rem;
}
.testimonial-author {
  font-family: var(--font-body);
  font-size: 0.99rem;
  color: var(--color-muted);
  padding-left: 8px;
}

/* --- Buttons CTA --- */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 12px 28px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 30px;
  border: none;
  background: none;
  outline: none;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.22s, color 0.20s, box-shadow 0.18s, border 0.18s;
  margin-right: 16px;
}
.cta.primary,
.cta.primary:visited {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(23,66,110,0.11);
  border: 1.5px solid var(--color-primary);
}
.cta.primary:hover, .cta.primary:focus {
  background: #285a8a;
  color: #fff;
  box-shadow: 0 4px 24px rgba(23,66,110,0.17);
}
.cta.secondary {
  background: var(--color-accent);
  color: #262D38;
  border: 1.5px solid #FFDC5C;
  box-shadow: 0 2px 8px rgba(255,210,64,0.09);
}
.cta.secondary:hover, .cta.secondary:focus {
  background: #ffdc5c;
  color: #161b23;
  box-shadow: 0 4px 18px rgba(255,210,64,0.15);
}
.cta:active { filter: brightness(0.94); }

/* === NAVIGATION === */
header {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(23,66,110,0.07);
  position: relative;
  z-index: 20;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 22px 18px 20px 18px;
  gap: 0;
}
.logo img { height: 40px; width: auto; display: block; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.main-nav a {
  font-family: var(--font-display);
  color: #273449;
  font-size: 1rem;
  padding: 4px 6px;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.17s, color 0.19s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}

/* Only show CTA on large if not already inside nav (handled by HTML order) */
header .cta { margin-left: 26px; }

/* === FOOTER === */
footer {
  background: var(--color-secondary);
  border-top: 1px solid var(--color-border);
  padding: 42px 0 16px 0;
}
footer .container {
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 8px;
}
.footer-nav a {
  color: var(--color-muted);
  font-size: 0.99rem;
  font-weight: 500;
  border-radius: 4px;
  padding: 3px 7px;
  transition: color 0.18s, background 0.15s;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--color-primary);
  background: #e8eff9;
}
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 0.98rem;
  color: var(--color-muted);
  margin-bottom: 8px;
  align-items: center;
}
.footer-contact img { width: 16px; height: 16px; vertical-align: middle; margin-right: 7px; }
footer p {
  color: #7E8A99;
  font-size: 0.91rem;
  margin-top: 12px;
}

/* === MOBILE MENU === */
.mobile-menu-toggle {
  display: none;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: #fff;
  z-index: 200;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  box-shadow: 0 6px 24px rgba(23,66,110,0.19);
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.36s cubic-bezier(0.86,0,0.07,1), opacity 0.23s;
}
.mobile-menu.open {
  display: flex;
  transform: translateX(0);
  opacity: 1;
}
.mobile-menu-close {
  color: #162033;
  background: none;
  font-size: 2.2rem;
  font-weight: bold;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 250;
  padding: 4px 8px;
  border-radius: 50%;
  box-shadow: none;
  transition: background 0.17s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus { background: var(--color-secondary); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  margin-top: 80px;
  align-items: flex-start;
  padding-left: 40px;
}
.mobile-nav a {
  font-size: 1.2rem;
  padding: 10px 0;
  color: #162033;
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.16s, color 0.18s;
  min-width: 180px;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--color-primary);
  background: var(--color-secondary);
}

@media (max-width: 1023px) {
  .main-nav { display: none !important; }
  .cta.primary { display: none !important; }
  .mobile-menu-toggle {
    display: block;
    position: absolute;
    top: 26px;
    right: 26px;
    z-index: 120;
    font-size: 2rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 7px;
    width: 48px;
    height: 48px;
    justify-content: center;
    align-items: center;
    border: none;
    box-shadow: 0 4px 18px rgba(23,66,110,0.12);
    display: flex;
    transition: background 0.20s;
  }
  .mobile-menu-toggle:active,
  .mobile-menu-toggle:hover { background: #285a8a; }
}

/* === RESPONSIVE === *//* Mobile-first */
@media (max-width: 1200px) {
  .container {
    max-width: 98vw;
  }
}
@media (max-width: 990px) {
  .feature-grid, .card-container, .content-grid, .footer-contact {
    gap: 14px;
  }
  .footer-contact {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}
@media (max-width: 768px) {
  .container {
    padding: 0 11px;
  }
  .section, section {
    padding: 26px 4px;
    margin-bottom: 36px;
  }
  .content-wrapper, .hero, .newsletter-section {
    padding: 0;
    max-width: 100vw;
  }
  .feature-grid {
    flex-direction: column;
    gap: 20px;
  }
  .card-container, .content-grid {
    flex-direction: column;
    gap: 16px;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 17px 10px;
  }
  .newsletter-section {
    padding: 22px 7px;
    border-radius: 8px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  h1 { font-size: 1.48rem; }
  h2 { font-size: 1.13rem; }
}
@media (max-width: 480px) {
  h1 { font-size: 1.12rem; }
  h2 { font-size: 0.99rem; }
}

/* === TABLES === */
table { border-collapse: collapse; margin-bottom: 22px; width: 100%; font-size: 1rem; }
th, td { padding: 10px 12px; border: 1px solid var(--color-border); text-align: left; }
th { background: var(--color-secondary); font-family: var(--font-display); }

/* === FORMS === */
label, select, input, textarea {
  display: block;
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 12px;
}
input, textarea, select {
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: 7px;
  padding: 9px 14px;
  outline: none;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(23,66,110,0.04);
  color: #162033;
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
}

/* === MISC & UTILS === */
.text-section ul { margin-bottom: 16px; }
.text-section ul li,
.text-section ol li {
  margin-bottom: 6px;
}
.text-section h2, .text-section h3 { margin-top: 24px; }

ol { list-style-type: decimal; }
blockquote { margin-left: 0; }

/* === Cookie Consent Banner === */
.cookie-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1.5px solid var(--color-border);
  box-shadow: 0 -6px 18px rgba(23,66,110,0.09);
  padding: 24px 18px 20px 18px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-size: 1rem;
  transition: transform 0.33s, opacity 0.17s;
}
.cookie-consent-banner.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(100px);
}
.cookie-consent-banner .banner-buttons {
  display: flex;
  gap: 14px;
}
.cookie-consent-banner .btn {
  padding: 10px 26px;
  border-radius: 24px;
  font-family: var(--font-display);
  font-size: 1rem;
  border: none;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-weight: 600;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(23,66,110,0.09);
}
.cookie-consent-banner .btn.accept {
  background: var(--color-primary);
  color: #fff;
}
.cookie-consent-banner .btn.accept:hover {
  background: #285a8a;
}
.cookie-consent-banner .btn.reject {
  background: #EAF1F8;
  color: #162033;
}
.cookie-consent-banner .btn.reject:hover {
  background: #DFE5ED;
}
.cookie-consent-banner .btn.settings {
  background: var(--color-accent);
  color: #212237;
}
.cookie-consent-banner .btn.settings:hover {
  background: #ffe487;
}

/* Cookie Modal Preferences */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22,32,51,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3010;
  pointer-events: all;
  opacity: 1;
  transition: opacity 0.22s;
}
.cookie-modal-overlay.hide { opacity: 0; pointer-events: none; }
.cookie-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(23,66,110,0.16);
  padding: 34px 24px 28px 24px;
  width: 96vw; max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 3020;
}
.cookie-modal h2 { font-size: 1.18rem; margin-top: 0; }
.cookie-modal .close-modal-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 1.7rem;
  cursor: pointer;
  background: transparent;
  color: #162033;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.13s;
}
.cookie-modal .close-modal-btn:hover { background: var(--color-secondary); }
.cookie-category {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  font-size: 1rem;
}
.cookie-category input[type="checkbox"], .cookie-category input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--color-primary);
}
.cookie-modal .modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-direction: row;
  justify-content: flex-end;
}
@media (max-width: 480px) {
  .cookie-modal { padding: 18px 6px 12px 6px; max-width: 95vw; }
  .cookie-modal h2 { font-size: 1rem; }
}

/* === ANIMATIONS / MICRO-INTERACTIONS === */
a, .cta, .btn, .main-nav a, .mobile-nav a, .cookie-consent-banner .btn {
  transition: background 0.22s, color 0.22s, box-shadow 0.22s, border 0.20s;
}
.card, .feature-item, .testimonial-card {
  transition: box-shadow 0.21s, transform 0.13s;
}
.card:hover, .feature-item:hover, .testimonial-card:hover {
  transform: translateY(-2px) scale(1.012);
  box-shadow: 0 5px 26px rgba(23,66,110,0.13);
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; background: #F6F7FA; }
::-webkit-scrollbar-thumb { background: #dbe2eb; border-radius: 7px; }

/* === ACCESSIBILITY === */
a:focus-visible, button:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* === SPECIAL: Ensures min 20px space between cards/sections === */
.section, section, .testimonial-card, .card, .feature-item, .newsletter-section {
  margin-bottom: 20px;
}

/* === Misc. --- Hide/show desktop/mobile as needed === */
@media (min-width: 1024px) {
  .mobile-menu, .mobile-menu-toggle { display: none !important; }
  .main-nav, header .cta.primary { display: flex !important; }
}
