/* =========================================================
   CIVICEYE GD — НАЧАЛНА СТРАНИЦА (Home / Welcome)
   ========================================================= */

.home-page {
    --home-green: #123B32;
    --home-green-light: #24594B;
    --home-lime: #D7F36B;
    --home-paper: #F3F5EF;
    --home-muted: #68776E;
    --home-border: #E1E7DF;
    --home-gap: 24px;
    --welcome-green: #174b3e;
    --welcome-green-dark: #10372e;
    --welcome-cream: #f7f5ef;
    --welcome-terracotta: #c8795b;
    --welcome-muted: #68766f;
    --welcome-border: rgba(23, 75, 62, 0.13);

    width: min(100% - 48px, 1180px);
    margin-inline: auto;
    padding: 36px 0 64px;
    color: var(--home-green);
    background: var(--welcome-cream);
    overflow: hidden;
}

.home-page *, .home-page *::before, .home-page *::after { box-sizing: border-box; }

/* HERO СЕКЦИЯ */
.home-page .home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: clamp(32px, 5vw, 76px);
    min-height: 440px;
    padding: clamp(32px, 5vw, 64px);
    border: 1px solid #E1E7DF;
    border-radius: 28px;
    background: radial-gradient(ellipse at 90% 10%, rgba(215, 243, 107, .23), transparent 45%), linear-gradient(135deg, #F7F8F3 0%, #EEF3E9 100%);
    overflow: hidden;
}
.home-page .home-hero-content { position: relative; z-index: 2; width: 100%; max-width: 570px; min-width: 0; }
.home-page .home-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px; color: #426B55; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; line-height: 1.5; }
.home-page .home-hero h1 { max-width: 620px; margin: 0; color: #123B32; font-size: clamp(38px, 4.2vw, 60px); font-weight: 800; line-height: 1.08; letter-spacing: -2px; overflow-wrap: break-word; }
.home-page .home-hero h1 span { color: #527C3D; }
.home-page .home-intro { max-width: 490px; margin: 24px 0 0; color: #65736A; font-size: 16px; line-height: 1.85; }

/* БУТОНИ И ДЕЙСТВИЯ */
.home-page .home-actions,
.home-page .home-account-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.home-page .home-account-actions { margin-top: 26px; }
.home-page .home-account-actions > p { margin: 0 0 10px 0; color: #3A614A; font-size: 13.5px; font-weight: 750; letter-spacing: 0.3px; }

.home-page .home-button-primary, .home-page .home-button-secondary { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 50px; padding: 13px 22px; border-radius: 12px; font-size: 14px; font-weight: 750; line-height: 1.4; text-align: center; text-decoration: none; transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.home-page .home-button-primary { border: 1px solid #123B32; background: #123B32; color: #FFFFFF; box-shadow: 0 6px 16px rgba(18, 59, 50, .12); }
.home-page .home-button-primary:hover { background: #1D5144; color: #FFFFFF; transform: translateY(-2px); box-shadow: 0 9px 22px rgba(18, 59, 50, .17); }
.home-page .home-button-secondary { border: 1px solid #D7E0D5; background: rgba(255, 255, 255, .82); color: #234A3D; }
.home-page .home-button-secondary:hover { border-color: #A8BDA7; background: #FFFFFF; color: #123B32; transform: translateY(-2px); }
.home-page .home-hero-note { display: flex; align-items: center; gap: 9px; margin-top: 26px; color: #6C796F; font-size: 13px; line-height: 1.6; }

/* =========================================================
   ВИЗУАЛНА СЕКЦИЯ: ОРБИТАЛНИ ПРЪСТЕНИ С ТЕКСТ
   ========================================================= */
@keyframes homeOrbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes homeOrbitSpinBack {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.home-page .home-hero-visual {
    --orbit-size: min(100%, 400px);
    position: relative;
    display: grid;
    place-items: center;
    isolation: isolate;
    min-width: 0;
    min-height: 400px;
}

/* Всеки пръстен е самостоятелен квадрат в центъра на секцията. */
.home-page .home-orbit {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: var(--orbit-size);
    height: var(--orbit-size);
    margin: auto;
    pointer-events: none;
    transform-origin: center center;
}

/* Думите се въртят бавно надясно, щрихите — по-бързо наляво. */
.home-page .home-orbit-outer {
    z-index: 1;
    animation: homeOrbitSpin 36s linear infinite;
}

.home-page .home-orbit-inner {
    z-index: 0;
    animation: homeOrbitSpinBack 22s linear infinite;
}

/* При посочване спираме въртенето, за да се прочете текстът. */
.home-page .home-hero:hover .home-orbit {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .home-page .home-orbit {
        animation: none;
    }
}

.home-page .home-orbit-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.home-page .home-orbit-guide {
    fill: none;
    stroke: rgba(18, 59, 50, .13);
    stroke-width: 1;
}

.home-page .home-orbit-text {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.6px;
    fill: #174b3e;
    text-transform: uppercase;
}

/* Дебели къси щрихи по вътрешния пръстен. */
.home-page .home-orbit-ticks {
    fill: none;
    stroke: rgba(18, 59, 50, .14);
    stroke-width: 5;
    stroke-dasharray: 1 26;
    stroke-linecap: round;
}

.home-page .home-orbit-dot { fill: rgba(18, 59, 50, .30); }
.home-page .home-orbit-dot-accent { fill: #91B653; }

/* Вътрешен фон на кръга */
.home-page .home-visual-circle { position: absolute; z-index: -1; aspect-ratio: 1; border-radius: 50%; pointer-events: none; }
.home-page .home-circle-inner { width: calc(var(--orbit-size) * .62); border: 1px solid rgba(18, 59, 50, .10); background: radial-gradient(circle, rgba(215, 243, 107, .34) 0%, rgba(215, 243, 107, .10) 68%, transparent 100%); }

/* Централна плаваща карта */
.home-page .home-visual-card {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
    width: calc(var(--orbit-size) * .60);
    max-width: 100%;
    padding: 20px 22px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 20px 55px rgba(18, 59, 50, .13);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.home-page .home-visual-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 70px rgba(18, 59, 50, .18);
}
.home-page .home-visual-icon { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: #EAF2DE; color: #24523D; font-size: 24px; }
.home-page .home-visual-card > div:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-page .home-visual-small { color: #728174; font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }
.home-page .home-visual-card strong { color: #123B32; font-size: 20px; line-height: 1.3; white-space: nowrap; }
.home-page .home-visual-caption { color: #778278; font-size: 12px; line-height: 1.5; }

/* Точка-маркер в надписа над заглавието */
.home-page .home-eyebrow-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #91B653; }

/* Статистики */
.home-page .home-statistics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--home-gap); margin-top: 28px; }
.home-page .home-stat-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 164px; padding: 24px; border: 1px solid #E1E7DF; border-radius: 18px; background: #FFFFFF; box-shadow: 0 5px 20px rgba(18, 59, 50, .035); }
.home-page .home-stat-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; color: #647168; font-size: 13px; font-weight: 650; }
.home-page .home-stat-icon { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: #EEF2E8; color: #315C42; font-size: 19px; }
.home-page .home-stat-icon-orange { background: #FFF0DC; color: #A76524; }
.home-page .home-stat-icon-green { background: #E3F2E6; color: #2F7746; }
.home-page .home-stat-number { margin-top: 17px; color: #123B32; font-size: clamp(30px, 3vw, 40px); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.home-page .home-stat-card > p { margin: 8px 0 0; color: #89938A; font-size: 12px; line-height: 1.6; }

/* Последни сигнали */
.home-page .home-recent-section { margin-top: 88px; }
.home-page .home-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.home-page .home-section-eyebrow { display: block; margin-bottom: 11px; color: #6C874D; font-size: 11px; font-weight: 800; letter-spacing: 1.6px; line-height: 1.5; }
.home-page .home-section-heading h2, .home-page .home-how-heading h2, .home-page .home-final-cta h2 { margin: 0; color: #123B32; font-size: clamp(26px, 3vw, 36px); font-weight: 800; line-height: 1.2; letter-spacing: -.7px; }
.home-page .home-section-heading p, .home-page .home-how-heading > p { max-width: 560px; margin: 12px 0 0; color: #738078; font-size: 14px; line-height: 1.8; }
.home-page .home-text-link { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 10px 0; color: #315B43; font-size: 13px; font-weight: 750; text-decoration: none; }
.home-page .home-text-link:hover { color: #638B42; }
.home-page .home-reports-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: var(--home-gap); }
.home-page .home-report-card { display: flex; flex-direction: column; min-width: 0; min-height: 245px; padding: 23px; border: 1px solid #E1E7DF; border-radius: 18px; background: #FFFFFF; box-shadow: 0 5px 20px rgba(18, 59, 50, .035); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.home-page .home-report-card:hover { transform: translateY(-3px); border-color: #CBD9C8; box-shadow: 0 12px 30px rgba(18, 59, 50, .08); }
.home-page .home-report-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.home-page .home-report-category { color: #55745A; font-size: 11px; font-weight: 800; letter-spacing: .4px; }
.home-page .home-report-status { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 9px; border-radius: 100px; font-size: 11px; font-weight: 750; line-height: 1.4; }
.home-page .home-report-status > span { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.home-page .home-status-new { background: #FFF1D9; color: #94631F; }
.home-page .home-status-progress { background: #E7F0FF; color: #365F9B; }
.home-page .home-status-resolved { background: #E5F4E7; color: #347447; }
.home-page .home-report-card h3 { margin: 22px 0 0; color: #203D30; font-size: 18px; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.home-page .home-report-description { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; margin: 10px 0 22px; color: #778178; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.home-page .home-report-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 15px; border-top: 1px solid #EEF1EB; }
.home-page .home-report-address { min-width: 0; color: #65746A; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.home-page .home-report-footer time { flex: 0 0 auto; color: #8A938A; font-size: 11px; white-space: nowrap; }
.home-page .home-all-reports-mobile { display: none; }

/* Как работи */
.home-page .home-how-section { margin-top: 92px; padding: 82px 7% 100px; border-top: 1px solid rgba(23, 75, 62, 0.07); background: #fff; }
.home-page .home-how-heading { max-width: 700px; margin: 0 auto 45px; text-align: center; }
.home-page .home-section-eyebrow { justify-content: center; color: var(--welcome-terracotta); }
.home-page .home-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--home-gap); max-width: 1150px; margin: 0 auto; }
.home-page .home-step { position: relative; min-width: 0; min-height: 220px; padding: 28px; border: 1px solid #E1E7DF; border-radius: 18px; background: var(--welcome-cream); }
.home-page .home-step-number { position: absolute; top: 24px; right: 24px; color: #B8C6B1; font-size: 13px; font-weight: 800; letter-spacing: 1px; }
.home-page .home-step-icon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 25px; border-radius: 14px; background: #EAF2DE; color: #315B43; font-size: 23px; }
.home-page .home-step h3 { margin: 0; color: #203D30; font-size: 18px; font-weight: 750; line-height: 1.4; }
.home-page .home-step p { margin: 10px 0 0; color: #778178; font-size: 13px; line-height: 1.8; }

/* CTA */
.home-page .home-final-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 36px; padding: 34px 38px; border: 1px solid #234B3C; border-radius: 22px; background: #123B32; }
.home-page .home-final-cta .home-section-eyebrow { color: #D7F36B; }
.home-page .home-final-cta h2 { color: #FFFFFF; }
.home-page .home-final-cta p { margin: 10px 0 0; color: #D1DDD4; font-size: 14px; line-height: 1.8; }
.home-page .home-final-cta .home-button-primary { flex: 0 0 auto; border-color: #D7F36B; background: #D7F36B; color: #123B32; }
.home-page .home-final-cta .home-button-primary:hover { background: #E5FA9D; }

/* =========================================================
   МОБИЛНА АДАПТИВНОСТ (MOBILE RESPONSIVE)
   ========================================================= */
@media (max-width: 1000px) {
    .home-page .home-hero { grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr); gap: 28px; padding: 36px; }
    .home-page .home-hero h1 { font-size: clamp(34px, 4.2vw, 46px); letter-spacing: -1.3px; }
    .home-page .home-reports-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-page .home-report-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .home-page {
        width: calc(100% - 24px);
        padding-top: 18px;
        padding-bottom: 40px;
        --home-gap: 14px;
    }

    /* Hero подреждане в една колона */
    .home-page .home-hero {
        grid-template-columns: 1fr;
        gap: 32px;
        min-height: auto;
        padding: 28px 20px 28px;
        border-radius: 24px;
        text-align: left;
    }

    .home-page .home-hero-content {
        max-width: 100%;
    }

    .home-page .home-eyebrow {
        margin-bottom: 16px;
        font-size: 11px;
        letter-spacing: 1.2px;
    }

    .home-page .home-hero h1 {
        font-size: clamp(30px, 8vw, 42px);
        line-height: 1.14;
        letter-spacing: -1.2px;
    }

    .home-page .home-intro {
        margin-top: 16px;
        font-size: 14.5px;
        line-height: 1.65;
    }

    /* Мобилни бутони: удобни за натискане с пръст */
    .home-page .home-account-actions {
        margin-top: 22px;
    }

    .home-page .home-account-actions > p {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .home-page .home-account-buttons,
    .home-page .home-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 14px;
    }

    .home-page .home-account-buttons > a,
    .home-page .home-actions > a {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        font-size: 14.5px;
    }

    .home-page .home-hero-note {
        margin-top: 20px;
        font-size: 12px;
    }

    /* Мобилно мащабиране на орбитата и картата */
    .home-page .home-hero-visual {
        --orbit-size: min(100%, 330px);
        min-height: 330px;
        width: 100%;
        margin: 0 auto;
    }

    /* На тясно екранче вътрешният пръстен само пречи. */
    .home-page .home-orbit-inner {
        display: none;
    }

    .home-page .home-orbit-text {
        font-size: 14px;
        letter-spacing: 1.2px;
    }

    /* Картата се подрежда вертикално, за да не докосва пръстена. */
    .home-page .home-visual-card {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: min(64%, 210px);
        padding: 18px;
        border-radius: 20px;
        text-align: center;
    }

    .home-page .home-visual-icon {
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
        font-size: 24px;
        border-radius: 13px;
    }

    .home-page .home-visual-card strong {
        font-size: 18px;
    }

    .home-page .home-visual-caption {
        font-size: 11px;
        line-height: 1.45;
    }

    /* Статистики на мобилен */
    .home-page .home-statistics {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 20px;
    }

    .home-page .home-stat-card {
        min-height: auto;
        padding: 18px 20px;
    }

    .home-page .home-stat-number {
        margin-top: 10px;
        font-size: 32px;
    }

    /* Секция последни сигнали */
    .home-page .home-recent-section,
    .home-page .home-how-section {
        margin-top: 52px;
    }

    .home-page .home-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .home-page .home-reports-grid {
        grid-template-columns: 1fr;
    }

    .home-page .home-report-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .home-page .home-report-card {
        min-height: 210px;
        padding: 18px;
    }

    .home-page .home-all-reports-mobile {
        display: block;
        margin-top: 16px;
    }

    .home-page .home-all-reports-mobile .home-button-secondary {
        width: 100%;
        min-height: 46px;
    }

    /* Как работи - стъпки */
    .home-page .home-how-heading {
        margin-bottom: 24px;
    }

    .home-page .home-steps {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .home-page .home-step {
        min-height: auto;
        padding: 22px;
    }

    .home-page .home-step-icon {
        margin-bottom: 16px;
    }

    /* Финален CTA */
    .home-page .home-final-cta {
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
        margin-top: 24px;
        padding: 24px 20px;
    }

    .home-page .home-final-cta .home-button-primary {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .home-page {
        width: calc(100% - 16px);
    }
    .home-page .home-hero {
        padding: 22px 14px 22px;
    }
    .home-page .home-eyebrow {
        font-size: 10px;
        letter-spacing: 0.8px;
    }
    .home-page .home-hero h1 {
        font-size: 29px;
    }
    .home-page .home-visual-card {
        gap: 10px;
        padding: 14px;
    }
    .home-page .home-visual-icon {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .home-page .home-visual-card strong {
        font-size: 16.5px;
    }
}
