/* ===========================================================
   CSS RESET & BASELINE NORMALIZATION
   =========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #F7F9FB;
  color: #232a34;
  line-height: 1.6;
  min-height: 100vh;
  font-size: 1rem;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: #2B367E;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #29B27D;
  outline: none;
}
ul, ol {
  list-style-position: inside;
}
button {
  border: none;
  font-family: inherit;
  background: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

/* ===========================================================
   SCANDINAVIAN CLEAN BRAND VARIABLES (fallbacks included)
   =========================================================== */
:root {
  --primary: #2B367E;
  --secondary: #29B27D;
  --accent: #F2F4F8;
  --text: #232a34;
  --background: #F7F9FB;
  --white: #fff;
  --shadow: 0 2px 16px rgba(43, 54, 126, 0.07);
  --shadow-card: 0 2px 8px rgba(43, 54, 126, 0.085);
  --radius: 16px;
}

/* ===========================================================
   TYPOGRAPHY
   =========================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  color: var(--primary);
  font-weight: 700;
}
h1 { font-size: 2.5rem; margin-bottom: 16px; letter-spacing: -0.5px; }
h2 { font-size: 2rem; margin-bottom: 16px; }
h3 { font-size: 1.25rem; margin-bottom: 12px; }
h4 { font-size: 1.1rem; }
p, ul, ol, li {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 12px;
  font-family: 'Roboto', Arial, sans-serif;
}
strong, b {
  font-weight: 700; color: var(--primary); 
}

/* Typography hierarchy for sections */
.section h2 { margin-bottom: 16px; }

/* Utility font sizes for minor/aux text */
.small, .footer-contact p, .footer-nav a { font-size: 0.96rem; }

/* ===========================================================
   LAYOUT CONTAINERS & FLEXBOX STRUCTURE
   =========================================================== */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

/* Universal section styling (mandatory spacing/alignment) */
.section,
section:not(.hero):not(.cta) {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
}

/* Main Flexbox Patterns */
.card-container, .feature-grid, .service-grid, .article-list, .features, .testimonials {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
  padding: 24px;
}
.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;
  padding-bottom: 18px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px 28px 20px 28px;
  margin: 16px 0 20px 0;
  transition: box-shadow 0.2s, border 0.2s;
  border: 1px solid #e0e3ed;
  min-width: 0;
}
.testimonial-card p {
  color: var(--text);
  font-size: 1.1rem;
}
.testimonial-card strong {
  color: var(--secondary);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Hero Section */
.hero {
  background: linear-gradient(110deg, #F2F4F8 80%, #e6efe9 100%);
  padding: 64px 0 40px 0;
  margin-bottom: 40px;
}
.hero .content-wrapper {
  align-items: flex-start;
  gap: 18px;
}
.hero h1 {
  color: var(--primary);
  font-size: 2.5rem;
  letter-spacing: -1.2px;
}
.hero p {
  max-width: 440px;
  color: #3b4150;
  font-size: 1.12rem;
}

/* CTA Section */
.cta { 
  background: var(--accent);
  padding: 50px 0 50px 0;
  margin: 60px 0 0 0;
}
.cta .content-wrapper {
  align-items: center;
  text-align: center;
  gap: 14px;
}

/* Feature Section */
.features .feature-grid,
.services .service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.feature, .service {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 32px 24px 28px 24px;
  flex: 1 0 225px;
  min-width: 225px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  transition: box-shadow 0.2s, transform 0.2s;
  border: 1px solid #e0e3ed;
}
.feature:hover, .service:hover {
  box-shadow: 0 4px 24px rgba(41,178,125,0.10);
  transform: translateY(-6px) scale(1.012);
}
.feature img, .service img {
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
}
.feature h3, .service h3 {
  color: var(--primary);
  font-size: 1.15rem;
  margin: 0 0 3px 0;
  letter-spacing: -0.2px;
}
.feature p, .service p {
  color: #424a55;
  font-size: 1rem;
}

/* Article List (Blog) */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.article-list article {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px 24px 20px 24px;
  border: 1px solid #e0e3ed;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.article-list h3 { font-size: 1.2rem; color: var(--primary); margin-bottom: 6px; }
.article-list .tags {
  color: var(--secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* ===========================================================
   HEADER & NAVIGATION
   =========================================================== */
header {
  width: 100%;
  background: var(--white);
  box-shadow: 0 1px 12px rgba(41,178,125,0.07);
  padding: 0;
  z-index: 90;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
header img {
  height: 38px;
  width: auto;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav a {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--primary);
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--accent);
  color: var(--secondary);
}
.cta-btn {
  background: var(--secondary);
  color: var(--white)!important;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 32px;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 1.09rem;
  margin-left: 8px;
  box-shadow: 0 2px 16px rgba(41, 178, 125, 0.07);
  transition: background 0.23s, color 0.23s;
  border: none;
  cursor: pointer;
        display: inline-block;
}
.cta-btn:hover, .cta-btn:focus {
  background: #238961;
  color: #fff;
}

/* Hamburger menu button */
.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  justify-content: center;
  align-items: center;
  margin-left: 18px;
  transition: background 0.21s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(41, 178, 125, 0.06);
}
.mobile-menu-toggle:active,
.mobile-menu-toggle:hover {
  background: var(--secondary);
  color: #fff;
}
/* Hide desktop nav in mobile */
@media (max-width: 1020px) {
  .main-nav { gap: 12px; }
}
@media (max-width: 840px) {
  .main-nav { gap: 7px; }
}
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  header .container {
    height: 58px;
  }
}

/* ===========================================================
   MOBILE MENU STYLES & ANIMATION
   =========================================================== */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(39,44,56,0.92);
  z-index: 200;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  transform: translateX(-100%);
  transition: transform 0.36s cubic-bezier(0.87,0.13,0.4,0.92);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  font-size: 2rem;
  background: none;
  color: var(--white);
  align-self: flex-end;
  margin: 22px 28px 16px 0;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--secondary);
  color: #fff;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 6px;
  padding: 10px 32px 24px 32px;
}
.mobile-nav a {
  color: var(--white);
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 1.2rem;
  padding: 13px 10px 13px 8px;
  border-radius: 8px;
  transition: background 0.25s, color 0.18s;
  margin-bottom: 4px;
}
.mobile-nav a:active, .mobile-nav a:focus, .mobile-nav a:hover {
  background: var(--secondary);
  color: #fff !important;
}
@media (max-width: 768px) {
  .mobile-menu {
    width: 100vw;
    min-width: 0;
  }
}

/* ===========================================================
   FOOTER STYLES
   =========================================================== */
footer {
  background: var(--accent);
  border-top: 1px solid #e0e3ed;
  margin-top: 60px;
  padding: 32px 0 0 0;
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 36px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 32px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 170px;
}
.footer-brand img {
  height: 38px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-nav a {
  color: #475077;
  font-size: 1rem;
  letter-spacing: 0.1px;
  transition: color 0.2s, text-decoration 0.2s;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--primary);
  text-decoration: underline;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 185px;
}
.footer-contact h3 {
  color: var(--primary);
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 7px;
}
.footer-contact p {
  font-size: 0.99rem;
  color: #3b4150;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-contact img {
  width: 19px; height: 19px; margin-right: 3px;
}
footer .container > * {
  min-width: 170px;
}
footer {
  font-size: 0.96rem;
  margin-bottom: 0;
}

/* Footer copyright */
.footer-brand p {
  font-size: 0.92rem;
  color: #686f86;
}

@media (max-width: 990px) {
  footer .container { flex-wrap: wrap; gap: 18px; }
}
@media (max-width: 768px) {
  footer .container {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
    padding-bottom: 24px;
  }
  .footer-contact, .footer-brand, .footer-nav { min-width: 0; }
}

/* ===========================================================
   COOKIE CONSENT BANNER & MODAL
   =========================================================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: var(--white);
  border-top: 1px solid #ccd4e1;
  box-shadow: 0 -2px 10px rgba(43,54,126,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 28px 24px 28px;
  z-index: 3000;
  animation: cookieBannerIn 0.77s 0.17s cubic-bezier(0.76,0.13,0.2,0.95);
}
@keyframes cookieBannerIn {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner__text {
  color: var(--text);
  font-size: 1.05rem;
  flex: 1 1 340px;
  line-height: 1.5;
}
.cookie-banner__buttons {
  display: flex;
  gap: 15px;
}
.cookie-banner__button {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  border-radius: 24px;
  padding: 9px 22px;
  font-size: 1rem;
  font-weight: 600;
  border: 1.5px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  transition: background 0.21s, color 0.2s, border 0.16s;
}
.cookie-banner__button.accept {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}
.cookie-banner__button.accept:hover,
.cookie-banner__button.accept:focus {
  background: #139f66;
}
.cookie-banner__button.reject:hover,
.cookie-banner__button.reject:focus {
  background: #f6f6f7;
  color: #b13232;
  border-color: #e35252;
}
.cookie-banner__button.settings {
  background: var(--accent);
  color: var(--primary);
  border: 1.5px solid #dadbe6;
}
.cookie-banner__button.settings:hover,
.cookie-banner__button.settings:focus {
  background: #eaf1f7;
  color: var(--primary);
  border-color: var(--primary);
}

/* Cookie settings modal popup */
.cookie-modal {
  position: fixed;
  z-index: 4001;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(53,55,67,0.27);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: cookieModalIn 0.32s 0.04s cubic-bezier(0.74,0.03,0.36,1.12);
}
@keyframes cookieModalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal__window {
  background: #fff;
  border-radius: 20px;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow);
  padding: 34px 30px 24px 30px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 17px;
  animation: cookieSettingsAppear 0.52s cubic-bezier(0.78,0.13,0.2,0.93);
}
@keyframes cookieSettingsAppear {
  from { transform: scale(0.95) translateY(40px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.cookie-modal__close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  color: #999fb3;
  font-size: 1.8rem;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
}
.cookie-modal__close:hover, .cookie-modal__close:focus {
  background: var(--accent);
  color: var(--primary);
}
.cookie-modal__title {
  font-size: 1.2rem;
  color: var(--primary);
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 700;
}
.cookie-modal__category {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0 9px 0;
  border-bottom: 1px solid #f3f3f5;
}
.cookie-modal__category:last-child { border-bottom: none; }
.cookie-modal__toggle {
  margin-left: auto;
}
.cookie-modal__toggle input[type='checkbox'] {
  appearance: none;
  width: 36px;
  height: 20px;
  background: #e5eaf6;
  border-radius: 20px;
  position: relative;
  outline: none;
  transition: background 0.2s;
  vertical-align: middle;
}
.cookie-modal__toggle input[type='checkbox']:checked {
  background: var(--secondary);
}
.cookie-modal__toggle input[type='checkbox']::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  height: 16px;
  width: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(41,178,125,0.11);
}
.cookie-modal__toggle input[type='checkbox']:checked::before {
  transform: translateX(16px);
}
.cookie-modal__actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 10px;
}

/* Essential cookies - always enabled */
.cookie-modal__category.essential label {
  opacity: 0.65;
  font-style: italic;
}
.cookie-modal__toggle input[disabled] {
  background: #bbc0cc;
  cursor: not-allowed;
}

/* Modal overlay disables scroll when opened */
body.cookie-modal-open {
  overflow: hidden;
}

/* ===========================================================
   RESPONSIVE DESIGN (MOBILE FIRST + DESKTOP ENHANCEMENT)
   =========================================================== */
@media (max-width: 1100px) {
  .feature, .service {
    min-width: 180px;
    max-width: 100%;
  }
}
@media (max-width: 900px) {
  .feature-grid, .service-grid {
    flex-direction: column;
    gap: 20px;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  .container {
    padding: 0 10px;
  }
  .section, section:not(.hero):not(.cta) {
    padding: 27px 6px 33px 6px;
    margin-bottom: 35px;
  }
  .hero {
    padding: 36px 0 29px 0;
    margin-bottom: 10px;
  }
  .hero h1 { font-size: 2.07rem; }
  .hero .content-wrapper { gap: 12px; }
  .feature, .service {
    padding: 19px 12px 18px 12px;
  }
  .features .feature-grid, .services .service-grid {
    gap: 14px;
  }
  .cta {
    padding: 32px 0 38px 0;
    margin: 30px 0 0 0;
  }
  .cta .content-wrapper { gap: 10px; }
  .footer-contact h3 { font-size: 1rem; }
  .testimonial-card {
    padding: 15px 10px 17px 13px;
    margin: 12px 0 16px 0;
  }
  .article-list article {
    padding: 15px 10px 10px 13px;
  }
  .mobile-menu {
    font-size: 1rem;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 19px 8px 18px 12px;
    font-size: 0.98rem;
  }
  .cookie-banner__text {
    font-size: 1.01rem;
    margin-bottom: 6px;
  }
  .cookie-modal__window {
    max-width: 99vw;
    padding: 14px 7vw 18px 13vw;
  }
  .main-nav { display: none; }
}
@media (max-width: 540px) {
  html {
    font-size: 13.5px;
  }
  .footer-brand img { height: 30px; }
}

/* Mobile-first: flex-direction column for layout containers (as needed) */
@media (max-width: 768px) {
  .content-grid, .features, .feature-grid, .service-grid, .article-list, .testimonials {
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }
  .text-image-section {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
}

/* Make sure nothing overlaps, always proper gap */
.card, .feature, .feature-item, .testimonial-card, .article-list article {
  margin-bottom: 20px;
}
.section:last-child, main > section:last-child {
  margin-bottom: 0;
}
/* Ensure no elements overlap on any viewport */
.section, header, footer, .card, .feature, .testimonial-card, .article-list article {
  z-index: 0;
}

/* ===========================================================
   CUSTOM INTERACTIONS & MICRO-ANIMATIONS
   =========================================================== */
.cta-btn, .cookie-banner__button, .main-nav a, .mobile-menu-toggle, .mobile-menu-close, .footer-nav a {
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.cta-btn:active,
.cookie-banner__button:active,
.main-nav a:active,
.mobile-menu-toggle:active,
.mobile-menu-close:active {
  transform: scale(0.97);
}
.feature img, .service img, .footer-contact img {
  transition: filter 0.22s;
}
.feature:hover img, .service:hover img {
  filter: brightness(0.89) contrast(1.04);
}
.testimonial-card:hover {
  box-shadow: 0 6px 24px rgba(43,54,126,0.14);
  border-color: var(--secondary);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* ===========================================================
   ACCESSIBLE COLOR CONTRAST / READABILITY
   =========================================================== */
.testimonial-card {
  background: var(--white);
  color: var(--text);
}
.testimonial-card p,
.testimonial-card strong {
  color: #232a34;
}
.feature, .service, .article-list article {
  background: var(--white);
  color: var(--text);
}

/* ===========================================================
   MISC. UTILITIES FOR WHITE SPACE & FLEX GAPS
   =========================================================== */
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.mt-32 { margin-top: 32px; }
.pb-0 { padding-bottom: 0 !important; }
.pt-0 { padding-top: 0 !important; }
/* Error/success/alert (if needed) */
.alert-success { background: #e8f7ef; color: #27895d; border: 1px solid #b7e1ce; }
.alert-error { background: #fbeaea; color: #b13232; border: 1px solid #ffd5d5; }

/* ===========================================================
   END OF CSS STYLE SHEET
   =========================================================== */