/* ===============================
   CSS RESET & BASE STYLES
   =============================== */
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 { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
body {
  font-family: 'Roboto', Arial, sans-serif;
  color: #1E4057; /* brand primary */
  background: #F6F8FA;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; height: auto; }
a { color: #1E4057; text-decoration: none; transition: color 0.15s; }
a:hover, a:focus { color: #FFD966; outline: none; }
ul, ol { padding-left: 24px; }
li + li { margin-top: 8px; }
h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  color: #1E4057;
  font-weight: 700;
  letter-spacing: 0.01em;
}
h1 { font-size: 2.25rem; margin-bottom: 20px; line-height: 1.15; }
h2 { font-size: 1.5rem; margin-bottom: 16px; line-height: 1.2; }
h3 { font-size: 1.125rem; margin-bottom: 12px; }
h4, h5 { font-size: 1rem; margin-bottom: 10px; }
p, ul, ol, blockquote { margin-bottom: 16px; }
blockquote {
  font-style: italic;
  color: #55809B;
  border-left: 4px solid #A8B9C6;
  padding-left: 16px;
  margin-bottom: 24px;
}
hr {
  border: none; border-top: 1px solid #E4E7EA; margin: 32px 0;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section, main > section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
@media (max-width: 768px) {
  .section, main > section { padding: 32px 10px; margin-bottom: 40px; }
  .container { padding: 0 8px; }
}

/* ===============================
   TYPOGRAPHY SCALE
   =============================== */
body { font-size: 16px; }
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.125rem; }
  h3 { font-size: 1rem; }
}

/* ===============================
   HEADER & NAVIGATION
   =============================== */
header {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(30,64,87,0.05);
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 100;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}
header nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
header nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  color: #1E4057;
  font-weight: 500;
  padding: 5px 8px;
  transition: color 0.2s;
  position: relative;
}
header nav a:hover,
header nav a:focus {
  color: #FFD966;
}
header .btn-primary {
  margin-left: 24px;
}
header img[alt="Trygga Takexperter"] {
  height: 50px;
  width: auto;
  margin-right: 20px;
}

/* Hamburger (mobile) menu button */
.mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  color: #1E4057;
  display: none;
  margin-left: 12px;
  z-index: 201;
  transition: color 0.15s;
}
.mobile-menu-toggle:focus { color: #FFD966; }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30,64,87,0.96);
  color: #fff;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.68,-0.55,.27,1.55);
  z-index: 200;
  display: flex;
  flex-direction: column;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  background: none;
  border: none;
  color: #FFD966;
  font-size: 2.2rem;
  align-self: flex-end;
  margin: 24px 24px 8px 0;
  cursor: pointer;
  z-index: 202;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 42px 24px;
}
.mobile-nav a {
  color: #fff;
  font-size: 1.25rem;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
  padding: 8px 0;
  transition: color 0.15s;
}
.mobile-nav a:focus,
.mobile-nav a:hover { color: #FFD966; }

@media (max-width: 1000px) {
  header .container nav { display: none; }
  header .btn-primary { display: none; }
  .mobile-menu-toggle { display: block; }
}
@media (min-width: 1001px) {
  .mobile-menu { display: none!important; }
}


/* ===============================
   BUTTONS & INTERACTIONS
   =============================== */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 13px 32px;
  border-radius: 32px;
  border: none;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.22s;
  box-shadow: 0 2px 12px rgba(30,64,87,0.07);
  text-align: center;
  min-width: 160px;
}
.btn-primary {
  background: #1E4057;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30,64,87,0.17);
}
.btn-primary:hover, .btn-primary:focus {
  background: #294d67;
  color: #FFD966;
}
.btn-secondary {
  background: #A8B9C6;
  color: #1E4057;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: #FFD966;
  color: #1E4057;
}

/* ===============================
   HERO SECTION
   =============================== */
.hero-section {
  background: linear-gradient(115deg, #EAF1F6 60%, #D2DEE8 100%);
  border-bottom: 3px solid #A8B9C6;
  padding: 54px 0;
}
.hero-section .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}
.hero-section .content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  max-width: 650px;
}
@media (max-width: 600px) {
  .hero-section { padding: 26px 0 18px 0; }
  .hero-section .content-wrapper { gap: 12px; }
}

/* ===============================
   FEATURE GRID & FLEX PATTERNS
   =============================== */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 30px 0 0 0;
  align-items: stretch;
}
.feature-grid > div {
  flex: 1 1 220px;
  background: #fff;
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 2px 12px rgba(30,64,87,0.07);
  min-width: 230px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #E4E7EA;
  transition: box-shadow 0.2s, border-color 0.18s;
}
.feature-grid > div:hover {
  box-shadow: 0 4px 16px rgba(30,64,87,0.13);
  border-color: #A8B9C6;
}
.feature-grid img { width: 40px; height: 40px; margin-bottom: 12px; }
.feature-grid h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: #1E4057;
}
@media (max-width: 900px) {
  .feature-grid {
    justify-content: center;
    gap: 20px;
  }
  .feature-grid > div { min-width: 180px; max-width: 100%; }
}
@media (max-width: 700px) {
  .feature-grid {
    flex-direction: column;
    gap: 18px;
  }
  .feature-grid > div { width: 100%; max-width: unset; }
}

/* ===============================
   FLEX CONTENT PATTERNS
   =============================== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(30,64,87,0.07);
  padding: 24px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #E4E7EA;
}
.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;
}
@media (max-width: 768px) {
  .content-grid, .card-container, .text-image-section { flex-direction: column; gap: 18px; }
}

/* ===============================
   USP BANNER / CERTIFICATES
   =============================== */
.usp-banner {
  background: #F7F9FB;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(30,64,87,0.05);
  padding: 30px 20px;
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.usp-banner .certificates {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  align-items: center;
}
.certificates img { width: 38px; height: 38px; }

.cta-banner {
  background: #1E4057;
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(30,64,87,0.11);
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
  text-align: center;
}
.cta-banner h2 { color: #FFD966; }
.cta-banner .btn-primary { margin-top: 16px; background: #FFD966; color: #1E4057; }
.cta-banner .btn-primary:hover, .cta-banner .btn-primary:focus { background: #A8B9C6; color: #1E4057; }


/* ===============================
   TESTIMONIALS DESIGN
   =============================== */
.testimonial-slider,
.testimonial-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 22px 0 8px 0;
}
.testimonial-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(30,64,87,0.09);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 28px;
  min-width: 220px;
  max-width: 370px;
  border: 1px solid #E4E7EA;
  transition: box-shadow 0.18s, border-color 0.14s;
  margin-bottom: 20px;
  color: #1E4057;
}
.testimonial-card p {
  font-size: 1.1rem;
  color: #294d67;
  margin-bottom: 10px;
}
.testimonial-card strong { color: #1E4057; }
.testimonial-card:hover, .testimonial-card:focus-within {
  box-shadow: 0 8px 20px rgba(30,64,87,0.12);
  border-color: #A8B9C6;
}
.star-rating {
  display: flex;
  gap: 3px;
  align-items: center;
  margin-top: 6px;
}
.star-rating img { width: 20px; height: 20px; }
.average-rating {
  display: flex;
  align-items: center;
  color: #1E4057;
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 2px 14px rgba(30,64,87,0.08);
  font-weight: 600;
  padding: 13px 18px;
  font-size: 1rem;
  margin: 10px 0 24px 0;
  gap: 7px;
}
.average-rating img { width: 22px; height: 22px; margin-right: 7px; }

@media (max-width: 780px) {
  .testimonial-slider, .testimonial-list { flex-direction: column; gap: 16px; }
  .testimonial-card { max-width: 100%; min-width: unset; }
}


/* ===============================
   TEAM & SERVICE OVERVIEW
   =============================== */
.team-overview, .service-list, .project-overview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}
.team-overview > p, .team-overview > ul {
  flex: 1 1 250px;
  max-width: 430px;
}
.service-list > div {
  flex: 1 1 210px;
  background: #fff;
  border-radius: 17px;
  padding: 26px 18px;
  box-shadow: 0 2px 11px rgba(30,64,87,0.08);
  display: flex;
  flex-direction: column;
  gap: 13px;
  align-items: flex-start;
  border: 1px solid #E4E7EA;
  min-width: 220px;
  max-width: 270px;
  transition: box-shadow 0.15s, border-color 0.16s;
}
.service-list > div:hover {
  box-shadow: 0 4px 16px rgba(30,64,87,0.13);
  border-color: #FFD966;
}
.service-list img { height: 38px; width: 38px; }
@media (max-width: 900px) {
  .service-list, .project-overview-list, .team-overview { gap: 18px; }
  .service-list > div, .project-overview-list > div, .team-overview > p, .team-overview > ul { max-width: 100%; }
}
@media (max-width: 650px) {
  .service-list, .project-overview-list, .team-overview { flex-direction: column; gap: 14px; }
}

.project-overview-list > div {
  flex: 1 1 240px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(30,64,87,0.07);
  padding: 22px 19px;
  border: 1px solid #E4E7EA;
  margin-bottom: 18px;
  min-width: 200px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.16s, border-color 0.13s;
}
.project-overview-list > div:hover {
  box-shadow: 0 8px 20px rgba(30,64,87,0.10);
  border-color: #A8B9C6;
}
.project-overview-list em {
  color: #294d67;
  font-style: italic;
  font-size: 0.98rem;
  margin-top: 2px;
}

/* ===============================
   CONTENT WRAPPER & CARD SPACING
   =============================== */
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.text-section {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(30,64,87,0.07);
  padding: 36px 30px;
  margin-bottom: 14px;
  border: 1px solid #E4E7EA;
  color: #294d67;
}
.text-section h1,
.text-section h2,
.text-section h3 {
  color: #1E4057;
  margin-top: 0;
}
@media (max-width: 900px) {
  .text-section {
    padding: 20px 12px;
  }
}

/* ===============================
   LIST STYLES / FLEX FOR FEATURE-ITEM
   =============================== */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
ul.topic-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 16px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
}
ul.topic-categories li {
  background: #A8B9C6;
  color: #1E4057;
  border-radius: 12px;
  padding: 7px 16px;
  font-size: 0.95rem;
}

/* ===============================
   FOOTER DESIGN
   =============================== */
footer {
  background: #1E4057;
  color: #fff;
  padding: 48px 0 28px 0;
  margin-top: 36px;
  font-size: 1rem;
}
footer .container { display: flex; flex-direction: column; align-items: stretch; }
footer .content-wrapper {
  display: flex; 
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
  flex-direction: row;
  justify-content: space-between;
  border-bottom: 1px solid #274B65;
  padding-bottom: 24px;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
footer nav a { color: #A8B9C6; font-size: 1rem; transition: color 0.14s; }
footer nav a:hover, footer nav a:focus { color: #FFD966; }
footer .footer-legal {
  font-size: 0.95rem;
  color: #A8B9C6;
  margin-top: 12px;
}
footer .footer-legal a { color: #A8B9C6; margin: 0 4px; }
footer .footer-legal a:hover, footer .footer-legal a:focus { color: #FFD966; }
footer .contact-short {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
  font-size: 0.96rem;
  min-width: 220px;
}
footer .contact-short img {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: middle;
  display: inline-block;
}
footer a img[alt="Trygga Takexperter"] {
  width: 58px;
  height: auto;
  margin-bottom: 8px;
}
@media (max-width: 900px) {
  footer .content-wrapper { flex-direction: column; gap: 18px; align-items: flex-start; }
  footer nav { flex-direction: row; flex-wrap: wrap; gap: 12px; }
}

/* ===============================
   COOKIE CONSENT BANNER & MODAL
   =============================== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5000;
  background: #1E4057;
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 24px 24px 24px 30px;
  box-shadow: 0 -2px 22px rgba(30,64,87,0.19);
  font-size: 1rem;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.48s cubic-bezier(.68,-0.55,.27,1.55), opacity 0.25s;
}
.cookie-banner.active {
  transform: translateY(0);
  opacity: 1;
}
.cookie-banner .cookie-banner-text {
  flex: 1 1 300px;
  max-width: 620px;
  color: #fff;
}
.cookie-banner-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.cookie-btn {
  border: none;
  border-radius: 24px;
  background: #FFD966;
  color: #1E4057;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 11px 24px;
  margin-right: 4px;
  box-shadow: 0 2px 8px rgba(30,64,87,0.08);
  cursor: pointer;
  transition: background 0.15s, color 0.12s;
}
.cookie-btn:hover, .cookie-btn:focus { background: #A8B9C6; color: #1E4057; }
.cookie-btn.cookie-reject {
  background: #fff;
  color: #1E4057;
  border: 1px solid #A8B9C6;
}
.cookie-btn.cookie-settings { background: #A8B9C6; color: #1E4057; }
.cookie-btn.cookie-accept { background: #FFD966; color: #1E4057; }

/* Cookie Modal */
.cookie-modal-overlay {
  position: fixed;
  z-index: 6000;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30,64,87,0.74);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s;
}
.cookie-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 32px rgba(30,64,87,0.18);
  padding: 32px 28px;
  min-width: 340px;
  max-width: 98vw;
  color: #1E4057;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateY(90px);
  opacity: 0;
  transition: transform 0.33s, opacity 0.17s;
}
.cookie-modal-open .cookie-modal {
  transform: translateY(0);
  opacity: 1;
}
.cookie-modal h2 {
  font-size: 1.3rem;
  margin-bottom: 9px;
}
.cookie-modal-category-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cookie-modal-category {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.02rem;
}
.cookie-category-toggle {
  width: 36px;
  height: 20px;
  border-radius: 12px;
  background: #A8B9C6;
  margin-right: 8px;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.cookie-category-toggle.enabled {
  background: #FFD966;
}
.cookie-category-toggle::after {
  content: '';
  display: block;
  position: absolute;
  left: 4px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.22s;
}
.cookie-category-toggle.enabled::after {
  left: 20px;
}
.cookie-modal-action-btns {
  display: flex;
  gap: 13px;
  margin-top: 12px;
}
.cookie-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: #A8B9C6;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.1s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus { color: #FFD966; }

@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 8px 16px 16px;
    font-size: 0.97rem;
  }
  .cookie-modal { padding: 18px 8px; min-width: 180px; }
}

/* ===============================
   MISCELLANEOUS / SMOOTH EFFECTS
   =============================== */
::-webkit-input-placeholder { color: #A8B9C6; }
::-moz-placeholder { color: #A8B9C6; }
:-ms-input-placeholder { color: #A8B9C6; }
::placeholder { color: #A8B9C6; }

/* SCROLLBAR (for Desktop Browsers) */
::-webkit-scrollbar { width: 9px; background: #F6F8FA; }
::-webkit-scrollbar-thumb { background: #A8B9C6; border-radius: 6px; }

/* Transitions */
.section, .content-wrapper, .text-section, .card, .testimonial-card, .feature-grid > div, .cta-banner, .usp-banner, .cookie-modal {
  transition: box-shadow 0.2s, border-color 0.13s, background 0.14s, color 0.17s;
}

/* ===============================
   ACCESSIBILITY & INTERACTIONS
   =============================== */
:focus { outline: 2px solid #FFD966; outline-offset: 1px; }

/* ===============================
   FORM (if any)
   =============================== */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}
input[type="text"], input[type="email"], textarea, select {
  border: 1px solid #A8B9C6;
  border-radius: 8px;
  padding: 10px 14px;
  width: 100%;
  margin-bottom: 16px;
  background: #F6F8FA;
  color: #1E4057;
  transition: border-color 0.13s;
}
input:focus, textarea:focus, select:focus { border-color: #FFD966; }
button { cursor: pointer; }

/* ===============================
   PRINT STYLES
   =============================== */
@media print {
  header, footer, .cookie-banner, .mobile-menu { display: none !important; }
  main { padding: 0 !important; }
}
