/* ====================================================================== */
/* 1. CSS RESET & NORMALIZATION                                            */
/* ====================================================================== */
html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *: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;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  outline: none;
}
button, [type="button"], [type="reset"], [type="submit"] {
  cursor: pointer;
}

/* ====================================================================== */
/* 2. ROOT VARIABLES & BRAND COLORS                                        */
/* ====================================================================== */
:root {
  --color-primary: #163464;
  --color-secondary: #3378C6;
  --color-accent: #F6C045;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F9FB;
  --color-text: #222B38;
  --color-muted: #6E7D91;
  --color-border: #E3E8F0;
  --color-shadow: rgba(22, 52, 100, 0.06);
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 3px 12px 0 var(--color-shadow);
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Open Sans', Arial, Helvetica, sans-serif;
}

/* ====================================================================== */
/* 3. GLOBAL STYLES & TYPOGRAPHY                                          */
/* ====================================================================== */
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 2.25rem;
  margin-bottom: 20px;
}
h2 {
  font-size: 1.5rem;
  margin-bottom: 18px;
}
h3 {
  font-size: 1.15rem;
}
@media (min-width: 768px) {
  h1 {
    font-size: 2.75rem;
  }
  h2 {
    font-size: 2rem;
  }
}

p, li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
}
strong {
  color: var(--color-primary);
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-wrapper {
  width: 100%;
  margin: 0 auto;
  max-width: 800px;
}

.text-section {
  margin-bottom: 32px;
}

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

/* white space between blocks */
main section:not(:last-child) {
  margin-bottom: 60px;
}

/* Visual hierarchy spacing */
ul, ol {
  margin-bottom: 16px;
}
ul li, ol li {
  margin-bottom: 8px;
}

/* ====================================================================== */
/* 4. HEADER & NAVIGATION                                                 */
/* ====================================================================== */
header {
  background: var(--color-bg);
  box-shadow: 0 2px 16px 0 rgba(22,52,100,0.03);
  padding-top: 14px;
  padding-bottom: 14px;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
header img {
  height: 38px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-primary);
  padding: 6px 0;
  transition: color 0.16s;
  position: relative;
}
.main-nav a:hover,
.main-nav a:focus {
  color: var(--color-secondary);
}
.main-nav a.active {
  color: var(--color-accent);
}
.cta-btn {
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  padding: 10px 28px;
  margin-left: 12px;
  box-shadow: 0 2px 8px 0 var(--color-shadow);
  border: none;
  outline: none;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s;
  display: inline-block;
}
.cta-btn:hover, .cta-btn:focus {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 4px 16px 0 var(--color-shadow);
}

/* Mobile only: burger menu toggle */
.mobile-menu-toggle {
  display: none;
  font-size: 2.1rem;
  background: none;
  color: var(--color-primary);
  border: none;
  outline: none;
  margin-left: 12px;
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-bg);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.33s cubic-bezier(.77,0,.18,1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 32px 32px 24px;
  box-shadow: 0 3px 32px 0 var(--color-shadow);
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}
.mobile-menu-close {
  align-self: flex-end;
  background: none;
  font-size: 2rem;
  color: var(--color-primary);
  border: none;
  margin-bottom: 32px;
  transition: color 0.18s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--color-secondary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-primary);
  padding: 8px 0;
  border-radius: var(--radius-sm);
  transition: background 0.16s, color 0.18s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--color-secondary);
  background: var(--color-bg-alt);
}

@media (max-width: 1024px) {
  .main-nav {
    gap: 18px;
  }
  .cta-btn {
    margin-left: 0;
    font-size: 0.98rem;
  }
  header img {
    height: 34px;
  }
}
@media (max-width: 900px) {
  header .container {
    gap: 8px;
  }
}
@media (max-width: 768px) {
  .main-nav {
    display: none !important;
  }
  .cta-btn {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  header .container {
    padding-right: 0;
  }
}

/* ====================================================================== */
/* 5. HERO SECTION                                                         */
/* ====================================================================== */
.hero-section {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  margin-bottom: 60px;
  padding: 56px 0 44px 0;
  box-shadow: 0 5px 18px 0 var(--color-shadow);
  display: flex;
}
.hero-section .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 640px;
}
.hero-section h1 {
  color: var(--color-primary);
  margin-bottom: 18px;
}
.hero-section p {
  color: var(--color-muted);
  max-width: 90%;
  margin-bottom: 22px;
}
.hero-section .cta-btn {
  margin-top: 8px;
  font-size: 1.1rem;
}
@media (max-width: 768px) {
  .hero-section {
    padding: 36px 0 30px 0;
    margin-bottom: 36px;
  }
  .hero-section .content-wrapper {
    max-width: 100%;
  }
  .hero-section h1 {
    font-size: 1.68rem;
  }
}

/* ====================================================================== */
/* 6. CARDS, GRIDS, FLEX CONTAINERS                                       */
/* ====================================================================== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-bg);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 20px;
  transition: box-shadow 0.20s, transform 0.20s;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  flex: 1 1 180px;
}
.card:hover {
  box-shadow: 0 8px 32px 0 var(--color-shadow);
  transform: translateY(-2px) scale(1.012);
}
.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: 16px;
  }
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: #fff;
  color: var(--color-text);
  border-radius: var(--radius);
  box-shadow: 0 3px 12px 0 var(--color-shadow);
  margin-bottom: 20px;
  border-left: 4px solid var(--color-accent);
  font-size: 1rem;
  transition: box-shadow 0.18s;
}
.testimonial-card p {
  color: var(--color-text);
  font-style: italic;
}
.testimonial-card span {
  color: var(--color-muted);
  font-size: 0.95rem;
  font-style: normal;
}
.testimonial-card:hover {
  box-shadow: 0 8px 32px 0 var(--color-shadow);
}

/* Ensure testimonial contrast */
.testimonial-card p, .testimonial-card span {
  color: #222B38;
}

/* Faq accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.faq-accordion details {
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  transition: box-shadow 0.13s;
  box-shadow: 0 2px 9px 0 var(--color-shadow);
  border: 1px solid var(--color-border);
}
.faq-accordion details[open] {
  box-shadow: 0 5px 24px 0 var(--color-shadow);
}
.faq-accordion summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-bottom: 4px;
  user-select: none;
  outline: none;
}
.faq-accordion summary:focus {
  color: var(--color-secondary);
}

/* ====================================================================== */
/* 7. TEXT, LINKS, BUTTONS                                                */
/* ====================================================================== */
.text-section a {
  color: var(--color-secondary);
  text-decoration: underline;
  transition: color 0.15s;
}
.text-section a:hover, .text-section a:focus {
  color: var(--color-primary);
}

.button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  border: none;
  padding: 11px 32px;
  margin: 0 10px 0 0;
  box-shadow: 0 2px 8px 0 var(--color-shadow);
  transition: background 0.19s, color 0.19s, box-shadow 0.15s;
}
.button:hover, .btn:hover,
.button:focus, .btn:focus {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 6px 20px 0 var(--color-shadow);
}

/***** Inputs and search *****/
input, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 1rem;
  margin-bottom: 12px;
  transition: border 0.16s;
}
input:focus, textarea:focus {
  border: 1.5px solid var(--color-secondary);
  outline: none;
}
label {
  font-family: var(--font-display);
  font-size: 1.06rem;
  color: var(--color-primary);
}

/* ====================================================================== */
/* 8. SERVICE LABEL / PRICE                                                */
/* ====================================================================== */
.service-price {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-left: 6px;
  margin-top: 4px;
}

/* ====================================================================== */
/* 9. FOOTER                                                              */
/* ====================================================================== */
footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 38px 0 26px 0;
  margin-top: 60px;
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 18px 0 8px 0;
  justify-content: center;
}
.footer-nav a {
  color: var(--color-muted);
  font-size: 1rem;
  transition: color 0.18s;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--color-secondary);
}
.footer-contact {
  color: var(--color-muted);
  font-size: 0.98rem;
  text-align: center;
  line-height: 1.6;
}
footer img {
  height: 36px;
}
@media (max-width: 768px) {
  footer {
    padding: 22px 0 18px 0;
    margin-top: 35px;
  }
  .footer-nav {
    gap: 12px;
    font-size: 0.95rem;
  }
  footer img {
    height: 26px;
  }
}

/* ====================================================================== */
/* 10. COOKIE CONSENT BANNER AND MODAL                                    */
/* ====================================================================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 1200;
  background: #fff;
  border-top: 2px solid var(--color-border);
  box-shadow: 0 -2px 24px 0 var(--color-shadow);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  padding: 22px 34px;
  font-size: 1rem;
  animation: slide-banner-in 0.44s cubic-bezier(.77,0,.18,1) 1;
}
.cookie-banner__message {
  flex: 1 1 0%;
  color: var(--color-text);
  font-size: 1rem;
  font-family: var(--font-body);
}
.cookie-banner__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.cookie-btn {
  padding: 8px 22px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  transition: background 0.16s, color 0.15s;
}
.cookie-btn.accept {
  background: var(--color-primary);
  color: #fff;
}
.cookie-btn.accept:hover, .cookie-btn.accept:focus {
  background: var(--color-secondary);
}
.cookie-btn.reject {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: #f9d49f;
  color: var(--color-primary);
}
.cookie-btn.settings {
  background: none;
  color: var(--color-accent);
  text-decoration: underline;
  padding: 8px 14px;
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  color: var(--color-primary);
}
@keyframes slide-banner-in {
  from { transform: translateY(80px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 18px;
    font-size: 0.98rem;
  }
  .cookie-banner__actions {
    gap: 8px;
  }
}

/* Cookie modal */
.cookie-modal {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(22,52,100,0.12);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.cookie-modal.open {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal__content {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 34px;
  min-width: 320px;
  max-width: 95vw;
  box-shadow: 0 8px 32px 0 var(--color-shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cookie-modal__title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.19rem;
  margin-bottom: 5px;
}
.cookie-modal__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.cookie-modal__label {
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1.01rem;
  font-weight: 500;
}
.cookie-switch {
  width: 42px;
  height: 22px;
  background: var(--color-bg-alt);
  border-radius: 22px;
  position: relative;
  flex-shrink: 0;
  border: 1.5px solid var(--color-border);
  box-sizing: border-box;
}
.cookie-switch input[type=checkbox] {
  display: none;
}
.cookie-switch__slider {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: var(--color-primary);
  border-radius: 50%;
  transition: left 0.18s, background 0.15s;
}
.cookie-switch input[type=checkbox]:checked + .cookie-switch__slider {
  left: 23px;
  background: var(--color-secondary);
}
.cookie-modal__actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 10px;
}
.cookie-modal__close {
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 1.5rem;
  position: absolute;
  top: 20px;
  right: 30px;
  cursor: pointer;
  transition: color 0.16s;
}
.cookie-modal__close:hover {
  color: var(--color-primary);
}
@media (max-width: 600px) {
  .cookie-modal__content {
    padding: 18px 8px;
    min-width: 0;
    font-size: 0.98rem;
  }
}
/* Essential cookies fixed */
.cookie-modal__row.essential .cookie-switch {
  opacity: 0.7;
  pointer-events: none;
  background: #eee;
  border: 1.5px solid #cecfd1;
}

/* ====================================================================== */
/* 11. MISC: BLOG SEARCH, CATEGORIES, ETC                                 */
/* ====================================================================== */
#blog-search {
  margin-top: 10px;
  max-width: 370px;
  font-size: 1rem;
}

/* Category chips */
strong + span, .blog-categories span {
  display: inline-block;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 2px 13px;
  margin-bottom: 0px;
  margin-left: 2px;
}

/* ====================================================================== */
/* 12. RESPONSIVE MEDIA QUERIES                                           */
/* ====================================================================== */
@media (max-width: 600px) {
  h1 {
    font-size: 1.42rem;
  }
  h2 {
    font-size: 1.09rem;
  }
  .section, .card, .testimonial-card {
    padding: 18px 8px;
    font-size: 0.97rem;
  }
  .container {
    padding: 0 8px;
  }
  .card {
    min-width: 0;
    padding: 16px 7px;
  }
}

/* ====================================================================== */
/* 13. TRANSITIONS, MICRO-INTERACTIONS                                    */
/* ====================================================================== */
a, .cta-btn, .btn, .card, .testimonial-card, .cookie-btn {
  transition: color 0.16s, background 0.16s, box-shadow 0.17s, transform 0.16s;
}

/* ====================================================================== */
/* 14. VISUAL REFINEMENTS, UTILITIES                                      */
/* ====================================================================== */
.border-bottom {
  border-bottom: 1px solid var(--color-border);
}
.rounded {
  border-radius: var(--radius);
}
.shadow {
  box-shadow: var(--shadow);
}
.spacing-md {
  margin-bottom: 32px;
}
.spacing-lg {
  margin-bottom: 60px;
}

/* ====================================================================== */
/* 15. HIDE ACCESSIBILITY/JS CLASSES                                      */
/* ====================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ====================================================================== */
/* 16. ACCESSIBILITY FOCUS STYLES                                         */
/* ====================================================================== */
a:focus-visible, button:focus-visible, .cta-btn:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 1px;
  z-index: 2;
}

/* ====================================================================== */
/* 17. OVERRIDES FOR IE, LEGACY BROWSERS                                   */
/* ====================================================================== */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  * {
    box-sizing: border-box !important;
  }
  .content-grid, .card-container, .text-image-section, .feature-list {
    display: flex !important;
    flex-wrap: wrap !important;
  }
}
