/* =============================
   ContrCarpi | Minimalist Flex UI
   style.css (mobile-first, flex-only)
   ============================= */

/* -----------------------------
   1) Reset & Base
------------------------------ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 1.1rem; }

:root {
  --cc-primary: #1F2937; /* brand primary */
  --cc-secondary: #C62828; /* brand red */
  --cc-accent: #F9FAFB; /* soft surface */
  --cc-text: #111827; /* dark text */
  --cc-muted: #6B7280; /* muted text */
  --cc-border: #E5E7EB; /* subtle border */
  --cc-shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --cc-shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --cc-radius: 12px;
}

body {
  font-family: Verdana, "Trebuchet MS", Arial, Helvetica, sans-serif; /* brand body first */
  color: var(--cc-text);
  background: #FFFFFF;
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; font-weight: 700; color: var(--cc-primary); margin: 0 0 12px 0; }
h1 { font-size: 32px; line-height: 1.25; letter-spacing: -0.2px; }
h2 { font-size: 24px; line-height: 1.3; }
h3 { font-size: 18px; line-height: 1.35; }

p { margin: 0 0 12px 0; color: var(--cc-text); }
.small { font-size: 14px; color: var(--cc-muted); }
.subheadline { color: var(--cc-muted); font-size: 16px; }

/* Focus states */
:focus { outline: 2px solid var(--cc-secondary); outline-offset: 2px; }

/* -----------------------------
   2) Layout containers (flex-only)
------------------------------ */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex; /* flex-only rule */
}

.content-wrapper {
  display: flex; /* flex-only */
  flex-direction: column;
  gap: 20px; /* generous spacing */
  width: 100%;
}

.section { margin-bottom: 60px; padding: 40px 20px; } /* Mandatory spacing pattern */

/* Generic content groups */
.text-section { display: flex; flex-direction: column; gap: 12px; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 18px; }

/* Utility flex containers per requirements */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: #fff; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-sm); }
.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: #fff; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-sm); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Ensure minimum spacing between cards/sections */
section + section { margin-top: 20px; }
.testimonial-card + .testimonial-card { margin-top: 20px; }

/* -----------------------------
   3) Header & Navigation
------------------------------ */
header {
  position: sticky; top: 0; z-index: 1000; background: #fff;
  border-bottom: 1px solid var(--cc-border);
  display: flex; flex-direction: column; gap: 8px;
}
header .container { align-items: center; justify-content: space-between; padding: 12px 20px; }

.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: 20px; }
.main-nav a { color: var(--cc-primary); padding: 8px 6px; border-radius: 8px; transition: background-color .2s ease, color .2s ease; }
.main-nav a:hover { background: var(--cc-accent); }

.cta-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
header .cta-group { display: none; }

/* Mobile menu */
.mobile-menu-toggle {
  display: inline-flex; align-self: flex-end; margin: 0 20px 12px; font-size: 24px; line-height: 1; padding: 8px 10px; border-radius: 10px;
  color: var(--cc-primary); background: var(--cc-accent); transition: background-color .2s ease, transform .2s ease;
}
.mobile-menu-toggle:hover { background: #EEF2F7; transform: translateY(-1px); }

.mobile-menu {
  position: fixed; inset: 0; background: #fff; z-index: 1200;
  transform: translateX(100%);
  transition: transform .35s ease;
  display: flex; flex-direction: column; gap: 10px; padding: 16px 20px;
  box-shadow: var(--cc-shadow-md);
}
.mobile-menu.open, .mobile-menu.active, body.menu-open .mobile-menu { transform: translateX(0); }

.mobile-menu-close { align-self: flex-end; font-size: 24px; padding: 8px; color: var(--cc-primary); border-radius: 8px; }
.mobile-menu-close:hover { background: var(--cc-accent); }

.mobile-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.mobile-nav a {
  display: flex; align-items: center; padding: 14px 12px; border: 1px solid var(--cc-border);
  border-radius: 12px; color: var(--cc-primary); transition: background-color .2s ease, transform .2s ease;
}
.mobile-nav a:hover { background: var(--cc-accent); transform: translateX(2px); }

/* -----------------------------
   4) Hero & Sections
------------------------------ */
.hero { background: var(--cc-accent); border-bottom: 1px solid var(--cc-border); }
.hero .container { padding-top: 28px; padding-bottom: 28px; }
.hero .content-wrapper { gap: 16px; }
.hero h1 { font-size: 32px; }
.hero .subheadline { font-size: 16px; }

.trust-badges { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 0; list-style: none; }
.trust-badges li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: #fff; border: 1px solid var(--cc-border);
  border-radius: 999px; color: var(--cc-primary);
}

.quick-contact { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: #fff; }
.quick-contact p { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; color: var(--cc-primary); }
.quick-contact img { width: 16px; height: 16px; }

section .container { padding-top: 28px; padding-bottom: 28px; }

/* -----------------------------
   5) Buttons & Links
------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--cc-border);
  color: var(--cc-primary); background: #fff; text-align: center;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.btn:hover { background: var(--cc-accent); transform: translateY(-1px); }

.btn-primary { background: var(--cc-primary); color: #fff; border-color: var(--cc-primary); }
.btn-primary:hover { background: #111827; box-shadow: var(--cc-shadow-sm); }

.btn-secondary { background: #fff; color: var(--cc-secondary); border-color: var(--cc-secondary); }
.btn-secondary:hover { background: var(--cc-secondary); color: #fff; box-shadow: var(--cc-shadow-sm); }

/* -----------------------------
   6) Testimonials (high-contrast)
------------------------------ */
.testimonial-card p { margin: 0; color: var(--cc-text); }
.testimonial-card strong { color: var(--cc-primary); }
.testimonial-card:hover { box-shadow: var(--cc-shadow-md); }

/* -----------------------------
   7) Footer
------------------------------ */
footer { border-top: 1px solid var(--cc-border); background: #fff; }
footer .container { padding-top: 28px; padding-bottom: 28px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 20px; }
footer .text-section h3 { margin-bottom: 6px; }
footer .text-section ul { display: flex; flex-direction: column; gap: 8px; list-style: none; padding-left: 0; }
footer a { color: var(--cc-primary); }
footer a:hover { text-decoration: underline; }

/* -----------------------------
   8) Cookie Consent (banner + modal)
------------------------------ */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1400;
  display: flex; flex-direction: column; gap: 12px; padding: 16px;
  background: #fff; border: 1px solid var(--cc-border); border-radius: 14px;
  box-shadow: var(--cc-shadow-md); transform: translateY(0); transition: transform .3s ease, opacity .3s ease;
}
.cookie-banner.hidden { transform: translateY(16px); opacity: 0; pointer-events: none; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn { flex: 1 1 auto; min-width: 120px; }

/* Cookie modal */
.cookie-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1490; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.cookie-overlay.open { opacity: 1; pointer-events: auto; }

.cookie-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.98);
  background: #fff; border: 1px solid var(--cc-border); border-radius: 16px; box-shadow: var(--cc-shadow-md);
  width: 92%; max-width: 640px; z-index: 1500; opacity: 0; pointer-events: none; transition: transform .3s ease, opacity .3s ease;
  display: flex; flex-direction: column; gap: 16px; padding: 18px;
}
.cookie-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.cookie-modal h3 { margin-bottom: 4px; }
.cookie-modal .cookie-groups { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--cc-border); border-radius: 12px; }
.cookie-modal .cookie-row .badge { font-size: 12px; color: #fff; background: var(--cc-primary); padding: 2px 8px; border-radius: 999px; }
.cookie-modal .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle (for checkboxes) */
.cookie-toggle { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #E5E7EB; transition: background-color .2s ease; display: inline-flex; align-items: center; padding: 3px; }
.cookie-toggle .knob { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--cc-shadow-sm); transform: translateX(0); transition: transform .2s ease; }
.cookie-toggle.on { background: var(--cc-secondary); }
.cookie-toggle.on .knob { transform: translateX(18px); }

/* -----------------------------
   9) Accessibility & Helpers
------------------------------ */
.hidden { display: none !important; }
.muted { color: var(--cc-muted); }
.divider { height: 1px; background: var(--cc-border); width: 100%; }

/* -----------------------------
   10) Media Queries (responsive)
------------------------------ */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .hero .container { padding-top: 40px; padding-bottom: 40px; }
  .text-image-section { flex-direction: row; }
}

@media (min-width: 992px) {
  h1 { font-size: 48px; }
  header .cta-group { display: flex; }
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* -----------------------------
   11) Extra polishing for lists & links
------------------------------ */
section a { color: var(--cc-secondary); }
section a:hover { text-decoration: underline; }

/* Ensure no overlap and breathing room */
.content-wrapper > * { margin: 0; }
.content-wrapper > * + * { margin-top: 0; }

/* -----------------------------
   12) Price/feature card patterns (generic)
------------------------------ */
.card { padding: 20px; }
.card h3 { margin-bottom: 8px; }
.card:hover { box-shadow: var(--cc-shadow-md); }

/* -----------------------------
   13) Specific tweaks for page elements
------------------------------ */
/* Make all list groups neat in hero/intro sections */
.hero ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 18px; }

/* Keep consistent spacing in footer columns */
footer .content-wrapper .text-section { gap: 10px; }

/* -----------------------------
   14) Color contrast assurance for testimonials/reviews
------------------------------ */
/* Dark text on light backgrounds is already enforced above */
.testimonial-card, .testimonial-card p, .testimonial-card strong { color: var(--cc-text); background: #fff; }

/* -----------------------------
   15) Prevent layout overlap & keep spacing
------------------------------ */
section { display: flex; }
section > .container { display: flex; }

/* -----------------------------
   16) Animations (subtle)
------------------------------ */
.fade-in { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* End of file */
