/* ============================
   CSS RESET & NORMALIZE
   ============================ */
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;
  background: #FFF;
  color: #25425C;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a {
  text-decoration: none;
  color: #25425C;
  transition: color 0.15s;
}
a:hover, a:focus {
  color: #54B99D;
  outline: none;
}
ul, ol {
  list-style: none;
  padding-left: 0;
}
img {
  max-width: 100%;
  display: block;
  height: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
}
th, td {
  padding: 12px 8px;
  text-align: left;
  font-size: 16px;
  background: #FFF;
}
th {
  background: #F4F6F8;
  font-weight: 700;
  font-family: 'Montserrat', Arial, sans-serif;
  color: #25425C;
}
tr:nth-child(even) {
  background: #FAFAFA;
}

/* ============================
   VARIABLES (with fallbacks)
   ============================ */
:root {
  --color-primary: #25425C;
  --color-secondary: #54B99D;
  --color-accent: #FFF8F1;
  --color-background: #FFFFFF;
  --color-surface: #FAFAFA;
  --color-card: #F5F8FA;
  --color-stroke: #E0E6EA;
  --color-text: #25425C;
  --color-link: #25425C;
  --color-link-hover: #54B99D;
  --color-muted: #838E99;
  --color-error: #B94A48;
  --shadow-card: 0 2px 12px 0 rgba(37,66,92,0.04);
  --shadow-menu: 0 4px 24px 0 rgba(37,66,92,0.10);
  --border-radius: 16px;
}

/* ============================
   TYPOGRAPHY
   ============================ */
body, input, button, textarea {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  color: var(--color-text);
  background: var(--color-background);
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  letter-spacing: -0.5px;
  color: var(--color-text);
  margin-bottom: 16px;
  font-weight: 700;
}
h1 {
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: 18px;
  margin-top: 0;
}
h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
h4, h5, h6 {
  font-size: 1rem;
}
p, li, td, th, address {
  font-size: 1rem;
  color: var(--color-text);
}
strong, b {
  font-weight: 700;
}
em, i {
  font-style: italic;
}

/* =============================
   LAYOUT STRUCTURE & CONTAINERS
   ============================= */
.container {
  width: 100%;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  max-width: 1100px;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
}

/* Card containers */
.card-container,
.card-grid,
.service-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 12px;
}

.card, .service-card {
  background: var(--color-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
  margin-bottom: 20px;
  position: relative;
  min-width: 260px;
  flex: 1 1 260px;
  transition: box-shadow 0.2s, transform 0.2s;
  border: 1px solid var(--color-stroke);
}
.card:hover, .service-card:hover {
  box-shadow: 0 2px 32px 0 rgba(37,66,92,0.12);
  transform: translateY(-3px) scale(1.01);
}

.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;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  background: #FFF;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-stroke);
  min-width: 220px;
  margin-bottom: 20px;
  max-width: 400px;
  transition: box-shadow .18s;
}
.testimonial-card:hover {
  box-shadow: 0 4px 24px 0 rgba(84,185,157,0.17);
}

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

.text-section {
  background: #FFF;
  border-radius: var(--border-radius);
  box-shadow: none;
  margin-bottom: 12px;
  padding: 18px 16px;
}

/* Service card fix (for service-cards container) */
.service-cards {
  gap: 24px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.service-card {
  flex: 1 1 260px;
  min-width: 240px;
  max-width: 320px;
}

/* =============================
   HEADER & NAVIGATION
   ============================= */
header {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-stroke);
  padding-top: 0;
  padding-bottom: 0;
}
header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  position: relative;
}
nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  z-index: 2;
}
nav a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--color-link);
  transition: background 0.15s, color 0.2s;
}
nav a:hover, nav a.active {
  background: var(--color-accent);
  color: var(--color-secondary);
  font-weight: 600;
}
header a.cta.primary {
  margin-left: 18px;
}
/* Logo size */
header img {
  height: 44px;
  width: auto;
}

/* =============================
   CTA BUTTONS
   ============================= */
.cta, .cta.primary {
  background: var(--color-secondary);
  color: #FFF;
  padding: 12px 28px;
  font-size: 1.1rem;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  border: none;
  border-radius: 28px;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: inline-block;
  margin-top: 10px;
  margin-bottom: 10px;
  transition: background 0.17s, box-shadow 0.18s, transform 0.2s;
}
.cta.primary {
  background: var(--color-primary);
}
.cta:hover, .cta:focus, .cta.primary:hover, .cta.primary:focus {
  background: #347c90;
  box-shadow: 0 2px 12px 0 rgba(84,185,157,0.14);
  color: #FFF;
  outline: none;
  transform: translateY(-2px);
}

/* =============================
   HERO/BANNER STYLES
   ============================= */
section:first-of-type {
  background: var(--color-accent);
  border-bottom: 1px solid var(--color-stroke);
}
section:first-of-type h1 {
  color: var(--color-primary);
  margin-top: 24px;
}
section:first-of-type p {
  color: var(--color-text);
  margin-bottom: 16px;
}

/* =============================
   LISTS with ICONS
   ============================= */
ul li img {
  vertical-align: middle;
  margin-right: 8px;
  height: 22px;
  width: 22px;
}
ul li {
  padding-left: 0;
  margin-bottom: 14px;
  color: var(--color-text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
ul {
  margin-bottom: 10px;
}

/* =============================
   FOOTER
   ============================= */
footer {
  background: #F5F8FA;
  border-top: 1px solid var(--color-stroke);
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-top: 20px;
  padding: 0 0 12px 0;
}
footer .container {
  padding-top: 34px;
  padding-bottom: 22px;
}
footer .content-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 36px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand img {
  height: 44px;
}
.footer-contact {
  min-width: 180px;
  margin-bottom: 10px;
}
.footer-contact p,
.footer-contact a {
  color: var(--color-muted);
  font-size: 0.99rem;
  margin-bottom: 3px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav a {
  color: var(--color-muted);
  transition: color 0.1s;
  font-size: 1rem;
}
.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--color-secondary);
  background: none;
}
.footer-social {
  display: flex;
  gap: 14px;
}
.footer-social a img {
  height: 28px;
  width: 28px;
  opacity: 0.87;
  transition: opacity 0.15s, transform 0.13s;
}
.footer-social a:hover img {
  opacity: 1;
  transform: scale(1.08);
}

/* =============================
   MOBILE MENU (BURGER MENU)
   ============================= */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 10px 18px 10px 8px;
  z-index: 102;
  transition: color 0.2s, background 0.15s;
  border-radius: 14px;
}
.mobile-menu-toggle:active,
.mobile-menu-toggle:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
  outline: none;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffffee;
  z-index: 200;
  transition: transform 0.38s cubic-bezier(.32,.76,.44,1.03), opacity 0.3s;
  box-shadow: var(--shadow-menu);
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: 40px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100vw);
}
.mobile-menu.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.mobile-menu-close {
  position: absolute;
  top: 18px; right: 18px;
  background: none;
  border: none;
  font-size: 2.1rem;
  color: var(--color-primary);
  z-index: 402;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: background 0.15s, color 0.12s;
}
.mobile-menu-close:focus,
.mobile-menu-close:hover {
  background: var(--color-accent);
  color: var(--color-secondary);
  outline: none;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100vw;
  margin-top: 54px;
  align-items: flex-start;
  padding-left: 40px;
}
.mobile-nav a {
  font-size: 1.2rem;
  padding: 14px 0 14px 5px;
  color: var(--color-primary);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  transition: color 0.12s, background 0.16s;
  border-radius: 8px;
  min-width: 90vw;
  display: block;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
  outline: none;
}

/* Hide desktop nav by default in mobile */
@media (max-width: 900px) {
  header .container nav,
  header a.cta.primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
@media (min-width: 901px) {
  .mobile-menu { display: none !important; }
}

/* =============================
   COOKIE CONSENT BANNER & MODAL
   ============================= */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  background: #fff;
  border-top: 1px solid var(--color-stroke);
  box-shadow: 0 -3px 16px 0 rgba(37,66,92,0.10);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 16px 18px 16px;
  gap: 12px;
  animation: cookieSlideUp 0.5s cubic-bezier(.22,.61,.36,1) 1;
}
@keyframes cookieSlideUp {
  from { transform: translateY(180px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  font-size: 15px;
  color: var(--color-primary);
  margin-bottom: 0;
  text-align: center;
}
.cookie-buttons {
  display: flex;
  flex-direction: row;
  gap: 16px;
}
.cookie-btn {
  background: var(--color-secondary);
  color: #FFF;
  border: none;
  border-radius: 18px;
  padding: 8px 18px;
  font-size: 1rem;
  font-family: 'Montserrat', Arial, sans-serif;
  cursor: pointer;
  font-weight: 600;
  margin-top: 0;
  transition: background 0.16s, box-shadow 0.17s;
}
.cookie-btn.reject {
  background: #F3F4F6;
  color: var(--color-primary);
  border: 1px solid var(--color-stroke);
}
.cookie-btn.settings {
  background: #FFF8F1;
  color: var(--color-secondary);
  border: 1px solid var(--color-accent);
}
.cookie-btn:hover, .cookie-btn:focus {
  background: #347c90;
  color: #fff;
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: #ececec;
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: #e6fff5;
}

/* Modal Styles */
.cookie-modal-backdrop {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(37,66,92,0.16);
  z-index: 1500;
  animation: fadeInBackdrop 0.28s;
  display: flex;
  align-items: center;
  justify-content: center;
}
@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal {
  background: #FFF;
  max-width: 420px;
  width: 90vw;
  border-radius: 20px;
  padding: 30px 24px 18px 24px;
  box-shadow: 0 6px 44px 0 rgba(37,66,92,0.17);
  z-index: 1600;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: modalPop .32s cubic-bezier(.31,1.06,.53,.98);
}
@keyframes modalPop {
  from { transform: scale(.90) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.cookie-modal h3 {
  font-size: 1.3rem;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--color-primary);
}
.cookie-modal .cookie-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #F5F5F5;
}
.cookie-modal .cookie-category:last-child {
  border-bottom: none;
}
.cookie-modal label {
  font-size: 1rem;
  color: var(--color-text);
}
.cookie-modal input[type="checkbox"] {
  accent-color: var(--color-secondary);
  width: 22px; height: 22px;
  border-radius: 6px;
  cursor: pointer;
}
.cookie-modal .cookie-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: row;
  gap: 14px;
  justify-content: flex-end;
}
.cookie-modal .close-modal {
  position: absolute;
  top: 19px; right: 21px;
  background: none;
  border: none;
  font-size: 1.35rem;
  color: #B0B7C3;
  cursor: pointer;
}

/* =============================
   RESPONSIVE LAYOUTS
   ============================= */
@media (max-width: 1100px) {
  .container {
    max-width: 98vw;
  }
}
@media (max-width: 900px) {
  footer .content-wrapper {
    flex-direction: column;
    gap: 28px;
    align-items: flex-start;
  }
}
@media (max-width: 768px) {
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .section {
    margin-bottom: 42px;
    padding: 28px 6px;
  }
  .content-wrapper,
  .card-container,
  .service-cards,
  .content-grid {
    flex-direction: column;
    gap: 18px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .testimonial-card, .card, .service-card, .text-section {
    min-width: 0;
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
    margin-right: 0;
  }
  header .container {
    min-height: 62px;
    padding-right: 6px;
    padding-left: 6px;
    gap: 6px;
  }
}
@media (max-width: 540px) {
  .cookie-banner p {
    font-size: 14px;
  }
  .cta, .cta.primary, .cookie-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
  }
  .cookie-buttons {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
}

/* =============================
   GENERAL UTILITIES
   ============================= */
/* Maintain minimum gap between all cards/sections: */
.section + .section,
.card + .card,
.service-card + .service-card,
.testimonial-card + .testimonial-card {
  margin-top: 24px;
}

/* Tables in cards or sections */
table {
  margin-top: 10px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-card);
  border-radius: 12px;
  border: 1px solid var(--color-stroke);
  overflow: hidden;
}
/* Remove shadow in cookie-modal */
.cookie-modal table { box-shadow: none; border-radius: 0; }

/* =============================
   MICRO-INTERACTIONS
   ============================= */
button, .cta, .cta.primary, .cookie-btn {
  transition: background 0.17s, box-shadow 0.2s, color 0.16s, transform 0.15s;
}

.testimonial-card {
  cursor: default;
  border-left: 5px solid var(--color-secondary);
  box-shadow: 0 1px 6px 0 rgba(37,66,92,0.10);
  background: #fff;
}
.testimonial-card p {
  color: #2B3440;
  font-size: 1.05rem;
  margin-bottom: 8px;
  line-height: 1.6;
}
.testimonial-card span {
  color: var(--color-secondary);
  font-size: 0.99rem;
}

/* =============================
   MISCELLANEOUS
   ============================= */
::-webkit-scrollbar {
  width: 9px;
  background: #ededed;
}
::-webkit-scrollbar-thumb {
  background: #E0E6EA;
  border-radius: 12px;
}

::selection {
  background: #D7FCED;
  color: var(--color-primary);
}

[tabindex]:focus, button:focus, a:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 1.5px;
}

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