/* =========================================================
   Blisko Seniora — style.css
   Design: monochrome_sophisticated (black/white/gray, contrast, elegant typography)
   Fonts: Georgia (display), Verdana (body)
   Flexbox-only layouts. No CSS Grid or Columns used.
   ========================================================= */

/* ------------------------------
   1) Reset & Base
   ------------------------------ */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, Geneva, Tahoma, sans-serif; color: #111111; background: #FAFAF7; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: #111111; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
ul, ol { padding-left: 20px; }
button { font-family: inherit; }
:focus { outline: 2px solid #1F3B57; outline-offset: 3px; }

/* Variables */
:root {
  --mono-0: #ffffff;         /* elevated white */
  --mono-25: #f6f6f6;        /* near-white */
  --mono-50: #FAFAF7;        /* brand accent-like off-white */
  --mono-100: #eeeeee;       /* light border */
  --mono-200: #e3e3e3;
  --mono-300: #d0d0d0;
  --mono-400: #b3b3b3;       /* muted border */
  --mono-600: #6b6b6b;       /* muted text */
  --mono-800: #222222;       /* dark text */
  --mono-900: #0f0f0f;       /* near black */
  --brand-primary: #1F3B57;  /* brand (used subtly for focus/accents) */
  --radius-xs: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-soft: 0 2px 10px rgba(0,0,0,0.06);
  --shadow-mid: 0 8px 24px rgba(0,0,0,0.10);
  --shadow-strong: 0 14px 40px rgba(0,0,0,0.14);
}

/* Typography */
h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: #0f0f0f; line-height: 1.25; margin: 0 0 12px 0; letter-spacing: -0.01em; }
h1 { font-size: 32px; }
h2 { font-size: 24px; margin-top: 8px; }
h3 { font-size: 18px; }
p { margin: 0 0 14px 0; color: #222; }
small, .meta { color: var(--mono-600); font-size: 14px; }
.subhead { font-size: 18px; color: #222; margin-bottom: 14px; }
.tagline { font-size: 16px; color: var(--mono-600); }

/* Responsive Type */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
  .subhead { font-size: 20px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
}

/* ------------------------------
   2) Layout wrappers (Flex only)
   ------------------------------ */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* Mandatory spacing and alignment patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.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; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Generic section spacing for plain <section> */
main > section { padding: 40px 0; border-bottom: 1px solid var(--mono-100); }
main > section:last-of-type { border-bottom: none; }

/* ------------------------------
   3) Header & Navigation
   ------------------------------ */
header { background: var(--mono-0); border-bottom: 1px solid var(--mono-100); position: relative; z-index: 1000; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: 16px; flex-wrap: wrap; }
.main-nav a { color: #111; padding: 8px 10px; border-radius: var(--radius-xs); transition: color .2s ease, background-color .2s ease; }
.main-nav a:hover { background: var(--mono-25); text-decoration: none; }

.header-cta { display: none; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-cta a { padding: 10px 14px; border-radius: 8px; border: 1px solid #111; background: #111; color: #fff; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.header-cta a:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); background: #000; text-decoration: none; }

.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid #111; border-radius: 8px; background: #111; color: #fff; font-size: 18px; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.mobile-menu-toggle:hover { background: #000; transform: translateY(-1px); }

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

/* ------------------------------
   4) Mobile Menu (off-canvas)
   ------------------------------ */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s ease, opacity .35s ease;
  z-index: 9999;
}
.mobile-menu .mobile-menu-panel { /* optional internal panel if used */
  display: flex;
}
.mobile-menu .mobile-nav {
  background: #111111;
  color: #ffffff;
  width: 85%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  box-shadow: var(--shadow-strong);
}
.mobile-menu .mobile-nav a {
  color: #ffffff;
  padding: 12px 10px;
  border-radius: 8px;
  font-size: 16px;
  border: 1px solid rgba(255,255,255,0.08);
}
.mobile-menu .mobile-nav a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.mobile-menu-close { align-self: flex-end; margin: 8px 20px 0 0; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); border-radius: 8px; padding: 6px 10px; cursor: pointer; }

/* Open states supported */
.mobile-menu.open,
.mobile-menu.active,
.mobile-menu[aria-hidden="false"] {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* Prevent body scroll when menu open */
body.no-scroll { overflow: hidden; }

/* ------------------------------
   5) Hero Section (dramatic contrast)
   ------------------------------ */
.hero { background: var(--mono-900); color: #ffffff; position: relative; }
.hero .content-wrapper { padding: 40px 0; align-items: flex-start; gap: 14px; }
.hero h1, .hero p, .hero a { color: #ffffff; }
.hero .subhead { color: #f3f3f3; }
.hero .tagline { color: #cfcfcf; }

/* CTA Buttons */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cta-row a { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 10px; border: 1.5px solid #111; background: #111; color: #fff; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease; }
.cta-row a:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); background: #000; text-decoration: none; }
/* Invert on dark hero */
.hero .cta-row a { border-color: #fff; background: #fff; color: #111; }
.hero .cta-row a:hover { background: #f6f6f6; }

/* Trust Row */
.trust-row ul { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 6px 0 0 0; padding-left: 0; list-style: none; }
.trust-row li { display: flex; align-items: center; gap: 8px; color: #e9e9e9; font-size: 14px; }
.trust-row li::before { content: '\2713'; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5); color: #fff; font-size: 12px; }

/* Phone Highlight */
.phone-highlight { display: inline-flex; align-items: center; gap: 10px; background: var(--mono-0); color: #111; border: 1px solid var(--mono-200); padding: 10px 12px; border-radius: 999px; box-shadow: var(--shadow-soft); }
.phone-highlight img { width: 18px; height: 18px; }
.phone-highlight a { color: #111; text-decoration: underline; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--mono-600); font-size: 14px; }
.breadcrumb a { color: #111; }

/* ------------------------------
   6) Content Sections & Cards
   ------------------------------ */
/* Multi-column text sections via Flex */
.content-wrapper > .text-section {
  border: 1px solid var(--mono-100);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  flex: 1 1 260px;
}

/* Generic card style (if used) */
.card {
  background: var(--mono-0);
  border: 1px solid var(--mono-100);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

/* Features */
.feature-item h3 { margin-bottom: 6px; }
.feature-item p, .feature-item li { color: #222; }

/* Testimonial cards — always light for readability */
.testimonial-card { background: #ffffff; border: 1px solid var(--mono-200); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.testimonial-card p { margin: 0; color: #111; }
.testimonial-card p + p { color: #222; }

/* Lists spacing */
.text-section ul, .text-section ol { margin: 8px 0 0 0; }
.text-section li { margin-bottom: 8px; }

/* ------------------------------
   7) Footer
   ------------------------------ */
footer { background: #0f0f0f; color: #ffffff; padding: 30px 0; margin-top: 20px; }
footer a { color: #ffffff; opacity: 0.92; }
footer a:hover { opacity: 1; text-decoration: underline; }
footer .content-wrapper { gap: 16px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-nav, .legal-nav, .social { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.social img { filter: invert(1); opacity: 0.85; transition: opacity .2s ease; }
.social a:hover img { opacity: 1; }
.credit { color: #cfcfcf; font-size: 14px; margin-top: 6px; }

/* ------------------------------
   8) Utilities & Micro-interactions
   ------------------------------ */
.muted { color: var(--mono-600); }
.text-center { text-align: center; }
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }

/* Elevated panel */
.panel { background: var(--mono-0); border: 1px solid var(--mono-100); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 16px; }

/* Button utility (optional) */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 10px; border: 1.5px solid #111; background: #111; color: #fff; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); background: #000; text-decoration: none; }
.btn-outline { background: transparent; color: #111; }
.btn-light { background: #fff; color: #111; border-color: #fff; }

/* ------------------------------
   9) Cookie Consent Banner & Modal
   ------------------------------ */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  background: #111111;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9998;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
}
.cookie-banner.show, .cookie-banner.open, .cookie-banner.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .cookie-actions .btn { padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.cookie-accept { background: #ffffff; color: #111; border-color: #ffffff; }
.cookie-reject { background: transparent; color: #ffffff; border-color: rgba(255,255,255,0.5); }
.cookie-settings { background: transparent; color: #ffffff; border-color: rgba(255,255,255,0.5); }
.cookie-reject:hover, .cookie-settings:hover { background: rgba(255,255,255,0.08); }

/* Cookie Preferences Modal */
.cookie-modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.cookie-modal.open, .cookie-modal.active { opacity: 1; pointer-events: auto; }
.cookie-modal-content {
  background: #ffffff;
  color: #111;
  width: 92%; max-width: 640px;
  border-radius: 12px;
  border: 1px solid var(--mono-200);
  box-shadow: var(--shadow-strong);
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px;
  transform: translateY(10px);
  transition: transform .3s ease;
}
.cookie-modal.open .cookie-modal-content, .cookie-modal.active .cookie-modal-content { transform: translateY(0); }
.cookie-categories { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--mono-200); border-radius: 10px; background: var(--mono-0); }
.cookie-category .label { display: flex; flex-direction: column; gap: 4px; }

/* Toggle style (attach to input[type=checkbox] + .toggle) */
.toggle { width: 46px; height: 26px; border-radius: 999px; background: #d0d0d0; position: relative; display: inline-flex; align-items: center; padding: 2px; transition: background .2s ease; }
.toggle::after { content: ''; width: 22px; height: 22px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transform: translateX(0); transition: transform .2s ease; }
input[type="checkbox"].toggle-input { position: absolute; opacity: 0; pointer-events: none; }
input[type="checkbox"].toggle-input:checked + .toggle { background: #111; }
input[type="checkbox"].toggle-input:checked + .toggle::after { transform: translateX(20px); }

.cookie-modal .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-modal .actions .btn { padding: 10px 14px; border-radius: 8px; }

/* ------------------------------
   10) Responsive Rules
   ------------------------------ */
@media (max-width: 768px) {
  /* Text-image sections stack */
  .text-image-section { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 768px) {
  /* Widen hero spacing */
  .hero .content-wrapper { padding: 60px 0; }
  /* Improve multi-column layout for text sections */
  .content-wrapper { gap: 24px; }
}

@media (min-width: 1024px) {
  /* For non-hero sections, allow row-like distribution inside content-wrapper when multiple .text-section present */
  main > section .content-wrapper { flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
  main > section .content-wrapper > *:not(h2):not(.breadcrumb) { flex: 1 1 300px; }
  /* Keep headings full width */
  main > section .content-wrapper > h2, main > section .content-wrapper > .breadcrumb { flex: 0 0 100%; }
}

/* ------------------------------
   11) Page-specific subtle accents
   ------------------------------ */
/* Ensure readability in testimonials/reviews */
section:has(.testimonial-card) { background: var(--mono-50); }
/* Fallback for browsers without :has — make testimonial cards highly readable anyway */
.testimonial-card { background: #fff; }

/* Breadcrumb spacing */
.hero .breadcrumb { color: #e0e0e0; }
.hero .breadcrumb a { color: #fff; }

/* ------------------------------
   12) Additional Components that may appear
   ------------------------------ */
.card-container .card { flex: 1 1 260px; }
.content-grid > * { flex: 1 1 300px; }

/* ------------------------------
   13) Forms (if added later)
   ------------------------------ */
input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%; padding: 12px 12px; border-radius: 8px; border: 1px solid var(--mono-200);
  background: var(--mono-0); color: #111; transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus { border-color: #111; box-shadow: 0 0 0 3px rgba(31,59,87,0.15); }
label { display: block; margin-bottom: 6px; color: #111; font-weight: 600; }

/* ------------------------------
   14) Tables (if needed in legal pages)
   ------------------------------ */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--mono-100); }
th { color: #111; }

/* ------------------------------
   15) Accessibility helpers
   ------------------------------ */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ------------------------------
   16) Fine-tuning specific elements in pages
   ------------------------------ */
/* Footer brand line wrap */
.footer-brand p { color: #e7e7e7; }

/* Legal nav subtle separation */
.legal-nav a { border: 1px solid rgba(255,255,255,0.14); border-radius: 8px; padding: 6px 10px; }
.legal-nav a:hover { background: rgba(255,255,255,0.06); text-decoration: none; }

/* In-content links */
.text-section a { text-decoration: underline; }

/* Ensure adequate vertical rhythm */
.content-wrapper > h2 { margin-top: 6px; margin-bottom: 6px; }

/* ------------------------------
   17) Print (basic)
   ------------------------------ */
@media print { 
  .mobile-menu-toggle, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
  header, footer { border: none; }
}
