/* Strona startowa eBudżet */
.md-content:has(.eb-home) { max-width: none; }
.md-content:has(.eb-home) .md-content__inner { margin: 0; padding: 0; }
.md-content:has(.eb-home) .md-content__inner::before { display: none; }
.md-main__inner:has(.eb-home) { margin-top: 0; }

.eb-home {
    --eb-blue: #10496e;
    --eb-teal: #388e86;
    --eb-tint: rgba(16, 73, 110, 0.07);
    --eb-line: rgba(16, 73, 110, 0.18);
    --eb-card: #ffffff;
    --eb-muted: #5b6b75;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow-x: clip;
}
[data-md-color-scheme="slate"] .eb-home {
    --eb-blue: #5aa9d6;
    --eb-card: rgba(255, 255, 255, 0.04);
    --eb-muted: #9fb2bd;
    --eb-tint: rgba(90, 169, 214, 0.14);
    --eb-line: rgba(90, 169, 214, 0.25);
}
.eb-home * { box-sizing: border-box; }
.eb-home a { text-decoration: none; }
.eb-wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

/* HERO */
.eb-hero {
    background: linear-gradient(120deg, #0b3552 0%, #10496e 60%, #1a6a9e 100%);
    color: #fff;
    padding: 4.5rem 0 7rem;
    position: relative;
}
.eb-hero::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .14), transparent 40%);
    pointer-events: none;
}
.eb-hero .eb-wrap {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 3rem; align-items: center; position: relative; z-index: 1;
}
.eb-eyebrow {
    display: inline-block; padding: .3rem .8rem; border-radius: 999px;
    background: rgba(255, 255, 255, .15); font-size: .7rem; font-weight: 700; letter-spacing: .12em;
}
.eb-home .eb-hero h1 {
    color: #fff; margin: 1rem 0 1rem; font-size: 2.4rem; line-height: 1.12; letter-spacing: -.03em;
}
.eb-hero p { color: rgba(255, 255, 255, .88); font-size: .95rem; line-height: 1.65; margin: 0 0 1.8rem; text-align: left; }
.eb-hbtns { display: flex; flex-wrap: wrap; gap: .8rem; }
.eb-hbtn {
    display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.3rem;
    border-radius: 10px; font-weight: 700; font-size: .85rem;
    border: 1px solid rgba(255, 255, 255, .55); color: #fff !important;
}
.eb-hbtn--solid { background: #fff; color: #0b3552 !important; border-color: #fff; }
.eb-shot { filter: drop-shadow(0 28px 40px rgba(0, 0, 0, .35)); }
.eb-shot img { display: block; width: 100%; height: auto; border-radius: 8px !important; }

/* PASEK */
.eb-stats { margin-top: -3.2rem; position: relative; z-index: 2; }
.eb-stats-box {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--md-default-bg-color); border: 1px solid var(--eb-line);
    border-radius: 16px; box-shadow: 0 18px 45px rgba(0, 0, 0, .12);
}
.eb-stat { min-width: 0; padding: 1.4rem 1.2rem; text-align: center; border-right: 1px solid var(--eb-line); }
.eb-stat:last-child { border-right: 0; }
.eb-stat strong { display: block; color: var(--eb-blue); font-size: 1.05rem; }
.eb-stat span { color: var(--eb-muted); font-size: .78rem; }

/* SEKCJE */
.eb-section { padding: 4.5rem 0 0; }
.eb-section:last-child { padding-bottom: 4rem; }
.eb-label { color: var(--eb-teal); font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.eb-home .eb-section h2.eb-title { margin: .4rem 0 2rem; font-size: 1.9rem; letter-spacing: -.02em; }

/* SZYBKIE LINKI */
.eb-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.eb-link {
    display: block; padding: 1.4rem 1.5rem; border-radius: 16px;
    border: 1px solid var(--eb-line); background: var(--eb-card);
}
.eb-link strong { display: block; color: var(--eb-blue); font-size: 1rem; }
.eb-link span { color: var(--eb-muted); font-size: .82rem; }

/* MODUŁY */
.eb-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.eb-tile { padding: 1.5rem; border-radius: 16px; background: var(--eb-card); border: 1px solid var(--eb-line); }
.eb-ico {
    display: flex; align-items: center; justify-content: center;
    width: 2.6rem; height: 2.6rem; border-radius: 12px;
    background: var(--eb-tint); color: var(--eb-blue);
}
.eb-ico svg { width: 1.4rem; height: 1.4rem; }
.eb-tile h3 { margin: .8rem 0 .4rem; font-size: 1rem; }
.eb-tile p { margin: 0; color: var(--eb-muted); font-size: .85rem; line-height: 1.6; text-align: left; }

/* treść pod spodem: zwykły tekst dokumentacji */
.eb-text { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

@media screen and (max-width: 40em) {
    .eb-hero { padding: 3rem 0 6rem; }
    .eb-section { padding-top: 3rem; }
    .eb-home .eb-section h2.eb-title { font-size: 1.5rem; margin-bottom: 1.2rem; }
    .eb-stats-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .eb-stat { padding: 1rem .5rem; min-width: 0; }
    .eb-stat strong { font-size: .9rem; overflow-wrap: anywhere; }
    .eb-stat span { font-size: .72rem; overflow-wrap: anywhere; }
    .eb-text img[align] {
        float: none !important; display: block; margin: 1rem auto;
        width: 100% !important; max-width: 22rem;
    }
}

@media screen and (max-width: 56em) {
    .eb-hero .eb-wrap, .eb-links, .eb-bento { grid-template-columns: minmax(0, 1fr); }
    .eb-stats-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .eb-stat:nth-child(2) { border-right: 0; }
    .eb-stat:nth-child(-n+2) { border-bottom: 1px solid var(--eb-line); }
    .eb-home .eb-hero h1 { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: no-preference) {
    .eb-hero .eb-wrap > div:first-child > * {
        opacity: 0;
        animation: eb-fade-up .7s cubic-bezier(.2, .7, .2, 1) forwards;
    }
    .eb-hero .eb-wrap > div:first-child > :nth-child(2) { animation-delay: .1s; }
    .eb-hero .eb-wrap > div:first-child > :nth-child(3) { animation-delay: .2s; }
    .eb-hero .eb-wrap > div:first-child > :nth-child(4) { animation-delay: .3s; }
    .eb-hero .eb-shot {
        opacity: 0;
        animation: eb-fade-up .9s cubic-bezier(.2, .7, .2, 1) .25s forwards,
                   eb-float 6s ease-in-out 1.2s infinite;
    }
    .eb-stats-box { animation: eb-fade-up .8s cubic-bezier(.2, .7, .2, 1) .5s both; }

    .eb-tile, .eb-link, .eb-hbtn {
        transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    }
    .eb-tile:hover, .eb-link:hover {
        transform: translateY(-5px);
        box-shadow: 0 16px 34px rgba(16, 73, 110, .16);
        border-color: var(--eb-blue);
    }
    .eb-hbtn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
    .eb-tile:hover .eb-ico { background: var(--eb-blue); color: #fff; }
    .eb-ico { transition: background .25s ease, color .25s ease; }
}
