/* Offline layout utilities for the recovered Django templates. */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body.restored-front { margin: 0; min-height: 100vh; line-height: 1.55; }
.restored-front [hidden] { display: none !important; }
.restored-front :where(h1, h2, h3, p) { margin: 0; }
.restored-front :where(a) { text-decoration: none; }
.restored-front :focus-visible { outline: 2px solid var(--glass-blue); outline-offset: 4px; }
.restored-front img { display: block; max-width: 100%; }

.restored-front .front-flag {
    width: 1.15em;
    height: .7em;
    border-radius: .08em;
    background:
        linear-gradient(90deg, transparent 28%, #003580 28% 45%, transparent 45%),
        linear-gradient(0deg, #fff 36%, #003580 36% 64%, #fff 64%);
}

.front-shell {
    width: 100%;
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 2rem);
}

.top-nav { position: relative; z-index: 3; }
.restored-front .top-nav-row { flex-wrap: wrap; }
.restored-front .nav-main-links { display: flex; flex-wrap: wrap; }
.restored-front .menu-link[aria-current="page"] { color: var(--text-primary); font-weight: 700; }
.restored-front .front-theme { margin: 0; white-space: nowrap; cursor: pointer; }
.restored-front .nav-control-btn { font-family: inherit; }
.restored-front .btn-ghost, .restored-front .btn-primary { text-align: center; }

.front-hero {
    display: grid;
    grid-template-columns: minmax(0,3fr) minmax(0,1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
    padding-bottom: 2.5rem;
}
.front-kicker { font-size: .77rem; font-weight: 700; text-transform: uppercase; letter-spacing: .24em; }
.front-hero .home-title {
    margin-block: .7rem 1rem;
    max-width: 19ch;
    font-size: clamp(2.3rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
}
.front-hero .home-subtitle { font-size: clamp(1.05rem, 2vw, 1.26rem); font-weight: 600; margin-bottom: .7rem; }
.front-hero .home-description { font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 42rem; margin-bottom: 1.4rem; }
.front-hero .home-portrait-frame {
    justify-self: end;
    width: min(100%, 17rem);
    overflow: hidden;
    border-radius: 1.8rem;
    border: 1px solid var(--surface-border);
    background: var(--surface-card);
    box-shadow: 0 16px 40px rgba(8, 20, 17, .21);
}
.front-hero .home-portrait-image { width: 100%; height: auto; }

.front-section { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.front-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem 1.5rem;
    flex-wrap: wrap;
}
.front-section .home-section-title,
.front-section .home-card-title { font-size: clamp(1.55rem, 3vw, 2rem); font-weight: 750; line-height: 1.18; }
.front-section .home-track-title, .front-story h3 { font-size: 1.35rem; line-height: 1.18; }
.front-section-lead { margin-top: .65rem !important; max-width: 47rem; color: var(--home-text-main); }
.front-section .front-grid { margin-top: 1.25rem; }
.front-pad { padding: clamp(1rem, 2.4vw, 1.5rem); }
.front-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, minmax(0,1fr)); }
.front-grid > * { min-width: 0; }
.front-grid .course-card { overflow: hidden; }
.front-grid .course-open-btn { width: 100%; }
.front-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.front-story .front-case-image {
    width: 100%;
    height: 11rem;
    object-fit: cover;
    object-position: center 30%;
    border-radius: 1.35rem;
    margin-bottom: .85rem;
}
.front-story .front-case-image[src$="/egor-home-v2.jpg"] { object-position: center 20%; }
.front-story .front-case-image[src$="/nelli.jpg"] { object-position: center 18%; }
.front-story .front-case-image[src$="/svetlana.png"] { object-position: center center; }
.front-story .home-success-story-text { margin-top: .65rem; }

.courses-list-page.front-shell { padding-block: clamp(2rem, 4.5vw, 2.5rem) 4rem; }
.courses-list-page.front-shell::before { inset-inline: 0; }
.courses-hero-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.13; }
.courses-hero .courses-hero-text { margin-top: .65rem; }
.courses-hero .courses-hero-meta { margin-top: .85rem; }
.courses-hero .courses-filter-wrap { gap: .5rem; }
.restored-front .course-title { line-height: 1.25; }
.front-archive-note { margin-top: 1.3rem !important; color: var(--text-muted); font-size: .85rem; }
.front-footer { border-top: 1px solid var(--surface-border); color: var(--text-muted); }
.front-footer .front-shell { padding-block: 1.3rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: center; }
.front-footer a { color: var(--text-secondary); }
.front-words { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; }
.front-words summary { overflow-wrap: anywhere; }
.front-words .home-word-fi { font-size: clamp(1.1rem, 2.5vw, 1.75rem); }

@media (max-width: 1023px) {
    .front-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .restored-front .top-nav-row { padding-block: .65rem; }
    .restored-front .nav-main-links { order: 3; flex-basis: 100%; }
}
@media (max-width: 767px) {
    .front-grid { grid-template-columns: minmax(0,1fr); gap: 1rem; }
    .front-hero { grid-template-columns: minmax(0,1fr); }
    .front-hero .home-portrait-frame { justify-self: start; width: min(58vw, 15rem); }
    .front-hero .home-title { overflow-wrap: break-word; }
    .front-words { grid-template-columns: minmax(0,1fr); gap: .45rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
