/*
 * ODYSSEY — Static Site Styles
 * Erasmus+ KA210-ADU: Financial security education for seniors 60+
 * https://odyssey-project.eu
 */

/* ==========================================================================
   0. CSS Custom Properties (Brand Colors from Master Prompt)
   ========================================================================== */

:root {
    /* Brand Colors */
    --color-navy: #2A2D34;
    --color-coral: #D4734E;
    --color-gold: #E8C46D;
    --color-rose: #C94060;
    --color-beige: #F0E0C8;
    --color-bg: #FAFAF8;
    --color-white: #FFFFFF;
    --color-text: #333333;
    --color-gray: #888888;
    --color-light: #E0E0E0;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 18px;
    --font-size-sm: 16px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
    --font-size-2xl: 30px;
    --font-size-3xl: 36px;
    --font-size-4xl: 48px;
    --line-height: 1.6;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --header-height: auto;
    --min-tap-target: 48px;

    /* Transitions */
    --transition: 0.25s ease;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Font size adjustment classes — toggled by user via a11y button */
.font-size-large {
    --font-size-base: 22px;
    --font-size-sm: 18px;
    --font-size-lg: 24px;
    --font-size-xl: 28px;
    --font-size-2xl: 34px;
    --font-size-3xl: 42px;
    --font-size-4xl: 56px;
}

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-weight: 500;
    line-height: var(--line-height);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Skip to content — accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 10000;
    padding: 0.75rem 1.5rem;
    background: var(--color-coral);
    color: var(--color-white);
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: top var(--transition);
}

.skip-link:focus {
    top: 1rem;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 800;
    color: var(--color-navy);
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p {
    margin-bottom: var(--space-sm);
}

a {
    color: var(--color-coral);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}

a:hover,
a:focus {
    color: var(--color-navy);
}

a:focus-visible {
    outline: 3px solid var(--color-coral);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   3. Layout / Container
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-md);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--min-tap-target);
    min-width: var(--min-tap-target);
    padding: 0.75rem 2rem;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: var(--font-size-base);
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1.2;
}

.btn:focus-visible {
    outline: 3px solid var(--color-coral);
    outline-offset: 3px;
}

.btn--primary {
    background-color: var(--color-coral);
    color: var(--color-white);
    border-color: var(--color-coral);
}

.btn--primary:hover,
.btn--primary:focus {
    background-color: #b8603f;
    border-color: #b8603f;
    color: var(--color-white);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-navy);
    border-color: var(--color-navy);
}

.btn--secondary:hover,
.btn--secondary:focus {
    background-color: var(--color-navy);
    color: var(--color-white);
}

/* ==========================================================================
   5. Header & Navigation
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.site-header .container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding-block: var(--space-xs);
}

.site-logo {
    flex-shrink: 0;
}

.site-logo img {
    height: clamp(80px, 12vw, 200px);
    width: auto;
}

/* Primary Navigation */
.primary-nav__list {
    display: flex;
    list-style: none;
    gap: 2px;
    align-items: center;
    flex-wrap: nowrap;
}

.primary-nav__list a {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    min-height: var(--min-tap-target);
    padding: 0.5rem clamp(0.4rem, 0.6vw, 0.75rem);
    font-weight: 700;
    font-size: clamp(0.75rem, 0.9vw, 0.95rem);
    color: var(--color-navy);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition), color var(--transition);
}

.primary-nav__list a:hover,
.primary-nav__list a:focus {
    background-color: var(--color-beige);
    color: var(--color-coral);
}

.primary-nav__list .is-active,
.primary-nav__list .current-menu-item a,
.primary-nav__list .current_page_item a {
    color: var(--color-coral);
    background-color: rgba(212, 115, 78, 0.08);
}

/* Header actions: lang switcher + font toggle + hamburger */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.lang-switcher__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--min-tap-target);
    min-width: var(--min-tap-target);
    padding: 0.3rem 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-gray);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    transition: all var(--transition);
}

.lang-switcher__link:hover,
.lang-switcher__link:focus {
    color: var(--color-navy);
    border-color: var(--color-light);
}

.lang-switcher__link--active {
    color: var(--color-coral);
    border-color: var(--color-coral);
}

.lang-switcher__flag {
    width: 24px;
    height: 18px;
    margin-right: 4px;
    border-radius: 2px;
}

/* Font Size Toggle Button */
.font-size-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--min-tap-target);
    min-width: var(--min-tap-target);
    background: none;
    border: 2px solid var(--color-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: var(--font-size-sm);
    color: var(--color-navy);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0.35rem 0.6rem;
}

.font-size-toggle:hover,
.font-size-toggle:focus {
    border-color: var(--color-coral);
    color: var(--color-coral);
}

.font-size-toggle[aria-pressed="true"] {
    background-color: var(--color-coral);
    border-color: var(--color-coral);
    color: var(--color-white);
}

/* Hamburger / Mobile Menu Toggle */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: var(--min-tap-target);
    min-width: var(--min-tap-target);
    background: none;
    border: 2px solid var(--color-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.5rem;
    transition: all var(--transition);
}

.menu-toggle:hover,
.menu-toggle:focus {
    border-color: var(--color-coral);
}

.menu-toggle__icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-navy);
    position: relative;
    transition: background-color var(--transition);
}

.menu-toggle__icon::before,
.menu-toggle__icon::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-navy);
    position: absolute;
    left: 0;
    transition: transform var(--transition);
}

.menu-toggle__icon::before { top: -7px; }
.menu-toggle__icon::after  { top: 7px; }

/* Open state for hamburger */
.menu-toggle[aria-expanded="true"] .menu-toggle__icon {
    background-color: transparent;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
    transform: rotate(45deg);
    top: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ==========================================================================
   6. Footer
   ========================================================================== */

.site-footer {
    background-color: var(--color-navy);
    color: var(--color-white);
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
}

.site-footer a {
    color: var(--color-gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer a:hover,
.site-footer a:focus {
    color: var(--color-white);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-eu {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.footer-eu__flag {
    width: 240px;
    height: auto;
    flex-shrink: 0;
}

.footer-eu__text {
    font-size: var(--font-size-sm);
    line-height: var(--line-height);
    color: rgba(255, 255, 255, 0.85);
}

.footer-eu__text strong {
    display: block;
    color: var(--color-white);
    margin-bottom: var(--space-xs);
}

.footer-partners {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer-partners img {
    height: 38px;
    width: auto;
    opacity: 0.9;
    transition: opacity var(--transition);
}

.footer-partners img:hover {
    opacity: 1;
}

.footer-social {
    display: flex;
    gap: var(--space-xs);
    list-style: none;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--min-tap-target);
    min-width: var(--min-tap-target);
    color: var(--color-white);
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.footer-social a:hover,
.footer-social a:focus {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.footer-social svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.footer-bottom {
    padding-top: var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a:hover,
.footer-bottom a:focus {
    color: var(--color-white);
}

/* ==========================================================================
   7. Front Page Sections (skeleton)
   ========================================================================== */

.hero-section {
    position: relative;
    background-color: var(--color-bg);
    color: var(--color-navy);
    padding: var(--space-3xl) 0;
    text-align: center;
    overflow: hidden;
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center 30%;
    filter: blur(2px);
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(250, 250, 248, 0.82);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    color: var(--color-navy);
    margin-bottom: var(--space-md);
}

.hero-section p {
    font-size: var(--font-size-lg);
    color: var(--color-text);
    max-width: 700px;
    margin-inline: auto;
    margin-bottom: var(--space-lg);
}

/* Hero tagline & subtitle */
.hero-section__tagline {
    display: inline-block;
    padding: 0.3rem 1rem;
    background-color: var(--color-coral);
    color: var(--color-white);
    font-weight: 700;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-section__subtitle {
    font-size: var(--font-size-sm);
    font-style: italic;
    color: var(--color-gray);
    margin-bottom: var(--space-md);
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-light);
}

.stat-card__number {
    display: block;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: var(--font-size-3xl);
    color: var(--color-coral);
    line-height: 1.1;
    margin-bottom: var(--space-xs);
}

.stat-card__label {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-gray);
    line-height: 1.4;
}

.section__cta-text {
    text-align: center;
    max-width: 800px;
    margin-inline: auto;
    font-size: var(--font-size-lg);
    color: var(--color-text);
}

.section {
    padding: var(--space-3xl) 0;
}

.section--alt {
    background-color: var(--color-beige);
}

.section__header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section__header h2 {
    margin-bottom: var(--space-xs);
}

.section__header p {
    color: #5b6270;
    font-size: var(--font-size-lg);
    font-weight: 500;
}

/* ==========================================================================
   8. Cards
   ========================================================================== */

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.card-grid--2 {
    grid-template-columns: 1fr;
}

.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-light);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card__icon {
    width: 48px;
    height: 48px;
    color: var(--color-coral);
    margin-bottom: var(--space-sm);
}

.card__icon svg {
    width: 100%;
    height: 100%;
}

.card__number {
    display: block;
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: var(--font-size-4xl);
    color: var(--color-coral);
    opacity: 0.4;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.card h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-xs);
}

.card p {
    color: #4f5663;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.card__badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--color-gold);
    color: var(--color-navy);
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.card__badge--coral {
    background-color: var(--color-coral);
    color: var(--color-white);
}

/* Video card placeholder */
.card--video {
    padding: 0;
    overflow: hidden;
}

.card__video-placeholder {
    aspect-ratio: 16 / 9;
    background-color: var(--color-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition);
}

.card__video-placeholder:hover {
    background-color: #3a3d44;
}

.card__video-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--color-white);
    opacity: 0.8;
}

.card--video h3 {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-base);
    margin-bottom: 0;
}

/* ==========================================================================
   8b. FAQ Accordion
   ========================================================================== */

.faq-list {
    max-width: 800px;
    margin-inline: auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-light);
}

.faq-item__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: var(--font-size-base);
    color: var(--color-navy);
    cursor: pointer;
    list-style: none;
    min-height: var(--min-tap-target);
}

.faq-item__question::-webkit-details-marker {
    display: none;
}

.faq-item__question::after {
    content: '+';
    font-size: var(--font-size-xl);
    color: var(--color-coral);
    flex-shrink: 0;
    margin-left: var(--space-sm);
    transition: transform var(--transition);
}

.faq-item[open] .faq-item__question::after {
    content: '−';
}

.faq-item__answer {
    padding-bottom: var(--space-md);
    color: var(--color-text);
    line-height: var(--line-height);
}

/* ==========================================================================
   8c. Partners Bar
   ========================================================================== */

.partners-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}

.partners-bar__item img {
    height: 55px;
    width: auto;
    filter: grayscale(30%);
    opacity: 0.8;
    transition: all var(--transition);
}

.partners-bar__item:hover img {
    filter: grayscale(0);
    opacity: 1;
}

/* ==========================================================================
   8d. Active nav state & hero actions
   ========================================================================== */

.primary-nav__list .is-active {
    color: var(--color-coral);
    background-color: rgba(212, 115, 78, 0.08);
}

.hero-section__actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.btn--on-dark {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.7);
    background-color: transparent;
}

.btn--on-dark:hover,
.btn--on-dark:focus {
    background-color: var(--color-white);
    color: var(--color-navy);
    border-color: var(--color-white);
}

/* ==========================================================================
   8e. Editorial, Course & Methodology Pages
   ========================================================================== */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: var(--space-3xl) 0;
    background:
        radial-gradient(circle at top right, rgba(232, 196, 109, 0.18), transparent 26%),
        radial-gradient(circle at left center, rgba(201, 64, 96, 0.08), transparent 22%),
        linear-gradient(135deg, #f4f2ec 0%, #fafaf8 56%, #efe6d6 100%);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: auto auto -120px -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 2px solid rgba(42, 45, 52, 0.08);
    box-shadow:
        0 0 0 28px rgba(42, 45, 52, 0.05),
        0 0 0 56px rgba(42, 45, 52, 0.03);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero--split .container,
.module-layout,
.article-section__grid,
.blog-feature {
    display: grid;
    gap: var(--space-xl);
    align-items: center;
}

.page-hero__lead,
.lead-text {
    font-size: var(--font-size-lg);
    color: #434a57;
    font-weight: 600;
    line-height: 1.7;
    max-width: 44rem;
}

.page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.page-hero__note {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: var(--space-md);
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(42, 45, 52, 0.08);
    border-radius: var(--radius-md);
    color: #5f6573;
    font-size: var(--font-size-sm);
}

.page-hero__visual img,
.module-layout__visual img,
.article-section__visual img,
.post-card__image img,
.blog-feature__image img {
    width: 100%;
    border-radius: 26px;
    border: 1px solid rgba(42, 45, 52, 0.08);
    box-shadow: 0 18px 42px rgba(42, 45, 52, 0.12);
    background: #f4f2ec;
}

.metric-strip,
.info-grid,
.resource-grid,
.scenario-grid,
.post-grid,
.three-rules__grid {
    display: grid;
    gap: var(--space-md);
}

.metric-strip {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-card,
.info-card,
.scenario-card,
.download-card,
.three-rules__item {
    background: var(--color-white);
    border: 1px solid rgba(42, 45, 52, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 26px rgba(42, 45, 52, 0.07);
}

.metric-card {
    padding: var(--space-lg);
}

.metric-card strong {
    display: block;
    color: var(--color-coral);
    font-size: var(--font-size-3xl);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.metric-card span,
.info-card p,
.download-card p,
.scenario-card p {
    color: #616161;
}

.scenario-card h3 a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: background-size 0.2s ease;
}

.scenario-card h3 a:hover,
.scenario-card h3 a:focus-visible {
    background-size: 100% 1px;
}

.info-grid,
.resource-grid,
.scenario-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.info-card,
.download-card,
.scenario-card {
    padding: var(--space-lg);
}

.info-card__icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    margin-bottom: var(--space-sm);
    color: var(--color-navy);
    background: linear-gradient(135deg, rgba(232, 196, 109, 0.55), rgba(201, 64, 96, 0.18));
}

.info-card__icon svg {
    width: 28px;
    height: 28px;
}

.roadmap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-sm);
}

.roadmap__step {
    position: relative;
    display: block;
    padding: 1rem 1rem 1rem 3.5rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(42, 45, 52, 0.08);
    border-radius: var(--radius-lg);
    color: var(--color-navy);
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.roadmap__step:hover,
.roadmap__step:focus-visible {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

.roadmap__step::before {
    content: attr(data-step);
    position: absolute;
    inset: 50% auto auto 1rem;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--color-coral);
    color: var(--color-white);
    font-size: 0.875rem;
}

.module-section {
    padding: var(--space-3xl) 0;
}

.module-section--alt {
    background: linear-gradient(180deg, rgba(240, 224, 200, 0.4), rgba(255, 255, 255, 0));
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--space-sm);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-coral);
}

.section-label::before {
    content: '';
    width: 2.75rem;
    height: 0.25rem;
    border-radius: 999px;
    background: var(--color-rose);
}

.module-layout__body h2,
.article-section__body h2,
.blog-feature__content h2 {
    margin-bottom: var(--space-xs);
}

.module-meta,
.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: var(--space-sm);
    color: #6a6f79;
    font-size: 0.9rem;
}

.module-meta span,
.post-card__meta span,
.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(42, 45, 52, 0.06);
}

.chip {
    color: var(--color-navy);
    font-weight: 700;
    text-decoration: none;
}

.tag-list,
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    list-style: none;
    margin: var(--space-md) 0 0;
}

.tag-list li,
.chip-list li {
    margin: 0;
}

.check-list,
.styled-list {
    list-style: none;
    display: grid;
    gap: 0.8rem;
    margin: var(--space-md) 0 0;
}

.check-list li,
.styled-list li {
    position: relative;
    padding-left: 1.9rem;
    margin: 0;
}

.check-list li::before,
.styled-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--color-coral);
    box-shadow: 0 0 0 4px rgba(212, 115, 78, 0.16);
}

.callout-panel {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(42, 45, 52, 0.98), rgba(42, 45, 52, 0.82));
    color: var(--color-white);
}

.callout-panel h3,
.callout-panel p,
.callout-panel li,
.callout-panel .check-list li {
    color: var(--color-white) !important;
}

.callout-panel a {
    color: var(--color-gold);
}

.callout-panel .check-list li::before {
    background: var(--color-gold);
    box-shadow: 0 0 0 4px rgba(232, 196, 109, 0.16);
}

.download-card__eyebrow {
    display: inline-block;
    margin-bottom: var(--space-sm);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(201, 64, 96, 0.12);
    color: var(--color-rose);
    font-weight: 700;
    font-size: 0.85rem;
}

.blog-feature {
    background: linear-gradient(135deg, rgba(42, 45, 52, 0.98), rgba(42, 45, 52, 0.88));
    border-radius: 32px;
    padding: var(--space-xl);
    color: var(--color-white);
    box-shadow: 0 18px 44px rgba(42, 45, 52, 0.18);
}

.blog-feature h2,
.blog-feature p,
.blog-feature li {
    color: var(--color-white);
}

.blog-feature .section-label {
    color: var(--color-gold);
}

.blog-feature .section-label::before {
    background: var(--color-gold);
}

.post-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.post-card {
    background: var(--color-white);
    border: 1px solid rgba(42, 45, 52, 0.08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(42, 45, 52, 0.08);
}

.post-card__image {
    background: linear-gradient(135deg, rgba(232, 196, 109, 0.16), rgba(201, 64, 96, 0.08));
}

.post-card__image--cover img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.post-card__content {
    padding: var(--space-lg);
}

.post-card h3 {
    font-size: 1.4rem;
}

.post-card p {
    color: #666;
}

.blog-card,
.blog-card:hover,
.blog-card:focus,
.blog-card__body,
.blog-card__title,
.blog-card__excerpt,
.blog-card__category,
.article-header,
.article-header h1,
.article-header__lead,
.article-lead,
.article-header__meta,
.article-meta {
    text-decoration: none;
}

.article-section {
    padding: var(--space-2xl) 0;
    border-top: 1px solid rgba(42, 45, 52, 0.08);
}

.article-section:first-of-type {
    border-top: none;
}

.article-section__body .check-list {
    margin-bottom: var(--space-lg);
}

.article-section__visual--head img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.content-block {
    max-width: 860px;
    margin-inline: auto;
}

.text-lg {
    font-size: var(--font-size-lg);
    font-weight: 500;
}

.pullquote {
    margin: var(--space-xl) 0;
    padding: var(--space-lg) var(--space-xl);
    border-left: 6px solid var(--color-coral);
    border-radius: 0 24px 24px 0;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 30px rgba(42, 45, 52, 0.06);
}

.pullquote p:last-child {
    margin-bottom: 0;
}

.pullquote--accent {
    border-left-color: var(--color-rose);
    background: linear-gradient(135deg, rgba(201, 64, 96, 0.12), rgba(255, 255, 255, 0.9));
}

.profile-card {
    padding: 0;
    overflow: hidden;
}

.profile-card__header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: var(--space-lg);
    color: var(--color-white);
}

.profile-card__header h3 {
    color: inherit;
    margin: 0;
    font-size: 1.4rem;
}

.profile-card__header--coral {
    background: linear-gradient(135deg, #d4734e, #bf6240);
}

.profile-card__header--gold {
    background: linear-gradient(135deg, #dcb55b, #b88f34);
}

.profile-card__header--rose {
    background: linear-gradient(135deg, #c94060, #a6354f);
}

.profile-card__header--navy {
    background: linear-gradient(135deg, #2a2d34, #424754);
}

.profile-card__icon {
    width: 2.8rem;
    height: 2.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

.profile-card__icon svg {
    width: 1.4rem;
    height: 1.4rem;
}

.profile-card__body {
    padding: var(--space-lg);
}

.profile-card__risk,
.profile-card__approach {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(42, 45, 52, 0.08);
}

.needs-list,
.timeline {
    display: grid;
    gap: var(--space-md);
    max-width: 940px;
    margin-inline: auto;
}

.need-item,
.timeline__content {
    background: var(--color-white);
    border: 1px solid rgba(42, 45, 52, 0.08);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(42, 45, 52, 0.06);
}

.need-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-lg);
    align-items: start;
    padding: var(--space-lg);
}

.need-item__number,
.three-rules__number {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--color-coral);
    color: var(--color-white);
    font-weight: 700;
    font-size: 1.05rem;
}

.need-item__example {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px dashed rgba(42, 45, 52, 0.14);
    color: #626874;
}

.timeline__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-md);
    align-items: start;
}

.timeline__marker {
    position: relative;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 1rem;
    border-radius: 50%;
    background: var(--color-coral);
    box-shadow: 0 0 0 8px rgba(212, 115, 78, 0.16);
}

.timeline__content {
    padding: var(--space-lg);
}

.three-rules__grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.three-rules__item {
    padding: var(--space-lg);
}

.card-grid--principles {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ==========================================================================
   9. Responsive — Mobile First
   ========================================================================== */

/* Mobile: nav hidden, hamburger visible */
@media (max-width: 991px) {
    .primary-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        border-bottom: 2px solid var(--color-light);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        padding: var(--space-sm);
        z-index: 999;
    }

    .primary-nav--open {
        display: block;
    }

    .primary-nav__list {
        flex-direction: column;
        gap: 0;
    }

    .primary-nav__list a {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: var(--font-size-base);
        color: var(--color-navy);
        border-bottom: 1px solid var(--color-light);
    }

    .primary-nav__list li:last-child a {
        border-bottom: none;
    }

    .menu-toggle {
        display: flex;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-top {
        grid-template-columns: 2fr 1fr 1fr;
        align-items: start;
    }

    .hero-section {
        padding: var(--space-3xl) 0 calc(var(--space-3xl) + 2rem);
    }

    .page-hero--split .container,
    .module-layout,
    .article-section__grid,
    .blog-feature {
        grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    }

    .module-layout--reverse .module-layout__visual,
    .article-section__grid--reverse .article-section__visual {
        order: -1;
    }
}

@media (max-width: 767px) {
    .page-hero,
    .module-section {
        padding: var(--space-2xl) 0;
    }

    .page-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .need-item {
        grid-template-columns: 1fr;
    }

    .pullquote {
        padding-inline: var(--space-lg);
    }
}

/* Blog article accessibility */
.article-page,
article.article {
    --article-text-scale: 1;
}

.article-page[data-text-size="1"],
article.article[data-text-size="1"] {
    --article-text-scale: 1.08;
}

.article-page[data-text-size="2"],
article.article[data-text-size="2"] {
    --article-text-scale: 1.18;
}

.article-page[data-text-size="3"],
article.article[data-text-size="3"] {
    --article-text-scale: 1.32;
}

.article-header h1 {
    font-size: calc(var(--font-size-3xl) * var(--article-text-scale));
    font-weight: 800;
    letter-spacing: -0.02em;
}

.article-header__lead,
.article-lead {
    font-size: calc(var(--font-size-lg) * var(--article-text-scale));
    font-style: normal;
    font-weight: 600;
    color: #4b5360;
    line-height: 1.7;
}

.article-header__meta,
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: calc(var(--font-size-sm) * var(--article-text-scale));
    color: #6c7280;
    font-weight: 600;
    margin-top: var(--space-sm);
}

.article-tools {
    max-width: 800px;
    margin: 0 auto var(--space-xl);
    padding: var(--space-md);
    background: var(--color-white);
    border: 1px solid var(--color-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(42, 45, 52, 0.07);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: space-between;
    align-items: center;
}

.article-tools__group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.article-tools__label {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-gray);
}

.article-tools__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--min-tap-target);
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--color-light);
    background: var(--color-white);
    color: var(--color-navy);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), background-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.article-tools__button:hover,
.article-tools__button:focus {
    border-color: var(--color-coral);
    color: var(--color-coral);
    box-shadow: 0 0 0 4px rgba(212, 115, 78, 0.12);
    outline: none;
}

.article-tools__button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.article-tools__button--primary {
    background: var(--color-coral);
    border-color: var(--color-coral);
    color: var(--color-white);
}

.article-tools__button--primary:hover,
.article-tools__button--primary:focus {
    background: #bd6241;
    border-color: #bd6241;
    color: var(--color-white);
}

.article-tools__button[aria-pressed="true"] {
    box-shadow: 0 0 0 4px rgba(212, 115, 78, 0.2);
}

.article-tools__status {
    flex-basis: 100%;
    font-size: var(--font-size-sm);
    color: var(--color-gray);
}

.article-content {
    font-size: calc(var(--font-size-base) * var(--article-text-scale));
}

.article-content h2 {
    font-size: calc(var(--font-size-2xl) * var(--article-text-scale));
}

.article-content h3 {
    font-size: calc(var(--font-size-xl) * var(--article-text-scale));
}

.article-content p,
.article-content li {
    font-size: 1em;
    line-height: 1.85;
    font-weight: 600;
    color: #38404d;
}

.blog-card__title {
    font-weight: 800;
    line-height: 1.2;
}

.blog-card__excerpt {
    color: #505764;
    font-weight: 500;
    line-height: 1.65;
}

.blog-card__category {
    font-weight: 800;
}

.article-content ul,
.article-content ol {
    margin: 0 0 var(--space-md) 1.35em;
}

.article-sources {
    font-size: calc(var(--font-size-sm) * var(--article-text-scale));
}

.article-sources h3 {
    font-size: calc(var(--font-size-base) * var(--article-text-scale));
}

.article-cta h3 {
    font-size: calc(var(--font-size-xl) * var(--article-text-scale));
}

.article-cta p {
    font-size: calc(var(--font-size-base) * var(--article-text-scale));
}

@media (max-width: 768px) {
    .article-tools {
        align-items: stretch;
    }

    .article-tools__group {
        width: 100%;
    }

    .article-tools__button {
        flex: 1 1 0;
    }
}

/* ==========================================================================
   9. Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .menu-toggle,
    .lang-switcher,
    .font-size-toggle,
    .article-tools,
    .skip-link {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* ==========================================================================
   CHAPTER NAVIGATION (metodologia — nawigacja między rozdziałami)
   ========================================================================== */

.chapter-nav {
    background: var(--color-beige);
    border-bottom: 1px solid var(--color-light);
}

.chapter-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    flex-wrap: wrap;
}

.chapter-nav__link {
    font-weight: 700;
    color: var(--color-navy);
    text-decoration: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}

.chapter-nav__link:hover,
.chapter-nav__link:focus-visible {
    background: var(--color-coral);
    color: var(--color-white);
}

.chapter-nav__link--disabled {
    color: var(--color-gray);
    pointer-events: none;
    cursor: default;
}

.chapter-nav__link--disabled:hover {
    background: none;
    color: var(--color-gray);
}

.chapter-nav__current {
    font-weight: 700;
    color: var(--color-coral);
    text-align: center;
}

@media (max-width: 600px) {
    .chapter-nav__inner {
        flex-direction: column;
        text-align: center;
    }
}
