/* ===============================
   CSS RESET & NORMALIZATION
   =============================== */
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;
}
ol, ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  border: none;
  max-width: 100%;
  height: auto;
  display: block;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
  box-shadow: none;
}
button {
  cursor: pointer;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* ===============================
   BRAND VARIABLES (fallbacks for older browsers)
   =============================== */
:root {
  --primary: #124559;
  --secondary: #F9CB40;
  --accent: #F4F7FA;
  --grey-light: #EAF0F3;
  --grey: #B8C5CD;
  --text-dark: #124559;
  --text-medium: #415568;
  --text-light: #6f8596;
  --card-radius: 14px;
  --card-shadow: 0 2px 18px 0 rgba(36,58,89,0.09);
  --transition: 0.23s cubic-bezier(.42,0,.58,1);
  --header-height: 64px;
}

/* ===============================
   BASE TYPOGRAPHY
   =============================== */
body {
  font-family: 'Open Sans', Arial, sans-serif;
  background: var(--accent);
  color: var(--text-dark);
  font-weight: 400;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 {
  font-size: 2.4rem;
  margin-bottom: 24px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}
h4 {
  font-size: 1.1rem;
}
p, li {
  color: var(--text-medium);
  font-size: 1rem;
  line-height: 1.7;
}
p {
  margin-bottom: 16px;
}
ul {
  margin-left: 24px;
  margin-bottom: 8px;
}
ul li {
  padding-left: 0;
  position: relative;
  margin-bottom: 6px;
}
strong, b {
  font-weight: 700;
}
blockquote {
  font-style: italic;
  color: var(--text-light);
  border-left: 4px solid var(--secondary);
  padding-left: 16px;
  margin-bottom: 20px;
}

/* ===============================
   LAYOUT CONTAINERS
   =============================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/***** MANDATORY FLEXBOX SPACING & PATTERNS *****/
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 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;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  flex-direction: column;
  min-width: 260px;
  max-width: 340px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/***** SCANDINAVIAN INSPIRED CARDS & SECTIONS *****/
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.feature-grid > div {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 28px 24px;
  min-width: 240px;
  flex: 1 1 250px;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.feature-grid > div:hover,
.feature-grid > div:focus {
  box-shadow: 0 6px 24px -2px rgba(36,58,89,.15);
  transform: translateY(-3px) scale(1.018);
}

/***** TESTIMONIALS *****/
.testimonials {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.testimonial-card p {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.testimonial-card strong {
  display: block;
  margin-top: 8px;
  color: var(--secondary);
  font-size: 1rem;
}
.testimonial-card div {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
}

/***** CASE STUDY, QUOTES *****/
.case-study {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 24px 20px;
  margin: 24px 0;
}
.quotes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/***** BUTTON STYLES *****/
.cta-button, .cookie-banner button, .cookie-modal .modal-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff !important;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 32px;
  padding: 13px 32px;
  transition: background .18s, color .18s, transform .18s;
  box-shadow: 0 1px 6px 0 rgba(36,58,89,0.06);
  min-width: 140px;
  border: none;
  outline: none;
  position: relative;
}
.cta-button:hover, .cta-button:focus,
.cookie-banner button:hover, .cookie-banner button:focus,
.cookie-modal .modal-actions button:hover,
.cookie-modal .modal-actions button:focus {
  background: var(--secondary);
  color: var(--primary) !important;
  transform: translateY(-2px) scale(1.03);
}

/***** SECONDARY BUTTONS *****/
.cookie-banner .cookie-reject,
.cookie-modal .modal-actions .cookie-reject {
  background: var(--grey-light);
  color: var(--text-dark) !important;
  font-weight: 500;
}
.cookie-banner .cookie-reject:hover,
.cookie-modal .modal-actions .cookie-reject:hover {
  background: var(--grey);
}
.cookie-banner .cookie-settings,
.cookie-modal .modal-actions .cookie-settings {
  background: transparent;
  color: var(--primary) !important;
  font-weight: 600;
  border: 1.5px solid var(--primary);
}
.cookie-banner .cookie-settings:hover,
.cookie-modal .modal-actions .cookie-settings:hover {
  background: var(--accent);
  border-color: var(--secondary);
  color: var(--secondary) !important;
}

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

/***** HEADER & NAVIGATION *****/
header {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 16px 0 rgba(36,58,89,.07);
  padding: 0;
  min-height: var(--header-height);
  z-index: 99;
  position: sticky;
  top: 0;
}
header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
}
header > a {
  display: flex;
  align-items: center;
  margin-right: 30px;
  padding: 0 8px;
  height: var(--header-height);
}
header > nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}
header > nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.05rem;
  padding: 10px 4px;
  border-radius: 8px;
  color: var(--text-dark);
  transition: background .14s, color .14s;
}
header > nav a:hover, header > nav a.active {
  background: var(--accent);
  color: var(--primary);
}
header .cta-button {
  margin-left: 24px;
  margin-right: 0;
}
button.mobile-menu-toggle {
  display: none;
  background: transparent;
  font-size: 2.1rem;
  color: var(--primary);
  padding: 8px 16px 8px 8px;
  border-radius: 10px;
  transition: background .16s;
  border: none;
}
button.mobile-menu-toggle:hover, button.mobile-menu-toggle:focus {
  background: var(--accent);
}

/***** MOBILE MENU (Overlay with Slide-in) *****/
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 100vw;
  width: 100vw;
  height: 100vh;
  background: rgba(244,247,250, 0.98);
  z-index: 9999;
  transition: left .30s cubic-bezier(.66,0,.34,1);
  box-shadow: -2px 0 18px 0 rgba(36,58,89,0.10);
  flex-direction: column;
}
.mobile-menu.open {
  display: flex;
  left: 0;
}
.mobile-menu-close {
  align-self: flex-end;
  background: none;
  font-size: 2.4rem;
  color: var(--primary);
  padding: 26px 32px 12px 0;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 16px;
  gap: 1.5rem;
  padding: 0 32px;
}
.mobile-nav a {
  font-size: 1.4rem;
  color: var(--primary);
  font-family: 'Montserrat', Arial, sans-serif;
  padding: 8px 0;
  font-weight: 600;
}
.mobile-nav a:hover {
  color: var(--secondary);
}

/***** MAIN SECTIONS & SPACING *****/
main {
  width: 100%;
  margin: 0 auto;
  margin-top: 0;
  min-height: 600px;
}
.text-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/***** CARD DESIGN (also for .feature-grid, .card) *****/
.card, .feature-grid > div, .testimonial-card, .case-study, .quotes blockquote {
  box-shadow: var(--card-shadow);
  border-radius: var(--card-radius);
}

/***** FOOTER *****/
footer {
  width: 100%;
  background: #fff;
  box-shadow: 0 -1px 14px 0 rgba(36,58,89,.08);
  padding: 0;
  margin-top: 60px;
}
footer .container {
  padding-top: 38px;
  padding-bottom: 38px;
}
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  justify-content: space-between;
}
footer a img {
  width: 48px;
  height: auto;
  margin-right: 18px;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
footer nav a {
  font-size: 1rem;
  color: var(--primary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
  line-height: 1.3;
}
footer nav a:hover {
  color: var(--secondary);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 1rem;
  color: var(--text-dark);
  margin-right: 12px;
}
.footer-contact img {
  margin-right: 8px;
  vertical-align: middle;
  width: 18px;
  height: 18px;
}

/***** CATEGORY FILTERS & LISTS (NEWS PAGE) *****/
.category-filters {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
}
.category-filters a {
  font-size: 1rem;
  color: var(--primary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
  background: var(--accent);
  padding: 6px 20px;
  border-radius: 24px;
  transition: background .17s, color .17s;
}
.category-filters a.active, .category-filters a:hover {
  background: var(--secondary);
  color: var(--primary);
}
.latest-posts-list li {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 20px 20px 14px 20px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.latest-posts-list h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

/***** SECTION & CARD/GRID LAYOUT FLEX (NO GRID!) *****/
@media (min-width: 900px) {
  .feature-grid, .testimonials, .content-grid {
    flex-direction: row;
    justify-content: flex-start;
  }
  .feature-grid > div {
    min-width: 260px;
    max-width: 360px;
  }
}

/***** RESPONSIVENESS (Mobile-first) *****/
@media (max-width: 900px) {
  .container {
    max-width: 100vw;
    padding: 0 8px;
  }
  .feature-grid, .testimonials, .content-grid, .footer .content-wrapper {
    flex-direction: column;
    gap: 20px;
  }
  .feature-grid > div, .testimonial-card {
    min-width: unset;
    max-width: unset;
    width: 100%;
    margin-bottom: 12px;
  }
}
@media (max-width: 768px) {
  h1 {
    font-size: 1.7rem;
  }
  h2 {
    font-size: 1.25rem;
  }
  header > nav,
  header .cta-button {
    display: none;
  }
  button.mobile-menu-toggle {
    display: flex;
    margin-left: auto;
    align-items: center;
    font-size: 2.1rem;
  }
  header {
    padding: 0 4px;
    min-height: 60px;
  }
  footer .content-wrapper {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .section {
    padding: 28px 5px;
  }
  .feature-grid, .testimonials, .content-grid {
    flex-direction: column;
    gap: 18px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 15px;
  }
  .testimonial-card {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    padding: 16px 10px;
  }
  .mobile-menu {
    min-width: 0;
    width: 100vw;
    padding: 0;
    left: 100vw;
  }
  .mobile-menu.open {
    left: 0;
  }
}
@media (max-width: 500px) {
  .footer-contact { font-size: .95rem; }
}

/***** SCROLLBAR (subtle, modern) *****/
body::-webkit-scrollbar {
  width: 9px;
  background: var(--accent);
}
body::-webkit-scrollbar-thumb {
  background: var(--grey);
  border-radius: 5px;
}

/***** MICRO-INTERACTIONS & TRANSITIONS *****/
.card, .feature-grid > div, .testimonial-card, .case-study, .cta-button, .category-filters a {
  transition: box-shadow var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}
.cta-button:active { transform: scale(0.98); }

/* ==========================
   COOKIE CONSENT BANNER
   ========================== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 -2px 14px 0 rgba(36,58,89,.10);
  padding: 26px 34px 20px 34px;
  min-width: 250px;
  gap: 35px;
  transition: transform .32s cubic-bezier(.42,0,.58,1);
}
.cookie-banner.hide {
  transform: translateY(110%);
}
.cookie-banner__text {
  color: var(--text-medium);
  font-size: 1.04rem;
  flex: 2;
  margin-right: 12px;
  min-width: 120px;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 16px;
  flex: 1;
}
.cookie-banner button {
  min-width: 120px;
  font-size: 1rem;
  border-radius: 32px;
  padding: 10px 23px;
}

/* ==========================
   COOKIE MODAL
   ========================== */
.cookie-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(18,69,89, 0.22);
  z-index: 12500;
  align-items: center;
  justify-content: center;
  transition: opacity .25s cubic-bezier(.42,0,.58,1);
  opacity: 0;
}
.cookie-modal.open {
  display: flex;
  opacity: 1;
}
.cookie-modal .modal-content {
  background: #fff;
  border-radius: 18px;
  max-width: 420px;
  width: 94vw;
  box-shadow: 0 2px 28px 4px rgba(36,58,89,0.13);
  padding: 36px 26px 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.cookie-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cookie-modal .modal-header h2 {
  font-size: 1.15rem;
  color: var(--primary);
}
.cookie-modal .modal-close {
  background: none;
  font-size: 2rem;
  color: var(--primary);
  border-radius: 8px;
  padding: 2px 8px;
  transition: background .13s;
}
.cookie-modal .modal-close:hover, .cookie-modal .modal-close:focus {
  background: var(--accent);
}
.cookie-modal .modal-section {
  background: #F4F7FA;
  border-radius: 11px;
  padding: 18px 14px;
  margin-bottom: 12px;
  font-size: 1.01rem;
  color: var(--text-medium);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cookie-modal .modal-section .cookie-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cookie-modal .modal-section label {
  font-size: 1rem;
  color: var(--primary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
}
.cookie-modal .modal-section input[type="checkbox"] {
  accent-color: var(--secondary);
  width: 19px; height: 19px;
}
.cookie-modal .modal-section.category-essential label {
  color: var(--grey);
}
.cookie-modal .modal-section.category-essential input[type="checkbox"] {
  accent-color: var(--grey);
}
.cookie-modal .modal-section.category-essential input[type="checkbox"]:disabled {
  cursor: not-allowed;
}
.cookie-modal .modal-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 16px;
}
.cookie-modal .modal-actions button {
  min-width: 112px;
}

/***** Cookie banner & modal responsiveness *****/
@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 17px 9px 14px 9px;
  }
  .cookie-banner .cookie-actions {
    gap: 8px;
  }
  .cookie-banner .cookie-actions button {
    min-width: 84px;
    padding: 8px 8px;
  }
  .cookie-modal .modal-content {
    padding: 22px 5px 22px 5px;
  }
}

/* ==========================
   MISC/UTILITY CLASSES
   ========================== */
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mb-32 { margin-bottom: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-20 { gap: 20px !important; }
.gap-8 { gap: 8px !important; }
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }

/***** FORM ELEMENTS *****/
input, select, textarea {
  width: 100%;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid var(--accent);
  font-size: 1rem;
  padding: 12px 13px;
  margin-bottom: 13px;
  transition: border-color .17s, box-shadow .17s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 1px 5px 0 rgba(36,58,89,0.09);
}
label {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 6px;
}

/* ==========================
   PRINT (for important pages)
   ========================== */
@media print {
  *, *:before, *:after {
    color: #111 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  header, footer, .cookie-banner, .mobile-menu {
    display: none !important;
  }
}
