/* ===== 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 {
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  background: #fff;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  display: block;
}
a {
  color: #17375E;
  text-decoration: none;
  transition: color .2s;
}
a:hover, a:focus {
  color: #399E5A;
  text-decoration: underline;
}
ul, ol {
  padding-left: 1.3em;
  margin-bottom: 1em;
}
li {
  margin-bottom: 0.5em;
}

/* ======= TYPOGRAPHY ======= */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  color: #111;
  letter-spacing: -.01em;
  margin-bottom: 16px;
}
h1 { font-size: 2.7rem; line-height: 1.10; margin-bottom: 32px; }
h2 { font-size: 1.8rem; line-height: 1.18; margin-bottom: 24px; }
h3 { font-size: 1.3rem; margin-bottom: 16px; }
h4 { font-size: 1.04rem; margin-bottom: 12px; }
p, .contact-info, .copyright {
  font-size: 1rem;
  color: #222;
  margin-bottom: 16px;
}
strong { font-weight: 700; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.08rem; }
}

/* ======= COLOR VARIABLES (with fallback) ======= */
:root {
  --primary: #111;
  --primary-brand: #17375E;
  --secondary-brand: #399E5A;
  --bg: #fff;
  --bg-dark: #191A1B;
  --accent: #F5F6F4;
  --border: #E0E3E7;
  --gray-700: #333;
  --gray-500: #555;
  --gray-300: #A0A4A8;
  --white: #fff;
  --black: #000;
}


/* ======= LAYOUT CLASSES ======= */
.container {
  width: 100%;
  max-width: 1172px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.content-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0;
}

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

.card-container,
.feature-grid,
.service-grid,
.card-grid,
.blog-list,
.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--bg);
  border-radius: 16px;
  box-shadow: 0 2px 16px 0 rgba(33,33,33,0.07);
  padding: 32px 24px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: 0 4px 36px 0 rgba(23, 55, 94, 0.13);
  transform: translateY(-3px) scale(1.012);
}

.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) {
  .section { padding: 32px 8px; margin-bottom: 40px; }
  .container { padding-left: 12px; padding-right: 12px; }
  .content-wrapper { padding: 0; }
  .card-container, .feature-grid, .service-grid, .card-grid, .blog-list, .contact-methods { gap: 16px; }
  .content-grid, .testimonial-card, .feature-item, .text-image-section { gap: 12px; }
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #f6f6f8;
  border-left: 4px solid var(--primary-brand);
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px 0 rgba(23, 55, 94, 0.06);
}
.testimonial-details {
  font-size: 1rem;
  color: var(--gray-500);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  margin-top: -6px;
}
.star-rating {
  font-size: 1.15rem;
  color: #17375E;
  letter-spacing: 2px;
}

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

.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
}
.contact-detail-box {
  flex: 1 1 240px;
  min-width: 220px;
  background: var(--accent);
  border-radius: 12px;
  box-shadow: 0 2px 10px 0 rgba(0,0,0,0.04);
  padding: 24px 18px;
  transition: box-shadow .13s;
}
.contact-detail-box h3 {
  font-size: 1.04rem;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 0.0em;
}
.contact-detail-box p {
  color: var(--gray-700);
  font-size: 0.97rem;
}

@media (max-width: 768px) {
  .contact-methods { flex-direction: column; gap: 14px; }
}

/* ======= HEADER/NAVIGATION ======= */
header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 50;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
nav.main-nav a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  color: var(--primary-brand);
  font-weight: 500;
  padding: 4px 0 4px 0;
  position: relative;
  transition: color .17s;
}
nav.main-nav a:hover, nav.main-nav a:focus {
  color: var(--secondary-brand);
}

.cta-btn {
  display: inline-block;
  background: var(--primary-brand);
  color: var(--white);
  border-radius: 7px;
  font-size: 1rem;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 10px 28px;
  border: none;
  box-shadow: 0 1px 8px 0 rgba(23, 55, 94, 0.06);
  margin-left: 18px;
  transition: background 0.16s, box-shadow 0.19s, transform 0.17s;
  cursor: pointer;
}
.cta-btn:hover, .cta-btn:focus {
  background: var(--secondary-brand);
  color: var(--white);
  box-shadow: 0 4px 28px 0 rgba(21, 69, 30, 0.12);
  transform: translateY(-2px) scale(1.022);
  text-decoration: none;
}

/* Hamburger menu */
.mobile-menu-toggle {
  display: none;
  font-size: 2.05rem;
  background: none;
  border: none;
  color: var(--primary-brand);
  margin-left: 20px;
  cursor: pointer;
  z-index: 105;
  transition: color 0.2s;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  color: var(--secondary-brand);
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  box-shadow: 0 0 32px rgba(30,33,39,.14);
  transform: translateX(-100%);
  transition: transform 0.38s cubic-bezier(.67,0,.33,1);
  z-index: 1000;
  padding-top: 72px;
  padding-left: 0;
  will-change: transform;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 2.2rem;
  background: none;
  border: none;
  color: var(--primary-brand);
  cursor: pointer;
  z-index: 1011;
  transition: color .16s;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  color: var(--secondary-brand);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-left: 40px;
}
.mobile-nav a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.18rem;
  color: var(--primary-brand);
  font-weight: 550;
  padding: 9px 0;
  transition: color .14s, background .12s;
  border-radius: 6px;
  line-height: 1.4;
}
.mobile-nav a:focus, .mobile-nav a:hover {
  color: var(--white);
  background: var(--primary-brand);
}

@media (max-width: 1020px) {
  nav.main-nav {
    gap: 18px;
  }
  .cta-btn {
    margin-left: 8px;
    padding: 10px 18px;
  }
}
@media (max-width: 900px) {
  nav.main-nav { gap: 12px; }
}
@media (max-width: 900px){
  header .container { min-height: 75px; }
}
@media (max-width: 768px) {
  nav.main-nav { display: none!important; }
  .cta-btn { display: none; }
  .mobile-menu-toggle { display: block; }
}
@media (min-width: 769px) {
  .mobile-menu, .mobile-menu-toggle { display: none!important; }
}


/* ======= HERO SECTION ======= */
.hero {
  width: 100%;
  background: linear-gradient(to right, #fff 60%, #f4f5f9 100%);
  padding: 56px 0 38px 0;
  margin-bottom: 40px;
  box-shadow: 0 2px 10px 0 rgba(17,24,39,0.03), 0 1px 0 rgba(230,230,236,0.09);
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero .content-wrapper {
  text-align: center;
  padding: 0 0;
  max-width: 720px;
  margin: 0 auto;
}
.hero h1 {
  color: #111;
  letter-spacing: -0.01em;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 2.6rem;
  margin-bottom: 18px;
  line-height: 1.11;
}
.hero p {
  color: #232323;
  margin-bottom: 32px;
  font-size: 1.13rem;
}
.hero .cta-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 44px;
  font-size: 1.13rem;
}
@media (max-width: 768px) {
  .hero { padding: 30px 0 23px 0; margin-bottom: 28px; }
  .hero .container, .hero .content-wrapper { padding: 0; }
  .hero h1 { font-size: 1.57rem; }
  .hero p { font-size: 1rem; }
}


/* ======= FEATURE/SERVICES/CARD GRIDS ======= */
.feature-grid > div, .service-grid > .service-card, .blog-list > article {
  flex: 1 1 200px;
  min-width: 220px;
  background: #fff;
  border-radius: 11px;
  box-shadow: 0 1px 6px 0 rgba(17,55,94,0.06);
  padding: 26px 23px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow .17s, transform .14s;
}
.feature-grid > div:hover, .service-card:hover, .blog-list > article:hover {
  box-shadow: 0 4px 20px 0 rgba(23, 55, 94, 0.14);
  transform: translateY(-2px) scale(1.015);
}
.feature-grid img,
.service-card img {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
}
.feature-grid h3, .service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--primary-brand);
}
.feature-grid p, .service-card p {
  color: #1d1f20;
  font-size: 1rem;
}
@media (max-width: 900px) {
  .feature-grid > div, .service-card { min-width: 170px; font-size: .96rem; padding: 15px 12px; }
}
@media (max-width: 768px) {
  .feature-grid, .service-grid { flex-direction: column; gap: 14px; }
  .feature-grid > div, .service-card { min-width: 0; width: 100%; margin-bottom: 0; }
}

/* ---- Blog/Article Preview ---- */
.blog-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 26px;
}
.blog-list > article {
  box-shadow: 0 1px 6px 0 #eee;
  flex: 1 1 280px;
  min-width: 220px;
  background: #fafbfa;
  border-radius: 9px;
  padding: 22px 18px;
  border-left: 2px solid var(--primary-brand);
  margin-bottom: 0;
}
.blog-list h3 a {
  color: var(--primary-brand);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  transition: color .17s;
}

/* ---- Blog search and categories ---- */
.categories-menu {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  margin-bottom: 14px;
  font-size: .96rem;
  flex-wrap: wrap;
}
.categories-menu a {
  background: #f5f5f7;
  color: #333;
  border-radius: 7px;
  padding: 3px 13px;
  transition: background .15s, color .13s;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}
.categories-menu a:hover {
  background: var(--primary-brand);
  color: #fff;
}
input[type="text"] {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  padding: 8px 14px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  margin-top: 7px;
  transition: border-color .14s;
  background: #fafbfd;
}
input[type="text"]:focus {
  border-color: var(--primary-brand);
  outline: none;
}

/* ======= CTA SECTION ======= */
section .cta-btn {
  display: inline-block;
  margin-top: 19px;
  margin-bottom: 10px;
  padding: 12px 36px;
}

/* ======= TIMELINE (about page) ======= */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.timeline > div {
  position: relative;
  padding-left: 33px;
  margin-bottom: 7px;
  color: #222;
  font-size: 1.01rem;
  line-height: 1.6;
}
.timeline > div strong {
  color: var(--primary-brand);
  font-weight: 700;
  position: absolute;
  left: 0; top: 0;
  font-size: 1.09rem;
}

/* ======= FOOTER ======= */
footer {
  background: #fafbfc;
  border-top: 1px solid var(--border);
  padding: 38px 0 14px 0;
  color: #333;
  font-size: 0.97rem;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 17px;
  align-items: center;
  justify-content: center;
}
footer nav {
  display: flex;
  gap: 24px;
}
footer nav a {
  color: #17375E;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  transition: color .18s;
  font-weight: 500;
}
footer nav a:hover {
  color: #399E5A;
}
footer .contact-info {
  font-size: 0.96rem;
  color: #555;
  text-align: center;
  margin-bottom: 0;
}
footer .contact-info a { color: #17375E; text-decoration: underline; }
footer .copyright {
  color: #A0A4A8;
  font-size: 0.92rem;
  margin-top: 6px;
}
@media (max-width: 768px) {
  footer .container { gap: 13px; padding-left: 2px; padding-right: 2px; }
  footer nav { gap: 13px; flex-wrap: wrap; }
}


/* ======= GENERAL MICRO-INTERACTIONS ======= */
button, .cta-btn, .mobile-menu-toggle, .mobile-menu-close {
  transition: background .16s, color .15s, box-shadow .17s, transform .12s;
}
input, textarea, select {
  transition: border-color .15s;
}

/* ======= MONOCHROME / SOPHISTICATED EFFECTS ======= */
body, section, .hero, .container, .content-wrapper, .card {
  background: #fff;
}
.card, .feature-grid > div, .service-card, .contact-detail-box, .testimonial-card, .blog-list > article {
  border: 1px solid #ededee;
  box-shadow: 0 1px 9px 0 rgba(0,0,0,0.065);
}
.hero {
  background: linear-gradient(to right, #fff 77%, #f0f1f6 100%);
}

/* ==== Cookie Consent Banner ==== */
.cookie-banner {
  position: fixed;
  left: 0; bottom: 0;
  width: 100vw;
  z-index: 3000;
  background: #191A1B;
  color: #fff;
  font-size: 1.02rem;
  padding: 18px 20px 18px 26px;
  box-shadow: 0 0 44px 0 rgba(23,55,94,0.16);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  opacity: 1;
  transform: translateY(0%);
  transition: opacity .33s, transform .33s;
}
.cookie-banner.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(120%);
}
.cookie-banner .cookie-text {
  flex: 1 1 280px;
  color: #fff;
  font-size: 1rem;
}
.cookie-banner .cookie-btn-group {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
}
.cookie-banner button {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 7px;
  border: none;
  padding: 7px 18px;
  margin: 0;
  cursor: pointer;
  outline: none;
  transition: background .17s, color .15s, box-shadow .15s;
  box-shadow: 0 1px 7px 0 rgba(0,0,0,0.07);
}
.cookie-banner .accept-cookies {
  background: var(--secondary-brand);
  color: #fff;
}
.cookie-banner .accept-cookies:hover {
  background: #267e41;
}
.cookie-banner .reject-cookies {
  background: #fff;
  color: #191A1B;
  border: 1px solid #bbb;
}
.cookie-banner .reject-cookies:hover {
  background: #f1f1f1;
  color: #191A1B;
}
.cookie-banner .cookie-settings {
  background: transparent;
  color: #fff;
  border: 1.5px solid #fff;
}
.cookie-banner .cookie-settings:hover {
  background: #212829;
  color: #fff;
}

@media (max-width: 512px) {
  .cookie-banner { flex-direction: column; gap: 12px; padding: 15px 5px; }
  .cookie-banner .cookie-text { font-size: 0.93rem; }
  .cookie-banner .cookie-btn-group { gap: 10px; }
}

/* ==== Cookie Preferences Modal ==== */
.cookie-modal-overlay {
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3100;
  background: rgba(0,0,0,0.35);
  opacity: 1;
  pointer-events: all;
  transition: opacity .22s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cookie-modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal {
  background: #fff;
  border-radius: 13px;
  max-width: 430px;
  width: 95vw;
  padding: 34px 28px 24px 28px;
  box-shadow: 0 8px 56px rgba(23,55,94,0.19);
  color: #222;
  position: relative;
  animation: fadeinmodal .42s cubic-bezier(.33,0,.67,1);
}
@keyframes fadeinmodal {
  from { opacity: 0; transform: translateY(34px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cookie-modal h2 {
  margin-bottom: 13px;
  color: #111;
  font-size: 1.23rem;
}
.cookie-modal label {
  font-size: 1rem;
  color: #232323;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cookie-modal .toggle {
  appearance: none;
  width: 36px;
  height: 19px;
  border-radius: 10px;
  background: #eee;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.15s;
  margin-right: 8px;
}
.cookie-modal .toggle:checked {
  background: #399E5A;
}
.cookie-modal .toggle::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 2.4px;
  width: 15px; height: 15px;
  background: #fff;
  border-radius: 8px;
  transition: left 0.15s;
  box-shadow: 0 1px 7px 0 #ccc;
}
.cookie-modal .toggle:checked::after {
  left: 17px;
}
.cookie-modal .cookie-modal-btns {
  display: flex;
  gap: 13px;
  margin-top: 22px;
  justify-content: flex-end;
}
.cookie-modal .cookie-modal-btns button {
  padding: 8px 20px;
  border-radius: 7px;
  font-size: 1rem;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}
.cookie-modal .close-pref-modal {
  position: absolute;
  top: 13px;
  right: 14px;
  font-size: 1.7rem;
  color: #888;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.cookie-modal .close-pref-modal:hover {
  color: #17375E;
}
@media (max-width: 520px) {
  .cookie-modal { padding: 15px 9px 14px 12px; }
  .cookie-modal h2 { font-size: 1rem; }
}

/* ======= ACCESSIBILITY FOCUS STATES ======= */
a, button, input, .cta-btn { outline: none; }
a:focus, .cta-btn:focus, .mobile-menu-toggle:focus, .mobile-menu-close:focus, button:focus {
  outline: 2px solid var(--primary-brand);
  outline-offset: 3px;
}

/* ======= UTILITY CLASSES & MISC ======= */
.mono-bg {
  background: #fff!important;
  color: #191A1B!important;
}
.mono-bg-dark {
  background: #222!important;
  color: #fff!important;
}
.dramatic-border {
  border-left: 5px solid var(--primary-brand)!important;
}

/* ======= OVERRIDES FOR SPACE & ALIGNMENT (MANDATORY) ======= */
section, .section { margin-bottom: 60px; padding: 40px 20px; }
.card-container, .feature-grid, .service-grid, .card-grid, .blog-list, .contact-methods { gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { gap: 20px; }
.text-image-section { gap: 30px; align-items: center; flex-wrap: wrap; }
.testimonial-card { gap: 20px; padding: 20px; align-items: center; }
.feature-item { gap: 15px; align-items: flex-start; }

@media (max-width: 768px) {
  section, .section { margin-bottom: 40px; padding: 24px 8px; }
  .content-grid, .testimonial-card, .feature-item, .text-image-section { gap: 14px; }
  .content-grid, .feature-grid, .service-grid, .card-container, .blog-list, .contact-methods {
    flex-direction: column; gap: 14px;
  }
  .text-image-section { flex-direction: column; }
  .container { padding-left: 6px; padding-right: 6px; }
}

/* Hide content visually but not from screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
