/* ====================================================================
   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 {
  height: 100%;
  font-size: 16px;
}
body {
  min-height: 100vh;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  background: #FFFDF7;
  color: #222;
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  max-width: 100%;
  display: block;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* ====================================================================
   TYPOGRAPHY SCALE & HEADINGS
   ==================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: #197278;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: .6em;
}
h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5, h6 { font-size: 1rem; }

p, ul, ol, blockquote {
  margin-bottom: 1.25em;
  font-size: 1rem;
  color: #222;
}
ul, ol {
  padding-left: 1.25em;
}
ul li, ol li {
  margin-bottom: .4em;
}
blockquote {
  margin: 0 0 1.75em 0;
  padding-left: 1.5em;
  border-left: 3px solid #B2DBD5;
  color: #197278;
  font-style: italic;
}
strong, b {
  font-weight: 600;
}

/* ====================================================================
   CONTAINERS & LAYOUT
   ==================================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
}
.section, section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
}

/* Add extra space between stacked section elements - minimum 20px */
section + section {
  margin-top: 20px;
}

/* ====================================================================
   HEADER & NAVIGATION BAR
   ==================================================================== */
header {
  width: 100%;
  background: #FFFDF7;
  border-bottom: 1px solid #E9F3EE;
  box-shadow: 0 1px 8px rgba(25,114,120, 0.04);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px;
  background: inherit;
}
.header-main a img {
  height: 40px;
  width: auto;
  display: block;
}
nav.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
nav.main-nav a {
  color: #197278;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
nav.main-nav a:hover,
nav.main-nav a:focus {
  background: #E9F3EE;
  color: #12555B;
}
.cta-btn {
  background: #197278;
  color: #FFFDF7;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 28px;
  border-radius: 28px;
  border: none;
  outline: none;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 16px rgba(25, 114, 120, 0.09);
  transition: background 0.2s, color 0.2s, box-shadow .2s;
  display: inline-block;
  letter-spacing: .5px;
}
.cta-btn:hover,
.cta-btn:focus {
  background: #12555B;
  color: #FFFDF7;
  box-shadow: 0 6px 24px rgba(25,114,120,.13);
}

/* ====================================================================
   MOBILE NAVIGATION
   ==================================================================== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: #197278;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 54;
  margin-left: auto;
  transition: background 0.15s;
}
.mobile-menu-toggle:hover {
  background: #B2DBD5;
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  width: 92vw;
  max-width: 350px;
  height: 100vh;
  background: #FFFDF7;
  box-shadow: -2px 0 24px rgba(30,80,85,0.13);
  z-index: 999;
  padding: 32px 28px 24px 28px;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(.55,0,.1,1), opacity 0.18s;
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}
.mobile-menu-close {
  background: none;
  border: none;
  color: #197278;
  font-size: 2rem;
  align-self: flex-end;
  margin-bottom: 30px;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 10px;
  transition: background 0.15s;
}
.mobile-menu-close:hover {
  background: #B2DBD5;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mobile-nav a {
  color: #197278;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.17rem;
  padding: 10px 0 10px 10px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: #B2DBD5;
  color: #12555B;
}

@media (max-width: 1024px) {
  nav.main-nav {
    gap: 18px;
  }
  .cta-btn {
    padding: 10px 18px;
    font-size: .97rem;
  }
}
@media (max-width: 900px) {
  nav.main-nav {
    gap: 8px;
  }
  .header-main {
    gap: 12px;
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (max-width: 850px) {
  nav.main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .cta-btn {
    padding: 10px 16px;
    font-size: .95rem;
  }
}

/* Dim background behind mobile menu */
.mobile-menu.open::before {
  content: '';
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(30, 80, 85, .23);
  z-index: -1;
  pointer-events: none;
}

/* ====================================================================
   HERO SECTION
   ==================================================================== */
.hero {
  background: #B2DBD5;
  border-radius: 0 0 36px 36px;
  box-shadow: 0 6px 40px rgba(25, 114, 120, 0.04);
  min-height: 260px;
  display: flex;
  align-items: center;
  margin-bottom: 60px;
}
.hero .container {
  flex: 1;
}
.hero .content-wrapper {
  align-items: flex-start;
  gap: 22px;
  padding: 0;
}
.hero h1 {
  font-size: 2.5rem;
  color: #197278;
  margin-bottom: 0.25em;
}
.hero p {
  font-size: 1.18rem;
  color: #11565A;
  max-width: 540px;
}
.hero .cta-btn {
  margin-top: 8px;
  font-size: 1.08rem;
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.55rem; }
  .hero p { font-size: 1rem; }
  .hero { min-height: 150px; padding-bottom: 16px; }
}

/* ====================================================================
   FLEXBOX UTILITY PATTERNS
   ==================================================================== */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 18px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #FFF;
  box-shadow: 0 2px 18px rgba(25,114,120,0.04);
  border-radius: 18px;
  padding: 28px 22px 22px 22px;
  min-width: 210px;
  min-height: 235px;
  flex: 1 1 240px;
  transition: box-shadow 0.23s, transform 0.17s;
  margin-bottom: 20px;
}
.feature-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.feature-item h3 {
  font-size: 1.14rem;
  margin-bottom: .15em;
}
.feature-item:hover,
.feature-item:focus {
  box-shadow: 0 6px 28px rgba(25,114,120,0.11);
  transform: translateY(-2px) scale(1.02);
}

.top-services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
}
.top-services-list > div {
  background: #FFF;
  border-radius: 14px;
  box-shadow: 0 1px 12px rgba(50,130,140,0.05);
  padding: 18px 18px 14px 18px;
  min-width: 185px;
  flex: 1 1 230px;
  margin-bottom: 20px;
  transition: box-shadow 0.23s, transform 0.17s;
}
.top-services-list > div:hover {
  box-shadow: 0 4px 24px rgba(25,114,120,0.09);
  transform: scale(1.015);
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  position: relative;
  margin-bottom: 20px;
  background: #FFF;
  box-shadow: 0 2px 18px rgba(25,114,120,0.06);
  border-radius: 14px;
  padding: 28px 24px;
  flex: 1 1 350px;
  transition: box-shadow 0.17s;
}
.card:hover {
  box-shadow: 0 6px 28px rgba(25,114,120,0.09);
}

/* ====================================================================
   TESTIMONIALS
   ==================================================================== */
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
  background: #FFF;
  border-radius: 18px;
  box-shadow: 0 2px 22px rgba(25,114,120,.07);
  font-style: normal;
  max-width: 560px;
  transition: box-shadow 0.18s, transform 0.13s;
}
.testimonial-card p {
  color: #222;
  font-size: 1.12rem;
  line-height: 1.54;
  margin-bottom: 10px;
  text-align: center;
}
.testimonial-meta {
  color: #197278;
  font-size: 1rem;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  text-align: center;
}
.testimonial-card:hover {
  box-shadow: 0 12px 32px rgba(25,114,120,.13);
  transform: scale(1.018);
}

/* ====================================================================
   CTA BOTTOM
   ==================================================================== */
.cta-bottom {
  background: #B2DBD5;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 24px 32px 24px;
  box-shadow: 0 6px 18px rgba(25,114,120,.07);
}
.cta-bottom h2 {
  color: #197278;
  text-align: center;
}
.cta-bottom p {
  color: #11565A;
  text-align: center;
}
.cta-bottom .cta-btn {
  margin-top: 12px;
}

/* ====================================================================
   FOOTER
   ==================================================================== */
footer {
  background: #E9F3EE;
  padding: 0;
  border-top: 1px solid #B2DBD5;
}
.footer-main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 20px 28px 20px;
  font-size: 1rem;
}
.footer-main > a img {
  height: 32px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 170px;
}
.footer-nav a {
  color: #197278;
  text-decoration: none;
  font-size: 1rem;
  transition: color .18s;
  padding: 3px 0 3px 3px;
  border-radius: 4px;
  font-weight: 400;
}
.footer-nav a:hover,
.footer-nav a:focus {
  color: #11565A;
  background: #B2DBD5;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 210px;
}
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #197278;
  font-size: .98rem;
  margin-bottom: 3px;
}
.footer-contact-item img {
  width: 17px;
  opacity: 0.82;
}

@media (max-width: 700px) {
  .footer-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 24px 12px 18px 12px;
  }
  .footer-nav, .footer-contact {
    min-width: 0;
    width: 100%;
  }
}

/* ====================================================================
   CONTACT DETAILS & FORMS
   ==================================================================== */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0 10px 0;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #197278;
  font-size: 1rem;
}
.contact-item img {
  width: 19px;
  height: 19px;
}

/* ====================================================================
   LEGAL SECTION STYLING
   ==================================================================== */
.legal {
  background: #FFF;
  box-shadow: 0 2px 18px rgba(25,114,120,0.04);
  border-radius: 10px;
  padding: 36px 20px;
  font-size: 1rem;
  color: #253334;
  margin-bottom: 30px;
}
.legal h1, .legal h2, .legal h3 {
  margin-top: 18px;
}
.legal ul {
  margin-bottom: 1.2em;
}

/* ====================================================================
   COOKIE CONSENT BANNER & MODAL
   ==================================================================== */
.cookie-consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  background: #197278;
  color: #FFFDF7;
  font-size: 1rem;
  padding: 24px 16px 20px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  z-index: 1200;
  box-shadow: 0 -4px 28px rgba(25, 114, 120, 0.11);
  justify-content: center;
  animation: cookie-banner-in 0.44s cubic-bezier(.7,0,.2,1);
}
@keyframes cookie-banner-in {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-consent-banner p {
  color: #FFFDF7;
  font-size: 1rem;
  max-width: 540px;
  margin: 0 10px 0 0;
}
.cookie-consent-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cookie-consent-btn, .cookie-settings-btn {
  background: #B2DBD5;
  color: #197278;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 28px;
  padding: 8px 18px;
  margin: 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  outline: none;
}
.cookie-consent-btn:hover, .cookie-settings-btn:hover{
  background: #FFFDF7;
  color: #197278;
}
.cookie-settings-btn {
  background: #EEE;
  color: #197278;
  border-radius: 18px;
  padding: 8px 17px;
  font-size: 0.97rem;
  font-weight: 500;
  border: 1px solid #B2DBD5;
}

.cookie-preferences-modal {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(30, 80, 85, .22);
  z-index: 1400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 36px 8px 24px 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.13s;
}
.cookie-preferences-modal.open {
  opacity: 1;
  pointer-events: all;
}
.cookie-preferences-content {
  background: #FFFDF7;
  color: #197278;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(25,114,120,0.17);
  padding: 30px 24px 26px 24px;
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: cookie-modal-in .34s cubic-bezier(.8,0,.2,1);
}
@keyframes cookie-modal-in {
  from { opacity: 0; transform: translateY(60px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-preferences-content h2 {
  font-size: 1.28rem;
  color: #197278;
  margin-bottom: .33em;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cookie-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #EEF6F7;
  border-radius: 10px;
  padding: 14px 14px 14px 16px;
  font-size: 1.01rem;
}
.cookie-category.essential {
  opacity: 0.76;
  font-style: italic;
}
.cookie-toggle {
  appearance: none;
  width: 38px; height: 22px;
  background: #B2DBD5;
  border-radius: 13px;
  position: relative;
  outline: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}
.cookie-toggle:checked {
  background: #197278;
}
.cookie-toggle:before {
  content: '';
  display: block;
  width: 16px; height: 16px;
  background: #FFFDF7;
  border-radius: 50%;
  position: absolute;
  top: 3px; left: 4px;
  transition: left .23s cubic-bezier(.4,0,.2,1), background 0.14s;
}
.cookie-toggle:checked:before {
  left: 18px;
  background: #B2DBD5;
}

.cookie-modal-actions {
  display: flex;
  gap: 13px;
  margin-top: 12px;
}
.cookie-modal-close {
  background: none;
  border: none;
  color: #197278;
  font-size: 1.65rem;
  position: absolute;
  top: 16px; right: 18px;
  z-index: 10;
  cursor: pointer;
  opacity: .83;
  transition: background 0.13s;
}
.cookie-modal-close:hover {
  background: #B2DBD5;
  border-radius: 6px;
}
@media (max-width: 520px) {
  .cookie-preferences-content {
    padding: 20px 8px 15px 8px;
  }
}
@media (max-width: 690px) {
  .cookie-consent-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 5vw 16px 5vw;
  }
}
@media (max-width: 480px) {
  .cookie-consent-banner {
    font-size: .97rem;
    padding: 16px 3vw 14px 3vw;
  }
  .cookie-consent-btn, .cookie-settings-btn {
    padding: 7px 15px;
    font-size: .97rem;
  }
}

/* ====================================================================
   RESPONSIVE & MOBILE LAYOUT
   ==================================================================== */
@media (max-width: 1100px) {
  .container {
    max-width: 97vw;
    padding-left: 6px; padding-right: 6px;
  }
}
@media (max-width: 950px) {
  .features-grid, .top-services-list {
    gap: 16px;
  }
}
@media (max-width: 800px) {
  .features-grid, .top-services-list, .card-container, .content-grid {
    flex-direction: column;
    gap: 20px;
  }
  .feature-item,
  .top-services-list > div,
  .card {
    min-width: 120px;
    width: 100%;
    flex: 1 1 100%;
    padding-left: 14px; padding-right: 14px;
  }
}
@media (max-width: 700px) {
  .header-main {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .section, section {
    padding: 28px 7px;
  }
  .container {
    padding-left: 4px; padding-right: 4px;
  }
  .footer-main {
    padding-left: 4px; padding-right: 4px;
  }
}
@media (max-width: 600px) {
  .hero {
    border-radius: 0 0 22px 22px;
  }
  h1 { font-size: 1.31rem; }
  h2 { font-size: 1.02rem; }
  .feature-item {
    padding: 16px 10px;
  }
  .cta-bottom {
    padding: 18px 7px 14px 7px;
    border-radius: 13px;
  }
}

/* Flex direction for text-image-section on mobile */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
  .content-grid { flex-direction: column; gap: 18px; }
}

/* =============== Microinteractions & Animations =============== */
button, .cta-btn, .cookie-consent-btn, .cookie-settings-btn {
  transition: background 0.18s, color 0.18s, box-shadow 0.2s, transform 0.13s;
}
button:active, .cta-btn:active, .cookie-consent-btn:active {
  transform: scale(0.98);
}

/* =============== Accessibility & Focus =============== */
a:focus, button:focus {
  outline: 2px solid #197278;
  outline-offset: 3px;
  z-index: 2;
}

/* =============== Miscellaneous =============== */
::-webkit-input-placeholder { color: #A3AAAD; opacity:1; }
::-moz-placeholder { color: #A3AAAD; opacity:1; }
:-ms-input-placeholder { color: #A3AAAD; opacity:1; }
::placeholder { color: #A3AAAD; opacity:1; }

[hidden] { display: none !important; }

/* Makes sure no elements overlap when stacked or wrapped */
.section > *, .features-grid > *, .top-services-list > *, .card-container > *, .content-grid > *, .testimonial-card {
  margin-bottom: 20px;
}

/* Prevent injuries on very small devices */
@media (max-width: 370px) {
  .feature-item, .testimonial-card {
    padding: 8px 2px;
    font-size: 0.97rem;
  }
}
