/* === CSS RESET & NORMALIZATION === */
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 {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  background: #F4F6FB;
  color: #232946;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; background: none; border: none; outline: none; }

/* === BRAND CSS VARIABLES === */
:root {
  --primary: #232946;
  --primary-rgb: 35,41,70;
  --secondary: #ffffff;
  --background: #F4F6FB;
  --accent: #009688;
  --accent-dark: #00796b;
  --shadow: 0 2px 12px rgba(35,41,70,0.06);
  --radius: 12px;
  --transition: 0.18s cubic-bezier(.42,.03,.44,.99);
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: #232946;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: 2.25rem; margin-bottom: var(--spacing-md); line-height: 1.1; }
h2 { font-size: 1.5rem; margin-bottom: var(--spacing-md); }
h3 { font-size: 1.125rem; margin-bottom: var(--spacing-sm); }
h4 { font-size: 1rem; margin-bottom: var(--spacing-xs); font-weight: 600; }
p, ul, ol, li { font-family: var(--font-body); color: #232946; }
p { margin-bottom: var(--spacing-md); }
strong { font-weight: bold; }

@media (min-width: 768px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.1rem; }
}

/* ==== LAYOUT CONTAINERS === */
.container {
  max-width: 1100px;
  margin-left: auto; margin-right: auto;
  padding-left: 20px; padding-right: 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* === SECTIONS === */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  position: relative;
}
@media (min-width: 768px) {
  .section { padding: 60px 0; }
}

/* === FLEX LAYOUTS === */
.card-container,
.card-grid,
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.card {
  background: var(--secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover,
.service-card:hover,
.testimonial-card:hover {
  box-shadow: 0 4px 32px rgba(35,41,70,0.11);
  transform: translateY(-2px) scale(1.02);
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; gap: 20px; }
}

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

/* ==== BUTTONS & CTAs ==== */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
  transition: background var(--transition), transform var(--transition);
}
.cta-button:hover, .cta-button:focus {
  background: var(--accent-dark);
  transform: translateY(-2px) scale(1.02);
}

button, .button {
  cursor: pointer;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  padding: 10px 24px;
  transition: background var(--transition), box-shadow var(--transition);
}
button:hover, .button:hover, button:focus, .button:focus {
  background: var(--accent-dark);
  box-shadow: var(--shadow);
}

/* === HEADER & NAVIGATION === */
header {
  background: var(--secondary);
  border-bottom: 1px solid #E1E5EE;
  position: sticky; z-index: 1000; top: 0;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}
nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  padding: 4px 0;
  color: var(--primary);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-bottom var(--transition);
}
nav a:hover, nav a:focus {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

@media (max-width: 1023px) {
  header .container { flex-wrap: wrap; height: auto; }
  nav { gap: 16px; }
}

/* === MOBILE NAVIGATION === */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 20px; right: 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  height: 48px;
  width: 48px;
  font-size: 2rem;
  border: none;
  z-index: 1202;
  box-shadow: 0 2px 8px rgba(35,41,70,0.14);
  transition: background var(--transition);
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--accent);
}

@media (min-width: 1024px) {
  .mobile-menu-toggle { display: none !important; }
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 100%;
  max-width: 370px;
  background: var(--secondary);
  box-shadow: -6px 0 24px rgba(35,41,70,0.13);
  z-index: 1201;
  padding: 32px 28px 28px 32px;
  transform: translateX(100%);
  transition: transform 0.33s cubic-bezier(.4,.01,.61,.99);
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-close {
  position: absolute; top: 18px; right: 20px;
  background: none;
  color: var(--primary);
  border-radius: 50%;
  font-size: 2rem;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: #f0f0f7;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
  width: 100%;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--primary);
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f7;
  transition: color var(--transition);
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--accent);
  background: #f0f0f7;
}

@media (min-width: 1024px) {
  .mobile-menu { display: none !important; }
}

@media (max-width: 1023px) {
  header nav, header .cta-button { display: none !important; }
  .mobile-menu-toggle { display: flex; }
}

/* === MAIN & SECTION SPACING === */
main {
  min-height: 500px;
  display: block;
}
section { /* .section rules are also global */ }

/* === SERVICE CARDS & BLOG PREVIEWS === */
.service-card {
  background: var(--secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  min-width: 250px;
  flex: 1 1 260px;
  gap: 10px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.service-card h3,
.service-card h2 { margin-bottom: var(--spacing-xs); }
.service-price {
  color: var(--accent-dark);
  font-weight: bold;
  font-size: 1.07rem;
  margin-top: var(--spacing-xs);
}

.blog-post-preview {
  background: var(--secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  min-width: 250px;
  flex: 1 1 260px;
  gap: 8px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.blog-post-preview a {
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-display);
  margin-top: 10px;
  transition: color var(--transition);
}
.blog-post-preview a:hover, .blog-post-preview a:focus {
  color: var(--primary);
  text-decoration: underline;
}

/* === TESTIMONIALS === */
.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  background: #fff;
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  min-width: 220px;
  max-width: 450px;
  color: #232946;
  transition: box-shadow var(--transition), transform var(--transition);
}
.testimonial-card p {
  font-size: 1.02rem;
  font-style: italic;
  color: #232946;
  margin-bottom: 8px;
}
.testimonial-name {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
  font-size: 0.97rem;
}

/* === FOOTER === */
footer {
  background: var(--secondary);
  border-top: 1px solid #E1E5EE;
  padding: 36px 0 24px 0;
  margin-top: 60px;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
footer .content-wrapper {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-nav a {
  color: var(--primary);
  font-weight: 500;
  font-family: var(--font-display);
  font-size: 1rem;
  opacity: 0.94;
  transition: color var(--transition), opacity var(--transition);
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--accent-dark);
  opacity: 1;
}
footer img {
  width: 48px;
  min-width: 40px;
}
footer .text-section {
  font-size: 1rem;
  color: #232946;
  opacity: 0.88;
}

@media (max-width: 768px) {
  footer .content-wrapper {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
}

/* === CATEGORY NAV === */
.categories-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 1rem;
  font-family: var(--font-display);
  margin-top: 24px;
  margin-bottom: 8px;
}
.categories-nav a {
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 999px;
  background: #f0f2fa;
  transition: background var(--transition), color var(--transition);
}
.categories-nav a:hover, .categories-nav a:focus {
  background: var(--accent);
  color: #fff;
}

/* === TEXT SECTIONS, MAP PLACEHOLDER, ETC === */
.text-section {
  font-size: 1rem;
  color: #232946;
  opacity: 0.95;
}
.map-placeholder {
  margin-top: 18px;
  background: #f2f5fa;
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  color: #9DA3B2;
  font-size: 1rem;
  font-family: var(--font-display);
}

/* === GAPS & UTILITIES === */
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

/* === RESPONSIVE FLEX DIRECTION === */
@media (max-width: 768px) {
  .content-wrapper, .card-container, .card-grid, .content-grid {
    flex-direction: column;
    gap: 20px;
  }
}

/* === SPACINGS BETWEEN ELEMENTS === */
section + section {
  margin-top: 0; /* already handled with .section margin-bottom */
}

main section, main .section {
  border-radius: var(--radius);
  margin-bottom: 60px;
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.3rem; }
  .cta-button, button, .button { font-size: 0.98rem; padding: 10px 18px; }
  .service-card, .blog-post-preview, .testimonial-card { padding: 18px 12px; min-width: 160px; }
}

/* === MICRO-INTERACTIONS & ANIMATIONS === */
.cta-button, .button, .service-card, .testimonial-card, .blog-post-preview {
  transition: box-shadow var(--transition), background var(--transition), transform var(--transition);
}

.card, .service-card, .testimonial-card, .blog-post-preview {
  will-change: transform, box-shadow;
}

input, textarea, select {
  border: 1px solid #E1E5EE;
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: var(--spacing-sm);
  background: #fff;
  font-size: 1rem;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
}

/* ===== COOKIE BANNER & MODAL ===== */
#cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 1300;
  background: rgba(255,255,255,0.93);
  box-shadow: 0 -4px 40px rgba(35,41,70,0.13);
  border-top: 1px solid #E1E5EE;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 16px 18px 16px;
  font-size: 0.98rem;
  color: #232946;
  animation: fadein-bottom 0.6s cubic-bezier(.38,.2,.45,1);
}
#cookie-banner.show { display: flex; }
@keyframes fadein-bottom {
  from { opacity: 0; transform: translateY(70px); } to { opacity: 1; transform: none; }
}
.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 6px;
  align-items: center;
}
.cookie-button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  padding: 8px 22px;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.cookie-button.cookie-reject {
  background: #f5f5f8;
  color: var(--primary);
  border: 1px solid #ededf3;
}
.cookie-button.cookie-reject:hover, .cookie-button.cookie-reject:focus {
  background: #ececf6;
  color: var(--accent-dark);
}
.cookie-button.cookie-settings {
  background: transparent;
  color: var(--accent);
  border: none;
  text-decoration: underline;
  font-weight: 500;
  padding: 7px 0;
}
.cookie-button.cookie-settings:hover, .cookie-button.cookie-settings:focus {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* COOKIE PREFERENCES MODAL */
#cookie-modal {
  display: none;
  position: fixed;
  z-index: 1310;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(35,41,70,0.18);
  align-items: center;
  justify-content: center;
}
#cookie-modal.show {
  display: flex;
  animation: fadein-modal 0.3s;
}
@keyframes fadein-modal {
  from { opacity: 0; } to { opacity: 1; }
}
.cookie-modal-content {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(35,41,70,0.18);
  padding: 40px 28px 32px 28px;
  max-width: 410px; width: 94%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cookie-modal-header {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.cookie-modal-category {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 1rem;
  margin-bottom: 12px;
}
.cookie-modal-category label {
  font-weight: 500;
  color: var(--primary);
}
.cookie-modal-category input[type="checkbox"] {
  accent-color: var(--accent);
  width: 22px; height: 22px;
}
.cookie-category-essential {
  color: #64677e;
  font-size: 0.98rem;
  font-style: italic;
  margin-left: 6px;
}
.cookie-modal-footer {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  justify-content: flex-end;
}
.cookie-modal-close {
  position: absolute;
  top: 18px; right: 28px;
  font-size: 1.5rem;
  background: none;
  color: #aaa;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
  border-radius: 50%;
  width: 38px; height: 38px;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--accent-dark);
  background: #f6f6fc;
}

@media (max-width: 500px) {
  .cookie-modal-content { padding: 22px 10px 18px 10px; }
}

/* === ACCESSIBLE HIDDEN & UTILITIES === */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* === ALIGNMENTS UTILITIES === */
.align-center { align-items: center; justify-content: center; }
.align-start { align-items: flex-start; }
.align-end   { align-items: flex-end;   }
.justify-start { justify-content: flex-start; }

/* === OVERLAY - works for any modal/burger overlay === */
.overlay {
  position: fixed;
  z-index: 1200;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(35,41,70,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadein-modal 0.2s;
}

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