/* ===================================================================
   Спортивная Москва — template_styles.css
   1C-Bitrix-like Static Site
   =================================================================== */

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: #1e1b4b;
    background-color: #faf5ff;
    background-image:
        linear-gradient(rgba(237,233,254,0.45) 1px, transparent 1px),
        linear-gradient(90deg, rgba(237,233,254,0.45) 1px, transparent 1px);
    background-size: 50px 50px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #7c3aed; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #6d28d9; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: 'Lora', serif; font-weight: 700; line-height: 1.3; color: #1e1b4b; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

/* ----- Container ----- */
.bx-container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ===================================================================
   HEADER — 3-row stacked with nav bar
   =================================================================== */
.bx-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(30,27,75,0.08);
    transition: box-shadow 0.3s ease;
}
.bx-header.scrolled { box-shadow: 0 4px 18px rgba(30,27,75,0.14); }

/* Row 1 */
.bx-header-top {
    background-color: #ede9fe;
    text-align: center;
    padding: 6px 0;
    font-size: 12px;
    font-weight: 600;
    color: #6d28d9;
    letter-spacing: 0.5px;
    font-family: 'Lato', sans-serif;
    overflow: hidden;
    max-height: 38px;
    opacity: 1;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}
.bx-header.scrolled .bx-header-top { max-height: 0; padding: 0; opacity: 0; }

/* Row 2 */
.bx-header-main {
    background-color: #ffffff;
    padding: 14px 0;
    border-bottom: 1px solid #ede9fe;
    transition: padding 0.3s ease;
}
.bx-header.scrolled .bx-header-main { padding: 8px 0; }
.bx-header-main .bx-container { display: flex; align-items: center; justify-content: space-between; }

.bx-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.bx-site-name {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 26px;
    color: #1e1b4b;
    line-height: 1;
    transition: font-size 0.3s ease;
}
.bx-header.scrolled .bx-site-name { font-size: 20px; }
.bx-header-tagline { font-size: 12px; color: #6b7280; font-style: italic; font-family: 'Lato', sans-serif; }

/* Row 3 — nav bar */
.bx-menu { background-color: #7c3aed; }
.bx-menu .bx-container { display: flex; }
.bx-nav { list-style: none; display: flex; flex-wrap: nowrap; }
.bx-nav li a {
    display: block;
    padding: 11px 18px;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    text-decoration: none;
    border-right: 1px solid rgba(255,255,255,0.12);
    transition: background-color 0.2s ease;
}
.bx-nav li:last-child a { border-right: none; }
.bx-nav li a:hover, .bx-nav li a.bx-active { background-color: #6d28d9; color: #fff; }

/* ===================================================================
   BREADCRUMB
   =================================================================== */
.bx-breadcrumb { background: #fff; border-bottom: 1px solid #ede9fe; padding: 9px 0; }
.bx-breadcrumb .bx-container {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 4px; font-size: 13px; color: #6b7280; font-family: 'Lato', sans-serif;
}
.bx-breadcrumb a { color: #7c3aed; }
.bx-breadcrumb a:hover { color: #6d28d9; text-decoration: underline; }
.bx-bc-sep { color: #d1d5db; margin: 0 1px; }
.bx-bc-current { color: #1e1b4b; font-weight: 600; }

/* ===================================================================
   PAGE WRAP
   =================================================================== */
.bx-page-wrap { flex: 1; padding: 36px 0 64px; }

/* ===================================================================
   SECTION HEADING
   =================================================================== */
.bx-section-heading {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 26px; padding-bottom: 12px; border-bottom: 3px solid #7c3aed;
}
.bx-section-heading h2 { font-family: 'Lora', serif; font-size: 22px; color: #1e1b4b; }
.bx-section-see-all { font-size: 13px; font-weight: 600; font-family: 'Lato', sans-serif; color: #7c3aed; white-space: nowrap; }
.bx-section-see-all:hover { color: #6d28d9; text-decoration: underline; }

/* ===================================================================
   NEWS CARDS
   =================================================================== */
.bx-news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.bx-news-card {
    background: #ffffff;
    border: 1px solid #ede9fe;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bx-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(124,58,237,0.14);
}

.bx-news-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #ede9fe;
    flex-shrink: 0;
}
.bx-news-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.bx-news-card:hover .bx-news-card-media img { transform: scale(1.06); }

.bx-card-icon {
    position: absolute;
    top: 10px; left: 10px;
    width: 30px; height: 30px;
    background: rgba(124,58,237,0.92);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; line-height: 1; z-index: 2;
}

.bx-news-card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.bx-card-cat { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.3px; color: #7c3aed; font-family: 'Lato', sans-serif; margin-bottom: 7px; }
.bx-card-title { font-family: 'Lora', serif; font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 9px; flex: 1; }
.bx-card-title a { color: #1e1b4b; }
.bx-card-title a:hover { color: #7c3aed; }
.bx-card-excerpt { font-size: 13px; color: #4b5563; line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bx-card-meta { font-size: 12px; color: #9ca3af; font-family: 'Lato', sans-serif; padding-top: 10px; border-top: 1px solid #ede9fe; margin-top: auto; }

/* ===================================================================
   ARTICLE DETAIL
   =================================================================== */
.bx-content.bx-news-detail {
    background: #ffffff;
    border: 1px solid #ede9fe;
    border-radius: 3px;
    padding: 42px;
    margin-bottom: 32px;
}

.bx-news-detail h1 {
    font-size: 30px;
    line-height: 1.3;
    margin-bottom: 10px;
    padding-bottom: 14px;
    position: relative;
}
.bx-news-detail h1::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 56px; height: 3px;
    background: #7c3aed;
    border-radius: 2px;
}

.bx-article-date {
    display: block;
    font-size: 13px;
    color: #9ca3af;
    font-family: 'Lato', sans-serif;
    margin-bottom: 24px;
    margin-top: 4px;
}

.bx-article-img {
    margin-bottom: 30px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #ede9fe;
}
.bx-article-img img { width: 100%; height: auto; display: block; }

/* Article body injected elements */
.bx-news-detail h2 {
    font-size: 21px;
    margin: 30px 0 12px;
    padding-left: 14px;
    position: relative;
    color: #1e1b4b;
}
.bx-news-detail h2::before {
    content: '';
    position: absolute;
    left: 0; top: 3px; bottom: 3px;
    width: 3px;
    background: #7c3aed;
    border-radius: 2px;
}

.bx-news-detail h3 { font-size: 17px; margin: 22px 0 10px; color: #2d2a5e; }
.bx-news-detail p { margin-bottom: 16px; line-height: 1.75; }
.bx-news-detail p:last-child { margin-bottom: 0; }

.bx-news-detail ul,
.bx-news-detail ol { margin: 14px 0 14px 24px; }
.bx-news-detail li { margin-bottom: 6px; line-height: 1.7; }
.bx-news-detail ul li::marker { color: #7c3aed; }

.bx-news-detail table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    border: 1px solid #ede9fe;
}
.bx-news-detail thead th {
    background: #7c3aed;
    color: #ffffff;
    padding: 10px 14px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
}
.bx-news-detail tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #ede9fe;
    color: #1e1b4b;
    vertical-align: top;
}
.bx-news-detail tbody tr:nth-child(even) td { background: #faf5ff; }

.bx-news-detail blockquote {
    border-left: 4px solid #7c3aed;
    background: #faf5ff;
    padding: 16px 20px;
    margin: 24px 0;
    font-style: italic;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.75;
    border-radius: 0 3px 3px 0;
}

.bx-news-detail .infobox {
    background: #ede9fe;
    border: 1px solid #a78bfa;
    border-radius: 3px;
    padding: 16px 20px;
    margin: 22px 0;
    font-size: 14px;
    line-height: 1.65;
}

.bx-news-detail .stat-block {
    background: #7c3aed;
    color: #ffffff;
    text-align: center;
    padding: 22px 24px;
    border-radius: 3px;
    margin: 22px 0;
    font-size: 32px;
    font-family: 'Lora', serif;
    font-weight: 700;
    line-height: 1.2;
}

.bx-news-detail a { color: #7c3aed; text-decoration: underline; }
.bx-news-detail a:hover { color: #6d28d9; }

/* ===================================================================
   BELOW-ARTICLE WIDGET ROW (3 columns)
   =================================================================== */
.bx-below-article { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-bottom: 48px; }

.bx-widget { background: #ffffff; border: 1px solid #ede9fe; border-radius: 3px; padding: 20px; }
.bx-widget-title { font-family: 'Lora', serif; font-size: 15px; font-weight: 700; color: #1e1b4b; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #7c3aed; }
.bx-widget ul { list-style: none; margin: 0; padding: 0; }
.bx-widget ul li { padding: 7px 0; border-bottom: 1px solid #ede9fe; font-size: 13px; line-height: 1.4; }
.bx-widget ul li:last-child { border-bottom: none; }
.bx-widget ul li a { color: #1e1b4b; text-decoration: none; }
.bx-widget ul li a:hover { color: #7c3aed; }

.bx-tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }

/* ===================================================================
   ARTICLE TAGS
   =================================================================== */
.bx-article-tags-wrap {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 8px; padding-top: 20px; margin-top: 24px;
    border-top: 1px solid #ede9fe;
    font-family: 'Lato', sans-serif; font-size: 13px;
}
.bx-article-tags-label { font-weight: 600; color: #4b5563; margin-right: 2px; }

a.bx-tag-pill {
    display: inline-block;
    padding: 3px 10px;
    background: #ede9fe;
    color: #7c3aed;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
    text-decoration: none;
    border: 1px solid #a78bfa;
    transition: background-color 0.2s ease, color 0.2s ease;
}
a.bx-tag-pill:hover { background: #7c3aed; color: #ffffff; border-color: #7c3aed; }

/* ===================================================================
   CATEGORY PAGE HEADER
   =================================================================== */
.bx-category-hdr {
    background: #ffffff;
    border: 1px solid #ede9fe;
    border-radius: 3px;
    padding: 28px 36px;
    margin-bottom: 28px;
}
.bx-category-hdr h1 { font-size: 26px; position: relative; padding-bottom: 12px; }
.bx-category-hdr h1::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 52px; height: 3px;
    background: #7c3aed;
    border-radius: 2px;
}
.bx-category-desc { margin-top: 10px; font-size: 15px; color: #4b5563; line-height: 1.65; }

/* ===================================================================
   HOMEPAGE HERO
   =================================================================== */
.bx-homepage-hero {
    background: linear-gradient(135deg, #7c3aed 0%, #2d2a5e 100%);
    padding: 52px 0 48px;
    position: relative;
    overflow: hidden;
}
.bx-homepage-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 60%, rgba(255,255,255,0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 25%, rgba(16,185,129,0.12) 0%, transparent 38%);
    pointer-events: none;
}
.bx-homepage-hero .bx-container { position: relative; z-index: 1; }

.bx-hero-badge {
    display: inline-block;
    background: #10b981;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 14px;
}
.bx-hero-title {
    font-family: 'Lora', serif;
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.25;
}
.bx-hero-sub {
    font-size: 15px;
    color: rgba(255,255,255,0.82);
    line-height: 1.65;
    max-width: 540px;
}

/* ===================================================================
   FOOTER — split color
   =================================================================== */
.bx-footer { flex-shrink: 0; }

.bx-footer-metro {
    height: 5px;
    background: repeating-linear-gradient(
        90deg,
        #7c3aed 0px, #7c3aed 38px,
        #2d2a5e 38px, #2d2a5e 46px,
        #10b981 46px, #10b981 82px,
        #2d2a5e 82px, #2d2a5e 90px,
        #6d28d9 90px, #6d28d9 122px,
        #2d2a5e 122px, #2d2a5e 130px
    );
    opacity: 0.7;
}

.bx-footer-upper { background: #2d2a5e; padding: 44px 0 36px; }
.bx-footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 32px; }
.bx-footer-col-title {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.1px; color: #c4b5fd; font-family: 'Lato', sans-serif; margin-bottom: 14px;
}
.bx-footer-about { font-size: 13px; color: #a5b4fc; line-height: 1.7; margin-bottom: 0; }
.bx-footer-col ul { list-style: none; padding: 0; margin: 0; }
.bx-footer-col ul li { margin-bottom: 8px; }
.bx-footer-col ul li a { font-size: 13px; color: #a5b4fc; text-decoration: none; font-family: 'Lato', sans-serif; transition: color 0.2s ease; }
.bx-footer-col ul li a:hover { color: #ffffff; }

.bx-footer-lower {
    background: #1e1b4b;
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.bx-footer-lower .bx-container {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
}
.bx-footer-copyright, .bx-footer-disclaimer {
    font-size: 12px; color: #6b7280; font-family: 'Lato', sans-serif;
}

/* ===================================================================
   TAG PAGE
   =================================================================== */
.bx-tag-page-hdr {
    background: #ffffff; border: 1px solid #ede9fe; border-radius: 3px;
    padding: 28px 36px; margin-bottom: 28px;
}
.bx-tag-page-hdr h1 { font-size: 24px; position: relative; padding-bottom: 12px; }
.bx-tag-page-hdr h1::after {
    content: ''; position: absolute;
    bottom: 0; left: 0;
    width: 48px; height: 3px;
    background: #7c3aed; border-radius: 2px;
}

/* ===================================================================
   UTILITIES
   =================================================================== */
.bx-btn {
    display: inline-block; padding: 10px 22px;
    background: transparent; border: 1.5px solid #7c3aed; color: #7c3aed;
    font-family: 'Lato', sans-serif; font-weight: 600; font-size: 13px;
    text-transform: uppercase; letter-spacing: 0.5px;
    cursor: pointer; border-radius: 2px; text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.bx-btn:hover { background: #7c3aed; color: #ffffff; box-shadow: inset 0 2px 4px rgba(0,0,0,0.08); }

/* Card entrance animation */
.bx-card-init {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.42s ease, transform 0.42s ease;
}
.bx-card-init.bx-card-in {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 880px) {
    .bx-news-list { grid-template-columns: repeat(2,1fr); }
    .bx-below-article { grid-template-columns: repeat(2,1fr); }
    .bx-footer-grid { grid-template-columns: repeat(2,1fr); }
    .bx-hero-title { font-size: 28px; }
}

@media (max-width: 580px) {
    .bx-news-list { grid-template-columns: 1fr; }
    .bx-below-article { grid-template-columns: 1fr; }
    .bx-footer-grid { grid-template-columns: 1fr; }
    .bx-site-name { font-size: 20px; }
    .bx-nav li a { padding: 10px 12px; font-size: 11px; }
    .bx-content.bx-news-detail { padding: 24px 18px; }
    .bx-news-detail h1 { font-size: 24px; }
    .bx-category-hdr { padding: 20px; }
    .bx-hero-title { font-size: 22px; }
    .bx-homepage-hero { padding: 32px 0 28px; }
    .bx-footer-upper { padding: 30px 0 24px; }
}
