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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100vh;
  font-family: 'Roboto', Arial, sans-serif;
  color: #23272F;
  background: #F4F4F9;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: inline-block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
a {
  color: #29476B;
  text-decoration: none;
  transition: color .2s;
}
a:hover, a:focus {
  color: #5CB3B8;
}

ul, ol {
  list-style: none;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 700;
  color: #29476B;
  margin-bottom: 16px;
  line-height: 1.1;
}
h1 { font-size: 2.5rem; margin-bottom: 24px; }
h2 { font-size: 2rem; margin-bottom: 20px; }
h3 { font-size: 1.4rem; margin-bottom: 16px; }
h4 { font-size: 1.12rem; margin-bottom: 14px; }

p, li, dd {
  margin-bottom: 14px;
  font-size: 1rem;
  font-family: 'Roboto', Arial, sans-serif;
}

/* ==== BRAND PALETTE ==== */
:root {
  --color-primary: #29476B;
  --color-secondary: #5CB3B8;
  --color-accent: #F4F4F9;
  --color-text: #23272F;
  --color-bg: #F4F4F9;
  --color-card-bg: #fff;
  --color-border: #DEDFE3;
  --color-shadow: rgba(41,71,107,0.07);
  --color-btn-hover: #2e577e;
  --color-btn-text: #fff;
  --color-footer-bg: #233958;
  --color-footer-text: #F4F4F9;
}

/* ==== GENERAL STRUCTURE & LAYOUT ==== */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
main {
  width: 100%;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
}
@media (max-width: 700px) {
  .section {
    margin-bottom: 36px;
    padding: 28px 8px;
  }
}

/* ==== HEADER & NAVIGATION ==== */
header {
  background: #fff;
  box-shadow: 0 2px 8px var(--color-shadow);
  position: sticky;
  top: 0;
  z-index: 1001;
}
.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
  min-height: 68px;
  padding: 0 20px;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 1.07rem;
}
.main-nav > a img {
  height: 36px;
  margin-right: 20px;
  vertical-align: middle;
}
.main-nav > a {
  padding: 0 8px;
  color: var(--color-primary);
  font-weight: 500;
  opacity: 1;
  border-radius: 6px;
  transition: background .2s, color .2s;
  height: 44px;
  display: flex;
  align-items: center;
}
.main-nav > a:not(:first-child):hover, .main-nav > a:not(:first-child):focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}
.main-nav > .btn-primary {
  margin-left: auto;
}

/* ==== BUTTONS ==== */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-btn-text);
  font-family: 'Montserrat', Arial, sans-serif;
  border: none;
  padding: 0 28px;
  height: 44px;
  border-radius: 24px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 6px var(--color-shadow);
  transition: background .16s, box-shadow .16s, transform .12s;
  outline: none;
  text-align: center;
  text-decoration: none;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 2px 10px var(--color-shadow);
  transform: translateY(-2px) scale(1.03);
}

/* ==== FLEXBOX CARDS & LAYOUTS (MANDATORY PATTERNS) ==== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 2px 8px var(--color-shadow);
  margin-bottom: 20px;
  position: relative;
  padding: 28px 24px;
  flex: 1 1 320px;
  min-width: 260px;
  transition: box-shadow .18s;
}
.card:hover {
  box-shadow: 0 4px 16px var(--color-shadow), 0 2px 2px var(--color-secondary);
}

.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) {
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  background: #F4F8FC;
  border: 1px solid #D2E1F5;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 7px 0 rgba(41,71,107,0.08);
  transition: box-shadow .18s, border .18s;
  line-height: 1.6;
  color: #253147;
  font-size: 1.05rem;
  max-width: 540px;
  width: 100%;
}
.testimonial-card:hover {
  border-color: #5CB3B8;
  box-shadow: 0 2px 16px 0 rgba(41,71,107,0.13);
}
.testimonial-card p {
  color: #232D3B;
  font-weight: 500;
  margin-bottom: 0;
}
.testimonial-card span {
  color: #29476B;
  font-weight: 600;
  font-size: .96rem;
  margin-top: -4px;
}
.testimonial-card .stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

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

.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 20px 0;
  background: none;
}
.text-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .container {
    padding: 0 10px;
  }
  .main-nav {
    font-size: .99rem;
    gap: 7px;
  }
}
@media (max-width: 560px) {
  .container {
    padding: 0 2vw;
  }
}

/* ==== MOBILE NAVIGATION ==== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 2rem;
  align-items: center;
  cursor: pointer;
  position: absolute;
  right: 18px;
  top: 14px;
  z-index: 1020;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: background .16s;
}
.mobile-menu-toggle:active,
.mobile-menu-toggle:focus {
  background: var(--color-accent);
}
@media (max-width: 980px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  transform: translateX(-100%);
  transition: transform .4s cubic-bezier(.77,.2,.18,1);
  z-index: 1110;
  box-shadow: 2px 0 24px rgba(41,71,107,0.09);
  padding: 18px 0 0 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  background: none;
  border: none;
  font-size: 2.2rem;
  color: var(--color-primary);
  position: absolute;
  right: 18px;
  top: 12px;
  cursor: pointer;
  z-index: 2;
  width: 44px; height: 44px;
  border-radius: 50%;
  transition: background .15s;
}
.mobile-menu-close:active, .mobile-menu-close:focus {
  background: var(--color-accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  padding-top: 62px;
  gap: 10px;
  width: 100vw;
  align-items: flex-start;
}
.mobile-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.1rem;
  padding: 16px 36px;
  width: 100%;
  color: var(--color-primary);
  border-radius: 10px;
  transition: background .14s, color .14s;
  font-weight: 500;
  margin-left: 0;
  display: flex;
  align-items: center;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}

@media (min-width: 981px) {
  .mobile-menu, .mobile-menu-toggle { display: none !important; }
  .main-nav { display: flex !important; }
}

/* ==== HOME & PAGES SECTIONS ==== */
ul li, ol li, dl dd {
  margin-bottom: 12px;
  padding-left: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
ul li img, ol li img {
  width: 26px;
  height: 26px;
  margin-right: 8px;
  flex-shrink: 0;
}

/* ==== FAQ (dl/dt/dd) ==== */
dl {
  width: 100%;
  margin-bottom: 18px;
}
dl dt {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-top: 14px;
  margin-bottom: 2px;
}
dl dd {
  margin-left: 0;
  color: #253147;
  margin-bottom: 8px;
  font-size: 1rem;
}

/* ==== VISUAL ELEMENTS ==== */
/* Subtle border and shadows for all cards */
.card, .testimonial-card, .feature-item {
  box-shadow: 0 2px 8px var(--color-shadow);
}

/* ==== CTA Section ==== */
.content-wrapper[style*="text-align: center"] {
  align-items: center !important;
  justify-content: center;
  text-align: center;
  gap: 22px;
}

/* ==== FOOTER ==== */
footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  margin-top: 60px;
  padding: 34px 0 0 0;
  box-shadow: 0 -2px 18px 0 #22223311;
  position: relative;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  font-size: 0.98rem;
  margin-bottom: 10px;
}
footer nav a {
  color: var(--color-footer-text);
  background: none;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.01rem;
  padding: 0 2px;
  transition: color .18s;
}
footer nav a:hover,
footer nav a:focus {
  color: var(--color-secondary);
  text-decoration: underline;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: .96rem;
  color: var(--color-footer-text);
  margin-bottom: 12px;
}

@media (max-width: 850px) {
  footer {
    padding: 22px 0 0 0;
  }
}

/* ==== COOKIES CONSENT BANNER & MODAL ==== */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0;
  width: 100vw;
  background: #fff;
  box-shadow: 0 -2px 16px #29476B15;
  border-top: 2px solid var(--color-secondary);
  z-index: 2000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 26px 22px 18px 22px;
  font-size: 1.04rem;
  font-family: 'Roboto', Arial, sans-serif;
  gap: 18px;
  animation: fadeInUp .55s cubic-bezier(.77,.02,.18,1) .1s both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-banner-msg {
  color: #213143;
  max-width: 420px;
}
.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.cookie-btn {
  padding: 0 24px;
  height: 40px;
  font-size: 1rem;
  border: none;
  border-radius: 22px;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Montserrat', Arial, sans-serif;
  outline: none;
  transition: background .14s, color .14s;
}
.cookie-btn.accept {
  background: var(--color-primary);
  color: #fff;
}
.cookie-btn.accept:hover {
  background: var(--color-secondary);
}
.cookie-btn.reject {
  background: #E1E4EC;
  color: #29476B;
}
.cookie-btn.reject:hover {
  background: #CED6DD;
  color: #213143;
}
.cookie-btn.settings {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.cookie-btn.settings:hover {
  background: var(--color-accent);
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 10px 12px 10px;
    font-size: .98rem;
  }
  .cookie-banner-actions {
    gap: 10px;
  }
}

.cookie-modal-backdrop {
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(40,60,90, 0.25);
  z-index: 3200;
  animation: fadeOverlay .18s cubic-bezier(.77,.11,.18,1) both;
}
@keyframes fadeOverlay {
  from { opacity: 0; } to { opacity: 1; }
}
.cookie-modal {
  position: fixed;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%,55%);
  background: #fff;
  min-width: 320px;
  max-width: 92vw;
  box-shadow: 0 6px 32px #29476B26;
  border-radius: 16px;
  z-index: 3500;
  padding: 30px 30px 24px 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: slideUp .34s cubic-bezier(.77,.04,.18,1.1) both;
}
@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%,90%); }
  to   { opacity: 1; transform: translate(-50%,55%); }
}
.cookie-modal h2 {
  font-size: 1.28rem;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.cookie-modal .cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 24px;
  width: 100%;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.07rem;
}
.cookie-modal .cookie-toggle {
  width: 40px;
  height: 22px;
  background: #D8E6EF;
  border-radius: 14px;
  position: relative;
  margin-right: 6px;
  flex-shrink: 0;
  cursor: pointer;
}
.cookie-modal .cookie-toggle input {
  display: none;
}
.cookie-modal .cookie-toggle span {
  position: absolute;
  left: 2px; top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px #29476b1e;
  transition: left .17s cubic-bezier(.85,.1,.45,1), background .14s;
}
.cookie-modal .cookie-toggle input:checked + span {
  left: 20px;
  background: var(--color-secondary);
}
.cookie-modal .cookie-category.disabled {
  opacity: 0.65;
}
.cookie-modal-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}
.cookie-modal .cookie-btn {
  height: 38px;
  padding: 0 16px;
  font-size: 1rem;
}

@media (max-width: 600px) {
  .cookie-modal { padding: 20px 6vw 18px 6vw; }
}

/* Hide cookie banner/modal when accepted */
.cookie-banner.cookie-banner--hidden { display: none !important; }
.cookie-modal.cookie-modal--hidden { display: none !important; }
.cookie-modal-backdrop.cookie-modal-backdrop--hidden { display: none !important; }

/* ==== MICRO-INTERACTIONS & TRANSITIONS ==== */
.card, .btn-primary, .testimonial-card, .cookie-btn, .mobile-menu, .mobile-nav a {
  transition-property: background, color, box-shadow, border, transform;
  transition-duration: .16s;
  transition-timing-function: cubic-bezier(.77, .2, .18, 1);
}

/* ==== SCROLLBAR STYLES ==== */
::-webkit-scrollbar {
  width: 10px; background: #eaeaea;
}
::-webkit-scrollbar-thumb {
  background: #c3d2e1;
  border-radius: 8px;
}

/* ==== ADDITIONAL RESPONSIVE TWEAKS ==== */
@media (max-width: 650px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.37rem; }
  h3 { font-size: 1.14rem; }
}

/* Ensure all layout containers use flex (no grid) */
/* For generic .flex-row and .flex-col helpers if needed */
.flex-row {
  display: flex;
  flex-direction: row;
  gap: 18px;
}
.flex-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Override browser autofill styles for corporate look */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  background-color: #eaefff !important;
  color: #213143 !important;
  border-radius: 5px;
}

/* Ensure minimum spacing between cards/sections on all devices */
.card, .testimonial-card, .content-wrapper, section {
  margin-bottom: 20px;
}

/* ==== SUBTLE HOVER SHADOWS FOR CARDS & CTA ==== */
.card:hover, .testimonial-card:hover {
  box-shadow: 0 6px 24px var(--color-shadow);
}

/* ACCESSIBILITY & FOCUS STATES */
a:focus, .btn-primary:focus, .cookie-btn:focus, .mobile-nav a:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* ==== UTILITIES ==== */
.hide { display: none !important; }

@media (max-width: 430px) {
  .btn-primary {
    padding: 0 12px;
    font-size: .95rem;
  }
  .cookie-banner {
    padding: 10px 4px 10px 4px;
    font-size: .92rem;
  }
}
