/* =========================
   L02 Portal – softer design
   ========================= */

/* helpers */
:root{
    /* fallbacks if theme.css didn't define these */
    --shadow: 0 14px 40px rgba(16, 24, 40, 0.08);
    --shadow-soft: 0 8px 22px rgba(16, 24, 40, 0.06);
    --primary-soft: rgba(0,0,0,0.03);
}

/* Topbar */
.topbar{
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in oklab, var(--bg) 92%, white);
    border-bottom: 1px solid rgba(16, 24, 40, 0.06);
    backdrop-filter: blur(6px);
}

.topbar-inner{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.logo{
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
}

.logo-mark{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(16,24,40,0.10);
}

.logo-text{
    font-weight: 800;
    opacity: .95;
}

.topnav{
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.topnav a{
    color: var(--text);
    opacity: .78;
    font-weight: 650;
    text-decoration: none;
}

.topnav a:hover{
    opacity: 1;
    color: var(--text);
    text-decoration: none;
}

.top-actions{
    display: flex;
    align-items: center;
    gap: 10px;
}

.search{
    width: 240px;
    max-width: 38vw;
    background: #fff;
    border: 1px solid rgba(16,24,40,0.08);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(16,24,40,0.06);
    outline: none;
}

.search:focus{
    border-color: color-mix(in oklab, var(--primary) 30%, rgba(16,24,40,0.08));
    box-shadow: 0 10px 26px rgba(16,24,40,0.10);
}

.lang{
    color: var(--muted);
    border: 1px solid rgba(16,24,40,0.08);
    padding: 8px 10px;
    border-radius: 999px;
    background: #fff;
}

/* Portal layout */
.portal{
    padding-top: 18px;
    padding-bottom: 28px;
}

.portal-grid{
    display: grid;
    grid-template-columns: 300px minmax(520px, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.col-title{
    margin: 6px 0 12px;
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.section-title{
    margin: 26px 0 12px;
    color: var(--text);
    font-weight: 850;
    letter-spacing: -0.01em;
}

/* ======================
   Soft card base styles
   ====================== */
.side-item,
.news-card,
.highlight-card,
.strip-item,
.post-article,
.featured{
    border: 1px solid rgba(16, 24, 40, 0.06);
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.side-item:hover,
.news-card:hover,
.highlight-card:hover,
.strip-item:hover{
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: rgba(16,24,40,0.08);
}

/* Left list */
.side-list{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-item{
    display: block;
    padding: 12px 12px;
    text-decoration: none;
}

.side-item-title{
    color: var(--text);
    font-weight: 750;
    line-height: 1.25;
    font-size: 14px;
}

.side-item-meta{
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.btn-more{
    display: block;
    margin-top: 14px;
    text-align: center;
    border-radius: 16px;
    padding: 11px 12px;
    background: var(--primary-soft);
    border: 1px solid rgba(16,24,40,0.06);
    color: var(--text);
    font-weight: 750;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transition: filter .18s ease, box-shadow .18s ease;
}

.btn-more:hover{
    filter: brightness(0.98);
    box-shadow: var(--shadow);
}

/* Center Featured */
.featured{
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    border-radius: 22px;
    overflow: hidden;
}

.featured-media img{
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    display: block;
    background: #f2f3f5;
}

.featured-body{
    padding: 18px;
}

.badge{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(16,24,40,0.08);
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    background: #fff;
}

.featured-title{
    margin: 12px 0 10px;
    line-height: 1.08;
    font-size: 34px;
    letter-spacing: -0.02em;
    font-weight: 850;
}

.featured-title a{
    color: var(--text);
    text-decoration: none;
}

.featured-title a:hover{
    color: var(--primary);
}

.featured-body .muted{
    font-size: 15px;
}

/* Center cards */
.cards-grid{
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.news-card{
    padding: 12px;
}

.news-card-img{
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(16,24,40,0.06);
    margin-bottom: 10px;
    background: #f2f3f5;
}

.news-card-title{
    margin: 0 0 6px;
    line-height: 1.2;
    font-size: 16px;
    font-weight: 850;
}

.news-card-title a{
    color: var(--text);
    text-decoration: none;
}

.news-card-title a:hover{
    color: var(--primary);
    text-decoration: none;
}

.meta{
    display: flex;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    flex-wrap: wrap;
}

/* Right highlights */
.highlights{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.highlight-card{
    padding: 12px;
}

.highlight-title a{
    color: var(--text);
    font-weight: 850;
    line-height: 1.25;
    text-decoration: none;
}

.highlight-title a:hover{
    color: var(--primary);
}

.highlight-text{
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted);
}

.chip-link{
    display: inline-flex;
    margin-top: 10px;
    border: 1px solid rgba(16,24,40,0.06);
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--text);
    font-weight: 750;
    background: var(--primary-soft);
    text-decoration: none;
    transition: filter .18s ease, box-shadow .18s ease;
}

.chip-link:hover{
    filter: brightness(0.98);
    box-shadow: var(--shadow-soft);
}

/* Strip section */
.strip{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.strip-item{
    padding: 10px;
    text-decoration: none;
}

.strip-thumb{
    height: 56px;
    border-radius: 12px;
    border: 1px solid rgba(16,24,40,0.06);
    background: #f2f3f5;
    margin-bottom: 8px;
}

.strip-title{
    color: var(--text);
    font-size: 13px;
    line-height: 1.25;
    font-weight: 750;
}

/* Post */
.post-article{
    padding: 18px;
    border-radius: 22px;
}

.post-title{
    margin: 0;
    font-size: 36px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 900;
}

.post-cover{
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(16,24,40,0.06);
    margin: 16px 0;
    background: #f2f3f5;
}

.post-body{
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
}

.post-body h2{margin: 18px 0 10px}
.post-body h3{margin: 16px 0 8px}
.post-body p{margin: 0 0 14px}
.post-body ul{margin: 0 0 14px 20px}
.post-body a{font-weight: 700; color: var(--primary); text-decoration: none}
.post-body a:hover{text-decoration: underline}

/* Footer (soft separator) */
.portal-footer{
    border-top: 1px solid rgba(16,24,40,0.06);
}

/* Responsive */
@media (max-width: 1200px){
    .portal-grid{grid-template-columns: 1fr}
    .cards-grid{grid-template-columns: repeat(2, 1fr)}
    .strip{grid-template-columns: repeat(3, 1fr)}
    .search{display: none}
}

@media (max-width: 520px){
    .cards-grid{grid-template-columns: 1fr}
    .strip{grid-template-columns: repeat(2, 1fr)}
}


/* Full-width section under the 3-column grid */
.portal-full{
    margin-top: 28px;
}

.strip-wide{
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

@media (max-width: 1200px){
    .strip-wide{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px){
    .strip-wide{ grid-template-columns: repeat(2, 1fr); }
}

/* ===== Slider (4 visible, 8 total) ===== */
.slider-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-top: 28px;
}

.slider-controls{ display:flex; gap:10px; }

.slider-btn{
    width:40px;height:40px;border-radius:999px;
    border:1px solid rgba(16,24,40,0.08);
    background:#fff;color:var(--text);
    font-size:22px;line-height:1;
    display:inline-flex;align-items:center;justify-content:center;
    box-shadow: var(--shadow-soft);
    cursor:pointer;
}

.slider-btn:disabled{ opacity:.45; cursor:default; }

.slider-viewport{
    overflow: hidden;
    margin-top: 10px;
    border-radius: 22px;
}

.slider-track{
    display:flex;
    gap:14px;
    padding: 6px; /* чтобы тени не резались */
    scroll-snap-type: x mandatory;
}

/* важное: скролл на viewport */
.slider-viewport{
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.slider-viewport::-webkit-scrollbar{ display:none; }

/* 4 visible */
.slide{
    flex: 0 0 calc((100% - 14px*3) / 4);
    scroll-snap-align: start;
}

@media (max-width: 1200px){
    .col-left{
        display: none;
    }
    .slide{ flex-basis: calc((100% - 14px*2) / 3); }
}
@media (max-width: 720px){
    .slide{ flex-basis: calc((100% - 14px*1) / 2); }
}
@media (max-width: 520px){
    .slide{ flex-basis: 80%; }
}

.strip-thumb{
    width:100%;
    height:140px;
    border-radius:12px;
    border:1px solid var(--border);
    background:#f2f3f5;
    margin-bottom:8px;
    object-fit:cover;
    display:block;
}


/* ===== Mobile nav (hamburger) ===== */
/* ===== Dropdown mobile nav ===== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
}

/* toggle */
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.08);
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 110;
}

.nav-toggle svg {
    stroke: var(--text);
    stroke-width: 2;
    stroke-linecap: round;
}

/* dropdown itself */
.topnav-mobile {
    position: absolute;
    top: 100%;
    right: 16px;

    min-width: 220px;
    padding: 8px;

    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,.12);

    display: flex;
    flex-direction: column;
    gap: 6px;

    opacity: 0;
    transform: translateY(-8px) scale(.98);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

/* open state */
.topnav-mobile[data-open="true"] {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.topnav-mobile a {
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    color: var(--text);
}

.topnav-mobile a:hover {
    background: rgba(0,0,0,.05);
    color: var(--primary);
}

/* responsive */
@media (max-width: 1199px) {
    .topnav-desktop { display: none; }
    .nav-toggle { display: inline-flex; }
}

@media (min-width: 1200px) {
    .topnav-mobile { display: none !important; }
}

