/* Prismyx Drift Nieruchomości - Scandinavian Clean UI
   Mobile-first, flexbox-only layout system
   Brand: primary #0B3D5D, secondary #1E6F5C, accent #F2F5F7, fonts: Georgia (display), Verdana (body)
*/

/* RESET & NORMALIZE */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: Verdana, Arial, Helvetica, sans-serif; background: #F2F5F7; color: #21272A; line-height: 1.6; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: #0B3D5D; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
blockquote, h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { width: 100%; border-collapse: collapse; border-spacing: 0; }
:focus-visible { outline: 2px solid #1E6F5C; outline-offset: 2px; }

/* THEME TOKENS (with fallbacks) */
:root {
  --primary: #0B3D5D;
  --secondary: #1E6F5C;
  --accent: #F2F5F7;
  --ink: #21272A;
  --muted: #5A6872;
  --border: #E6E9EC;
  --surface: #FFFFFF;
  --shadow-sm: 0 2px 6px rgba(8, 29, 43, 0.06);
  --shadow-md: 0 8px 20px rgba(8, 29, 43, 0.08);
  --radius: 12px;
}

/* TYPOGRAPHY SCALE */
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: #0B3D5D; letter-spacing: 0.2px; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.25; margin-top: 8px; }
h3 { font-size: 18px; line-height: 1.3; color: #1E3A4A; }
p, li, blockquote { font-size: 16px; color: #21272A; }
small, .note, .risk-notes, .disclaimer-note, .methodology-note, .privacy_note, .response-time-info { font-size: 14px; color: #5A6872; }

/* LAYOUT WRAPPERS */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
main { display: flex; flex-direction: column; gap: 40px; }

/* Sections as light cards within accent background for Scandinavian feel */
main > section { display: flex; width: 100%; }
main > section > .container { padding-top: 10px; padding-bottom: 10px; }
.content-wrapper { display: flex; flex-direction: column; gap: 20px; background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }

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

/* HEADER */
header { background: #FFFFFF; border-bottom: 1px solid #E6E9EC; position: sticky; top: 0; z-index: 900; }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
header img { height: 36px; width: auto; }
.main-nav { display: none; align-items: center; gap: 16px; flex-wrap: wrap; }
.main-nav a { color: #0B3D5D; padding: 8px 10px; border-radius: 8px; transition: background-color 0.2s ease, color 0.2s ease; }
.main-nav a:hover { background: #F2F5F7; color: #06324B; text-decoration: none; }
.cta-buttons { display: none; align-items: center; gap: 12px; }

/* BUTTONS */
.btn-primary, .btn-secondary, .newsletter-form button, .cookie-banner .btn, .cookie-modal .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 10px; border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease; cursor: pointer; text-decoration: none; }
.btn-primary { background: #4c9684; color: #FFFFFF; border-color: #1E6F5C; box-shadow: 0 2px 8px rgba(30, 111, 92, 0.15); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(30, 111, 92, 0.22); }
.btn-secondary { background: #FFFFFF; color: #0B3D5D; border-color: #0B3D5D; }
.btn-secondary:hover { background: #F2F5F7; transform: translateY(-1px); }

/* CTA group */
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* TRUST BADGES */
.trust-badges { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; opacity: 0.9; }
.trust-badges img { height: 28px; width: auto; filter: saturate(0.7); }

/* FEATURE GRID - paired icon/description, flex-only */
.feature-grid { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: flex-start; }
.feature-grid .feature-icon { flex: 0 0 56px; display: flex; align-items: center; justify-content: center; background: #F7FAFB; border: 1px solid #E6E9EC; border-radius: 12px; height: 56px; box-shadow: var(--shadow-sm); }
.feature-grid .feature-icon img { width: 26px; height: 26px; }
.feature-grid .feature-description { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }

/* BENEFIT LIST & COMMON LISTS */
.benefit-list, .category-list, .indicator-list, .audience-segments, .use-cases, .team-roles-list, .associations-membership, .awards-list, .consent_checkboxes, .fee-structure, .rights-list, .cookie_categories, .purposes_list, .selection_criteria, .investment-list, .closed-investments-list, .performance-summaries, .lessons-learned, .next-steps-list, .user_obligations { display: flex; flex-direction: column; gap: 10px; }
.benefit-list li, .category-list li, .indicator-list li, .audience-segments li, .use-cases li, .team-roles-list li, .associations-membership li, .awards-list li, .consent_checkboxes li, .fee-structure li, .rights-list li, .cookie_categories li, .purposes_list li, .selection_criteria li, .investment-list li, .closed-investments-list li, .performance-summaries li, .lessons-learned li, .next-steps-list li, .user_obligations li { display: flex; align-items: flex-start; gap: 10px; background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.benefit-list img, .category-list img, .indicator-list img { width: 20px; height: 20px; }

/* SERVICES CARDS */
.service-cards { display: flex; flex-wrap: wrap; gap: 20px; }
.service-card { flex: 1 1 260px; display: flex; flex-direction: column; gap: 10px; background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 12px; padding: 18px; box-shadow: var(--shadow-sm); transition: transform 0.15s ease, box-shadow 0.2s ease; }
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* STATS */
.stat-items { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.stat-item { flex: 1 1 140px; background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: var(--shadow-sm); }
.stat-item strong { font-family: Georgia, "Times New Roman", serif; color: #1E6F5C; font-size: 24px; }
.stat-item span { color: #5A6872; font-size: 14px; }

/* PROCESS */
.process-steps { display: flex; flex-direction: column; gap: 12px; }
.process-steps li { background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.risk-controls { display: flex; flex-direction: column; gap: 10px; background: #FAFBFC; border: 1px dashed #E0E6EA; border-radius: 12px; padding: 16px; }
.risk-controls h3 { color: #0B3D5D; }
.risk-controls ul { display: flex; flex-direction: column; gap: 8px; }
.risk-controls li { background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 8px; padding: 10px 12px; }

/* TESTIMONIALS */
.testimonial-card { background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 12px; box-shadow: var(--shadow-sm); align-items: flex-start; }
.testimonial-card blockquote { color: #21272A; font-size: 18px; line-height: 1.5; }
.testimonial-card cite { font-style: normal; color: #5A6872; font-size: 14px; }
.star-rating { display: flex; align-items: center; gap: 4px; opacity: 0.95; }
.star-rating img { width: 18px; height: 18px; }

/* FAQ */
.faq-items { display: flex; flex-wrap: wrap; gap: 16px; }
.faq-item { flex: 1 1 280px; background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); }
.faq-item h3 { color: #0B3D5D; font-size: 18px; }

/* CONTACT DETAILS & MAP/EMBEDS */
.contact-details { display: flex; flex-direction: column; gap: 10px; }
.contact-details p { display: flex; align-items: center; gap: 10px; }
.contact-details img { width: 18px; height: 18px; opacity: 0.9; }
.map-embed, .calendly-embed { display: flex; align-items: center; justify-content: center; background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 12px; padding: 10px; height: 220px; box-shadow: var(--shadow-sm); }
.map-embed img, .calendly-embed img { width: 36px; height: 36px; opacity: 0.7; }

/* FOOTER */
footer { background: #FFFFFF; border-top: 1px solid #E6E9EC; }
footer .container { padding-top: 20px; padding-bottom: 20px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 16px; background: transparent; border: none; box-shadow: none; padding: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-nav a { color: #0B3D5D; padding: 6px 8px; border-radius: 8px; }
.footer-nav a:hover { background: #F2F5F7; text-decoration: none; }
.contact-info { display: flex; flex-direction: column; gap: 8px; }
.contact-info p { display: flex; align-items: center; gap: 10px; color: #5A6872; }
.contact-info img { width: 18px; height: 18px; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: #F7FAFB; border: 1px solid #E6E9EC; border-radius: 12px; padding: 12px; }
.newsletter-form label { color: #0B3D5D; font-weight: 600; }
.newsletter-form input[type="email"] { flex: 1 1 220px; min-width: 0; border: 1px solid #D9E1E6; border-radius: 10px; padding: 10px 12px; background: #FFFFFF; }
.newsletter-form button { background: #0B3D5D; color: #FFFFFF; border-color: #0B3D5D; }
.newsletter-form button:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(11,61,93,0.25); }
.social-links { display: flex; align-items: center; gap: 10px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #E6E9EC; background: #FFFFFF; transition: transform 0.15s ease, box-shadow 0.2s ease; }
.social-links a:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.social-links img { width: 18px; height: 18px; }
footer .copyright { color: #8A96A3; font-size: 14px; }

/* TABLES: cookie table */
.cookie_table { background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 12px; overflow: hidden; display: block; }
.cookie_table table { width: 100%; }
.cookie_table th, .cookie_table td { text-align: left; padding: 12px; border-bottom: 1px solid #EEF2F4; font-size: 14px; }
.cookie_table th { background: #F7FAFB; color: #0B3D5D; font-weight: 700; }
.cookie_table tr:last-child td { border-bottom: none; }

/* MOBILE NAVIGATION */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid #E6E9EC; background: #FFFFFF; border-radius: 10px; cursor: pointer; font-size: 20px; color: #0B3D5D; transition: background-color 0.2s ease, transform 0.15s ease; }
.mobile-menu-toggle:hover { background: #F2F5F7; transform: translateY(-1px); }
.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(11, 61, 93, 0.05); display: flex; flex-direction: row; justify-content: flex-end; transform: translateX(100%); opacity: 0; pointer-events: none; transition: transform 0.3s ease, opacity 0.3s ease; z-index: 1000; }
.mobile-menu.active { transform: translateX(0); opacity: 1; pointer-events: auto; }
.mobile-menu .mobile-nav { width: 84%; max-width: 360px; background: #FFFFFF; border-left: 1px solid #E6E9EC; display: flex; flex-direction: column; gap: 4px; padding: 70px 20px 20px 20px; box-shadow: -6px 0 24px rgba(8,29,43,0.06); }
.mobile-menu-close { position: fixed; top: 16px; right: 16px; width: 40px; height: 40px; border: 1px solid #E6E9EC; background: #FFFFFF; border-radius: 10px; cursor: pointer; font-size: 18px; color: #0B3D5D; z-index: 1001; display: inline-flex; align-items: center; justify-content: center; }
.mobile-nav a { display: flex; align-items: center; padding: 12px 10px; border-radius: 10px; color: #0B3D5D; transition: background-color 0.2s ease; }
.mobile-nav a:hover { background: #F2F5F7; text-decoration: none; }

/* COOKIE CONSENT BANNER */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: #FFFFFF; border-top: 1px solid #E6E9EC; box-shadow: 0 -8px 20px rgba(8,29,43,0.06); display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; transform: translateY(100%); opacity: 0; pointer-events: none; transition: transform 0.35s ease, opacity 0.35s ease; z-index: 1100; }
.cookie-banner.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-banner .cookie-inner { display: flex; flex-direction: column; gap: 10px; }
.cookie-banner p { font-size: 14px; color: #21272A; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .btn { padding: 10px 14px; border-radius: 10px; border: 1px solid #E6E9EC; background: #FFFFFF; color: #0B3D5D; }
.cookie-buttons .btn-accept { background: #1E6F5C; border-color: #1E6F5C; color: #FFFFFF; }
.cookie-buttons .btn-reject { background: #FFFFFF; border-color: #0B3D5D; color: #0B3D5D; }
.cookie-buttons .btn-settings { background: #F2F5F7; border-color: #E6E9EC; color: #0B3D5D; }

/* COOKIE PREFERENCES MODAL */
.cookie-modal-backdrop { position: fixed; inset: 0; background: rgba(8,29,43,0.45); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; z-index: 1200; }
.cookie-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.cookie-modal { background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 14px; width: 100%; max-width: 680px; margin: 0 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 40px rgba(8,29,43,0.2); }
.cookie-modal header { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: transparent; border: none; position: static; }
.cookie-modal h3 { font-size: 20px; color: #0B3D5D; }
.cookie-modal .cookie-groups { display: flex; flex-direction: column; gap: 10px; }
.cookie-modal .group { display: flex; flex-direction: column; gap: 8px; border: 1px solid #E6E9EC; border-radius: 10px; padding: 12px; background: #FAFBFC; }
.cookie-modal .group .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cookie-modal .btn { align-self: flex-end; }

/* TABLE HEADINGS IN POLICY PAGES */
.toc { display: flex; flex-direction: column; gap: 8px; background: #FAFBFC; border: 1px solid #E6E9EC; border-radius: 12px; padding: 12px; }
.policy-sections { display: flex; flex-direction: column; gap: 14px; }
.definitions, .limitations_of_liability, .governing_law, .changes_policy, .contact_for_legal, .effective_date, .management-instructions, .consent-management, .key-metrics, .holding-periods { display: flex; flex-direction: column; gap: 10px; background: #FFFFFF; border: 1px solid #E6E9EC; border-radius: 12px; padding: 12px; }

/* UTILITIES */
.note, .risk-notes, .disclaimer-note, .methodology-note { background: #FAFBFC; border-left: 3px solid #1E6F5C; padding: 10px 12px; border-radius: 6px; }
.resource-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* LINKS INSIDE TEXT */
.content-wrapper a { color: #0B3D5D; text-decoration-color: #C8D6DF; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.content-wrapper a:hover { text-decoration-color: #0B3D5D; }

/* RESPONSIVE BEHAVIOR */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
  .content-wrapper { padding: 28px; gap: 22px; }
  .text-image-section { flex-direction: row; }
  .faq-item { flex: 1 1 calc(50% - 16px); }
  .stat-item strong { font-size: 28px; }
  .newsletter-form { flex-wrap: nowrap; }
  .cookie-banner .cookie-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 992px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  .main-nav { display: flex; }
  .cta-buttons { display: flex; }
  .mobile-menu-toggle { display: none; }
  header .container { gap: 18px; }
  .service-card { flex: 1 1 calc(33.333% - 14px); }
  .faq-item { flex: 1 1 calc(33.333% - 16px); }
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; gap: 16px 24px; }
  .footer-nav { flex: 1 1 100%; }
  .contact-info { flex: 1 1 320px; }
  .newsletter-form { flex: 2 1 420px; }
  .social-links { margin-left: auto; }
}

/* ACCESSIBILITY & MICRO-INTERACTIONS */
.btn-primary:active, .btn-secondary:active, .mobile-menu-toggle:active, .newsletter-form button:active { transform: translateY(0); }
::selection { background: rgba(30,111,92,0.2); color: #0B3D5D; }

/* EXTRA: ALIGNMENT HELPERS FOR IMAGE-TEXT SECTIONS */
.text-image-section > * { flex: 1 1 300px; }

/* HERO PARAGRAPH SIZING */
.content-wrapper > p:first-of-type { font-size: 18px; color: #37424D; }

/* SPECIAL CLASSES USED IN PAGES */
.certifications { display: flex; align-items: center; gap: 10px; }
.certifications img { width: 26px; height: 26px; }
.licenses-and-certifications { display: flex; flex-direction: row; gap: 10px; align-items: center; color: #5A6872; }
.key-metrics p { color: #1E6F5C; font-weight: 600; }
.response-time-info { display: flex; align-items: center; gap: 8px; }
.response-time-info img { width: 18px; height: 18px; }

/* PREVENT OVERLAP - SPACING BETWEEN SECTIONS */
main > section + section { margin-top: 0; }
main > section { padding: 0 0 0 0; }

/* Ensure all layout groups use flex (no grid anywhere) */
.footer-nav, .contact-info, .newsletter-form, .social-links, .cta-group, .trust-badges, .feature-grid, .service-cards, .stat-items, .process-steps, .faq-items, .contact-details, .map-embed, .calendly-embed, .resource-links, .certifications, .licenses-and-certifications { display: flex; }

/* PRINT FRIENDLY MINOR TWEAKS */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal-backdrop { display: none !important; }
  body { background: #FFFFFF; }
  .content-wrapper { box-shadow: none; border-color: #BFC8D2; }
}
