/* RESET & NORMALIZE */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; margin: 0; padding: 0; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; height: auto; }
table { border-collapse: collapse; width: 100%; }
input, button, select, textarea { font: inherit; }
button { background: none; border: none; cursor: pointer; padding: 0; }
:root {
  --primary: #07436F;
  --secondary: #45A6C6;
  --accent: #F3F8FA;
  --neutral: #ffffff;
  --neutral-dark: #1a202c;
  --grey-light: #e9edf0;
  --shadow: 0 2px 8px 0 rgba(7,67,111,0.08), 0 1.5px 4px 0 rgba(69,166,198,0.04);
  --radius: 18px;
  --transition: 0.18s cubic-bezier(.64,.09,.08,.94);
}

body {
  background: var(--accent);
  color: var(--primary);
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

header {
  background: var(--neutral);
  border-bottom: 3px solid var(--secondary);
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 76px;
}
header img[alt="BolånJämför"] {
  height: 44px;
  margin-right: 18px;
}
.main-nav {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
}
.main-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--primary);
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--secondary);
  color: var(--neutral);
}

.cta-btn {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--neutral);
  background: var(--primary);
  border-radius: 28px;
  padding: 11px 38px;
  margin-left: 20px;
  box-shadow: 0 3px 10px rgba(7,67,111,0.12);
  border: none;
  outline: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.cta-btn:hover, .cta-btn:focus {
  background: var(--secondary);
  color: var(--primary);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(69,166,198,0.12);
}

/***** MOBILE MENU *****/
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 112;
  width: 46px;
  height: 46px;
  background: var(--primary);
  color: var(--neutral);
  font-size: 2rem;
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 8px rgba(7,67,111,0.10);
  align-items: center;
  justify-content: center;
  transition: background var(--transition), box-shadow var(--transition);
}
.mobile-menu-toggle:active, .mobile-menu-toggle:focus {
  background: var(--secondary);
  outline: 2px solid var(--secondary);
}
@media (max-width: 1080px) {
  .main-nav, header .cta-btn { display: none; }
  .mobile-menu-toggle { display: flex; }
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--neutral);
  z-index: 200;
  transform: translateX(100vw);
  transition: transform 0.3s cubic-bezier(.4,.5,.16,1);
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: 0 0 32px rgba(7,67,111,0.05);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 44px; height: 44px;
  font-size: 2.2rem;
  color: var(--primary);
  border-radius: 50%;
  background: var(--grey-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 201;
}
.mobile-menu-close:hover, .mobile-menu-close:focus { background: var(--secondary); color: var(--neutral); }
.mobile-nav {
  margin-top: 90px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 24px 32px;
}
.mobile-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  padding: 16px 0;
  border-bottom: 1.5px solid var(--accent);
  transition: background var(--transition), color var(--transition);
  border-radius: 0px;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--secondary);
  color: var(--neutral);
  border-radius: 8px;
}

/***** BASE TYPOGRAPHY *****/
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.01em;
  line-height: 1.17;
}
h1 { font-size: 2.6rem; margin-bottom: 20px; margin-top: 0; }
h2 { font-size: 2rem; margin-bottom: 16px; margin-top: 32px; }
h3 { font-size: 1.4rem; margin-bottom: 9px; margin-top: 24px; }
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.47rem; }
  h3 { font-size: 1.1rem; }
}
p, ul, ol { font-size: 1rem; margin-bottom: 10px; }
strong, b { font-weight: 700; }

/************* SECTION SPACING & FLEX LAYOUTS *************/
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--neutral);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}
/**** Cards & Card Container ****/
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.card {
  margin-bottom: 20px;
  background: var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 27px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 260px;
  max-width: 360px;
  position: relative;
  border: 2.5px solid var(--secondary);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

/**** CONTENT GRID (e.g. feature-grid, partner-logos) ****/
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: stretch;
  margin-bottom: 16px;
}
.feature-grid > div {
  background: var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 325px;
  min-width: 230px;
  flex: 1 1 250px;
  padding: 26px 18px 18px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 2px solid var(--secondary);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-grid > div:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 12px 28px rgba(7,67,111,0.14);
}
.feature-grid img {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}
.partner-logos {
  display: flex;
  gap: 32px;
  align-items: center;
  margin: 19px 0 0 0;
}

.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;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .feature-grid, .card-grid, .content-grid, .card-container {
    flex-direction: column;
    gap: 22px;
  }
  .feature-grid > div,.card {
    width: 99%;
    min-width: 180px;
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  .container { padding: 0 7px; }
  .content-wrapper { padding: 0; }
  .feature-grid, .card-grid, .content-grid, .card-container {gap: 16px;}
  section { padding: 24px 6px; margin-bottom: 33px; }
  .text-image-section { flex-direction: column; gap: 18px; }
}

/********* TABLES (rate tables) *********/
table {
  background: var(--neutral);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  width: 100%;
  margin: 18px 0 18px 0;
  font-size: 1rem;
  overflow: hidden;
}
thead th {
  font-family: 'Montserrat', Arial, sans-serif;
  background: var(--secondary);
  color: var(--neutral);
  border-right: 2px solid var(--accent);
  font-size: 1.07rem;
  padding: 12px 8px;
  font-weight: 700;
  text-align: left;
  letter-spacing: 0.03em;
}
tbody td {
  padding: 13px 10px;
  border-bottom: 1.5px solid var(--accent);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody td img { vertical-align: sub; margin-right: 6px; height: 28px; }

/**** ACCORDION FAQ ****/
.accordion-list { display: flex; flex-direction: column; gap: 20px; }
.accordion-list > div { background: var(--accent); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 19px; }
.accordion-list h3 { cursor: pointer; font-size: 1.12rem; margin-bottom: 7px; position: relative; display: flex; align-items: center; }
.accordion-list h3::after {
  content: '\25BC';
  font-size: 0.7em;
  margin-left: 8px;
  transition: transform 0.1s;
  color: var(--secondary);
}
.accordion-list > div[open] h3::after, .accordion-list > div.active h3::after {
  transform: rotate(-180deg);
}
.accordion-list > div > div { display: none; margin-top: 8px; font-size: 1rem; color: var(--primary); }
.accordion-list > div.active > div { display: block; }

/********** TESTIMONIALS **********/
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 2.5px solid var(--secondary);
  font-style: italic;
  color: var(--neutral-dark);
}
.testimonial-card p {
  font-size: 1.13rem;
  color: var(--primary);
  margin-bottom: 0;
}
.testimonial-card strong {
  font-size: 1rem;
  color: var(--secondary);
  font-style: normal;
  margin-left: 10px;
  font-weight: 700;
}

/********** FORMS/CALCULATOR FIELDS *********/
.calculator-fields {
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: var(--accent);
  padding: 22px 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.calculator-fields label {
  font-weight: 600;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--primary);
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}
.calculator-fields input {
  padding: 10px 10px 10px 14px;
  border: 2px solid var(--secondary);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--neutral);
  margin-bottom: 7px;
  transition: border-color var(--transition);
}
.calculator-fields input:focus {
  border-color: var(--primary);
}
.calculator-fields span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 0.97rem;
}

.calculation-result {
  background: var(--neutral);
  border: 2px solid var(--secondary);
  border-radius: var(--radius);
  padding: 22px 16px;
  margin: 0 0 12px 0;
  box-shadow: var(--shadow);
}
.calculation-result h3 { margin-bottom: 7px; }
.calculation-result strong {
  color: var(--primary);
  font-size: 1.16rem;
  font-family: 'Montserrat', Arial, sans-serif;
  letter-spacing: 0.03em;
}

/*********** ARTICLE / TIPS ***********/
.article-teasers {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
}
.article-teasers > div {
  background: var(--accent);
  border-radius: 13px;
  box-shadow: var(--shadow);
  border-left: 7px solid var(--secondary);
  max-width: 340px;
  padding: 23px 14px 20px 21px;
  margin-bottom: 18px;
  flex: 1;
  min-width: 170px;
  transition: transform var(--transition);
}
.article-teasers > div:hover {
  transform: translateY(-2px) scale(1.02);
}

/************* TEAM *************/
.team-brief {
  background: var(--accent);
  border: 2px solid var(--secondary);
  border-radius: 12px;
  padding: 17px 18px;
  margin: 10px 0 0 0;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.06rem;
}

/********* FOOTER *********/
footer {
  background: var(--primary);
  color: var(--accent);
  padding: 32px 0 0 0;
  margin-top: 36px;
  font-size: 1rem;
}
footer .container { flex-direction: column; gap: 20px; }
.footer-nav {
  display: flex;
  flex-direction: row;
  gap: 30px;
  margin-bottom: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--accent);
  font-size: 1rem;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 0;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--secondary);
  background: var(--accent);
}
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 19px;
  margin-bottom: 6px;
  font-size: 1rem;
}
.footer-contact img {
  display: inline-block;
  margin-right: 3px;
  height: 18px;
  vertical-align: bottom;
}
footer p { margin: 12px 0 0 0; font-size: 0.97rem; color: var(--accent); }

/********* UTILITY *********/
img[alt^="icon-"] { vertical-align: middle; height: 28px; margin-right: 6px; display: inline-block; }
img[alt="E-post"], img[alt="Telefon"] { height: 20px; }

/********** COOKIE CONSENT BANNER **********/
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--secondary);
  color: var(--neutral);
  padding: 24px 18px 18px 18px;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 -3px 16px rgba(7,67,111,0.09);
  font-size: 1.07rem;
  animation: cookieSlideIn 0.64s cubic-bezier(.62,0,.11,1.04);
}
@keyframes cookieSlideIn {
  0% { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-banner button {
  margin-left: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: 24px;
  font-size: 1rem;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow 0.2s;
}
.cookie-banner .accept {
  background: var(--primary);
  color: var(--neutral);
  margin-right: 6px;
}
.cookie-banner .accept:hover {background: #022941;}
.cookie-banner .reject {
  background: var(--neutral);
  color: var(--primary);
  border: 1.8px solid var(--primary);
}
.cookie-banner .reject:hover {background: #e3e7ea;}
.cookie-banner .settings {
  background: var(--accent);
  color: var(--primary);
  margin-left: 8px;
}
.cookie-banner .settings:hover {background: #e3f6fd;}

/********* COOKIE MODAL *********/
.cookie-modal {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 4010;
  background: rgba(7, 67, 111, 0.37);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInModal 0.26s cubic-bezier(.41,0,.17,0.98);
}
@keyframes fadeInModal {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
.cookie-modal-content {
  background: var(--neutral);
  color: var(--primary);
  border-radius: 18px;
  box-shadow: 0 2px 24px rgba(7,67,111,0.22);
  padding: 34px 26px 22px 26px;
  width: 97%;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  gap: 19px;
  position: relative;
  text-align: left;
  animation: popupModal 0.19s cubic-bezier(.41,0,.17,0.98);
}
@keyframes popupModal {
  0% { transform: scale(.92); opacity: 0;}
  100% { transform: scale(1); opacity: 1;}
}
.cookie-modal-content h4 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-family: 'Montserrat', Arial, sans-serif;
}
.cookie-modal-content label {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}
.cookie-modal-content input[type="checkbox"] {
  transform: scale(1.3);
  accent-color: var(--secondary);
}
.cookie-modal-content .modal-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: row;
  gap: 13px;
  justify-content: flex-end;
}
.cookie-modal-close {
  position: absolute;
  top: 12px; right: 17px;
  font-size: 1.7rem;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
}
.cookie-modal-close:hover { color: var(--secondary); }
/********* RESPONSIVE & FLEX ADJUSTMENTS *********/
@media (max-width: 600px) {
  header .container { flex-direction: row; gap: 8px; }
  .feature-grid > div, .testimonial-card, .card, .card-content,.section {
    min-width: 0;
    max-width: 100%;
    font-size: 1rem;
  }
  .article-teasers > div { max-width: 97vw; }
  .footer-contact { flex-direction: column; gap: 7px; align-items: flex-start; }
  .footer-nav { flex-direction: column; gap: 7px; }
}

/********* MICRO-INTERACTIONS + HOVER/ACTIVE *********/
a, button, input, .main-nav a, .mobile-nav a, .cta-btn {
  transition: color var(--transition), background var(--transition), border var(--transition), box-shadow var(--transition), transform var(--transition);
}

input:focus, select:focus, button:focus, a:focus {
  outline: 2.5px solid var(--secondary);
  outline-offset: 2px;
}

/*********** MISC ***********/
::-webkit-input-placeholder { color: #7a9ab1; }
::-moz-placeholder { color: #7a9ab1; }
:-ms-input-placeholder { color: #7a9ab1; }
::placeholder { color: #7a9ab1; }

hr {
  border: 0;
  border-top: 1.5px solid var(--accent);
  margin: 24px 0 15px 0;
}

/* Hide scrollbars for mobile menu */
.mobile-menu {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  overflow-y: auto;
}
.mobile-menu::-webkit-scrollbar { display: none; }

/********** PRINT *****************/
@media print {
  header, .main-nav, .mobile-menu, .cookie-banner, .cookie-modal, .mobile-menu-toggle, footer { display: none !important; }
  section, main { box-shadow: none !important; background: #fff !important; border: none !important; }
  body { background: #fff !important; }
}
