/* ================================================================
   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;
}
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}
body {
  background: #F7F9FA;
  min-height: 100vh;
  font-family: 'Georgia', 'Times New Roman', Times, serif;
  font-size: 16px;
  color: #252526;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
*, *::before, *::after {
  box-sizing: inherit;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}
a {
  color: #204080;
  text-decoration: none;
  transition: color 0.20s ease;
}
a:hover, a:focus {
  color: #F4A825;
  text-decoration: underline;
}
ul, ol {
  margin-left: 24px;
  margin-bottom: 16px;
}
li {
  margin-bottom: 12px;
  line-height: 1.7;
}
strong {
  font-weight: 600;
}

/* =============== Typography =============== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Georgia', serif;
  color: #1A2233;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
  line-height: 1.2;
}
h1 {
  font-size: 32px;
  margin-bottom: 20px;
}
h2 {
  font-size: 24px;
  margin-bottom: 18px;
}
h3 {
  font-size: 20px;
  margin-bottom: 14px;
}
h4 {
  font-size: 18px;
  margin-bottom: 10px;
}
h5, h6 {
  font-size: 16px;
}
@media (min-width: 600px) {
  h1 {
    font-size: 40px;
  }
  h2 {
    font-size: 28px;
  }
}
p {
  margin-bottom: 16px;
  font-family: 'Georgia', 'Times New Roman', Times, serif;
}
.text-section {
  font-size: 16px;
  color: #26282C;
  max-width: 650px;
}

/* =============== Container & Sections =============== */
.container {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.content-wrapper {
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(32, 40, 80, 0.06);
}
@media (max-width: 768px) {
  .section {
    margin-bottom: 40px;
    padding: 24px 8px;
    border-radius: 10px;
  }
}

/* =============== Header & Navigation =============== */
header {
  background: #fff;
  border-bottom: 1.5px solid #e0e4ed;
  box-shadow: 0 2px 8px rgba(32,64,128,0.04);
  position: sticky;
  top: 0;
  z-index: 120;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding-top: 0;
  padding-bottom: 0;
}
header img[alt="JämförTrading"] {
  height: 46px;
  width: auto;
  margin-right: 24px;
}
.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.main-nav a {
  font-family: 'Montserrat', serif;
  font-size: 16px;
  font-weight: 500;
  color: #1A2233;
  letter-spacing: 0.02em;
  padding: 5px 3px;
  border-bottom: 2.5px solid transparent;
  transition: color 0.2s, border-bottom 0.18s;
}
.main-nav a:hover,
.main-nav a:focus {
  color: #204080;
  border-bottom: 2.5px solid #F4A825;
  background: none;
}
.mobile-menu-toggle {
  display: none;
  background: none; border: none;
  color: #204080;
  font-size: 2.25rem;
  cursor: pointer;
  line-height: 1;
  margin-left: 24px;
}
@media (max-width: 1024px) {
  .main-nav {
    gap: 14px;
  }
}
@media (max-width: 900px) {
  header .container {
    height: 60px;
  }
  .main-nav {
    gap: 8px;
  }
}
@media (max-width: 800px) {
  .main-nav {
    gap: 8px;
  }
}
@media (max-width: 768px) {
  .main-nav {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: inline-block;
  }
}

/* =============== Mobile Menu =============== */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 92vw;
  max-width: 400px;
  background: #fff;
  box-shadow: 2px 0 24px rgba(32,64,128,0.08);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.215,.61,.355,1);
  border-right: 5px solid #204080;
  display: flex;
  flex-direction: column;
  padding-top: 0;
  padding-bottom: 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  margin: 24px 0 12px 24px;
  padding: 0;
  background: none;
  border: none;
  color: #204080;
  font-size: 2rem;
  font-weight: bold;
  align-self: flex-start;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.2s;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  color: #F4A825;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 20px;
}
.mobile-nav a {
  display: block;
  padding: 12px 0 10px 0;
  color: #1A2233;
  font-size: 18px;
  font-family: 'Montserrat', serif;
  font-weight: 500;
  border-bottom: 1px solid #edeef1;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav a:focus,
.mobile-nav a:hover {
  color: #204080;
  background: #F7F9FA;
}
@media (min-width: 769px) {
  .mobile-menu {
    display: none !important;
  }
}

/* =============== Section & Card Patterns =============== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  margin-bottom: 20px;
  position: relative;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(32,64,128,0.07);
  padding: 24px 20px;
  min-width: 250px;
  flex: 1 1 300px;
  transition: box-shadow 0.20s, transform 0.20s;
}
.card:hover {
  box-shadow: 0 5px 18px rgba(32,64,128,0.11);
  transform: translateY(-4px) scale(1.016);
  z-index: 2;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .content-grid,
  .text-image-section,
  .card-container {
    flex-direction: column;
    gap: 18px;
  }
}

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

/* =============== Testimonial Cards =============== */
.testimonial-card {
  background: #F7F9FA;
  color: #2E3442;
  display: flex;
  align-items: center;
  gap: 20px;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgba(40, 56, 100, 0.07);
  padding: 20px;
  margin-bottom: 20px;
  flex: 1 1 300px;
  position: relative;
  transition: box-shadow 0.18s, background 0.18s;
}
.testimonial-card:hover {
  box-shadow: 0 5px 20px rgba(32,64,128,0.14);
  background: #fffde9;
}
.testimonial-card p {
  color: #1F2432;
  font-size: 17px;
  font-style: italic;
  font-family: 'Georgia', serif;
  margin-right: 15px;
}
.testimonial-card span {
  font-size: 14px;
  color: #204080;
  font-family: 'Montserrat', serif;
  letter-spacing: 0.01em;
  margin-right: 10px;
}
.testimonial-card img {
  height: 21px;
  margin-right: 2px;
}

/* =============== Buttons & Calls To Action =============== */
.cta, .primary, button, .button {
  display: inline-block;
  background: #204080;
  color: #fff;
  font-family: 'Montserrat', serif;
  font-size: 18px;
  font-weight: 600;
  padding: 13px 32px;
  border: none;
  border-radius: 32px;
  box-shadow: 0 1px 6px rgba(40, 60, 120, 0.06);
  cursor: pointer;
  margin-top: 8px;
  margin-bottom: 8px;
  transition: background 0.18s, color 0.15s, box-shadow 0.22s, transform 0.13s;
  text-transform: none;
  letter-spacing: 0.01em;
}
.cta.primary {
  background: #204080;
  color: #fff;
}
.cta.primary:hover, .cta.primary:focus {
  background: #F4A825;
  color: #204080;
  box-shadow: 0 2px 14px rgba(244, 168, 37, .13);
}
.cta.secondary {
  background: #F7F9FA;
  color: #204080;
  border: 2px solid #204080;
}
.cta.secondary:hover, .cta.secondary:focus {
  background: #204080;
  color: #fff;
}
.button, button {
  background: #F4A825;
  color: #204080;
  border: none;
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
}
.button:hover, button:hover, .button:focus, button:focus {
  background: #204080;
  color: #fff;
}

/* =============== Badges, Progress Bar, Visual Accents =============== */
.badge {
  display: inline-block;
  background: #F4A825;
  color: #1A2233;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 7px;
  line-height: 1.2;
  margin-left: 10px;
  letter-spacing: 0.03em;
}
.progress-bar {
  width: 100%;
  background: #e0e6f2;
  border-radius: 7px;
  height: 18px;
  overflow: hidden;
  margin-top: 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
}
.progress-bar span {
  display: block;
  background: #204080;
  color: #fff;
  padding: 0 10px;
  height: 18px;
  line-height: 18px;
  border-radius: 7px;
  font-size: 15px;
}

/* =============== Comparison Table (jamfor-maklare) =============== */
.comparison-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.table-row {
  display: flex;
  flex-wrap: wrap;
  background: #F7F9FA;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(32,64,128,0.03);
  padding: 14px 18px;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  color: #1A2233;
  min-width: 260px;
  gap: 12px;
  transition: box-shadow 0.16s;
}
.table-row:hover {
  box-shadow: 0 2px 8px rgba(32,64,128,0.10);
  background: #fff;
}
.table-row .badge {
  margin-left: 10px;
}

/* =============== List with Icon =============== */
ul li > img, ol li > img {
  height: 18px;
  margin-right: 7px;
  vertical-align: baseline;
  position: relative;
  top: 2px;
  filter: grayscale(20%);
}
/* =============== Accordion FAQ =============== */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.faq-accordion h3 {
  font-size: 18px;
  font-family: 'Montserrat', serif;
  color: #204080;
  cursor: pointer;
  margin-bottom: 4px;
  margin-top: 8px;
  font-weight: 500;
  transition: color 0.18s;
}
.faq-accordion h3:hover, .faq-accordion h3:focus {
  color: #F4A825;
}
.faq-accordion p {
  color: #272932;
  margin-bottom: 8px;
}

/* =============== Footer =============== */
footer {
  background: #fff;
  border-top: 1.5px solid #e0e4ed;
  margin-top: 64px;
  padding-top: 20px;
  padding-bottom: 24px;
}
footer .container {
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
  justify-content: flex-start;
}
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin-bottom: 8px;
  margin-top: 5px;
}
.footer-menu a {
  color: #204080;
  font-family: 'Montserrat', serif;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s;
}
.footer-menu a:hover, .footer-menu a:focus {
  color: #F4A825;
}
.social-icons {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 6px;
}
.social-icons img {
  width: 28px;
  height: 28px;
  filter: grayscale(53%) brightness(0.85);
  transition: filter 0.17s;
  cursor: pointer;
}
.social-icons img:hover {
  filter: grayscale(0%) brightness(1);
}
.copyright {
  color: #999EA7;
  font-size: 14px;
  margin-top: 6px;
  width: 100%;
}

/* =============== Cookie Consent (banner & modal) =============== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fffbe7;
  border-top: 2px solid #F4A825;
  box-shadow: 0 -1px 12px rgba(32,64,128,0.06);
  z-index: 10000;
  padding: 22px 16px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 16px;
  font-family: 'Georgia', serif;
}
.cookie-banner p {
  color: #272932;
  font-size: 16px;
  margin: 0 0 6px 0;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 15px;
}
.cookie-banner .cookie-btn {
  padding: 10px 24px;
  background: #204080;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-family: 'Montserrat', serif;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1.5px 8px rgba(30,50,100,0.13);
  transition: background 0.15s, color 0.12s;
}
.cookie-banner .cookie-btn.secondary {
  background: #F4A825;
  color: #204080;
}
.cookie-banner .cookie-btn.settings {
  background: #F7F9FA;
  color: #204080;
  border: 1.5px solid #204080;
}
.cookie-banner .cookie-btn:hover, .cookie-banner .cookie-btn:focus {
  background: #F4A825;
  color: #204080;
}
.cookie-banner .cookie-btn.settings:hover {
  background: #204080;
  color: #fff;
}

/* Cookie Modal (Preferences) */
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 35, 0.35);
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.cookie-modal.open {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal .cookie-modal-content {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 44px rgba(32,64,128,0.2);
  max-width: 440px;
  width: 94vw;
  padding: 32px 26px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  animation: modalShow 0.35s cubic-bezier(.34,1.29,.59,1) both;
}
@keyframes modalShow {
  from { transform: translateY(44px) scale(0.99); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.cookie-modal .close-modal {
  position: absolute;
  top: 16px; right: 19px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #204080;
  cursor: pointer;
  transition: color 0.14s;
}
.cookie-modal .close-modal:hover, .cookie-modal .close-modal:focus {
  color: #F4A825;
}
.cookie-modal h2 {
  font-size: 22px;
  margin-bottom: 7px;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  font-size: 16px;
  color: #204080;
  font-family: 'Montserrat', serif;
}
.cookie-category .toggle {
  width: 39px; height: 22px;
  background: #E5E8F2;
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  outline: none;
  border: none;
  transition: background 0.17s;
  margin-left: 6px;
  margin-bottom: 0;
  margin-top: 0;
}
.cookie-category .toggle[aria-checked="true"] {
  background: #204080;
}
.cookie-category .toggle .dot {
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0.5px 1.5px rgba(70,80,120,0.12);
  transition: left 0.18s;
}
.cookie-category .toggle[aria-checked="true"] .dot {
  left: 20px;
}
.cookie-category .toggle[aria-disabled="true"] {
  background: #BBBECB;
  cursor: not-allowed;
  opacity: 0.7;
}
.cookie-modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 13px;
  margin-top: 12px;
}
.cookie-modal .cookie-btn {
  min-width: 110px;
}

/* =============== Responsive Design =============== */
@media (max-width: 1100px) {
  .container { max-width: 96vw; }
}
@media (max-width: 900px) {
  .container { max-width: 98vw; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
}
@media (max-width: 768px) {
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  .testimonial-card, .card, .section {
    padding: 16px 8px;
  }
  .footer-menu {
    gap: 11px;
  }
}
@media (max-width: 520px) {
  body {
    font-size: 15px;
  }
  .social-icons img {
    width: 21px; height: 21px;
  }
  .cookie-banner {
    padding: 12px 5px 11px 5px;
    font-size: 14.5px;
  }
}

/* =============== Miscellaneous =============== */
::-webkit-scrollbar {
  width: 10px;
  background: #edeef2;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: #E0E4ED;
  border-radius: 9px;
}
::selection {
  background: #F4A825;
  color: #1A2233;
}

/* =============== Utility Spacing Classes (for consistent design) =============== */
.mt-8 { margin-top: 8px !important; }
.mt-16 { margin-top: 16px !important; }
.mt-24 { margin-top: 24px !important; }
.mb-8 { margin-bottom: 8px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-32 { margin-bottom: 32px !important; }

/* =============== Print Styles =============== */
@media print {
  header, footer, .cookie-banner, .mobile-menu { display: none !important; }
  main { padding: 0; }
  .container, .section { max-width: 100vw; padding: 0; }
  body { background: #fff; color: #000; }
}