/* =====================================================
   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;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
  background: #F9F9F6;
  color: #203143;
}
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}
a {
  color: #C43F00;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #203143;
  text-decoration: underline;
}
ul, ol {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
}
button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}

/* =====================================================
   FONT FAMILY (Classic Elegant)
   ===================================================== */
:root {
  --primary: #203143;
  --primary-rgb: 32, 49, 67;
  --secondary: #F9F9F6;
  --light: #fff;
  --accent: #C43F00;
  --accent-hover: #E9642F;
  --muted: #e7e5d9;
  --text-main: #203143;
  --text-muted: #677285;
  --border: #dfdee6;
  --shadow: 0 4px 16px rgba(32,49,67,0.06);
  --radius: 12px;
  --serif: 'Georgia', 'Times New Roman', Times, serif;
  --sans: 'Montserrat', 'Roboto', Arial, sans-serif;
}

body {
  font-family: var(--serif);
  font-size: 18px;
  background: var(--secondary);
  color: var(--text-main);
  min-height: 100vh;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  color: var(--primary);
  margin-bottom: 24px;
  line-height: 1.15;
  font-weight: 700;
}
h1 {
  font-size: 2.75rem;
  margin-bottom: 24px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}
h3 {
  font-size: 1.35rem;
  margin-bottom: 16px;
  font-weight: 600;
}
h4 {
  font-size: 1.12rem;
}
h5, h6 {
  font-size: 1rem;
}

p, li {
  font-family: var(--serif);
  font-size: 1.06rem;
  color: var(--text-main);
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}
strong {
  font-weight: 700;
}
small, .small {
  font-size: 0.95em;
  color: var(--text-muted);
}

.category-tag {
  display: inline-block;
  background: var(--muted);
  color: var(--primary);
  font-size: 0.9em;
  border-radius: 6px;
  padding: 3px 10px;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* =====================================================
   LAYOUT CONTAINERS & SPACING
   ===================================================== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* Ensures no double box-shadow for first section */
section:first-of-type {
  margin-top: 40px;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
/* Text-Image section pattern (if needed by HTML) */
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width:768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}

.text-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

/* Cards (reuse for testimonials, team, features, articles) */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px 20px 24px;
  min-width: 270px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(32,49,67,0.11);
  border-color: var(--accent-hover);
  z-index: 1;
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
@media (max-width: 900px) {
  .content-grid {
    flex-direction: column;
    gap: 24px;
  }
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--muted);
  border-radius: var(--radius);
  padding: 20px 20px 18px 20px;
}

.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 20px 18px 20px;
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid #e3e3df;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(32,49,67,0.06);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.testimonial-card:hover {
  box-shadow: 0 6px 18px rgba(32,49,67,0.14);
  border-color: var(--accent);
}
.testimonial-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 1em;
  color: var(--text-main);
}
.testimonial-card p {
  flex: 1;
  font-style: italic;
  font-size: 1.07em;
  color: var(--primary);
  margin-bottom: 0;
}

/* List styling (classic with muted color for icons) */
ul li, ol li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 9px;
  font-size: 1.06em;
}
ul li img, ol li img {
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  filter: grayscale(60%);
  opacity: 0.7;
}
ul {
  margin-bottom: 12px;
}

/* =========== HEADER/NAVIGATION ============= */
header {
  background: var(--light);
  box-shadow: 0 2px 8px rgba(32,49,67,0.04);
  position: sticky;
  top: 0;
  z-index: 60;
}
header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  padding: 18px 16px;
}
header nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
header nav a {
  font-family: var(--sans);
  font-size: 1.13em;
  color: var(--primary);
  padding: 6px 10px;
  border-radius: 7px;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
}
header nav a:hover, header nav a:focus {
  background: var(--muted);
  color: var(--accent);
}

.cta-btn {
  font-family: var(--sans);
  background: var(--accent);
  color: #fff;
  font-size: 1.08em;
  border-radius: 10px;
  padding: 10px 24px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: none;
  transition: background 0.22s, box-shadow 0.22s;
  box-shadow: 0 0 0 0 transparent;
  text-align: center;
  display: inline-block;
}
.cta-btn:hover, .cta-btn:focus {
  background: var(--accent-hover);
  box-shadow: 0 2px 10px rgba(196, 63, 0, 0.12);
  color: #fff;
  text-decoration: none;
}

/* Hamburger Menu Button */
.mobile-menu-toggle {
  display: none;
  background: var(--primary);
  color: #fff;
  font-size: 2rem;
  border-radius: 9px;
  padding: 6px 15px;
  margin-left: 14px;
  transition: background 0.18s;
  z-index: 110;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: var(--accent);
}
@media (max-width: 980px) {
  header nav, header .cta-btn {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-block;
  }
}

/* ======== MOBILE MENU OVERLAY ======== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(32,49,67,0.97);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform: translateX(-100%);
  transition: transform 0.38s cubic-bezier(.77,0,.18,1);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 2.3rem;
  background: none;
  color: #fff;
  margin: 28px 28px 0 0;
  padding: 4px 10px;
  border-radius: 9px;
  transition: background 0.13s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: rgba(250,250,250,0.14);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding: 38px 38px 10px 38px;
}
.mobile-nav a {
  font-family: var(--sans);
  font-size: 1.22em;
  color: #fff;
  border-radius: 7px;
  padding: 14px 4px 14px 0;
  transition: background 0.2s, color 0.2s;
}
.mobile-nav a:active, .mobile-nav a:focus, .mobile-nav a:hover {
  background: rgba(250,250,250,0.11);
  color: var(--accent);
}
@media (min-width: 981px) {
  .mobile-menu, .mobile-menu-toggle {
    display: none !important;
  }
}

/* ========== MAIN & SECTION HEADERS ========== */
main {
  margin-bottom: 40px;
}
section > .container > h2,
section > .container > h1 {
  margin-top: 0;
}

/* ========== FOOTER ========== */
footer {
  background: var(--muted);
  border-top: 1px solid var(--border);
  padding: 34px 0 28px 0;
  color: var(--primary);
  font-size: 1em;
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--sans);
}
footer nav a {
  color: var(--primary);
  font-size: 1em;
  transition: color 0.2s;
  opacity: 0.97;
}
footer nav a:hover, footer nav a:focus {
  color: var(--accent);
}
footer .text-section {
  color: var(--text-muted);
  font-size: 0.98em;
  text-align: center;
}

/* ========== Utility Classes ========== */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: 8px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mt-4 { margin-top: 16px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mt-6 { margin-top: 24px !important; }
.mb-6 { margin-bottom: 24px !important; }
.center { text-align: center; }

/* =========== MAP EMBED ========== */
.map-embed {
  background: var(--muted);
  border-radius: 8px;
  padding: 15px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.map-embed img {
  width: 100%;
  max-width: 340px;
  margin-bottom: 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

/* =========== BLOG ARTICLE CARDS ========== */
article {
  background: var(--light);
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: 0 1px 7px rgba(32,49,67,0.05);
  transition: box-shadow 0.13s;
}
article:hover {
  box-shadow: 0 5px 16px rgba(32,49,67,0.13);
}

/* =============================
   RESPONSIVE DESIGN (Mobile First)
   ============================= */
@media (max-width: 1100px) {
  .container { max-width: 97vw; }
  section { padding: 32px 7px; }
}
@media (max-width: 768px) {
  h1 { font-size: 2.19rem; }
  h2 { font-size: 1.36rem; }
  .container { max-width: 98vw; }
  section { padding: 25px 2px; margin-bottom: 38px; }
  .content-wrapper,
  .card-container,
  .content-grid {
    flex-direction: column !important;
    gap: 18px;
  }
  .card {
    min-width: 0;
    padding: 18px 12px;
  }
  footer .container {
    padding: 0 4px;
  }
}

@media (max-width: 430px) {
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.1rem; }
  .card, article, section { padding: 12px 2px; }
  .testimonial-card { padding: 10px 4px 11px 7px; }
}

/* =============================
   MICRO-INTERACTIONS & EFFECTS
   ============================= */
.card, .testimonial-card, article {
  transition: box-shadow 0.18s, border-color 0.18s, background 0.16s;
}
.cta-btn, .mobile-menu-toggle, .mobile-menu-close {
  transition: background 0.22s, color 0.15s, box-shadow 0.19s;
}

/* ============ FOCUS STYLES ============= */
:focus { outline: none; }
.cta-btn:focus, .mobile-menu-toggle:focus, .mobile-menu-close:focus, a:focus {
  box-shadow: 0 0 0 3px var(--accent);
  outline: none;
}

/* ============= COOKIE CONSENT ============= */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: var(--primary);
  color: #fff;
  font-family: var(--serif);
  box-shadow: 0 -2px 20px rgba(32,49,67,0.16);
  padding: 18px 16px 18px 20px;
  display: flex;
  align-items: center;
  gap: 26px;
  z-index: 1999;
  animation: cookie-slide-in 0.65s cubic-bezier(.71,0,.3,1.12);
}
.cookie-banner .cookie-text {
  flex: 1 1 60%;
  font-size: 1.06em;
  color: #fff;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cookie-btn {
  font-family: var(--sans);
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1em;
  font-weight: 500;
  transition: background 0.2s, color 0.16s, box-shadow 0.18s;
  margin: 0 2px;
}
.cookie-btn.accept {
  background: var(--accent);
  color: #fff;
}
.cookie-btn.accept:hover, .cookie-btn.accept:focus {
  background: var(--accent-hover);
  box-shadow: 0 1px 4px rgba(196,63,0,0.22);
}
.cookie-btn.reject {
  background: #fff;
  color: var(--primary);
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: #ffeadd;
  color: var(--accent);
}
.cookie-btn.settings {
  background: var(--muted);
  color: var(--primary);
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: #fff4eb;
  color: var(--accent);
}

@keyframes cookie-slide-in {
  0% { transform: translateY(80px); opacity: 0; }
  80% { opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 6px;
    font-size: 0.97em;
  }
}

/* ===== COOKIE PREFERENCES MODAL ===== */
.cookie-modal {
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  background: rgba(32,49,67,0.60);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  animation: modal-in 0.4s cubic-bezier(.64,0,.32,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1.00); }
}

.cookie-modal-content {
  background: #fff;
  color: var(--primary);
  border-radius: 18px;
  padding: 32px 20px 24px 32px;
  width: 95vw;
  max-width: 460px;
  box-shadow: 0 10px 54px 0 rgba(32,49,67,0.14);
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 1.08em;
  animation: cookie-modal-appear 0.4s;
}
@keyframes cookie-modal-appear {
  from { opacity:0; transform: scale(.97); }
  to { opacity: 1; transform: scale(1); }
}
.cookie-modal-content h2 {
  margin-top: 0;
  font-size: 1.28em;
  color: var(--accent);
}
.cookie-modal-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 10px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.00em;
  font-family: var(--sans);
}
.cookie-category label {
  font-weight: 500;
}
.cookie-category input[type=checkbox]:disabled + label {
  color: #b8babd;
  opacity: 0.87;
  font-style: italic;
}
.cookie-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ========== ACCESSIBILITY: Improved High Contrast for Testimonials ========== */
.testimonial-card, .testimonial-card p, .testimonial-details {
  color: #222 !important;
  background: #fff !important;
}
.testimonial-card {
  border-color: #cbcbd9;
}

/* ========== MISC: Animations for CTA Buttons ========== */
.cta-btn {
  position: relative;
  overflow: hidden;
}
.cta-btn:after {
  content: '';
  display: block;
  position: absolute;
  left: -75%; top: 0; bottom: 0;
  width: 50%;
  background: rgba(255,255,255,.13);
  pointer-events: none;
  transition: left 0.3s cubic-bezier(.59,.53,.38,1.37);
  z-index: 1;
  border-radius: 14px;
}
.cta-btn:hover:after {
  left: 120%;
}

/* ========================
   PRINT (only print main content)
   ======================== */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  section, main { box-shadow: none !important; background: #fff !important; }
  body { background: #fff !important; }
}
