/* =============================
   Tornideluc Glanzservice – style.css
   Warm & friendly design: warm colors, rounded corners, friendly fonts, soft shadows
   Mobile-first • Only Flexbox layouts • No CSS Grid/Columns
   ============================= */

/* --- CSS Reset & Base 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, input, select, textarea { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 3px solid #FFB48A; outline-offset: 2px; }

/* --- Design Tokens --- */
:root {
  /* Brand */
  --color-primary: #144A7C; /* brand blue */
  --color-secondary: #2E8B57; /* brand green */
  --color-accent: #F4F8FC; /* light brand accent */
  /* Warm friendly neutrals */
  --warm-1: #FFF7F0; /* hero/section bg */
  --warm-2: #FCEFE6; /* cards */
  --warm-3: #FFE7D6; /* accents/pills */
  --warm-ink: #1F2937; /* dark text */
  --ink-700: #2D3748;
  --ink-600: #4B5563;
  --ink-500: #6B7280;
  --line: #E8E2DC;
  --white: #FFFFFF;
  /* Effects */
  --shadow-sm: 0 4px 12px rgba(20, 74, 124, 0.08);
  --shadow-md: 0 8px 24px rgba(20, 74, 124, 0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --focus: #FFB48A; /* warm focus */
  /* Spacing */
  --space-8: 8px; --space-12: 12px; --space-16: 16px; --space-20: 20px; --space-24: 24px; --space-30: 30px; --space-32: 32px; --space-40: 40px; --space-48: 48px; --space-60: 60px;
}

/* --- Typography --- */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: var(--warm-ink);
  background: #FFFDFB;
  line-height: 1.6;
  font-size: 16px;
}
.h1, h1 { font-family: "Trebuchet MS", Tahoma, sans-serif; font-weight: 700; font-size: 32px; line-height: 1.25; letter-spacing: 0.2px; }
.h2, h2 { font-family: "Trebuchet MS", Tahoma, sans-serif; font-weight: 700; font-size: 24px; line-height: 1.3; margin-bottom: var(--space-16); }
.h3, h3 { font-family: "Trebuchet MS", Tahoma, sans-serif; font-weight: 700; font-size: 18px; line-height: 1.35; margin-top: var(--space-16); margin-bottom: var(--space-8); }
small { color: var(--ink-600); }

p { color: var(--ink-700); }
strong { font-weight: 700; color: var(--warm-ink); }

/* --- Global Layout Helpers (Flex Only) --- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-16);
  display: flex; /* flexbox container always */
  flex-direction: column;
  gap: var(--space-24);
}
.content-wrapper {
  display: flex; /* flexbox container */
  flex-direction: column;
  gap: var(--space-20);
  align-items: flex-start;
}

/* Mandatory spacing patterns (exact specs) */
.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; }

/* Default section styling to mirror warm_friendly spacing */
main > section { margin-bottom: var(--space-60); padding: var(--space-40) 0; }

/* --- Header --- */
header { position: relative; z-index: 50; background: var(--white); box-shadow: var(--shadow-sm); }
header .container { padding-top: var(--space-16); padding-bottom: var(--space-16); }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: var(--space-12); border-radius: var(--radius-sm); }
.logo img { height: 36px; width: auto; }
.tagline { display: none; color: var(--ink-600); font-size: 14px; }

.main-nav { display: none; gap: var(--space-16); align-items: center; }
.main-nav a { color: var(--warm-ink); padding: 10px 12px; border-radius: 999px; transition: background 180ms ease, color 180ms ease, transform 180ms ease; }
.main-nav a:hover { background: var(--warm-3); color: var(--color-primary); transform: translateY(-1px); }

.header-cta { display: none; gap: var(--space-12); align-items: center; }

/* Hamburger */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; background: var(--warm-3); color: var(--warm-ink); border-radius: 10px; box-shadow: var(--shadow-sm); cursor: pointer; transition: background 180ms ease, transform 180ms ease; }
.mobile-menu-toggle:hover { background: #FFD7BF; transform: translateY(-1px); }

/* --- Mobile Menu Overlay --- */
.mobile-menu { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--warm-2); transform: translateX(100%); transition: transform 260ms ease; z-index: 9999; padding: var(--space-24); gap: var(--space-24); box-shadow: var(--shadow-md); }
.mobile-menu.open, .mobile-menu.active { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 42px; height: 42px; border: 0; background: var(--warm-3); color: var(--warm-ink); border-radius: 10px; box-shadow: var(--shadow-sm); cursor: pointer; }
.mobile-nav { display: flex; flex-direction: column; gap: var(--space-12); }
.mobile-nav a { padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--warm-ink); box-shadow: var(--shadow-sm); transition: transform 160ms ease, background 160ms ease; }
.mobile-nav a:hover { background: #FFF3EA; transform: translateX(3px); }

/* --- Hero --- */
.hero { background: var(--warm-1); border-radius: 0; }
.hero .container { padding-top: var(--space-40); padding-bottom: var(--space-40); }
.hero .content-wrapper { align-items: flex-start; gap: var(--space-16); }
.hero h1 { color: var(--color-primary); }
.hero p { max-width: 70ch; }
.service-badges { display: flex; flex-wrap: wrap; gap: var(--space-8); color: var(--ink-600); }
.service-badges span { background: var(--warm-3); color: var(--warm-ink); padding: 6px 10px; border-radius: 999px; border: 1px solid #F6D8C8; }

/* --- CTAs & Buttons --- */
.cta-group { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease; font-weight: 700; }
.btn.primary { background: var(--color-primary); color: var(--white); box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: #0F3A63; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.secondary { background: #FFF1E8; color: var(--color-primary); border-color: #F3D2C1; }
.btn.secondary:hover { background: #FFDCC8; }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* --- Lists & Text Blocks --- */
.text-section { display: flex; flex-direction: column; gap: var(--space-12); }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: var(--space-8); padding-left: 0; }
.text-section li { color: var(--ink-700); }

.benefits-list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); }
.benefits-list li { display: flex; align-items: center; gap: var(--space-8); background: var(--white); border: 1px solid var(--line); padding: 10px 12px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.benefits-list img { width: 18px; height: 18px; }

.quick-contact { display: flex; flex-wrap: wrap; gap: var(--space-8); color: var(--ink-600); }
.quick-contact a { display: inline-flex; align-items: center; gap: 8px; color: var(--color-primary); font-weight: 700; }
.quick-contact img { width: 16px; height: 16px; }

/* --- Cards & Generic Components --- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: var(--space-20); transition: transform 180ms ease, box-shadow 180ms ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* --- Testimonials --- */
/* Requirement: dark text on light backgrounds for readability */
.testimonial-card { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--color-secondary); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); color: var(--warm-ink); }
.testimonial-card p { color: var(--warm-ink); font-style: italic; }
.testimonial-card div { color: var(--ink-600); }

/* --- Tables ( Preise page ) --- */
.text-section table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.text-section thead tr { background: var(--color-primary); color: var(--white); }
.text-section th, .text-section td { text-align: left; padding: 12px 14px; font-size: 15px; }
.text-section tbody tr { background: var(--white); border-top: 1px solid var(--line); }
.text-section tbody tr:nth-child(odd) { background: #FFF8F3; }
.text-section table a { color: var(--color-primary); font-weight: 700; }

/* --- Address blocks --- */
address { font-style: normal; display: flex; flex-direction: column; gap: var(--space-8); }
address p { display: flex; align-items: center; gap: 10px; }
address img { width: 18px; height: 18px; }

/* --- Footer --- */
footer { background: var(--accent); padding: var(--space-40) 0; border-top: 1px solid var(--line); }
footer .content-wrapper { display: flex; flex-direction: column; gap: var(--space-24); }
.footer-brand { display: flex; flex-direction: column; gap: var(--space-12); }
.footer-brand img { height: 36px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.footer-nav a { padding: 8px 10px; border-radius: 999px; color: var(--warm-ink); transition: background 160ms ease; }
.footer-nav a:hover { background: var(--warm-3); }
.footer-contact { display: flex; flex-direction: column; gap: var(--space-8); color: var(--ink-600); }
.social-links { display: inline-flex; gap: 12px; }
.copyright { color: var(--ink-600); font-size: 14px; }

/* --- Cookie Consent Banner --- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: var(--space-16); background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(20, 74, 124, 0.12); padding: var(--space-16); z-index: 9998; transform: translateY(110%); transition: transform 260ms ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: var(--space-12); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.cookie-btn { padding: 10px 14px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; cursor: pointer; }
.cookie-btn.accept { background: var(--color-secondary); color: var(--white); }
.cookie-btn.reject { background: #FFE7D6; color: var(--warm-ink); border-color: #F3D2C1; }
.cookie-btn.settings { background: var(--white); color: var(--color-primary); border-color: var(--line); }
.cookie-btn:hover { filter: brightness(0.98); }

/* Cookie Modal */
.cookie-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: var(--space-16); z-index: 10000; }
.cookie-modal.open { display: flex; }
.cookie-modal .backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); }
.cookie-modal .dialog { position: relative; background: var(--white); width: 100%; max-width: 640px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: var(--space-24); display: flex; flex-direction: column; gap: var(--space-16); z-index: 1; }
.cookie-modal h3 { color: var(--color-primary); }
.cookie-category { display: flex; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #FFF9F4; }
.cookie-category .label { display: flex; flex-direction: column; gap: 4px; }

/* Simple toggle */
.toggle { position: relative; width: 48px; height: 28px; background: #E9E9E9; border-radius: 999px; cursor: pointer; transition: background 160ms ease; display: inline-flex; align-items: center; padding: 0 4px; }
.toggle::after { content: ""; width: 20px; height: 20px; background: var(--white); border-radius: 50%; box-shadow: var(--shadow-sm); transform: translateX(0); transition: transform 160ms ease; }
.toggle.on { background: var(--color-secondary); }
.toggle.on::after { transform: translateX(20px); }
.toggle.locked { background: #C9E6D6; }

/* --- Utility --- */
.hr { height: 1px; background: var(--line); width: 100%; }
.muted { color: var(--ink-600); }
.hidden { display: none !important; }

/* --- Page specifics & Lists for numbers --- */
ol { counter-reset: step; display: flex; flex-direction: column; gap: var(--space-12); }
ol > li { position: relative; padding-left: 42px; }
ol > li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; background: var(--warm-3); color: var(--warm-ink); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border: 1px solid #F3D2C1; }

/* --- Links --- */
a { color: var(--color-primary); }
a:hover { text-decoration: underline; }

/* --- Images in text-image sections --- */
.text-image-section img { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

/* --- Forms (generic) --- */
input[type="text"], input[type="email"], input[type="tel"], textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }

/* --- Desktop Enhancements --- */
@media (min-width: 768px) {
  .h1, h1 { font-size: 40px; }
  .h2, h2 { font-size: 28px; }
  .h3, h3 { font-size: 20px; }

  .hero { border-radius: var(--radius-lg); }
  .tagline { display: inline-flex; font-size: 14px; }

  .content-wrapper { gap: var(--space-24); }

  /* Header navigation visible on tablet+ */
  .main-nav { display: inline-flex; }
  .header-cta { display: inline-flex; }
  .mobile-menu-toggle { display: none; }

  /* Lists in rows when space permits */
  .benefits-list { gap: var(--space-12); }

  /* Footer layout in rows */
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .footer-brand, .footer-nav, .footer-contact { flex: 1 1 260px; }
}

@media (min-width: 992px) {
  .hero .content-wrapper { max-width: 900px; }
}

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

/* --- Additional Components to support future content --- */
/* Flexible feature list items */
.features { display: flex; flex-wrap: wrap; gap: var(--space-20); }
.feature-item { background: var(--warm-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-20); box-shadow: var(--shadow-sm); }

/* Content grid using flex only */
.cards { display: flex; flex-wrap: wrap; gap: var(--space-20); }
.cards .card { flex: 1 1 280px; }

/* --- Header alignment tweaks on very narrow screens --- */
@media (max-width: 420px) {
  header .content-wrapper { gap: var(--space-12); }
  .logo img { height: 32px; }
}

/* --- Accessibility & Interaction --- */
.btn, .mobile-menu-toggle, .mobile-menu-close, .cookie-btn { transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.btn:active, .mobile-menu-toggle:active, .mobile-menu-close:active, .cookie-btn:active { transform: translateY(1px); }

/* --- Ensure adequate spacing between all elements --- */
main > section > .container > .content-wrapper > * + * { margin-top: 0; }

/* --- Specific page minor tweaks --- */
/* Service badges in hero already styled; ensure spacing below lists */
.hero .benefits-list { margin-top: var(--space-8); }

/* Footer small copyright spacing */
footer .copyright { flex: 1 1 100%; margin-top: var(--space-12); }

/* --- High-contrast for testimonials & review sections --- */
section:has(.testimonial-card) { background: var(--white); }

/* --- Tables overflow on small screens --- */
.text-section { overflow-x: auto; }
.text-section table { min-width: 600px; }

/* --- Prevent overlapping: add consistent gaps between block elements --- */
main > section .text-section > * + * { margin-top: 6px; }

/* --- Warm divider pills for stats (if used) --- */
.stats { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.stats .stat { background: var(--warm-3); border: 1px solid #F3D2C1; color: var(--warm-ink); padding: 10px 14px; border-radius: 999px; }

/* --- Print basics --- */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}
