/* RESET & NORMALIZE */
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; margin: 0; padding: 0; }
body, html { width: 100%; min-height: 100%; }
body {
  background: #F8FAFC;
  color: #214052;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.5s;
}

/* CSS VARIABLES FOR COLOR PALETTE */
:root {
  --color-primary: #16425B;
  --color-primary-light: #B9C6D3;
  --color-primary-pastel: #E3EEF7;
  --color-secondary: #B9C6D3;
  --color-accent: #FCD116;
  --color-accent-soft: #FFF6CC;
  --color-bg: #F8FAFC;
  --color-bg-pastel: #F2F6FA;
  --color-white: #FFFFFF;
  --color-border: #EAF0F7;
  --color-shadow: rgba(22,66,91,0.10);
  --color-danger: #E57373;
  --color-success: #77C9B7;
  --color-pastel-blue: #CCDEF3;
  --color-pastel-lilac: #E3DFFD;
  --color-pastel-yellow: #FFF6CC;
  --color-pastel-green: #D6F5E3;
  --color-pastel-pink: #FAE1F8;
}

/* FONT DECLARATIONS (Google Webfonts import outside this CSS) */
h1, h2, h3, h4, h5, h6 { font-family: 'Roboto Slab', Georgia, serif; color: var(--color-primary); font-weight: 700; }
h1 { font-size: 2.5rem; margin-bottom: 20px; letter-spacing: 0.01em; }
h2 { font-size: 2rem; margin-bottom: 16px; }
h3 { font-size: 1.32rem; margin-bottom: 12px; }
h4 { font-size: 1.12rem; margin-bottom: 8px; }
body, p, ul, li, address, table, tr, td, th, em, strong, a, button { font-family: 'Open Sans', Arial, sans-serif; }
p, ul, li, ol, address { font-size: 1rem; }
strong { font-weight: 600; }


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

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

.content-wrapper {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

section {
  background: var(--color-bg-pastel);
  margin-bottom: 60px;
  padding: 40px 20px;
  border-radius: 22px;
  box-shadow: 0 2px 14px 0 var(--color-shadow);
}

/* HERO STYLES */
.hero {
  background: linear-gradient(120deg, var(--color-pastel-blue) 55%, var(--color-pastel-pink) 100%);
  box-shadow: 0 4px 32px 0 var(--color-shadow);
  margin-bottom: 60px;
  border-radius: 24px;
  padding: 56px 0 64px 0;
}
.hero h1 { font-size: 2.5rem; line-height: 1.1; margin-bottom: 18px; color: var(--color-primary); }
.hero p { color: var(--color-primary); margin-bottom: 22px; }
.hero .primary-cta { margin-top: 18px; }

/* FLEXBOX LAYOUTS */
.feature-grid, .market-factors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
  justify-content: space-between;
}
.feature-grid > div, .market-factors-grid > div {
  flex: 1 1 230px;
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 2px 10px var(--color-shadow);
  padding: 28px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-grid > div:hover, .market-factors-grid > div:hover {
  box-shadow: 0 8px 24px var(--color-shadow);
  transform: translateY(-3px) scale(1.025);
}
.feature-grid img, .market-factors-grid img {
  width: 42px; height: 42px;
  margin-bottom: 14px;
  filter: drop-shadow(0 2px 8px var(--color-pastel-blue));
}

.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; border-radius: 15px; }
.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;
  border-radius: 16px;
  background: var(--color-pastel-lilac);
  margin-bottom: 20px;
  box-shadow: 0 2px 8px var(--color-shadow);
  flex-direction: column;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* CTA BUTTONS */
.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-primary);
  background: linear-gradient(90deg, var(--color-accent-soft), #ffeac8 110%);
  border: none;
  border-radius: 100px;
  padding: 14px 38px;
  box-shadow: 0 2px 16px var(--color-shadow);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.18s, transform 0.16s;
  margin: 12px 0 12px 0;
  outline: none;
  text-align: center;
}
.primary-cta:hover, .primary-cta:focus {
  background: linear-gradient(100deg, #FCD116 60%, #FFF6CC 110%);
  color: var(--color-primary);
  box-shadow: 0 6px 24px var(--color-shadow);
  transform: translateY(-2px) scale(1.02);
}

/* HEADER */
header {
  width: 100%;
  background: var(--color-bg);
  position: sticky;
  top: 0; left: 0;
  z-index: 995;
  box-shadow: 0 3px 18px -8px var(--color-shadow);
  border-bottom: 2.5px solid var(--color-primary-light);
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 24px;
  padding: 0 16px;
}
header img { height: 36px; width: auto; }

header nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
}
header nav a {
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 22px;
  background: none;
  color: var(--color-primary);
  transition: color 0.18s, background 0.18s;
  font-family: 'Open Sans', Arial, sans-serif;
}
header nav a:hover, header nav a:focus {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}
.primary-cta {
  margin-left: 18px;
  margin-bottom: 0;
}

/* MOBILE MENU */
.mobile-menu-toggle {
  display: none;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  width: 48px; height: 48px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.18s, color 0.18s;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: var(--color-secondary);
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: linear-gradient(120deg, var(--color-pastel-blue) 60%, var(--color-pastel-pink) 100%);
  z-index: 1999;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  box-shadow: 0 6px 64px 0 var(--color-shadow);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.87,.03,.37,.96);
  overflow-y: auto;
}
.mobile-menu.open {
  display: flex;
  transform: translateX(0%);
}
.mobile-menu-close {
  font-size: 2.2rem;
  background: none;
  color: var(--color-primary);
  border: none;
  margin: 32px 0 8px 26px;
  cursor: pointer;
  align-self: flex-start;
  padding: 0 8px;
  border-radius: 18px;
  transition: background 0.2s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-accent-soft);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 14px 42px 20px 38px;
  width: 100%;
}
.mobile-nav a {
  font-size: 1.2rem;
  color: var(--color-primary);
  padding: 12px 0;
  border-radius: 18px;
  width: 100%;
  background: none;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

@media (max-width: 990px) {
  header .container {
    flex-direction: row;
    gap: 14px;
  }
  header nav { gap: 8px; }
}
@media (max-width: 768px) {
  header .container {
    padding: 0 6px;
    min-height: 62px;
    flex-direction: row;
    gap: 4px;
  }
  header nav {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .primary-cta {
    margin-left: auto;
  }
}

/* MAIN CONTENT STYLES */
main { margin-bottom: 40px; }
ul, ol {
  margin: 0 0 12px 18px;
}
ul li, ol li {
  margin-bottom: 8px;
  font-size: 1rem;
}
ul li strong, ol li strong { color: var(--color-primary); }

/* TABLES, COMPARISONS, INFOGRAPHS */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 24px;
  font-size: 1rem;
  background: var(--color-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--color-shadow);
}
thead {
  background: var(--color-pastel-yellow);
  color: var(--color-primary);
}
th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
th {
  font-size: 1.08rem;
  font-weight: 700;
}
tr:last-child td {
  border-bottom: none;
}
.comparison-table em { color: var(--color-primary); font-style: italic; }
.filter-explanation { margin-top: 6px; font-size: 0.95rem; color: #686f7a; }

.infographic-charts {
  background: var(--color-pastel-blue);
  border-radius: 14px;
  padding: 18px 20px 16px 24px;
  box-shadow: 0 3px 14px var(--color-shadow);
  margin-bottom: 20px;
}
.key-figures-table { margin-top: 18px; }

.article-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 10px;
}
.article-list article {
  flex: 1 1 330px;
  background: var(--color-white);
  box-shadow: 0 2px 10px var(--color-shadow);
  border-radius: 14px;
  padding: 18px 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.analyst-opinion { color: #8271c3; font-size: 0.99rem; font-style: italic; margin-top: 10px; }

/* Footer */
footer {
  width: 100%;
  background: var(--color-pastel-blue);
  border-top: 2px solid var(--color-primary-light);
  padding: 40px 0 30px 0;
}
footer .container {
  flex-direction: column;
  gap: 18px;
}
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
}
.footer-menu a {
  color: var(--color-primary);
  font-size: 0.99rem;
  font-weight: 500;
  padding: 0 7px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.footer-brand img {
  height: 28px; width: auto;
}
.footer-social {
  display: flex;
  gap: 14px;
  align-items: center;
}
footer address {
  font-style: normal;
  font-size: 0.97rem;
  color: #274965;
  margin-bottom: 3px;
}
footer a:hover, footer a:focus {
  color: var(--color-accent);
}

/* TESTIMONIAL CARDS */
.testimonial-card {
  background: var(--color-pastel-green);
  color: #15374E;
  border-radius: 18px;
  box-shadow: 0 4px 18px var(--color-shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 26px;
  margin-bottom: 32px;
  border-left: 8px solid var(--color-accent);
  max-width: 540px;
  font-size: 1.08rem;
}
.testimonial-card strong {
  margin-top: 7px; color: var(--color-primary); font-size:1rem; }
.testimonial-card p { color: #1d3557; margin-bottom: 5px; }

/* ADDRESS AND CONTACT */
address img {
  vertical-align: middle;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  margin-bottom: 2px;
}
address p { margin-bottom: 5px; }

/* SUPPORT TEXT */
.support-text {
  color: #717782;
  font-size: 1rem;
  margin-top: 10px;
  margin-bottom: 0;
}

/* MICRO-INTERACTIONS */
button, .primary-cta, .mobile-menu-toggle {
  transition: background 0.2s, color 0.2s, box-shadow 0.15s, transform 0.13s;
}

/* COOKIE CONSENT BANNER */
.cookie-consent-banner {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  background: var(--color-pastel-yellow);
  color: var(--color-primary);
  box-shadow: 0 -3px 16px var(--color-shadow);
  border-top: 3px solid var(--color-accent);
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  padding: 24px 18px 20px 22px;
  z-index: 13000;
  font-size: 1rem;
  transition: transform 0.35s;
}
.cookie-consent-banner.hide {
  transform: translateY(130%);
}
.cookie-consent-banner .cookie-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.cookie-btn {
  border-radius: 24px;
  padding: 9px 28px;
  border: none;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 0;
  background: var(--color-accent);
  color: var(--color-primary);
  cursor: pointer;
  transition: background 0.16s, color 0.12s, box-shadow 0.11s;
  box-shadow: 0 2px 11px var(--color-shadow);
}
.cookie-btn.accept {
  background: var(--color-success);
  color: var(--color-primary);
}
.cookie-btn.reject {
  background: var(--color-danger);
  color: var(--color-white);
}
.cookie-btn.settings {
  background: var(--color-primary);
  color: var(--color-accent);
}
.cookie-btn:hover, .cookie-btn:focus {
  filter: brightness(1.12);
  box-shadow: 0 5px 16px var(--color-shadow);
}

/* COOKIE MODAL OVERLAY */
.cookie-modal-overlay {
  position: fixed;
  z-index: 13100;
  inset: 0;
  background: rgba(22,66,91,0.17);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  transition: opacity 0.22s;
}
.cookie-modal {
  background: var(--color-white);
  border-radius: 20px;
  padding: 32px 30px 22px 34px;
  width: 90%;
  max-width: 469px;
  box-shadow: 0 8px 40px 0 var(--color-shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  animation: popin 0.26s cubic-bezier(.49,1.23,.62,1.12);
}
@keyframes popin {
  0% { opacity: 0; transform: scale(.9); }
  100% { opacity: 1; transform: scale(1); }
}
.cookie-modal .cookie-modal-close {
  position: absolute;
  top: 18px; right: 22px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--color-danger);
  cursor: pointer;
}
.cookie-modal h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  color: var(--color-primary);
  font-family: 'Roboto Slab', serif;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
  font-size: 1rem;
}
.cookie-modal .toggle {
  width: 38px;
  height: 22px;
  border-radius: 18px;
  background: var(--color-secondary);
  position: relative;
  transition: background 0.15s;
  margin-left: auto;
}
.cookie-modal .toggle[data-enabled="true"] {
  background: var(--color-success);
}
.cookie-modal .toggle-dot {
  width: 18px; height: 18px;
  position: absolute;
  top: 2px; left: 2px;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: 0 1px 5px var(--color-shadow);
  transition: left 0.16s;
}
.cookie-modal .toggle[data-enabled="true"] .toggle-dot {
  left: 18px;
}
.cookie-modal .toggle[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
}
.cookie-modal .modal-actions {
  display: flex; gap: 13px; margin-top: 10px;
}

/* RESPONSIVE STYLES */
@media (max-width: 990px) {
  .feature-grid, .market-factors-grid, .article-list {
    gap: 18px;
  }
  .feature-grid > div, .market-factors-grid > div, .article-list article {
    flex-basis: 48%;
    min-width: 220px;
  }
}
@media (max-width: 768px) {
  .container { padding: 0 4px; }
  .hero { padding: 36px 0 42px 0; }
  section { padding: 26px 6px; }
  main { margin-bottom: 24px; }
  .feature-grid, .market-factors-grid, .article-list {
    flex-direction: column;
    gap: 14px;
  }
  .feature-grid > div, .market-factors-grid > div, .article-list article {
    width: 100%;
    min-width: 0;
    padding: 22px 14px;
  }
  .testimonial-card {
    padding: 15px 12px;
    max-width: 96vw;
  }
  .section { margin-bottom: 36px; }
  .footer-menu { flex-direction: column; gap: 4px; }
  .footer-social { gap: 7px; }
}
@media (max-width: 580px) {
  h1 { font-size: 1.82rem; }
  h2 { font-size: 1.35rem; }
  .hero { padding: 20px 0 30px 0; }
  .primary-cta { padding: 10px 18px; font-size: 1rem; }
  .footer-brand { flex-direction: column; gap:4px; }
  .footer-social { gap:4px; }
}

/* MODAL/OFFSCREEN ACCESSIBILITY */
body.mobile-menu-open { overflow-y: hidden; }
body.cookie-modal-open { overflow-y: hidden; }

/* ACCESSIBLE FOCUS */
a:focus, button:focus, .primary-cta:focus, .cookie-btn:focus, .mobile-menu-toggle:focus {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 2.5px;
}

/* CUSTOM SCROLLBAR FOR MODAL/MENU */
.mobile-menu, .cookie-modal {-webkit-overflow-scrolling: touch; }
.mobile-menu::-webkit-scrollbar, .cookie-modal::-webkit-scrollbar { width: 7px; background: var(--color-secondary); }
.mobile-menu::-webkit-scrollbar-thumb, .cookie-modal::-webkit-scrollbar-thumb { background: var(--color-primary-light); border-radius: 6px; }

/* Z-INDEX LAYERING */
header { z-index: 999; }
footer { z-index: 0; }
.mobile-menu { z-index: 1999; }
.cookie-consent-banner { z-index: 13000; }
.cookie-modal-overlay { z-index: 13100; }

/* PRINT STYLES */
@media print {
  header, footer, .mobile-menu, .cookie-consent-banner, .cookie-modal-overlay { display: none !important; }
  section, .container { box-shadow: none !important; background: transparent !important; }
}
