/* ==========================================================================
   Sport Weekend 6 — Template Styles
   Dark sports theme, mobile-first, BEM notation
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --sw-primary: #0d1b2a;
    --sw-accent: #e63946;
    --sw-bg: #0a0f1a;
    --sw-surface: #111827;
    --sw-surface-2: #1a2332;
    --sw-surface-3: #243044;
    --sw-text: #e8ecf1;
    --sw-text-muted: #8899aa;
    --sw-border: rgba(255, 255, 255, 0.08);
    --sw-live: #e63946;
    --sw-win: #22c55e;
    --sw-draw: #f59e0b;
    --sw-loss: #ef4444;
    --sw-radius: 10px;
    --sw-radius-sm: 6px;
    --sw-radius-lg: 14px;
    --sw-radius-xl: 18px;
    --sw-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --sw-transition: 0.2s ease;
    --sw-header-h: 56px;
    --sw-bottom-nav-h: 60px;
    --sw-sidebar-w: 260px;
    --sw-container: 1200px;
    --sw-gap: 16px;
}

[data-theme="light"] {
    --sw-primary: #1a3a5c;
    --sw-bg: #f0f2f5;
    --sw-surface: #ffffff;
    --sw-surface-2: #f5f7fa;
    --sw-surface-3: #e8ecf1;
    --sw-text: #1a1a2e;
    --sw-text-muted: #5a6a7a;
    --sw-border: rgba(0, 0, 0, 0.1);
    --sw-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body.sw-body {
    margin: 0;
    background: var(--sw-bg);
    color: var(--sw-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: var(--sw-bottom-nav-h);
}

a {
    color: var(--sw-text);
    text-decoration: none;
    transition: color var(--sw-transition);
}

a:hover {
    color: var(--sw-accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Container ---------- */
.sw-container {
    width: 100%;
    max-width: var(--sw-container);
    margin: 0 auto;
    padding: 0 var(--sw-gap);
}

/* ---------- Topbar ---------- */
.sw-topbar {
    background: var(--sw-primary);
    color: var(--sw-text-muted);
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px solid var(--sw-border);
}

/* ---------- Header ---------- */
.sw-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--sw-primary);
    border-bottom: 1px solid var(--sw-border);
    height: var(--sw-header-h);
    transition: transform 0.3s ease;
}

.sw-header--hidden {
    transform: translateY(-100%);
}

.sw-header__inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 8px;
    min-width: 0;
}

.sw-header__left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}

.sw-header__logo img {
    height: 24px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .sw-header__logo img {
        height: 36px;
    }
}

.sw-header__logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.sw-header__nav {
    display: none;
    flex: 1;
    min-width: 0;
}

.sw-header__nav .nav,
.sw-header__nav > ul,
.sw-header__nav .mod-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.sw-header__nav .nav-item {
    position: relative;
}

.sw-header__nav a {
    display: block;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--sw-radius-sm);
    transition: background var(--sw-transition), color var(--sw-transition);
}

.sw-header__nav a:hover,
.sw-header__nav .active > a {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Dropdown toggle button */
.sw-header__nav .mod-menu__toggle-sub {
    display: none;
}

/* Dropdown submenu */
.sw-header__nav .mod-menu__sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1100;
    min-width: 200px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.sw-header__nav .nav-item:hover > .mod-menu__sub {
    display: block;
}

.sw-header__nav .mod-menu__sub a {
    padding: 8px 16px;
    color: var(--sw-text);
    font-size: 13px;
    border-radius: 0;
}

.sw-header__nav .mod-menu__sub a:hover {
    background: var(--sw-surface-2);
    color: var(--sw-accent);
}

.sw-header__right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Burger */
.sw-header__burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
}

.sw-header__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform var(--sw-transition), opacity var(--sw-transition);
}

/* Theme toggle */
.sw-header__theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: var(--sw-radius);
    transition: background var(--sw-transition);
}

.sw-header__theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .sw-icon--moon { display: none; }
[data-theme="light"] .sw-icon--sun { display: none; }

/* ---------- Mobile Drawer ---------- */
.sw-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    pointer-events: none;
    visibility: hidden;
}

.sw-drawer--open {
    pointer-events: auto;
    visibility: visible;
}

.sw-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sw-drawer--open .sw-drawer__overlay {
    opacity: 1;
}

.sw-drawer__panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--sw-surface);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sw-drawer--open .sw-drawer__panel {
    transform: translateX(0);
}

.sw-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--sw-border);
}

.sw-drawer__title {
    font-size: 16px;
    font-weight: 700;
}

.sw-drawer__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--sw-text);
    font-size: 24px;
    cursor: pointer;
    border-radius: var(--sw-radius);
}

.sw-drawer__close:hover {
    background: var(--sw-surface-2);
}

.sw-drawer__nav ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.sw-drawer__nav li {
    border-bottom: 1px solid var(--sw-border);
}

.sw-drawer__nav > ul > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    transition: background var(--sw-transition);
}

.sw-drawer__nav a {
    display: block;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    transition: background var(--sw-transition);
}

.sw-drawer__nav a:hover {
    background: var(--sw-surface-2);
}

/* Parent item arrow indicator */
.sw-drawer__nav .parent > a::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--sw-text-muted);
    border-bottom: 2px solid var(--sw-text-muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.sw-drawer__nav .parent.sw-drawer-open > a::after {
    transform: rotate(-135deg);
}

/* Hide Joomla toggle-sub button in drawer */
.sw-drawer__nav .mod-menu__toggle-sub {
    display: none;
}

/* Submenu in drawer */
.sw-drawer__nav .mod-menu__sub {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    background: var(--sw-surface-2);
}

.sw-drawer__nav .parent.sw-drawer-open > .mod-menu__sub {
    display: block;
}

.sw-drawer__nav .mod-menu__sub a {
    padding: 10px 16px 10px 32px;
    font-size: 14px;
    color: var(--sw-text-muted);
}

.sw-drawer__nav .mod-menu__sub a:hover {
    color: var(--sw-accent);
    background: var(--sw-surface-3);
}

/* ---------- Nav Tabs ---------- */
.sw-nav-tabs {
    background: var(--sw-surface);
    border-bottom: 1px solid var(--sw-border);
}

.sw-nav-tabs__scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
    cursor: grab;
}

.sw-nav-tabs__scroll::-webkit-scrollbar {
    display: none;
}

.sw-nav-tabs__scroll a,
.sw-nav-tabs__scroll .nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--sw-text-muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color var(--sw-transition), border-color var(--sw-transition);
}

.sw-nav-tabs__scroll a:hover,
.sw-nav-tabs__scroll .nav-link:hover {
    color: var(--sw-text);
}

.sw-nav-tabs__scroll a.active,
.sw-nav-tabs__scroll .nav-link.active {
    color: var(--sw-accent);
    border-bottom-color: var(--sw-accent);
}

/* ---------- News Ticker ---------- */
.sw-ticker {
    background: var(--sw-surface-2);
    border-bottom: 1px solid var(--sw-border);
    overflow: hidden;
}

.sw-ticker__inner {
    display: flex;
    align-items: center;
    height: 36px;
    gap: 12px;
}

.sw-ticker__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--sw-live);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--sw-radius-sm);
    flex-shrink: 0;
    animation: sw-pulse 2s infinite;
}

@keyframes sw-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.sw-ticker__track {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    font-size: 13px;
    color: var(--sw-text-muted);
}

/* ---------- Hero ---------- */
.sw-hero {
    padding: var(--sw-gap) 0;
}

/* ---------- Main Layout ---------- */
.sw-main {
    padding: var(--sw-gap) 0;
}

.sw-main__grid {
    display: grid;
    gap: var(--sw-gap);
}

.sw-main__content {
    min-width: 0;
}

.sw-main__content--full {
    max-width: 100%;
}

/* ---------- Sidebar ---------- */
.sw-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--sw-gap);
}

/* ---------- Module Chrome: Card ---------- */
.sw-card {
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-lg);
    overflow: hidden;
}

.sw-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--sw-border);
}

.sw-card__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--sw-text);
    margin: 0;
}

.sw-card__title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--sw-accent);
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

.sw-card__body {
    padding: 16px;
}

/* ---------- Category Blog ---------- */
.sw-category-blog__title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 16px;
    color: var(--sw-text);
}

.sw-category-blog__desc {
    font-size: 14px;
    color: var(--sw-text-muted);
    margin-bottom: 16px;
}

.sw-category-blog__empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--sw-text-muted);
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-lg);
}

/* Subcategories */
.sw-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sw-subcategories__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius);
    color: var(--sw-text);
    font-size: 13px;
    font-weight: 600;
    transition: background var(--sw-transition), border-color var(--sw-transition);
}

.sw-subcategories__item:hover {
    background: var(--sw-surface-2);
    border-color: var(--sw-accent);
    color: var(--sw-accent);
}

.sw-subcategories__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--sw-surface-3);
    border-radius: 10px;
    font-size: 11px;
    color: var(--sw-text-muted);
}

/* ---------- News Cards (okko.tv / bleacherreport style) ---------- */
/* Title lives on top of the image, gradient from transparent to dark at bottom.
   Rounded corners — softer, premium feel. */
.sw-news-grid {
    display: grid;
    gap: var(--sw-gap);
}

.sw-news-card {
    position: relative;
    display: block;
    background: var(--sw-surface);
    border-radius: var(--sw-radius-lg);
    overflow: hidden;
    transition: transform var(--sw-transition), box-shadow var(--sw-transition);
    isolation: isolate;
}

.sw-news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.sw-news-card__image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--sw-surface-2);
}

.sw-news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.4s ease;
}

.sw-news-card:hover .sw-news-card__image img {
    transform: scale(1.04);
}

/* Gradient overlay for legibility */
.sw-news-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 35%, transparent 60%);
    pointer-events: none;
}

.sw-news-card__category {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-block;
    padding: 4px 9px;
    background: var(--sw-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: var(--sw-radius-sm);
}

.sw-news-card__body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 14px 16px;
}

.sw-news-card__title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.sw-news-card__title a {
    color: #fff;
}

.sw-news-card__title a:hover {
    color: var(--sw-accent);
}

.sw-news-card__intro {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.45;
    margin: 6px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sw-news-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 8px;
}

.sw-news-card__date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sw-news-card__hits {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Horizontal card variant — kept for sidebar popular lists */
.sw-news-card--horizontal {
    display: flex;
    flex-direction: row;
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
}

.sw-news-card--horizontal .sw-news-card__image {
    width: 80px;
    min-width: 80px;
    aspect-ratio: 1;
    border-radius: 0;
}

.sw-news-card--horizontal .sw-news-card__image::after {
    display: none;
}

.sw-news-card--horizontal .sw-news-card__body {
    position: static;
    padding: 8px 12px;
    flex: 1;
}

.sw-news-card--horizontal .sw-news-card__title {
    font-size: 13px;
    color: var(--sw-text);
    text-shadow: none;
    -webkit-line-clamp: 2;
}

.sw-news-card--horizontal .sw-news-card__title a {
    color: var(--sw-text);
}

.sw-news-card--horizontal .sw-news-card__meta {
    color: var(--sw-text-muted);
    margin-top: 6px;
}

/* No-image fallback — use solid surface, inline layout */
.sw-news-card--no-image {
    min-height: 120px;
    padding: 16px;
    border: 1px solid var(--sw-border);
}

.sw-news-card--no-image .sw-news-card__body {
    position: static;
    padding: 0;
}

.sw-news-card--no-image .sw-news-card__title {
    color: var(--sw-text);
    text-shadow: none;
    font-size: 16px;
}

.sw-news-card--no-image .sw-news-card__title a {
    color: var(--sw-text);
}

.sw-news-card--no-image .sw-news-card__meta {
    color: var(--sw-text-muted);
}

/* Featured / hero card — bigger title, taller image */
.sw-news-card--featured .sw-news-card__image {
    aspect-ratio: 4 / 3;
}

.sw-news-card--featured .sw-news-card__body {
    padding: 18px 18px 20px;
}

.sw-news-card--featured .sw-news-card__title {
    font-size: 24px;
    line-height: 1.1;
}

.sw-news-card--featured .sw-news-card__intro {
    font-size: 14px;
    margin-top: 10px;
    -webkit-line-clamp: 3;
}

/* ---------- Article ---------- */
.sw-article {
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-lg);
    overflow: hidden;
}

.sw-article__hero {
    aspect-ratio: 21 / 9;
    overflow: hidden;
    background: var(--sw-surface-2);
}

.sw-article__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.sw-article__header {
    padding: 20px 20px 0;
}

.sw-article__category {
    display: inline-block;
    padding: 3px 10px;
    background: var(--sw-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--sw-radius-sm);
    margin-bottom: 12px;
}

.sw-article__title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 12px;
}

.sw-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--sw-text-muted);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sw-border);
}

.sw-article__body {
    padding: 20px;
    font-size: 16px;
    line-height: 1.7;
}

.sw-article__body p {
    margin: 0 0 1em;
}

.sw-article__body img {
    border-radius: var(--sw-radius);
    margin: 1em 0;
}

.sw-article__body h2,
.sw-article__body h3 {
    margin: 1.5em 0 0.5em;
    font-weight: 700;
}

.sw-article__body blockquote {
    box-shadow: inset 3px 0 0 var(--sw-accent);
    margin: 1em 0;
    padding: 12px 20px;
    background: var(--sw-surface-2);
    border-radius: 0 var(--sw-radius) var(--sw-radius) 0;
    font-style: italic;
    color: var(--sw-text-muted);
}

.sw-article__tags {
    padding: 16px 20px;
    border-top: 1px solid var(--sw-border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sw-article__tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--sw-surface-2);
    color: var(--sw-text-muted);
    font-size: 12px;
    border-radius: var(--sw-radius);
    transition: background var(--sw-transition), color var(--sw-transition);
}

.sw-article__tag:hover {
    background: var(--sw-accent);
    color: #fff;
}

.sw-article__nav {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--sw-border);
    font-size: 13px;
}

.sw-article__nav a {
    color: var(--sw-text-muted);
}

.sw-article__nav a:hover {
    color: var(--sw-accent);
}

/* ---------- Spotlights ---------- */
.sw-spotlights {
    padding: var(--sw-gap) 0;
}

.sw-spotlights__grid {
    display: grid;
    gap: var(--sw-gap);
}

.sw-section {
    padding: var(--sw-gap) 0;
}

/* ---------- Footer ---------- */
.sw-footer {
    background: var(--sw-primary);
    padding: 32px 0 16px;
    margin-top: 32px;
    border-top: 1px solid var(--sw-border);
}

.sw-footer__grid {
    display: grid;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sw-footer__col h3,
.sw-footer__col .module-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 12px;
}

.sw-footer__col a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.sw-footer__col a:hover {
    color: #fff;
}

.sw-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sw-footer__col li {
    margin-bottom: 8px;
}

.sw-footer__bottom {
    padding-top: 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* ---------- Mobile Bottom Nav ---------- */
.sw-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--sw-bottom-nav-h);
    background: var(--sw-surface);
    border-top: 1px solid var(--sw-border);
    padding-bottom: env(safe-area-inset-bottom);
}

.sw-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    color: var(--sw-text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: color var(--sw-transition);
}

.sw-bottom-nav__item--active {
    color: var(--sw-accent);
}

.sw-bottom-nav__item:hover {
    color: var(--sw-accent);
}

/* ---------- Error page ---------- */
.sw-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 40px 20px;
}

.sw-error__logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--sw-text);
    margin-bottom: 40px;
}

.sw-error__code {
    font-size: 96px;
    font-weight: 800;
    color: var(--sw-accent);
    line-height: 1;
    margin: 0 0 16px;
}

.sw-error__message {
    font-size: 18px;
    color: var(--sw-text-muted);
    margin: 0 0 32px;
}

.sw-error__link {
    display: inline-block;
    padding: 10px 24px;
    background: var(--sw-accent);
    color: #fff;
    font-weight: 600;
    border-radius: var(--sw-radius);
    transition: opacity var(--sw-transition);
}

.sw-error__link:hover {
    color: #fff;
    opacity: 0.9;
}

/* ---------- Breadcrumbs ---------- */
.sw-breadcrumbs {
    padding: 12px 0;
    font-size: 13px;
    color: var(--sw-text-muted);
}

.sw-breadcrumbs a {
    color: var(--sw-text-muted);
}

.sw-breadcrumbs a:hover {
    color: var(--sw-accent);
}

.sw-breadcrumbs .divider {
    margin: 0 6px;
    opacity: 0.5;
}

/* ---------- Pagination ---------- */
.sw-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 20px 0;
}

.sw-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius);
    color: var(--sw-text-muted);
    font-size: 14px;
    transition: background var(--sw-transition), color var(--sw-transition);
}

.sw-pagination .page-link:hover {
    background: var(--sw-surface-2);
    color: var(--sw-text);
}

.sw-pagination .active .page-link {
    background: var(--sw-accent);
    border-color: var(--sw-accent);
    color: #fff;
}

/* ---------- LIVE badge ---------- */
.sw-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--sw-live);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--sw-radius-sm);
    animation: sw-pulse 2s infinite;
}

.sw-badge-live::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
}

/* ---------- Match widget ---------- */
.sw-match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--sw-border);
    font-size: 13px;
}

.sw-match:last-child {
    border-bottom: none;
}

.sw-match__team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.sw-match__team img {
    width: 20px;
    height: 20px;
}

.sw-match__team span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-match__score {
    font-weight: 700;
    padding: 0 12px;
    text-align: center;
    min-width: 50px;
}

.sw-match__time {
    font-size: 11px;
    color: var(--sw-text-muted);
    text-align: center;
    min-width: 50px;
}

/* ---------- Standings table ---------- */
.sw-standings {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.sw-standings th {
    padding: 8px 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--sw-text-muted);
    border-bottom: 1px solid var(--sw-border);
    text-align: center;
    white-space: nowrap;
}

.sw-standings td {
    white-space: nowrap;
}

.sw-standings th:first-child,
.sw-standings td:first-child,
.sw-standings th:nth-child(2),
.sw-standings td:nth-child(2) {
    text-align: left;
}

.sw-standings td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--sw-border);
    text-align: center;
}

.sw-standings tr:hover {
    background: var(--sw-surface-2);
}

.sw-standings__team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sw-standings__team img {
    width: 18px;
    height: 18px;
}

/* Standings wrapper & header */
.sw-standings-wrapper {
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-lg);
    overflow: hidden;
}

/* Remove card padding when standings is inside */
.sw-card__body:has(.sw-standings-wrapper) {
    padding: 0;
}

.sw-card__body .sw-standings-wrapper {
    border: none;
    border-radius: 0;
}

.sw-standings-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--sw-border);
}

.sw-standings-header__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--sw-text);
}

.sw-standings-header__title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--sw-accent);
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Standings table enhancements */
.sw-standings-wrapper .sw-standings {
    margin: 0;
}

.sw-standings__pos {
    font-weight: 700;
    width: 28px;
    color: var(--sw-text-muted);
    text-align: left;
    padding-left: 6px;
}

.sw-standings__team-name {
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    padding-left: 4px;
}
.sw-standings__logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
}
.sw-standings__team-label {
    vertical-align: middle;
}

.sw-standings__points {
    font-weight: 700;
    color: var(--sw-text);
}

/* Zone indicators — classic border-left on first cell */
.sw-standings__zone--gold td:first-child       { border-left: 3px solid #ffd700; }
.sw-standings__zone--silver td:first-child     { border-left: 3px solid #c0c0c0; }
.sw-standings__zone--bronze td:first-child     { border-left: 3px solid #cd7f32; }
.sw-standings__zone--ucl td:first-child        { border-left: 3px solid #15803d; }
.sw-standings__zone--uel td:first-child        { border-left: 3px solid #3b82f6; }
.sw-standings__zone--uecl td:first-child       { border-left: 3px solid #06b6d4; }
.sw-standings__zone--promotion td:first-child  { border-left: 3px solid var(--sw-win); }
.sw-standings__zone--playoffin td:first-child  { border-left: 3px solid #4ade80; }
.sw-standings__zone--playoff td:first-child    { border-left: 3px solid #f59e0b; }
.sw-standings__zone--relegation td:first-child { border-left: 3px solid var(--sw-loss); }


/* Legend */
.sw-standings__full-link {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 24px);
    margin: 12px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sw-text);
    background: linear-gradient(135deg, var(--sw-surface-2), var(--sw-surface-3));
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-md, 8px);
    cursor: pointer;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.sw-standings__full-link::after {
    content: '→';
    font-size: 14px;
    transition: transform 0.2s ease;
    color: var(--sw-accent);
}
.sw-standings__full-link:hover {
    color: #fff;
    border-color: var(--sw-accent);
    transform: translateY(-1px);
}
.sw-standings__full-link:hover::after {
    transform: translateX(4px);
}
.sw-standings__full-link:active {
    transform: translateY(0);
}
.sw-standings-wrapper.is-compact .sw-standings__full-link {
    display: inline-flex;
}
/* In compact mode: hide all stat columns except first (games) and last (points) */
.sw-standings-wrapper.is-compact .sw-standings th:nth-child(n+4):not(:last-child),
.sw-standings-wrapper.is-compact .sw-standings td:nth-child(n+4):not(:last-child) {
    display: none;
}

/* CSS fallback for narrow screens with many columns (when JS detection fails) */
@media (max-width: 500px) {
    .sw-standings-wrapper[data-cols="9"] .sw-standings__full-link,
    .sw-standings-wrapper[data-cols="10"] .sw-standings__full-link,
    .sw-standings-wrapper[data-cols="11"] .sw-standings__full-link,
    .sw-standings-wrapper[data-cols="12"] .sw-standings__full-link {
        display: inline-flex;
    }
    .sw-standings-wrapper[data-cols="9"] .sw-standings th:nth-child(n+4):not(:last-child),
    .sw-standings-wrapper[data-cols="9"] .sw-standings td:nth-child(n+4):not(:last-child),
    .sw-standings-wrapper[data-cols="10"] .sw-standings th:nth-child(n+4):not(:last-child),
    .sw-standings-wrapper[data-cols="10"] .sw-standings td:nth-child(n+4):not(:last-child),
    .sw-standings-wrapper[data-cols="11"] .sw-standings th:nth-child(n+4):not(:last-child),
    .sw-standings-wrapper[data-cols="11"] .sw-standings td:nth-child(n+4):not(:last-child),
    .sw-standings-wrapper[data-cols="12"] .sw-standings th:nth-child(n+4):not(:last-child),
    .sw-standings-wrapper[data-cols="12"] .sw-standings td:nth-child(n+4):not(:last-child) {
        display: none;
    }
}
/* Also for 7-col stat tables (like RPL 6 stats + name + pos + points = 9) on very narrow screens */
@media (max-width: 380px) {
    .sw-standings-wrapper[data-cols="8"] .sw-standings__full-link,
    .sw-standings-wrapper[data-cols="7"] .sw-standings__full-link {
        display: inline-flex;
    }
    .sw-standings-wrapper[data-cols="8"] .sw-standings th:nth-child(n+4):not(:last-child),
    .sw-standings-wrapper[data-cols="8"] .sw-standings td:nth-child(n+4):not(:last-child),
    .sw-standings-wrapper[data-cols="7"] .sw-standings th:nth-child(n+4):not(:last-child),
    .sw-standings-wrapper[data-cols="7"] .sw-standings td:nth-child(n+4):not(:last-child) {
        display: none;
    }
}

/* Modal with full table */
.sw-standings-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
}
.sw-standings-modal.is-open {
    display: block;
}
.sw-standings-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}
.sw-standings-modal__dialog {
    position: relative;
    margin: 40px auto;
    max-width: 720px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 80px);
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sw-standings-modal__topbar {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--sw-border);
    background: var(--sw-surface);
}
.sw-standings-modal__topbar .sw-standings-header {
    flex: 1 1 auto;
    border-bottom: none;
}
.sw-standings-modal__close {
    position: relative;
    flex: 0 0 auto;
    margin-right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--sw-surface-2);
    color: var(--sw-text);
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.sw-standings-modal__close:hover {
    background: var(--sw-accent);
    color: #fff;
}
.sw-standings-modal__body {
    overflow: auto;
    padding-top: 8px;
    -webkit-overflow-scrolling: touch;
}
.sw-standings-modal__body .sw-standings {
    width: auto;
    min-width: 100%;
}
.sw-standings-modal__body .sw-standings__team-name {
    max-width: none;
}
.sw-standings-modal__body .sw-standings__pos {
    color: var(--sw-text);
}

@media (max-width: 600px) {
    .sw-standings-modal__dialog {
        margin: 0;
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        border: none;
    }
}
.sw-standings-modal__body .sw-standings-wrapper,
.sw-standings-modal__body > .sw-standings-header {
    border: none;
    border-radius: 0;
}
.sw-standings-modal__body .sw-standings__full-link {
    display: none !important;
}

.sw-standings-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--sw-border);
}

.sw-standings-legend__item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--sw-text-muted);
}

.sw-standings-legend__item::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.sw-standings-legend__item--gold::before { background: #ffd700; }
.sw-standings-legend__item--silver::before { background: #c0c0c0; }
.sw-standings-legend__item--bronze::before { background: #cd7f32; }
.sw-standings-legend__item--ucl::before { background: #15803d; }
.sw-standings-legend__item--uel::before { background: #3b82f6; }
.sw-standings-legend__item--uecl::before { background: #06b6d4; }
.sw-standings-legend__item--promotion::before { background: var(--sw-win); }
.sw-standings-legend__item--playoffin::before { background: #4ade80; }
.sw-standings-legend__item--playoff::before { background: #f59e0b; }
.sw-standings-legend__item--relegation::before { background: var(--sw-loss); }

/* ---------- Joomla system messages ---------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--sw-radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* ---------- Utilities ---------- */
.sw-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.sw-fade-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.sw-fade-in--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Mobile home layout — matching sport-weekend.com redesign mockup
   Inspired by okko.tv (rounded corners, soft shadows) and
   bleacherreport.com (dark cards, bold title overlay).
   ========================================================================== */

/* ---------- Section blocks (inside-container rows) ---------- */
.sw-row {
    padding: 14px 0;
}

.sw-row__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0 var(--sw-gap);
    font-size: 15px;
    font-weight: 800;
    text-transform: none;
    color: var(--sw-text);
}

.sw-row__title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--sw-accent);
    border-radius: 2px;
}

.sw-row__title-line {
    flex: 1;
    height: 1px;
    background: var(--sw-border);
    margin-left: 4px;
}

/* ---------- Today match strip (horizontal scroll) ---------- */
.sw-today {
    position: relative;
    background: var(--sw-surface);
    border-top: 1px solid var(--sw-border);
    border-bottom: 1px solid var(--sw-border);
    padding: 8px 0 0;
}

/* Peek работает «натурально» через min-width карточек —
   последняя видимая всегда подрезана, что показывает скроллируемость */

/* Точки-индикаторы для today-strip */
.sw-today__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 6px 0 0;
}

.sw-today__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--sw-border);
    transition: background var(--sw-transition), width var(--sw-transition);
}

.sw-today__dot--active {
    width: 14px;
    border-radius: 3px;
    background: var(--sw-accent);
}

.sw-today__head {
    padding: 0 var(--sw-gap) 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--sw-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sw-today__head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sw-border);
}

.sw-today__scroll {
    display: flex;
    gap: 8px;
    padding: 0 var(--sw-gap) 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--sw-gap);
}

.sw-today__scroll > *:last-child {
    scroll-margin-right: var(--sw-gap);
}

.sw-today__scroll::-webkit-scrollbar {
    display: none;
}

.sw-today-card {
    flex: 0 0 auto;
    min-width: 220px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 10px;
    background: var(--sw-surface-2);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius);
    scroll-snap-align: start;
    transition: border-color var(--sw-transition);
}

.sw-today-card:hover {
    border-color: var(--sw-accent);
}

.sw-today-card__time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 2px 0;
    min-width: 42px;
    border-right: 1px solid var(--sw-border);
    padding-right: 10px;
}

.sw-today-card__time-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--sw-text);
    line-height: 1;
}

.sw-today-card__channel {
    font-size: 9px;
    font-weight: 600;
    color: var(--sw-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sw-today-card__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sw-today-card__teams {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sw-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-today-card__logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.sw-today-card__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--sw-text-muted);
}

.sw-today-card__live {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    background: var(--sw-live);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: var(--sw-radius-sm);
    animation: sw-pulse 2s infinite;
}

.sw-today-card__live::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
}

.sw-today-card__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sw-win);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
    animation: sw-pulse 1.5s infinite;
    flex-shrink: 0;
}

/* ---------- Hero slider (свайп-карусель из Главных новостей) ----------
   Peek-эффект: слайд чуть уже viewport, справа виден край следующего.
   Радиусы — на самих слайдах (okko.tv-style), не на track.
   --------------------------------------------------------------------- */
.sw-hero-slider {
    position: relative;
    margin: 0 0 var(--sw-gap);
    /* служебные переменные для peek-математики */
    --sw-slider-gap: 0px;
    --sw-slider-peek: 60px;
}

.sw-hero-slider__track {
    display: flex;
    gap: var(--sw-slider-gap);
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--sw-gap);
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.sw-hero-slider__track::-webkit-scrollbar {
    display: none;
}

.sw-hero-slider__track > .sw-hero-tile,
.sw-hero-slide {
    flex: 0 0 calc(100% - var(--sw-gap) - var(--sw-slider-peek));
    margin: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    border-radius: var(--sw-radius-lg);
}

/* Левый/правый отступ обеспечиваем margin на крайних слайдах — это даёт
   точную формулу ширины без учёта track padding */
.sw-hero-slider__track > *:first-child {
    margin-left: var(--sw-gap);
}

.sw-hero-slider__track > *:last-child {
    margin-right: var(--sw-gap);
    scroll-margin-right: var(--sw-gap);
}

/* Dots indicator — прозрачный bar с точками поверх нижнего края */
.sw-hero-slider__dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 20px;
    pointer-events: auto;
}

.sw-hero-slider__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background var(--sw-transition), width var(--sw-transition);
}

.sw-hero-slider__dot--active {
    width: 18px;
    border-radius: 3px;
    background: var(--sw-accent);
}

/* Counter style (альтернатива/дополнение к точкам) */
.sw-hero-slider__counter {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 20px;
}

/* ---------- Hero tile (big image with overlaid title + intro) ---------- */
.sw-hero-tile {
    position: relative;
    display: block;
    margin: var(--sw-gap);
    border-radius: var(--sw-radius-lg);
    overflow: hidden;
    isolation: isolate;
    aspect-ratio: 4 / 5;
    background: var(--sw-surface-2);
}

.sw-hero-tile__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
}

.sw-hero-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0.1) 75%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.sw-hero-tile__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 18px 18px 8px;
    color: #fff;
}

.sw-hero-tile__badge {
    display: inline-block;
    padding: 4px 10px;
    margin-bottom: 10px;
    background: var(--sw-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--sw-radius-sm);
}

.sw-hero-tile__title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.sw-hero-tile__title a {
    color: #fff;
}

.sw-hero-tile__intro {
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 70%;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Bullet news list (tight, под hero) ---------- */
.sw-bullets {
    margin: 0 var(--sw-gap);
    padding: 6px 14px;
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius);
    list-style: none;
}

.sw-bullets__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--sw-border);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.sw-bullets__item:last-child {
    border-bottom: none;
}

.sw-bullets__league {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-top: 1px;
}

.sw-bullets__item a {
    color: var(--sw-text);
    flex: 1;
}

.sw-bullets__item a:hover {
    color: var(--sw-accent);
}

.sw-bullets__item strong {
    color: var(--sw-text);
    font-weight: 700;
}

/* ---------- Ad banner ---------- */
.sw-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 var(--sw-gap);
    min-height: 120px;
    background: linear-gradient(135deg, #d85f3a, #c84a2a);
    color: #fff;
    font-size: 32px;
    font-weight: 400;
    border-radius: var(--sw-radius);
    overflow: hidden;
    text-align: center;
}

.sw-ad--tall {
    min-height: 200px;
    font-size: 40px;
}

.sw-ad--compact {
    min-height: 80px;
    font-size: 20px;
}

.sw-ad__label {
    opacity: 0.95;
}

/* ---------- Fresh issue cards — свайп-карусель из «Читайте в свежем номере» ---------- */
.sw-fresh {
    position: relative;
    margin: 0 0 var(--sw-gap);
    --sw-fresh-gap: 10px;
}

.sw-fresh__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 var(--sw-gap) 10px;
    font-size: 14px;
    font-weight: 800;
    color: var(--sw-text);
}

.sw-fresh__head::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--sw-accent);
    border-radius: 2px;
}

.sw-fresh__head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sw-border);
}

.sw-fresh__scroll {
    display: flex;
    gap: var(--sw-fresh-gap);
    padding: 0 var(--sw-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--sw-gap);
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.sw-fresh__scroll::-webkit-scrollbar {
    display: none;
}

.sw-fresh__scroll > *:last-child {
    scroll-margin-right: var(--sw-gap);
}

.sw-fresh-card {
    position: relative;
    display: block;
    flex: 0 0 44%;
    aspect-ratio: 3 / 4;
    border-radius: var(--sw-radius-lg);
    overflow: hidden;
    isolation: isolate;
    background: var(--sw-surface-2);
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.sw-fresh-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
}

/* Gradient overlay для читаемости заголовка */
.sw-fresh-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.45) 40%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.sw-fresh-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 10px 12px;
}

.sw-fresh-card__title {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.sw-fresh-card__title a {
    color: #fff;
}

/* ---------- Issue CTA (обложка свежего номера + дата + кнопка загрузки) ---------- */
.sw-issue-cta {
    position: relative;
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: stretch;
    gap: 16px;
    margin: var(--sw-gap);
    padding: 16px;
    background: linear-gradient(135deg, var(--sw-surface) 0%, var(--sw-surface-2) 100%);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-lg);
    overflow: hidden;
}

.sw-issue-cta__cover {
    position: relative;
    align-self: center;
    aspect-ratio: 600 / 848;
    border-radius: 6px;
    overflow: hidden;
    background: var(--sw-surface-3);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transform: rotate(-2deg);
    transition: transform var(--sw-transition);
}

.sw-issue-cta__cover:hover {
    transform: rotate(0deg) scale(1.04);
}

.sw-issue-cta__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sw-issue-cta__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.sw-issue-cta__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 17px;
    color: var(--sw-text-muted);
    line-height: 1.25;
    margin: 0;
}

.sw-issue-cta__text > * {
    display: block;
}

.sw-issue-cta__text strong {
    color: var(--sw-text);
    font-weight: 800;
    font-size: 18px;
}

.sw-issue-cta__date {
    color: var(--sw-accent);
    font-weight: 800;
    font-size: 19px;
    white-space: nowrap;
}

.sw-issue-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 4px;
    padding: 7px 12px;
    background: var(--sw-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--sw-radius);
    white-space: nowrap;
    transition: background var(--sw-transition), transform var(--sw-transition);
    text-align: center;
    align-self: flex-start;
}

.sw-issue-cta__btn svg {
    width: 12px;
    height: 12px;
}

.sw-issue-cta__btn:hover {
    color: #fff;
    background: #d12f3e;
    transform: translateY(-1px);
}

/* ---------- Header league icons strip ---------- */
.sw-header__leagues {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex-shrink: 0;
}

.sw-header__league {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    opacity: 0.95;
    transition: opacity var(--sw-transition), transform var(--sw-transition);
    flex-shrink: 0;
}

.sw-header__league img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sw-header__leagues a:hover .sw-header__league,
.sw-header__league:hover {
    opacity: 1;
    transform: scale(1.08);
}

.sw-header__leagues a:hover img {
    transform: scale(1.08);
    opacity: 1;
}

/* On narrow screens — hide theme toggle, show leagues */
@media (max-width: 991px) {
    .sw-header__theme-toggle {
        display: none;
    }
}

/* ---------- Home layout: remove side padding from hero on home ---------- */
.sw-body--home .sw-main {
    padding: 0;
}

.sw-body--home .sw-hero-tile {
    margin: var(--sw-gap) var(--sw-gap) 0;
}

/* ========================================================================
   Responsive
   ======================================================================== */

/* Tablet */
@media (min-width: 768px) {
    :root {
        --sw-gap: 20px;
    }

    .sw-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sw-spotlights__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sw-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sw-article__title {
        font-size: 32px;
    }
}

/* Desktop */
@media (min-width: 992px) {
    :root {
        --sw-gap: 24px;
    }

    body.sw-body {
        padding-bottom: 0;
    }

    .sw-header__burger,
    .sw-header__leagues {
        display: none;
    }

    .sw-header__nav {
        display: flex;
    }

    .sw-bottom-nav {
        display: none;
    }

    .sw-main__grid {
        grid-template-columns: 1fr var(--sw-sidebar-w);
    }

    .sw-news-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sw-spotlights__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sw-footer__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .sw-article__title {
        font-size: 36px;
    }

    .sw-article__body {
        padding: 24px 28px;
    }

    .sw-news-card--featured .sw-news-card__title {
        font-size: 28px;
    }

    .sw-hero-tile {
        aspect-ratio: 21 / 9;
    }

    .sw-hero-tile__title {
        font-size: 34px;
    }

    .sw-fresh-card {
        flex: 0 0 22%;
    }
}

/* Large desktop */
@media (min-width: 1200px) {
    .sw-container {
        padding: 0 24px;
    }
}
