/* ==== 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%; vertical-align: baseline; box-sizing: border-box;}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section { display: block; }
body { line-height: 1; color: #222; background: #fff; }
ol, ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { border: 0; max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; font-size: 100%; outline: none; border: none; background: none; }

/* ==== BRAND VARIABLES & FALLBACKS ==== */
:root {
  --brand-primary: #16607A;
  --brand-secondary: #F1BE48;
  --brand-accent: #F5F5F5;
  --text-dark: #222;
  --text-light: #fff;
  --geometric-blue: #226B8C;
  --bg-light: #F5F5F5;
  --shadow-mid: 0px 4px 20px 0px rgba(22,96,122,0.08);
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-lg: 28px;
  --transition: all 0.22s cubic-bezier(.68,-0.55,.27,1.55);
}

/* ==== MAIN LAYOUT ==== */
body {
  font-family: 'Montserrat', Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.6;
}
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
section,
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}

/* ==== TYPOGRAPHY ==== */
h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--brand-primary);
}
h1 {
  font-size: 2.6rem;
  margin-bottom: 18px;
  line-height: 1.1;
  font-family: 'Montserrat', Arial, sans-serif;
  text-transform: none;
}
h2 {
  font-size: 2rem;
  margin-bottom: 22px;
  line-height: 1.2;
}
h3 {
  font-size: 1.35rem;
  margin-bottom: 16px;
  line-height: 1.16;
}
h4, h5 {
  font-size: 1rem;
}
.subheadline {
  font-size: 1.125rem;
  color: var(--geometric-blue);
  font-weight: 500;
  margin-bottom: 28px;
  max-width: 750px;
}

p, ul, ol {
  margin-bottom: 18px;
}
strong { font-weight: 700; }
ul, ol {
  padding-left: 24px;
}
ul li, ol li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 0; /* let geometric marker show */
}
ul li::before {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  background-color: var(--brand-secondary);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  margin-right: 10px;
  vertical-align: middle;
}
ol li::before {
  display: none;
}
.text-section {
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.1rem; }
  .subheadline { font-size: 1rem; }
  .text-section { max-width: 100%; }
}

/* ==== STRUCTURED FLEXBOX LAYOUT ==== */
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.feature {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-mid);
  padding: 32px 24px;
  min-width: 240px;
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  transition: box-shadow 0.2s;
  margin-bottom: 20px;
  border-top: 6px solid var(--brand-secondary);
}
.feature img {
  width: 46px;
  height: 46px;
  margin-bottom: 10px;
}
.feature:hover {
  box-shadow: 0 8px 24px 0 rgba(22, 96, 122, 0.16);
  border-top-color: var(--brand-primary);
}

/* ==== HERO ==== */
.hero {
  padding: 42px 20px 62px 20px;
  background: var(--brand-accent);
  min-height: 320px;
  margin-bottom: 60px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  align-items: center;
}
.hero .container, .hero .content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
}
.hero h1 { color: var(--brand-primary); }
.hero .subheadline { color: var(--geometric-blue); }

@media(max-width: 768px) {
  .hero {
    margin-bottom: 32px;
    padding-bottom: 40px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  }
}

/* ==== FLEXBOX PATTERNS MANDATORY ==== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-mid);
  margin-bottom: 20px;
  position: relative;
  padding: 32px 22px;
  flex: 1 1 270px;
  min-width: 220px;
  transition: box-shadow 0.22s;
}
.card:hover {
  box-shadow: 0 8px 18px 0 rgba(22, 96, 122, 0.13);
}
.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: 16px;
  background: #fff;
  padding: 24px 22px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px 0 rgba(22,96,122,0.10);
  min-width: 220px;
  max-width: 420px;
  border-left: 6px solid var(--brand-primary);
}
.testimonial-card .ratings {
  display: flex;
  color: var(--brand-secondary);
  font-size: 1.4rem;
  letter-spacing: 3px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
}
.testimonial-card .testimonial-meta {
  font-size: 0.95rem;
  color: var(--brand-primary);
  margin-bottom: 7px;
}
.testimonial-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

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

@media (max-width: 900px) {
  .feature-grid, .testimonial-slider, .card-container, .content-grid {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  .feature, .card, .testimonial-card { min-width: 0; width: 100%; }
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; gap: 18px; }
}

/* ==== BUTTONS ==== */
.btn-primary,
.btn-secondary, .mobile-nav a, .cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 33px;
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s, transform 0.18s;
  margin-right: 8px;
}
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  border: 2px solid var(--brand-primary);
  box-shadow: 0 2px 10px 0 rgba(22,96,122,0.07);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-color: var(--brand-secondary);
  transform: translateY(-2px) scale(1.04);
}
.btn-secondary {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border: 2px solid var(--brand-secondary);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  transform: translateY(-2px) scale(1.04);
}

/* ==== HEADER + NAV ==== */
header {
  background: #fff;
  box-shadow: 0 4px 20px 0 rgba(22,96,122,0.06);
  padding-bottom: 0px;
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 1001;
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.logo img { height: 38px; }
.main-nav ul {
  display: flex;
  gap: 14px;
  align-items: center;
}
.main-nav li { margin: 0 5px; }
.main-nav a {
  color: var(--brand-primary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  padding: 7px 13px;
  border-radius: 6px;
  transition: background 0.14s, color 0.14s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
}
.main-nav .btn-primary {
  margin-left: 20px;
  margin-right: 0;
}

@media (max-width: 900px) {
  .main-nav ul { gap: 8px; }
  .main-nav .btn-primary { padding: 10px 21px; font-size: 0.97rem; }
  .main-nav { gap: 8px; }
}

/* ==== MOBILE MENU ==== */
.mobile-menu-toggle {
  display: none;
  position: absolute;
  top: 19px;
  right: 24px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 2.2rem;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  border: 2px solid var(--brand-primary);
  transition: background 0.16s;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover{
  background: var(--brand-secondary);
  color: var(--brand-primary);
  outline: none;
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(22,96,122,0.98);
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(.77,0,.18,1), opacity 0.2s;
  z-index: 1202;
  display: flex; flex-direction: column; align-items: flex-start;
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0%);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  background: none;
  color: #fff;
  font-size: 2.2rem;
  position: absolute;
  top: 22px; right: 28px;
  cursor: pointer;
  z-index: 1220;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  border: 2px solid #fff;
  transition: background 0.14s;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  background: var(--brand-secondary);
  color: var(--brand-primary);
}
.mobile-nav {
  margin-top: 90px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 0 36px;
}
.mobile-nav a {
  color: #fff;
  background: none;
  font-size: 1.18rem;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 18px 0 17px 16px;
  border-radius: var(--radius-md);
  border-left: 5px solid var(--brand-secondary);
  margin-bottom: 5px;
  transition: background-color .14s, color .14s, padding .14s;
}
.mobile-nav a:focus,
.mobile-nav a:hover {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  padding-left: 24px;
}

@media (max-width: 1100px){
  .main-nav ul { display: none; }
  .main-nav .btn-primary { display: none; }
  .mobile-menu-toggle { display: flex; }
}
@media (min-width: 1101px){
  .mobile-menu,
  .mobile-menu-toggle { display: none !important; }
}

/* ==== FOOTER ==== */
footer {
  background: var(--brand-primary);
  color: #fff;
  padding: 50px 5px 14px 5px;
  margin-top: 40px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: 0 -4px 20px 0 rgba(22,96,122,0.10);
}
footer .container {
  padding: 0 12px;
}
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  align-items: center;
}
.footer-nav,
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 7px;
}
.footer-nav a, .legal-links a {
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s, color 0.12s;
}
.footer-nav a:hover,
.legal-links a:hover {
  background: var(--brand-secondary);
  color: var(--brand-primary);
}
.social-icons {
  display: flex; gap: 14px;
}
.social-icons img {
  height: 28px;
  width: 28px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  transition: opacity 0.14s, filter 0.14s;
}
.social-icons img:hover {
  filter: none;
  opacity: 1;
}

.copyright {
  display: block;
  font-size: 0.98rem; opacity: 0.84;
  margin-top: 7px;
  width: 100%;
}
@media (max-width:768px) {
  footer .content-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .footer-nav, .legal-links { gap: 10px; }
}

/* ==== FORM ELEMENTS ==== */
input, textarea, select {
  font-family: 'Montserrat', Arial, sans-serif;
  padding: 12px 16px;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  margin-top: 3px;
  margin-bottom: 16px;
  background: #fff;
  width: 100%;
  transition: border 0.15s;
}
input:focus, textarea:focus, select:focus {
  border: 1.5px solid var(--brand-primary);
  outline: none;
}
label {
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--brand-primary);
}

/* ==== COOKIE CONSENT BANNER ==== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 -4px 20px 0 rgba(22,96,122,0.08);
  border-top: 4px solid var(--brand-secondary);
  z-index: 1500;
  display: flex;
  align-items: center;
  padding: 23px 26px 18px 26px;
  gap: 32px;
  flex-wrap: wrap;
  animation: cookieBannerIn 0.42s cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes cookieBannerIn {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: none;        opacity: 1; }
}
.cookie-banner p {
  font-size: 1.03rem; color: var(--brand-primary); margin-bottom: 0; flex:1 1 240px;
}
.cookie-btn {
  background: var(--brand-primary);
  color: #fff;
  margin: 0 6px;
  border: 2px solid var(--brand-primary);
}
.cookie-btn.btn-secondary {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-color: var(--brand-secondary);
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-color: var(--brand-secondary);
  transform: translateY(-2px) scale(1.04);
}
.cookie-btn.btn-secondary:hover, .cookie-btn.btn-secondary:focus {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  transform: translateY(-2px) scale(1.04);
}

/* ==== COOKIE PREFERENCES MODAL ==== */
.cookie-modal-overlay {
  position: fixed;
  left: 0; top: 0; right:0; bottom:0;
  background: rgba(22,96,122,0.77);
  z-index: 1550;
  display: flex; align-items: center; justify-content: center;
  animation: cookieModalIn 0.35s cubic-bezier(.77,0,.18,1);
}
@keyframes cookieModalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cookie-modal {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 410px;
  width: 96%;
  padding: 34px 28px 26px 28px;
  box-shadow: 0 8px 40px 0 rgba(22,96,122,0.14);
  z-index: 1552;
  display: flex; flex-direction: column; gap: 20px;
  animation: modalSlideIn 0.25s cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes modalSlideIn {
  from { transform: scale(0.9); opacity:0; }
  to   { transform: none; opacity:1; }
}
.cookie-modal h3 {
  color: var(--brand-primary);
  margin-bottom: 12px;
}
.cookie-modal ul {
  margin-bottom: 11px;
  padding-left: 0;
}
.cookie-toggle-group {
  display: flex; flex-direction: column; gap: 16px;
}
.cookie-toggle {
  display: flex; align-items: center; gap: 10px;
}
.cookie-toggle input[type="checkbox"] {
  accent-color: var(--brand-secondary);
  width: 24px; height: 24px;
  border-radius: 6px;
}
.cookie-toggle label {
  margin-bottom: 0;
  color: var(--brand-primary);
  font-size: 1.04rem;
}
.cookie-modal .cookie-btn {
  min-width: 108px;
  margin-top: 12px;
}
.cookie-modal .cookie-btn:last-child {margin-right:0;}
.cookie-modal .close-modal {
  position: absolute; top: 24px; right: 30px;
  border-radius: 50%; border: 2px solid var(--brand-primary); width: 32px; height: 32px; background: none; color: var(--brand-primary);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.cookie-modal .close-modal:focus, .cookie-modal .close-modal:hover {
  background: var(--brand-secondary); color: var(--brand-primary); border-color: var(--brand-secondary);
}

@media(max-width:500px){
  .cookie-modal{padding: 12px 8px 18px 10px;}
  .cookie-banner {flex-direction:column;gap:14px;padding:13px 6px;}
}

/* ==== PAGE-SPECIFIC & MISC ==== */
.confirmation {
  padding: 80px 20px 60px 20px;
  background: var(--brand-accent);
  border-radius: var(--radius-lg);
  min-height: 320px;
}

/* ==== VISUAL GEOMETRIC DECORATIONS ==== */
.feature, .card, .testimonial-card {
  /* geometric accent corners */
  position: relative;
}
.feature::after, .card::after, .testimonial-card::after {
  content: '';
  display: block;
  position: absolute;
  top: 10px; right: 12px;
  width: 34px;
  height: 34px;
  background: var(--brand-secondary);
  opacity: 0.12;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  pointer-events: none;
}
.testimonial-card::after { background: var(--brand-primary); opacity: 0.08; top:12px; right:16px; }

/* ==== ANIMATIONS & MICRO-INTERACTIONS ==== */
button, .btn-primary, .btn-secondary, .mobile-nav a, .cookie-btn {
  transition: var(--transition);
}
.feature, .card, .testimonial-card {
  transition: box-shadow 0.21s, border-top 0.19s;
}
.feature:hover, .card:hover {
  box-shadow: 0 12px 32px 0 rgba(22,96,122,0.23);
  transform: translateY(-2px) scale(1.02);
  z-index: 1;
}
.testimonial-card:focus-within, .testimonial-card:hover {
  box-shadow: 0 12px 38px 0 rgba(22,96,122,0.18);
  border-left-color: var(--brand-secondary);
}

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

/* ==== RESPONSIVE UTILITIES ==== */
@media (max-width: 768px) {
  section,.section { margin-bottom: 38px; padding: 22px 6px; }
  .container { padding: 0 8px; }
}
