/* =====================================================================
   PrecuProfe Naprawy 360 — style.css
   Design: professional_corporate (blue/gray palette, structured layout)
   Mobile-first, Flexbox-only layouts, high-contrast and accessible
   ===================================================================== */

/* ----------------------------
   1) CSS Reset / Normalize
   ---------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }
a { background-color: transparent; text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid #2F855A; outline-offset: 2px; }

/* ----------------------------
   2) Theme Tokens (CSS Vars)
   ---------------------------- */
:root {
  --pp-primary: #1E3A8A;   /* brand blue */
  --pp-secondary: #2F855A; /* trust green */
  --pp-accent: #F4F7FB;    /* light accent */
  --pp-white: #FFFFFF;
  --pp-black: #0B1220;
  --pp-text: #1F2937;      /* gray-800 */
  --pp-muted: #6B7280;     /* gray-500 */
  --pp-border: #E5E7EB;    /* gray-200 */
  --pp-shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
}

/* ----------------------------
   3) Base Typography
   ---------------------------- */
body {
  font-family: Verdana, Geneva, sans-serif; /* body font */
  color: var(--pp-text);
  background: var(--pp-white);
  font-size: 16px;
}
h1, h2, h3 { font-family: "Trebuchet MS", Tahoma, sans-serif; /* display font */ }

h1 { font-size: 32px; line-height: 1.2; font-weight: 700; color: var(--pp-primary); margin-bottom: 16px; }
h2 { font-size: 24px; line-height: 1.3; font-weight: 700; color: var(--pp-primary); margin-bottom: 16px; }
h3 { font-size: 18px; line-height: 1.4; font-weight: 700; color: var(--pp-text); margin-top: 12px; margin-bottom: 8px; }

p { font-size: 16px; line-height: 1.7; color: var(--pp-text); margin-bottom: 12px; }
small, .small { font-size: 14px; color: var(--pp-muted); }
strong { font-weight: 700; }

/* ----------------------------
   4) Layout Containers (Flexbox-only)
   ---------------------------- */
.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.text-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.text-section ul,
.text-section ol { display: flex; flex-direction: column; gap: 8px; padding-left: 0; }
.text-section li { display: flex; align-items: center; gap: 10px; color: var(--pp-text); }
.text-section li img { width: 18px; height: 18px; }

/* Mandatory spacing & alignment patterns */
.section { margin-bottom: 60px; padding: 40px 20px; display: flex; flex-direction: column; gap: 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; gap: 14px; background: var(--pp-white); border: 1px solid var(--pp-border); border-radius: 10px; padding: 20px; box-shadow: var(--pp-shadow); }
.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; border-radius: 12px; background: var(--pp-accent); border: 1px solid var(--pp-border); box-shadow: var(--pp-shadow); color: var(--pp-text); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ----------------------------
   5) Header & Navigation
   ---------------------------- */
header { position: relative; z-index: 50; border-bottom: 1px solid var(--pp-border); background: var(--pp-white); }
header .container { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a { color: var(--pp-text); font-weight: 600; padding: 8px 10px; border-radius: 6px; transition: color .2s ease, background-color .2s ease; }
.main-nav a:hover { color: var(--pp-primary); background: var(--pp-accent); }

.header-cta { display: none; align-items: center; gap: 10px; }
.header-cta a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 8px; font-weight: 700; transition: background-color .25s ease, color .25s ease, box-shadow .25s ease; }
.header-cta a:first-child { background: var(--pp-primary); color: var(--pp-white); box-shadow: var(--pp-shadow); }
.header-cta a:first-child:hover { background: #17306e; }
.header-cta a:last-child { background: var(--pp-white); color: var(--pp-primary); border: 1px solid var(--pp-primary); }
.header-cta a:last-child:hover { background: var(--pp-accent); }

.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; color: var(--pp-primary); background: var(--pp-accent); box-shadow: var(--pp-shadow); transition: transform .2s ease, background-color .2s ease; }
.mobile-menu-toggle:hover { background: #e9eef7; transform: translateY(-1px); }

/* Mobile Menu Overlay */
.mobile-menu { position: fixed; inset: 0; background: rgba(11,18,32,0.6); display: flex; flex-direction: row; align-items: stretch; justify-content: flex-end; transform: translateX(100%); transition: transform .35s ease; z-index: 1000; }
.mobile-menu .mobile-nav { background: var(--pp-white); width: min(85%, 360px); display: flex; flex-direction: column; gap: 8px; padding: 20px; border-left: 1px solid var(--pp-border); box-shadow: var(--pp-shadow); }
.mobile-menu .mobile-nav a { padding: 12px 10px; border-radius: 6px; color: var(--pp-text); font-weight: 600; }
.mobile-menu .mobile-nav a:hover { background: var(--pp-accent); color: var(--pp-primary); }
.mobile-menu-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 8px; color: var(--pp-primary); background: var(--pp-accent); box-shadow: var(--pp-shadow); }
/* Support multiple possible JS toggled classes */
.mobile-menu.open,
.mobile-menu.active,
.mobile-menu.is-open,
body.menu-open .mobile-menu { transform: translateX(0); }

/* ----------------------------
   6) Main & Sections
   ---------------------------- */
main { display: flex; flex-direction: column; gap: 20px; }
main > section { display: flex; flex-direction: column; gap: 20px; padding: 30px 0; border-bottom: 1px solid var(--pp-border); }
main > section:first-of-type { background: var(--pp-accent); border-bottom-color: transparent; }

.text-section a { color: var(--pp-primary); font-weight: 700; text-decoration: none; border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.text-section a:hover { color: #17306e; border-color: #cdd7ef; }

/* CTA links inside text-section displayed as buttons when alone or key actions */
.text-section > a { display: inline-flex; align-self: flex-start; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--pp-primary); background: var(--pp-white); color: var(--pp-primary); box-shadow: var(--pp-shadow); }
.text-section > a:hover { background: var(--pp-accent); }
.text-section > a:first-child { background: var(--pp-primary); color: var(--pp-white); border-color: var(--pp-primary); }
.text-section > a:first-child:hover { background: #17306e; color: #fff; }

/* Ordered and unordered lists within content sections */
ol.text-section, ul.text-section { padding-left: 0; }

/* Testimonials - high contrast on light background (required) */
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--pp-muted); }

/* Utility cards (if added later) */
.card .card-title { font-weight: 700; color: var(--pp-primary); }
.card .card-link { margin-top: auto; color: var(--pp-primary); font-weight: 700; }
.card:hover { box-shadow: 0 8px 22px rgba(16, 24, 40, 0.12); }

/* Content grids via Flexbox-only */
.content-grid > * { flex: 1 1 260px; min-width: 240px; }
.card-container > .card { flex: 1 1 calc(50% - 24px); min-width: 260px; }

/* ----------------------------
   7) Footer
   ---------------------------- */
footer {  color: #e5e7eb; border-top: 1px solid rgba(229,231,235,0.15); }
footer .container { gap: 24px; padding-top: 26px; padding-bottom: 26px; }
footer .content-wrapper { gap: 16px; }
footer a { color: #c7d2fe; }
footer a:hover { color: var(--pp-white); }

/* ----------------------------
   8) Buttons (generic helpers)
   ---------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 10px; font-weight: 700; border: 1px solid transparent; transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease; }
.btn-primary { background: var(--pp-primary); color: var(--pp-white); box-shadow: var(--pp-shadow); }
.btn-primary:hover { background: #17306e; }
.btn-outline { background: var(--pp-white); color: var(--pp-primary); border-color: var(--pp-primary); }
.btn-outline:hover { background: var(--pp-accent); }
.btn-success { background: var(--pp-secondary); color: var(--pp-white); }
.btn-success:hover { background: #276749; }

/* ----------------------------
   9) Mobile Navigation Rules
   ---------------------------- */
/* Mobile first: hide desktop nav, show burger */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* ----------------------------
   10) Responsive Typography & Layout
   ---------------------------- */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .content-wrapper { gap: 24px; }
  .text-section { gap: 14px; }
  .text-image-section { flex-direction: row; }
  .text-section ul, .text-section ol { gap: 10px; }
}
@media (min-width: 1200px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

/* ----------------------------
   11) Lists & Inline Separators
   ---------------------------- */
.text-section span { color: var(--pp-muted); }
.text-section ul.inline, .text-section ol.inline { flex-direction: row; flex-wrap: wrap; }

/* ----------------------------
   12) Tables (if any appear later)
   ---------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border: 1px solid var(--pp-border); text-align: left; }
th { background: var(--pp-accent); color: var(--pp-primary); }

/* ----------------------------
   13) Cookie Consent Banner & Modal
   ---------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; display: flex; flex-direction: column; gap: 14px; background: var(--pp-white); border-top: 1px solid var(--pp-border); box-shadow: 0 -8px 24px rgba(16,24,40,0.12); padding: 16px 20px; transform: translateY(100%); transition: transform .35s ease; }
.cookie-banner.show, body.cookies-open .cookie-banner { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { padding: 10px 14px; border-radius: 8px; }
.cookie-actions .accept { background: var(--pp-secondary); color: var(--pp-white); }
.cookie-actions .accept:hover { background: #276749; }
.cookie-actions .reject { background: var(--pp-white); color: #B91C1C; border: 1px solid #B91C1C; }
.cookie-actions .reject:hover { background: #FEF2F2; }
.cookie-actions .settings { background: var(--pp-white); color: var(--pp-primary); border: 1px solid var(--pp-primary); }
.cookie-actions .settings:hover { background: var(--pp-accent); }

/* Modal */
.cookie-modal-overlay { position: fixed; inset: 0; background: rgba(11,18,32,0.55); display: none; align-items: center; justify-content: center; z-index: 1200; }
.cookie-modal-overlay.open { display: flex; }
.cookie-modal { display: flex; flex-direction: column; gap: 16px; width: min(92%, 720px); background: var(--pp-white); border: 1px solid var(--pp-border); border-radius: 12px; box-shadow: var(--pp-shadow); padding: 20px; transform: translateY(20px); opacity: 0; transition: opacity .25s ease, transform .25s ease; }
.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: 12px; }
.cookie-modal .category { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--pp-border); border-radius: 10px; padding: 12px; }

/* Toggle switch (for Analytics/Marketing) */
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; inset: 0; opacity: 0; }
.switch .track { position: absolute; inset: 0; background: #CBD5E1; border-radius: 999px; transition: background-color .25s ease; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--pp-white); box-shadow: 0 1px 4px rgba(0,0,0,0.2); transition: transform .25s ease; }
.switch input:checked + .track { background: var(--pp-secondary); }
.switch input:checked + .track .thumb { transform: translateX(20px); }

/* ----------------------------
   14) Forms (if added later)
   ---------------------------- */
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--pp-border); border-radius: 8px; background: var(--pp-white); color: var(--pp-text);
}
input::placeholder, textarea::placeholder { color: var(--pp-muted); }
label { font-weight: 700; color: var(--pp-text); margin-bottom: 6px; display: inline-block; }
.form-row { display: flex; flex-wrap: wrap; gap: 16px; }
.form-row > * { flex: 1 1 220px; }

/* ----------------------------
   15) Micro-interactions & Helpers
   ---------------------------- */
.fade-in { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
.fade-in.appear { opacity: 1; transform: translateY(0); }

.separator { height: 1px; width: 100%; background: var(--pp-border); display: flex; }
.muted { color: var(--pp-muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--pp-accent); color: var(--pp-primary); font-weight: 700; }

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

/* ----------------------------
   17) Page-specific gentle refinements
   ---------------------------- */
/* Hero paragraphs slightly larger for emphasis */
main > section:first-of-type p { font-size: 18px; color: var(--pp-text); }
/* Inline trust icons row when space allows */
@media (min-width: 768px) {
  .text-section[aria-label="Znaki zaufania"] ul { flex-direction: row; flex-wrap: wrap; gap: 14px 24px; }
}

/* ----------------------------
   18) Ensure no overlapping and good spacing
   ---------------------------- */
section .testimonial-card + .testimonial-card { margin-top: 16px; }
.content-wrapper > .text-section + .text-section { margin-top: 4px; }

/* ----------------------------
   19) Compliance: Flex behavior for headers/footers nav groups
   ---------------------------- */
footer nav, footer .text-section, header nav, header .header-cta { display: flex; flex-wrap: wrap; gap: 10px; }
footer .text-section { flex-direction: column; }

/* ----------------------------
   20) Safety: prevent content from touching edges on very small screens
   ---------------------------- */
@media (max-width: 360px) {
  .mobile-menu .mobile-nav { width: 100%; }
  .header-cta a { padding: 10px 12px; }
}

/* End of file */
