/* Monitorium homepage redesign layer */
.is-home {
    background:
        linear-gradient(180deg, #f7fbff 0%, #eef5f6 46%, #fffaf0 100%);
}

.is-home .site-header {
    border-bottom-color: rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.is-home .site-main {
    padding: 0 0 70px;
}

.ml-hero {
    position: relative;
    min-height: 700px;
    padding: 46px 0 56px;
    color: #f8fafc;
    overflow: hidden;
    background: #111827;
}

.ml-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 18, 32, 0.94) 0%, rgba(10, 18, 32, 0.78) 39%, rgba(10, 18, 32, 0.28) 69%, rgba(10, 18, 32, 0.18) 100%),
        url("/static/img/home/monitorium-calibration-lab.jpg") center / cover no-repeat;
}

.ml-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 150px;
    background: linear-gradient(180deg, transparent, #f7fbff);
}

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

.ml-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.68fr);
    gap: 34px;
    align-items: end;
}

.ml-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(94, 234, 212, 0.35);
    background: rgba(15, 23, 42, 0.44);
    border-radius: 999px;
    color: #a7f3d0;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.ml-hero h1 {
    max-width: 760px;
    margin: 24px 0 18px;
    font-size: clamp(2.55rem, 5.2vw, 5.45rem);
    line-height: 0.95;
    color: #fff;
    font-weight: 850;
}

.ml-hero h1 span {
    color: #5eead4;
}

.ml-hero-lead {
    max-width: 660px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: 1.12rem;
    line-height: 1.72;
}

.ml-search-panel {
    max-width: 690px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(8, 13, 23, 0.74);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.ml-search-panel .search-hero {
    max-width: none;
    margin: 0;
    z-index: 20;
}

.ml-search-panel .search-hero input {
    height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: none;
}

.ml-quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.ml-quick a,
.ml-panel a,
.ml-station-card,
.ml-route,
.ml-category-card,
.ml-featured {
    color: inherit;
    text-decoration: none;
}

.ml-quick a {
    min-height: 78px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ml-quick a:hover {
    transform: translateY(-2px);
    background: rgba(94, 234, 212, 0.16);
}

.ml-quick b,
.ml-panel b,
.ml-route b,
.ml-category-card b {
    font-size: 0.95rem;
    line-height: 1.25;
}

.ml-quick span,
.ml-panel span,
.ml-route span,
.ml-category-card span {
    color: #cbd5e1;
    font-size: 0.78rem;
    line-height: 1.35;
}

.ml-side {
    display: grid;
    gap: 12px;
}

.ml-panel {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.ml-panel small {
    display: block;
    margin-bottom: 12px;
    color: #67e8f9;
    font-weight: 800;
    text-transform: uppercase;
}

.ml-panel a {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.ml-signal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.ml-signal div {
    min-height: 76px;
    padding: 10px;
    background: rgba(94, 234, 212, 0.1);
    border: 1px solid rgba(94, 234, 212, 0.18);
}

.ml-signal strong {
    display: block;
    color: #fff;
    font-size: 1.25rem;
}

.ml-signal span {
    color: #bae6fd;
}

.ml-band {
    position: relative;
    z-index: 2;
    margin-top: 0;
    padding-top: 24px;
}

.ml-band-inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
    padding: 18px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.14);
}

.ml-featured {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 20px;
    min-height: 190px;
    padding: 22px;
    background: #0f172a;
    color: #fff;
}

.ml-featured .featured-badge {
    color: #fcd34d;
}

.ml-featured .featured-title {
    color: #fff;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.12;
}

.ml-featured .featured-desc {
    color: #cbd5e1;
}

.ml-featured .featured-visual {
    width: 100%;
    min-height: 118px;
    border-radius: 0;
    background: linear-gradient(135deg, #164e63, #f97316);
}

.ml-routes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ml-route {
    min-height: 90px;
    padding: 14px;
    border: 1px solid #dbe5e8;
    background: #f8fafc;
}

.ml-route b,
.ml-category-card b {
    display: block;
    color: #0f172a;
    margin-bottom: 6px;
}

.ml-route span,
.ml-category-card span {
    color: #64748b;
}

.ml-section {
    padding: 72px 0 0;
}

.ml-section-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 24px;
}

.ml-section-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.7rem, 3vw, 3rem);
    line-height: 1.05;
}

.ml-section-head p {
    max-width: 470px;
    margin: 0;
    color: #64748b;
    line-height: 1.65;
}

.ml-stations {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

.ml-station-card {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: end;
    overflow: hidden;
    background: #0f172a;
}

.ml-station-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.ml-station-card:hover img {
    transform: scale(1.035);
}

.ml-station-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 22%, rgba(15, 23, 42, 0.9) 100%);
}

.ml-station-card div {
    position: relative;
    z-index: 1;
    padding: 24px;
}

.ml-station-card strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 1.45rem;
}

.ml-station-card span {
    color: #dbeafe;
    line-height: 1.55;
}

.ml-stations-side {
    display: grid;
    gap: 18px;
}

.ml-stations-side .ml-station-card {
    min-height: 171px;
}

.ml-stations-side .ml-station-card strong {
    font-size: 1.15rem;
}

.ml-categories {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 10px;
}

.ml-category-card {
    min-height: 142px;
    grid-column: span 3;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ml-category-card:nth-child(1),
.ml-category-card:nth-child(5) {
    grid-column: span 5;
    background: #102033;
}

.ml-category-card:nth-child(2),
.ml-category-card:nth-child(7) {
    grid-column: span 4;
}

.ml-category-card:nth-child(1) b,
.ml-category-card:nth-child(5) b {
    color: #fff;
}

.ml-category-card:nth-child(1) span,
.ml-category-card:nth-child(5) span {
    color: #cbd5e1;
}

.ml-category-card em {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 999px;
    background: #ccfbf1;
    color: #0f766e;
    font-style: normal;
    font-weight: 800;
}

.ml-category-card:hover {
    transform: translateY(-3px);
    border-color: #14b8a6;
}

.ml-disclaimer {
    margin-top: 36px;
    padding: 18px 20px;
    border-left: 4px solid #14b8a6;
    background: #ecfeff;
    color: #334155;
    line-height: 1.6;
}

.ml-dynamic .recent-scroll,
.ml-dynamic .articles-home-grid {
    margin-top: 16px;
}

.ml-dynamic .article-home-card,
.ml-dynamic .recent-card {
    border-radius: 6px;
}

.ml-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 30px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

.ml-cta h2 {
    margin: 0 0 8px;
    color: #fff;
}

.ml-cta p {
    margin: 0;
    color: #cbd5e1;
}

.ml-cta a {
    color: #0f172a;
    background: #5eead4;
    border-radius: 6px;
    padding: 13px 18px;
    text-decoration: none;
    font-weight: 800;
}

@media (max-width: 980px) {
    .is-home .mobile-menu-btn {
        display: block;
    }

    .is-home .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 20px;
        right: 20px;
        flex-direction: column;
        padding: 16px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        z-index: 100;
    }

    .is-home .main-nav.open {
        display: flex;
    }

    .ml-hero {
        min-height: auto;
        padding-top: 34px;
    }

    .ml-hero-grid,
    .ml-band-inner,
    .ml-stations,
    .ml-cta {
        grid-template-columns: 1fr;
    }

    .ml-side {
        align-items: stretch;
    }

    .ml-section-head {
        display: block;
    }

    .ml-section-head p {
        margin-top: 12px;
    }
}

@media (max-width: 720px) {
    .ml-hero {
        padding: 26px 0 34px;
    }

    .ml-hero::before {
        background:
            linear-gradient(180deg, rgba(10, 18, 32, 0.9) 0%, rgba(10, 18, 32, 0.7) 58%, rgba(10, 18, 32, 0.86) 100%),
            url("/static/img/home/monitorium-calibration-lab.jpg") center / cover no-repeat;
    }

    .ml-quick,
    .ml-routes,
    .ml-signal {
        grid-template-columns: 1fr;
    }

    .ml-band-inner,
    .ml-search-panel,
    .ml-featured,
    .ml-cta {
        padding: 14px;
    }

    .ml-featured {
        grid-template-columns: 1fr;
    }

    .ml-featured .featured-visual {
        min-height: 70px;
    }

    .ml-category-card,
    .ml-category-card:nth-child(1),
    .ml-category-card:nth-child(2),
    .ml-category-card:nth-child(5),
    .ml-category-card:nth-child(7) {
        grid-column: 1 / -1;
    }

    .ml-station-card,
    .ml-stations-side .ml-station-card {
        min-height: 260px;
    }
}
