/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #f0f0f0;
    background-color: #3b3b3b;
}

main.article-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Sections */
.section {
    margin-bottom: 3rem;
    color: #f0f0f0;
}
.section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 500;
    text-align: center; /* центрирование текста */
}
.section h3 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}
.section p {
    margin-bottom: 1rem;
}


/* Features section */
.more-features {
    margin-top: 4rem;
    background-color: #3b3b3b;
}

.features-filter {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 60%;
    margin-left: auto;
    margin-right: auto; /* центрируем по горизонтали */
    justify-content: center; /* кнопки внутри тоже по центру */
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: #3b3b3b;
    border: 1px solid #fff; /* белый контур */
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background-color: #000000;
    color: #fff;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 3rem;
    width: 100%;        /* растягиваем на всю ширину */
    max-width: 100%;    /* убираем ограничение */
    margin: 0;          /* убираем отступы */
}

.feature-item {
    background-color: #3b3b3b;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.feature-image {
    position: relative;
    width: 100%;
    height: 440px;     /* высота превью */
    overflow: hidden;
    border-radius: 20px;
}

.feature-image img {
    position: absolute;
    inset: 0;
    margin: auto;
    min-width: 100%;
    min-height: 35.8rem;
    width: auto;
    height: auto;
    top: 130%;
    left: 50%;
    transform: translate(-50%, -50%);  /* центрируем и обрезаем сверху/снизу */
    display: block;
}

.feature-info {
    padding: 1rem;
}

.feature-category {
    position: absolute;
    top: 12px;        /* отступ сверху */
    left: 12px;       /* прижимаем к левому краю */
    background: #7e7e7e;
    color: #fff;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 100;
    opacity:0.7;
}

.feature-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}
.feature-info p {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #e4e4e4;
    font-weight:100;
}

.btn-secondary {
    display: inline-block;
    padding: 0.5rem 0.8rem;
    font-size: 0.7rem;
    background-color: #ffffff;
    color: #000000;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.btn-secondary:hover {
    background-color: #a91e1e;
}

.feature-date {
    display: block;
    font-size: 0.6rem;
    color: #ffffff;
    margin: 0.25rem 0 0.75rem;
}

.feature-actions {
    margin-top: 0.5rem;
}


/* Header */
.site-header{ position:fixed; inset:0 0 auto 0; height:64px; z-index:1100; pointer-events:none; }
.site-header__wrap{ height:100%; display:flex; align-items:center; justify-content:flex-end; padding:8px 12px; pointer-events:auto; }

/* Burger */
.burger{ position:relative; width:44px; height:44px; border:0; background:rgb(255 255 255 / 17%); border-radius:9999px; box-shadow:0 10px 30px rgba(0,0,0,.06); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.burger span{ position:absolute; width:22px; height:2px; background:#ff2d2d; border-radius:0px; left:50%; transform:translateX(-50%); transition:transform .22s ease, opacity .18s ease; }
.burger span:nth-child(1){ top:14px; }
.burger span:nth-child(2){ top:20px; width:18px; left:55%;}
.burger span:nth-child(3){ top:26px; }
.burger.is-active span:nth-child(1){ transform:translateX(-50%) translateY(6px) rotate(45deg); }
.burger.is-active span:nth-child(2){ opacity:0; }
.burger.is-active span:nth-child(3){ transform:translateX(-50%) translateY(-6px) rotate(-45deg); }

/* Off-canvas */
.offcanvas{ position:fixed; top:0; right:0; width:min(92vw,420px); height:100dvh; background:#0f0f0f; color:#fff; z-index:1200; transform:translateX(100%); transition:transform .25s ease; display:flex; flex-direction:column; padding:22px; }
.offcanvas.is-open{ transform:translateXч(0); }

.offcanvas__backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:1190; opacity:0; pointer-events:none; transition:opacity .25s ease; }
.offcanvas__backdrop.is-show{ opacity:1; pointer-events:auto; }

.no-scroll{ overflow:hidden; }

/* Nav */
.offcanvas__nav{ margin-top:8px; }
.menu{ list-style:none; margin:0; padding:0; }
.menu > li{ margin:22px 0; position:relative; }
.menu a{ color:#fff; text-decoration:none; font-size:28px; font-weight:500; letter-spacing:.02em; }

.menu .has-sub > a{ padding-right:28px; display:inline-block; }
.menu .has-sub > .sub-toggle{ position:absolute; top:6px; right:0; width:22px; height:22px; border:0; background:transparent; cursor:pointer; }
.menu .has-sub > .sub-toggle::after{ content:""; position:absolute; left:6px; top:10px; width:10px; height:2px; background:#fff; transition:transform .22s ease; }
.menu .has-sub > .sub-toggle::before{ content:""; position:absolute; left:10px; top:6px; width:2px; height:10px; background:#fff; transition:opacity .22s ease; }
.menu .has-sub.is-open > .sub-toggle::before{ opacity:0; }

.menu .sub{ list-style:none; margin:10px 0 0; padding:0 0 0 12px; display:none; }
.menu .has-sub.is-open > .sub{ display:block; }
.menu .sub li{ margin:10px 0; }
.menu .sub a{ font-size:18px; opacity:.9; }

/* Фикс конфликта с Bootstrap */
.offcanvas { /* можно оставить как есть */
  /* transform: translateX(100%);  — уже есть у тебя */
  /* visibility: hidden;           — Bootstrap ставит это */
}

.offcanvas.is-open {
  transform: translateX(0);      /* уже есть */
  visibility: visible;           /* <-- важно */
}
