/* ========== 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;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
*, *:before, *:after { box-sizing: inherit; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img, svg { vertical-align: middle; border: none; max-width: 100%; height: auto; }
address { font-style: normal; }
button, input, textarea, select { font: inherit; color: inherit; background: none; border: none; outline: none; }

/* ========== CUSTOM PROPERTIES ========== */
:root {
  --color-primary: #205072;
  --color-secondary: #2C3E50;
  --color-accent: #F5F6FA;
  --color-white: #FFF;
  --color-black: #111;
  --color-grey-100: #ECEFF1;
  --color-grey-300: #C3CEDA;
  --color-grey-500: #B0B8BF;
  --color-shadow: rgba(32, 80, 114, 0.06);
  --container-max-width: 1160px;

  --font-display: 'Merriweather', serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

/* ========== BASE TYPOGRAPHY ========== */
body {
  background: var(--color-accent);
  color: var(--color-secondary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-primary);
  margin-bottom: 18px;
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: 2.15rem; margin-bottom: 24px; }
h2 { font-size: 1.45rem; margin-bottom: 20px; }
h3 { font-size: 1.13rem; margin-bottom: 12px; font-weight: 600; }
h4, h5, h6 { font-weight: 500; }

p, ul, ol, address {
  color: var(--color-secondary);
  font-size: 1rem;
  margin-bottom: 16px;
}
p.subheadline {
  color: var(--color-secondary);
  font-size: 1.13rem;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
}
strong { font-weight: 600; color: var(--color-primary); }

ul, ol {
  padding-left: 1.2em;
}
ul li, ol li {
  margin-bottom: 8px;
}

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 18px;
}

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

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

/* Mandatory spacing rules for cards/lists */
.card-container, .features-grid, .testimonial-list, .footer-menu, .footer-contact, .footer-social, .content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 2px 18px 0 var(--color-shadow);
  padding: 32px 28px;
  transition: box-shadow .18s ease, transform .18s;
}
.card:hover {
  box-shadow: 0 4px 28px 0 rgba(32,80,114,0.12);
  transform: translateY(-2px) 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-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
  background: var(--color-white);
  margin-bottom: 20px;
  border-radius: 14px;
  box-shadow: 0 2px 12px var(--color-shadow);
  color: var(--color-black);
  font-size: 1.08rem;
  transition: box-shadow .18s, transform .18s;
  min-width: 240px;
  max-width: 340px;
}
.testimonial-card p {
  color: var(--color-black);
  font-style: italic;
}
.testimonial-card span {
  color: var(--color-primary);
  font-size: 0.98rem;
  font-weight: 500;
  margin-top: 8px;
}
.testimonial-card:hover {
  box-shadow: 0 4px 22px rgba(32,80,114,0.10);
  transform: translateY(-1px) scale(1.01);
}

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

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

/* ========== HEADER & NAV ========== */
header {
  background: var(--color-white);
  box-shadow: 0 1px 12px 0 var(--color-shadow);
  position: sticky;
  top: 0;
  z-index: 30;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
header a img {
  height: 38px;
  margin-right: 24px;
}
nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
nav a {
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background .13s, color .13s;
}
nav a:hover, nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-primary);
  margin-left: 18px;
  cursor: pointer;
  z-index: 1050;
  transition: color .16s;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  color: var(--color-secondary);
}

/* ========== MOBILE MENU OVERLAY ========== */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-accent);
  transform: translateX(100%);
  transition: transform .33s cubic-bezier(.48,0,.32,1);
  z-index: 1210;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 0 0 0;
  box-shadow: -2px 0 16px 0 var(--color-shadow);
}
.mobile-menu.open {
  transform: translateX(0%);
}
.mobile-menu-close {
  position: absolute;
  top: 22px;
  right: 22px;
  background: none;
  border: none;
  font-size: 2.1rem;
  color: var(--color-primary);
  cursor: pointer;
  z-index: 1220;
  padding: 7px;
  border-radius: 6px;
  transition: background .14s;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  background: var(--color-grey-100);
}
.mobile-nav {
  margin-top: 78px;
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 14px;
  align-items: flex-start;
  padding: 0 32px;
}
.mobile-nav a {
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 1.19rem;
  padding: 11px 0;
  border-radius: 5px;
  width: 100%;
  transition: background .13s, color .13s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-grey-100);
  color: var(--color-secondary);
}

/* ========== CTA BUTTONS ========== */
.cta, .cta.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 28px;
  min-width: 132px;
  border: none;
  border-radius: 30px;
  box-shadow: 0 2px 12px var(--color-shadow);
  cursor: pointer;
  transition: background .16s, box-shadow .16s, transform .12s;
  margin-top: 12px;
  gap: 10px;
}
.cta.primary {
  background: var(--color-secondary);
}
.cta:focus, .cta:hover {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 5px 24px rgba(44,62,80,0.12);
  transform: translateY(-2px) scale(1.02);
}

/* ========== FEATURE/CARD LISTS ========== */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}
.features-grid > div {
  background: var(--color-white);
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--color-shadow);
  padding: 20px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 220px;
  flex: 1 1 230px;
  transition: box-shadow .15s, transform .15s;
}
.features-grid > div:hover {
  box-shadow: 0 4px 18px rgba(44,62,80,0.09);
  transform: translateY(-2px) scale(1.01);
}
.features-grid img {
  width: 38px; height: 38px; margin-bottom: 10px;
}

/* ========== FOOTER ========== */
footer {
  background: var(--color-white);
  box-shadow: 0 -1px 14px 0 var(--color-shadow);
  margin-top: 60px;
  font-size: 0.98rem;
  color: var(--color-secondary);
  padding: 0;
}
footer section {
  padding: 42px 0 0 0;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 260px;
  margin-bottom: 20px;
}
.footer-contact img {
  height: 34px; margin-bottom: 8px;
}
.footer-contact address {
  color: var(--color-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}
.footer-contact address img {
  width: 17px; height: 17px; margin-right: 7px; vertical-align: baseline;
}
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-bottom: 15px;
}
.footer-menu a {
  color: var(--color-primary);
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 500;
  transition: background .1s, color .13s;
}
.footer-menu a:hover, .footer-menu a:focus {
  background: var(--color-grey-100);
  color: var(--color-secondary);
}
.footer-social {
  display: flex;
  gap: 16px;
}
.footer-social a img {
  width: 28px; height: 28px;
  filter: grayscale(0.7) opacity(0.8);
  transition: filter .15s;
}
.footer-social a:hover img,
.footer-social a:focus img {
  filter: grayscale(0) opacity(1);
}

/* ========== COOKIE CONSENT BANNER & MODAL ========== */
.cookie-consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--color-white);
  color: var(--color-secondary);
  border-top: 1px solid var(--color-grey-300);
  box-shadow: 0 -2px 16px var(--color-shadow);
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 18px;
  gap: 18px;
  visibility: visible;
  opacity: 1;
  transition: opacity .4s;
}
.cookie-consent-banner.hide {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.cookie-consent-banner p {
  margin-bottom: 0;
  font-size: 0.97rem;
  flex: 1 1 0%;
}
.cookie-btn {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.97rem;
  font-weight: 600;
  border-radius: 24px;
  padding: 9px 22px;
  margin-left: 10px;
  border: none;
  box-shadow: 0 1px 6px var(--color-shadow);
  transition: background .15s;color .14s;
  cursor: pointer;
}
.cookie-btn.secondary {
  background: var(--color-grey-100);
  color: var(--color-primary);
  box-shadow: none;
  border: 1px solid var(--color-primary);
}
.cookie-btn:focus, .cookie-btn:hover {
  background: var(--color-secondary);
  color: #fff;
}
.cookie-btn.secondary:focus, .cookie-btn.secondary:hover {
  background: var(--color-grey-300);
  color: var(--color-primary);
}

/* COOKIE MODAL */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,62,80, 0.4);
  z-index: 1700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity .33s;
}
.cookie-modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.cookie-modal {
  background: var(--color-white);
  color: var(--color-secondary);
  border-radius: 18px;
  box-shadow: 0 4px 30px 0 rgba(44,62,80, 0.13);
  max-width: 95vw;
  width: 410px;
  padding: 32px 28px 26px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 19px;
}
.cookie-modal h3 {
  font-family: var(--font-display);
  font-size: 1.17rem;
  color: var(--color-primary);
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  font-size: 0.99rem;
}
.cookie-toggle {
  appearance: none;
  width: 38px;
  height: 20px;
  background: var(--color-grey-300);
  border-radius: 999px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background .15s;
}
.cookie-toggle:checked {
  background: var(--color-primary);
}
.cookie-toggle:after {
  content: '';
  position: absolute;
  top: 2.2px; left: 2.2px;
  width: 15.2px;
  height: 15.2px;
  background: var(--color-white);
  border-radius: 50%;
  transition: left .15s;
  box-shadow: 0 1px 6px var(--color-shadow);
}
.cookie-toggle:checked:after {
  left: 20.2px;
}
.cookie-modal .cookie-modal-actions {
  display: flex;
  gap: 10px;
}
.cookie-modal .cookie-btn {
  margin-left: 0;
}
.cookie-modal-close {
  position: absolute;
  top: 20px;
  right: 23px;
  background: none;
  border: none;
  font-size: 1.7rem;
  color: var(--color-primary);
  cursor: pointer;
  z-index: 1;
  border-radius: 7px;
  padding: 4px;
  transition: background .11s;
}
.cookie-modal-close:focus, .cookie-modal-close:hover {
  background: var(--color-grey-100);
}

/* ========== RESPONSIVE QUERIES ========== */
@media (max-width: 1120px) {
  .container { max-width: 98vw; }
}
@media (max-width: 900px) {
  .features-grid > div { min-width: 192px; }
  .footer-contact { min-width: 170px; }
}
@media (max-width: 820px) {
  header .container { flex-direction: row; gap: 12px; }
  nav { gap: 13px; }
}
@media (max-width: 768px) {
  h1 { font-size: 1.48rem; }
  h2 { font-size: 1.16rem; }
  .section {
    margin-bottom: 38px;
    padding: 22px 4px;
  }
  .container { padding: 0 8px; }
  .features-grid {
    gap: 15px;
  }
  .footer-contact {
    min-width: 0;
    gap: 5px;
  }
  .footer-social {
    gap: 10px;
  }
}
@media (max-width: 650px) {
  .features-grid {
    flex-direction: column;
    gap: 17px;
  }
  .features-grid > div {
    min-width: 0;
    width: 100%;
    padding: 17px 10px;
  }
  .testimonial-list {
    flex-direction: column;
    gap: 13px;
  }
}
@media (max-width: 620px) {
  header .container {
    padding-left: 10px; padding-right: 7px;
    height: 56px;
  }
  nav { display: none !important; }
  .mobile-menu-toggle {
    display: block;
  }
  .section {
    padding: 14px 0px;
  }
}
@media (max-width: 430px) {
  .content-wrapper { padding-left: 0; padding-right: 0; }
  .cookie-modal { width: 99vw; max-width: 99vw; padding: 20px 7px 17px 7px; }
}

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

/* ========== MISCELLANEOUS CLASSES ========== */
input, select, textarea {
  border-radius: 6px;
  padding: 9px 12px;
  border: 1px solid var(--color-grey-300);
  background: #fff;
  color: var(--color-secondary);
  margin-bottom: 14px;
  font-size: 1rem;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  outline: none;
}
label {
  display: block;
  font-size: .98rem;
  margin-bottom: 6px;
}
.form-group { margin-bottom: 24px; }

hr {
  border: none;
  border-top: 1px solid var(--color-grey-100);
  margin: 24px 0; height: 1px;
}
a { outline: none; transition: color .13s; }
a:focus { box-shadow: 0 0 2px var(--color-primary); border-radius: 3px; }
::-webkit-input-placeholder { color: var(--color-grey-500); }
::-moz-placeholder { color: var(--color-grey-500); }
:-ms-input-placeholder { color: var(--color-grey-500); }
::placeholder { color: var(--color-grey-500); }

/***** Animations *****/
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.section, .card, .cta, .testimonial-card, .features-grid > div {
  animation: fadeInUp .5s cubic-bezier(.5,0,.2,1) both;
}

/***** Z-index Consistency *****/
header { z-index: 30; }
.mobile-menu { z-index: 1210; }
.cookie-consent-banner { z-index: 1600; }
.cookie-modal-overlay { z-index: 1700; }

/***** Accessibility improvements for color contrast *****/
.testimonial-card, .testimonial-card p, .testimonial-card span {
  color: var(--color-black);
  background: var(--color-white);
}

/***** Success/error messages (if used) *****/
.success-message {
  color: #249f58;
  background: #F5FAF7;
  border-radius: 7px;
  padding: 11px 17px;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(36,159,88,0.05);
  margin-bottom: 16px;
}
.error-message {
  color: #C4352A;
  background: #FBF3F2;
  border-radius: 7px;
  padding: 11px 17px;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(196,53,42,0.05);
  margin-bottom: 16px;
}

/* ========== END CSS ========== */
