/* =====================================
   Reset & Normalize
   ===================================== */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; border: none; background: none; cursor: pointer; }
input, select, textarea { font: inherit; }

/* =====================================
   Brand Variables (with fallbacks)
   ===================================== */
:root {
  --color-primary: #102A43;
  --color-secondary: #D7263D;
  --color-accent: #F5F7FA;
  --color-white: #FFFFFF;
  --color-ink: #0B1724; /* very dark for text */
  --color-muted: #73839B;
  --color-line: #E2E8F0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(16,42,67,0.08);
  --shadow-md: 0 8px 24px rgba(16,42,67,0.12);
  --shadow-lg: 0 16px 40px rgba(16,42,67,0.18);
  --transition-fast: 160ms ease;
  --transition-med: 260ms ease;
}

/* =====================================
   Base Typography & Body
   ===================================== */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: var(--color-ink);
  background: var(--color-accent);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: "Trebuchet MS", Verdana, Geneva, Tahoma, sans-serif;
  font-weight: 800; /* bold, modern */
  line-height: 1.2;
  color: var(--color-primary);
}

h1 { font-size: 34px; letter-spacing: 0.2px; }
h2 { font-size: 28px; margin-bottom: 16px; }
h3 { font-size: 20px; margin-bottom: 10px; }

p, li { font-size: 16px; color: var(--color-ink); }
.subheadline { color: var(--color-muted); font-size: 18px; margin-top: 8px; }

strong { font-weight: 800; color: var(--color-ink); }

/* Accessibility & Focus */
:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* =====================================
   Layout Foundations (Flex-only)
   ===================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex; /* flex container to comply */
  justify-content: center;
}

.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* Mandatory spacing pattern (also map onto <section>) */
.section { margin-bottom: 60px; padding: 40px 20px; }
section { margin-bottom: 60px; padding: 40px 0; }

/* Mandatory layout helpers */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; padding: 20px; }
.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; align-items: center; gap: 20px; padding: 20px; background: #ffffff; border: 1px solid var(--color-line); border-left: 6px solid var(--color-secondary); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* =====================================
   Header & Navigation
   ===================================== */
header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
  box-shadow: 0 2px 0 rgba(16,42,67,0.02);
}

header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand img { height: 40px; width: auto; }

.main-nav { display: none; align-items: center; gap: 20px; }
.main-nav a { color: var(--color-primary); font-weight: 700; padding: 10px 12px; border-radius: 8px; transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast); }
.main-nav a:hover { background: var(--color-accent); transform: translateY(-1px); }

.header-cta { display: none; align-items: center; gap: 12px; }
.header-cta a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 10px; font-weight: 800; letter-spacing: 0.2px; background: var(--color-secondary); color: #fff; box-shadow: var(--shadow-sm); transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast); }
.header-cta a:last-child { background: var(--color-primary); }
.header-cta a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; color: var(--color-white);
  background: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.mobile-menu-toggle:hover { background: #0b2236; transform: translateY(-1px); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(16,42,67,0.92);
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch;
  padding: 18px;
  transform: translateX(100%);
  transition: transform var(--transition-med);
}
.mobile-menu.open { transform: translateX(0%); }
.mobile-menu-close {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
  border-radius: 10px; background: #ffffff; color: var(--color-primary); font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.mobile-nav { margin-top: 48px; display: flex; flex-direction: column; gap: 14px; }
.mobile-nav a {
  display: flex; align-items: center;
  padding: 14px 16px; border-radius: 12px; background: #fff; color: var(--color-primary);
  font-weight: 800; box-shadow: var(--shadow-sm);
}
.mobile-nav a:hover { background: var(--color-accent); }

/* Show desktop menu on larger screens */
@media (min-width: 992px) {
  .mobile-menu-toggle { display: none; }
  .main-nav { display: flex; }
  .header-cta { display: flex; }
}

/* =====================================
   Hero & Headings Accents
   ===================================== */
/* Bold accent bar for primary page H1 */
main h1 {
  position: relative; padding-left: 14px;
}
main h1:before {
  content: ""; display: block; position: absolute; left: 0; top: 0.1em; bottom: 0.1em; width: 6px; border-radius: 3px; background: var(--color-secondary);
}

/* =====================================
   CTAs & Links
   ===================================== */
.cta-group, .header-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-group a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; font-weight: 800; letter-spacing: 0.2px;
  color: #fff; background: var(--color-secondary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.cta-group a:nth-child(2) { background: var(--color-primary); }
.cta-group a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Generic buttons (for cookie banner etc.) */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 12px; font-weight: 800; background: var(--color-secondary); color: #fff; box-shadow: var(--shadow-sm); transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn.primary { background: var(--color-secondary); color: #fff; }
.btn.dark { background: var(--color-primary); color: #fff; }
.btn.ghost { background: #fff; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn.muted { background: #fff; color: var(--color-secondary); border: 2px solid var(--color-secondary); }

/* Links */
a { transition: color var(--transition-fast), background var(--transition-fast); }
a:hover { color: var(--color-secondary); }

/* =====================================
   Lists, Badges, Pills
   ===================================== */
.trust-badges ul {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
.trust-badges li {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--color-line); border-radius: 999px; font-weight: 700; color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.trust-badges img { width: 18px; height: 18px; }

.service-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.service-pills a {
  display: inline-flex; align-items: center; padding: 10px 14px; border-radius: 999px;
  border: 2px solid var(--color-secondary); color: var(--color-secondary); font-weight: 800; background: #fff;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.service-pills a:hover { background: var(--color-secondary); color: #fff; transform: translateY(-1px); }

/* =====================================
   Text Sections & Content Blocks
   ===================================== */
.text-section {
  background: #fff; border: 1px solid var(--color-line); border-left: 6px solid var(--color-primary);
  border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px;
}
.text-section ul { display: flex; flex-direction: column; gap: 8px; padding-left: 0; }
.text-section li { display: flex; align-items: center; gap: 10px; }
.text-section li img { width: 18px; height: 18px; }

.quick-contact.text-section { border-left-color: var(--color-secondary); }

.map-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  height: 220px; border: 2px dashed var(--color-line); border-radius: var(--radius-md); background: var(--color-accent);
  color: var(--color-muted);
}

/* =====================================
   Testimonials (high contrast: dark on light)
   ===================================== */
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--color-muted); font-weight: 700; }

/* =====================================
   Footer
   ===================================== */
footer {
  background: var(--color-primary); color: #fff; padding: 40px 0; border-top: 4px solid var(--color-secondary);
}
footer .content-wrapper { flex-direction: row; flex-wrap: wrap; gap: 24px; }
footer nav { display: flex; flex-direction: column; gap: 8px; }
footer nav a { color: #fff; opacity: 0.95; font-weight: 700; }
footer nav a:hover { opacity: 1; color: #fff; text-decoration: underline; }
.brand-signature { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.06); padding: 14px 16px; border-radius: var(--radius-md); }
.brand-signature img { width: 36px; height: 36px; }
footer .text-section { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-left-color: #fff; color: #fff; }

/* =====================================
   Tables (if any appear in legal pages)
   ===================================== */
.table { width: 100%; border: 1px solid var(--color-line); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; }
.table-row { display: flex; padding: 10px 12px; border-bottom: 1px solid var(--color-line); }
.table-row:last-child { border-bottom: none; }
.table-cell { flex: 1; padding-right: 10px; }

/* =====================================
   Cookie Consent Banner & Modal
   ===================================== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000; display: flex; flex-direction: column; gap: 12px;
  background: #fff; color: var(--color-ink); border-top: 3px solid var(--color-secondary); box-shadow: 0 -10px 30px rgba(16,42,67,0.15);
  padding: 16px 20px;
  transform: translateY(110%);
  transition: transform var(--transition-med);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 8px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .accept { background: var(--color-secondary); color: #fff; }
.cookie-actions .reject { background: #fff; color: var(--color-secondary); border: 2px solid var(--color-secondary); }
.cookie-actions .settings { background: #fff; color: var(--color-primary); border: 2px solid var(--color-primary); }
.cookie-actions .btn { padding: 10px 14px; border-radius: 10px; font-weight: 800; }

.cookie-modal-overlay {
  position: fixed; inset: 0; background: rgba(16,42,67,0.75); z-index: 3100; display: none; align-items: center; justify-content: center; padding: 20px;
}
.cookie-modal-overlay.open { display: flex; }
.cookie-modal {
  width: 100%; max-width: 720px; background: #fff; color: var(--color-ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 20px; display: flex; flex-direction: column; gap: 16px;
  transform: translateY(16px); opacity: 0; transition: transform var(--transition-med), opacity var(--transition-med);
}
.cookie-modal-overlay.open .cookie-modal { transform: translateY(0); opacity: 1; }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 14px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-accent); }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle (for cookie categories) */
.switch { position: relative; width: 48px; height: 28px; display: inline-flex; align-items: center; }
.switch input { appearance: none; width: 48px; height: 28px; background: #c5d0dc; border-radius: 999px; position: relative; outline: none; transition: background var(--transition-fast); }
.switch input:checked { background: var(--color-secondary); }
.switch input:before { content: ""; position: absolute; left: 2px; top: 2px; width: 24px; height: 24px; background: #fff; border-radius: 50%; transition: transform var(--transition-fast); box-shadow: var(--shadow-sm); }
.switch input:checked:before { transform: translateX(20px); }

/* =====================================
   Legal Pages Content
   ===================================== */
main section .content-wrapper > h2 + .text-section { margin-top: 0; }

/* =====================================
   Responsive Adjustments
   ===================================== */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

@media (min-width: 768px) {
  h1 { font-size: 42px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }

  .content-wrapper { gap: 24px; }

  /* Arrange multiple text sections in rows where applicable */
  section .content-wrapper { display: flex; flex-direction: column; }
  section .content-wrapper > .text-section-group { display: flex; flex-wrap: wrap; gap: 20px; }

  .testimonial-card { padding: 24px; }
}

@media (min-width: 992px) {
  section { padding: 60px 0; }

  /* Two/three-up layout using flex-wrap for siblings */
  section .content-wrapper.flex-rows { display: flex; flex-wrap: wrap; gap: 20px; }
  section .content-wrapper.flex-rows > .text-section { flex: 1 1 calc(50% - 10px); }

  .trust-badges ul { gap: 16px; }
  .service-pills { gap: 12px; }

  .cookie-banner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cookie-banner .cookie-content { max-width: 70%; }
}

/* =====================================
   Cards & Micro-interactions
   ===================================== */
.card:hover, .text-section:hover, .testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

/* =====================================
   Utility Spacing
   ===================================== */
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }
.gap-20 { gap: 20px; }

/* =====================================
   Forms (if used later)
   ===================================== */
.input, input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--color-line); border-radius: 10px; background: #fff; color: var(--color-ink);
}
.input:focus, input:focus, textarea:focus, select:focus { border-color: var(--color-secondary); outline: none; box-shadow: 0 0 0 3px rgba(215,38,61,0.15); }

/* =====================================
   High-contrast Notices
   ===================================== */
.notice {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #fff3f4; color: #7a0f1a; border: 1px solid #ffc9cf;
}

/* =====================================
   Images inside content
   ===================================== */
.text-section img, .testimonial-card img { flex-shrink: 0; }

/* =====================================
   Ensure no overlap & adequate spacing
   ===================================== */
section .content-wrapper > * { margin-top: 0; }
section .content-wrapper > * + * { margin-top: 8px; }

/* =====================================
   Geometric accents (decorative only)
   ===================================== */
.accent-chip { display: inline-flex; align-items: center; padding: 6px 10px; background: var(--color-secondary); color: #fff; border-radius: 999px; font-weight: 800; box-shadow: var(--shadow-sm); }

/* =====================================
   Header quick align for dense navs
   ===================================== */
header nav[aria-label^="Footer"], footer nav[aria-label^="Footer"] { gap: 6px; }

/* =====================================
   Readability in testimonials & review sections (dark text on light bg)
   ===================================== */
section h2 + .testimonial-card, .testimonial-card { background: #fff; color: var(--color-ink); }

/* =====================================
   Service: Quick-contact pills in hero
   ===================================== */
.quick-contact.text-section p { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.quick-contact.text-section img { width: 16px; height: 16px; }

/* =====================================
   Header link sizing for tap targets
   ===================================== */
header a { min-height: 44px; display: inline-flex; align-items: center; }

/* =====================================
   Prevent any absolute positioning on content cards (allowed only for controls like close buttons)
   ===================================== */
.card, .text-section, .testimonial-card { position: relative; }

/* =====================================
   Additional helper classes for content authors (optional usage)
   ===================================== */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: #fff; border: 1px solid var(--color-line); border-radius: 999px; font-weight: 700; color: var(--color-primary); }

/* End of stylesheet */
