/* ===== 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;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.6;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  background: #fff;
  color: #183153;
  font-size: 16px;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ol, ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.25s ease;
}
img {
  max-width: 100%;
  display: block;
  height: auto;
}

/* ===== BRAND COLORS & TYPOGRAPHY ===== */
:root {
  --color-primary: #183153;
  --color-secondary: #DAE2EC;
  --color-accent: #F4B942;
  --color-background: #fff;
  --color-on-primary: #fff;
  --color-on-secondary: #183153;
  --color-on-accent: #183153;
  --color-grey: #6C7A89;
  --font-display: 'Roboto Slab', serif;
  --font-body: 'Open Sans', Arial, Helvetica, sans-serif;
  --radius-lg: 18px;
  --radius-md: 9px;
  --radius-sm: 4px;
  --shadow-md: 0 2px 12px rgba(24,49,83,0.10);
  --shadow-lg: 0 4px 28px rgba(24,49,83,0.14);
  --blur-bg: blur(7px);
  --animation-speed: 0.4s;
}

/* ===== LAYOUT CONTAINERS & FLEXBOX ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
}

.text-section {
  align-items: flex-start;
  gap: 20px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-background);
}

.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

.feature-card {
  background: var(--color-secondary);
  color: var(--color-on-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px 22px;
  flex: 1 1 260px;
  min-width: 260px;
  max-width: 355px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  font-size: 16px;
  transition: transform 0.22s cubic-bezier(.42,0,.58,1), box-shadow 0.22s cubic-bezier(.42,0,.58,1);
  margin-bottom: 20px;
  position: relative;
}
.feature-card img {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  filter: none;
}
.feature-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-lg);
}

.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.service-card {
  background: var(--color-secondary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 24px 20px;
  flex: 1 1 240px;
  min-width: 240px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
  font-size: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px) scale(1.01);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.faq-item {
  background: var(--color-secondary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 20px 18px;
  transition: box-shadow 0.18s;
  font-size: 16px;
}
.faq-item h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.faq-item p { font-size: 16px; color: var(--color-grey); }

.testimonial-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  color: #183153;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 22px;
  min-width: 260px;
  max-width: 350px;
  flex: 1 1 250px;
  margin-bottom: 20px;
  transition: box-shadow 0.22s;
  font-size: 16px;
}
.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
}
.testimonial-card p {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary);
}
.testimonial-card strong {
  font-size: 16px;
  color: var(--color-grey);
  font-weight: 600;
  margin-top: 6px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.contact-info p {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

.map {
  background: var(--color-secondary);
  color: var(--color-on-secondary);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 8px;
}

.pricing-table {
  width: 100%;
  margin-bottom: 24px;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.pricing-table th, .pricing-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-secondary);
  font-size: 17px;
  font-family: var(--font-display);
}
.pricing-table th {
  background: var(--color-secondary);
  color: var(--color-primary);
  font-size: 18px;
  font-weight: bold;
  text-align: left;
}
.pricing-table tr:last-child td {
  border-bottom: none;
}
.pricing-details {
  font-size: 16px;
  color: var(--color-grey);
}
.pricing-details ul {
  list-style: disc;
  margin-left: 22px;
  margin-top: 6px;
}

/* ===== TYPOGRAPHY & HEADINGS ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-weight: bold;
  letter-spacing: 0.01em;
}
h1 { font-size: 2.5rem; line-height: 1.15; margin-bottom: 14px; }
h2 { font-size: 2rem;   line-height: 1.18; margin-bottom: 10px; }
h3 { font-size: 1.3rem; line-height: 1.20; margin-bottom: 8px; }
h4 { font-size: 1.08rem; margin-bottom: 6px; }

p, ul, ol, li, label {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-primary);
}

strong, b {
  color: var(--color-primary);
  font-weight: 900;
}

.text-section h2, .text-section h1 {
  margin-top: 0;
}

/* ===== BUTTONS & CTA ===== */
.cta-button,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  background: var(--color-accent);
  color: var(--color-on-accent);
  border: none;
  border-radius: var(--radius-lg);
  padding: 13px 34px;
  margin-top: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  outline: none;
  letter-spacing: 0.02em;
  transition: background 0.13s, box-shadow 0.16s, color 0.18s, transform 0.18s;
}
.cta-button:hover, .cta-button:focus, 
button:hover, button:focus {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px) scale(1.04);
}

/* ===== HEADER & NAVIGATION ===== */
header {
  width: 100%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: 0;
  box-shadow: 0 7px 24px rgba(24,49,83,0.09);
  position: relative;
  z-index: 1100;
}
header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 22px;
  min-height: 76px;
  justify-content: space-between;
}
header img {
  height: 48px;
  margin-right: 18px;
}
header nav {
  display: flex;
  gap: 18px;
}
header nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.09rem;
  padding: 7px 15px;
  color: var(--color-on-primary);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color 0.13s, background 0.15s;
}
header nav a:hover, header nav a:focus {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
header .cta-button {
  margin-top: 0;
  font-size: 18px;
  padding: 10px 23px;
}

/* ===== FOOTER ===== */
footer {
  width: 100%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: 0 0 32px 0;
  box-shadow: 0 -6px 22px rgba(24,49,83,0.06);
  font-size: 16px;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 20px;
}
footer .content-wrapper {
  display: flex;
  flex-direction: row;
  gap: 36px;
  align-items: flex-start;
  justify-content: space-between;
}
footer img {
  height: 38px;
  margin-bottom: 12px;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
footer nav a {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: bold;
  transition: color 0.15s;
}
footer nav a:hover, footer nav a:focus {
  color: #fff;
}
footer .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--color-on-primary);
  font-size: 16px;
}
footer .footer-contact p {
  color: var(--color-on-primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
footer .footer-contact img {
  height: 18px;
  width: 18px;
  margin-right: 3px;
}

/* ===== MOBILE NAVIGATION ===== */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 21px;
  z-index: 1700;
  width: 49px;
  height: 49px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  border: none;
  border-radius: 50%;
  font-size: 2.2rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.14s, color 0.17s, box-shadow 0.18s, transform 0.12s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-lg);
  transform: scale(1.07);
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(24,49,83, 0.97);
  color: var(--color-on-primary);
  z-index: 3200;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.33s var(--animation-speed) cubic-bezier(.92,0,.26,1.02), opacity 0.23s 0.09s;
  overflow-y: auto;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-close {
  align-self: flex-end;
  margin: 26px 35px 0 0;
  font-size: 2.2rem;
  background: none;
  color: var(--color-accent);
  border: none;
  border-radius: 50%;
  width: 46px; height: 46px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 34px 0 0 42px;
}
.mobile-nav a {
  font-size: 1.28rem;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--color-accent);
  padding: 14px 10px 8px 0;
  border-bottom: 1px solid rgba(250,250,250,0.07);
  transition: color 0.19s, background 0.17s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: #fff;
  background: none;
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: 0 -4px 22px rgba(24,49,83,0.14);
  padding: 20px 10px 28px 10px;
  z-index: 4100;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 36px;
  justify-content: center;
  font-size: 1.05rem;
  animation: cookie-slide-in 0.7s cubic-bezier(.24,.84,.27,1.05);
}
@keyframes cookie-slide-in {
  from { transform: translateY(110%); opacity:0.2; }
  to { transform: translateY(0); opacity:1; }
}
.cookie-banner__actions {
  display: flex;
  flex-direction: row;
  gap: 18px;
}
.cookie-banner button {
  font-size: 17px;
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  outline: none;
  padding: 9px 25px;
  cursor: pointer;
  background: var(--color-accent);
  color: var(--color-on-accent);
  margin-top: 0;
  box-shadow: var(--shadow-md);
  transition: background 0.12s, color 0.14s, transform 0.11s;
}
.cookie-banner button:hover, .cookie-banner button:focus {
  background: #fff;
  color: var(--color-primary);
  transform: scale(1.03);
}
.cookie-banner__actions .cookie-btn-settings {
  background: none;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  padding: 9px 22px;
  margin-left: 9px;
  box-shadow: none;
  transition: color 0.13s, border-color 0.13s;
}
.cookie-banner__actions .cookie-btn-settings:hover {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

/* ===== COOKIE MODAL ===== */
.cookie-modal-overlay {
  position: fixed;
  z-index: 4200;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(24,49,83,0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s;
}
.cookie-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal {
  background: #fff;
  color: var(--color-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 30px 28px 30px;
  min-width: 310px;
  max-width: 98vw;
  max-height: 87vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeIn 0.41s cubic-bezier(.42,0,.58,1);
  position: relative;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
.cookie-modal__close {
  position: absolute; right: 16px; top: 16px;
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 2.1rem;
  border-radius: var(--radius-sm);
  padding: 3px 9px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.cookie-modal__close:hover, .cookie-modal__close:focus {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.cookie-cats {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 18px;
}
.cookie-cat-item {
  background: var(--color-secondary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.cookie-cat-item label {
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-primary);
  font-weight: bold;
}
.cookie-cat-item input[type=checkbox] {
  width: 22px;
  height: 22px;
  accent-color: var(--color-accent);
  cursor: pointer;
  margin-left: 12px;
}
.cookie-cat-item .category-always {
  color: var(--color-accent);
  font-weight: 800;
  font-size: 1.02em;
  margin-left: 16px;
}
.cookie-modal__actions {
  display: flex;
  flex-direction: row;
  gap: 13px;
  margin-top: 12px;
}
.cookie-modal__actions button {
  font-size: 17px;
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  padding: 9px 22px;
  margin-top: 0;
  cursor: pointer;
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-md);
  transition: background 0.15s, color 0.15s;
}
.cookie-modal__actions button:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ======= SECTION SPACING/ALIGNMENT (CRITICAL) ======= */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  background: #fff;
  padding: 24px 20px;
}
.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;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Spacing between all cards/sections (CRITICAL) */
section, .section {
  margin-bottom: 60px;
  padding-top: 40px;
  padding-bottom: 40px;
}
main > section:last-child, 
main > .section:last-child {
  margin-bottom: 0;
}

/* ===== VISUAL HIERARCHY ===== */
section h2:not(:first-child) {
  margin-top: 18px;
}
h1, h2, h3, h4 {
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* Micro-interactions */
a, .card, .cta-button, button, .feature-card, .service-card {
  will-change: transform, box-shadow, color, background;
}

/* High contrast for testimonial/review cards */
.testimonial-card, .testimonial-card p, .testimonial-card strong {
  color: #183153;
  background: #fff;
}

/* ===== RESPONSIVE DESIGN (MOBILE FIRST) ===== */
@media (max-width: 1030px) {
  .container {
    max-width: 980px;
  }
  .feature-grid, .service-list, .testimonial-list, .content-grid { gap: 16px; }
}
@media (max-width: 850px) {
  .container {
    max-width: 730px;
  }
  .content-wrapper, .feature-grid, .service-list, .testimonial-list, .content-grid {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  .feature-card,
  .service-card,
  .testimonial-card {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  footer .content-wrapper {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
}
@media (max-width: 1030px) {
  header .cta-button { display: none; }
}
@media (max-width: 900px) {
  header .container {
    flex-direction: column;
    gap: 14px;
    min-height: 63px;
    align-items: flex-start;
  }
  header nav {
    flex-wrap: wrap;
    gap: 12px;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .section, section {
    padding: 28px 0 28px 0;
    margin-bottom: 36px;
  }
  .container {
    padding: 0 9px;
  }
  header nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .text-image-section, .content-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .feature-grid, .service-list, .testimonial-list, .content-grid {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .feature-card,
  .service-card,
  .testimonial-card {
    width: 100%;
    min-width: 150px;
    max-width: 100%;
  }
  header img {
    height: 36px;
    margin-right: 6px;
  }
  footer .content-wrapper {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 6px 32px 12px;
  }
}
@media (max-width: 490px) {
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1rem; }
  .feature-card, .service-card, .testimonial-card {
    padding: 18px 7px;
  }
  header img, footer img {
    height: 28px;
  }
  .cookie-modal {
    padding: 20px 8px 18px 8px;
    min-width: 0;
    font-size: 15px;
  }
  .cookie-modal__close {
    right: 2px;
    top: 3px;
  }
}

/* ===== VISUAL ELEMENTS: CARDS, SHADOWS, EFFECTS ===== */
.card, .feature-card, .service-card, .testimonial-card {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  background: #fff;
}
.card:hover { box-shadow: var(--shadow-lg); }

/* ===== UTILITY CLASSES ===== */
.hide { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-100 { width: 100% !important; }
.mt-1 { margin-top: 14px; }

/* ===== FOCUS STYLES FOR ACCESSIBILITY ===== */
a:focus, button:focus, .cta-button:focus, input:focus, .mobile-menu-toggle:focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  z-index: 99;
}

/* ===== PRINT ADJUSTMENTS ===== */
@media print {
  header, footer, .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal-overlay {
    display: none !important;
  }
  main, section, .container {
    width: 100%;
    margin: 0; padding: 0;
  }
}
