/* --- ОСНОВНЫЕ НАСТРОЙКИ --- */
@font-face {
    font-family: Gilroy;
    src: url('fonts/Gilroy-Regular.woff2') format('woff2'), url('fonts/Gilroy-Regular.woff') format('woff');
    font-weight: 400; font-style: normal; font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: Gilroy, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: #1d1d1d; color: #f0f0f0; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 10px; 
    position: relative; /* Чтобы блок был поверх картинки */
    z-index: 5;         /* Приподнимаем слой */
   }

/* --- ШАПКА И НАВИГАЦИЯ --- */
.top-panel { padding: 10px 0; display: flex; justify-content: center; align-items: center; position: sticky; top: 0; z-index: 1000; transition: .3s; box-shadow: 0 4px 12px rgba(0,0,0,.5); background-color: #1d1d1d; }
.header-container { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.header-wrapper { display: flex; flex-direction: column; gap: 20px; margin-bottom: 0 !important; }
.header-main-row { display: flex; justify-content: space-between; align-items: center; }
.header-search-row { width: 100%; margin-bottom: 0 !important; }

.search-bar-btn { width: 100%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); border-radius: 4px; padding: 8px 15px; color: #aaa; text-align: left; cursor: pointer; display: flex; align-items: center; transition: .3s; }
.search-bar-btn:hover { background: rgba(255,255,255,.15); color: #fff; border-color: #555; }

.logo-container { display: flex; align-items: center; gap: 15px; }
.logo, .logo-r { width: 40px; height: 40px; background: url(img/goblin-r.webp) center center/contain no-repeat; border-radius: 5px; border: 1px solid #fff; }
.site-title { font-size: 1.5rem; font-weight: 400; color: #f4edff; }
.nav-links { display: flex; gap: 35px; align-items: center; }
.nav-links a { color: #8fbcd8; font-size: 1rem; transition: color .3s; white-space: nowrap; }
.nav-links a:hover, .breadcrumbs a:hover, .alert a:hover { color: #fff; }
.nav-links a.recommended { color: #e2704c; }
.nav-links a.soap { color: #58b588; }
.nav-links a.fill { color: #4a91c9; }

.alert a:hover,.nav-links a:hover{color:#fff}
.alert a{color:#8fbcd8;text-decoration:none;display:flex;align-items:center;gap:10px;font-size:1rem;transition:color .3s}
.alert{text-align:center;max-width:1100px}
.alert a{color:orange} 
.alert2 a:hover,.nav-links a:hover{color:#fff} 
.alert2{text-align:center;max-width:1100px}
.alert2 a{color:orange}

/* --- СЛАЙДЕР (TOP PICKS) --- */
.top-picks-container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 10px 10px 0; position: relative; z-index: 20;  margin-bottom: 10px; }
.picks-slider-wrapper { position: relative; width: 100%; }
.slider-track { display: flex; gap: 15px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 10px 5px; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-item { flex: 0 0 calc((100% - 135px) / 10); aspect-ratio: 2/3; border-radius: 4px; position: relative; transition: transform .3s ease; background: #000; box-shadow: 0 5px 15px rgba(0,0,0,.5); }
.slider-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }
.slider-item:hover { transform: scale(1.15); z-index: 100; box-shadow: 0 10px 25px rgba(0,0,0,.9); border: 1px solid #e2704c; }

.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(20,20,20,.9); border: 1px solid #555; box-shadow: 0 4px 10px rgba(0,0,0,.7); cursor: pointer; z-index: 101; display: flex; align-items: center; justify-content: center; opacity: 1; transition: .2s; }
.slider-arrow:hover { background: #e2704c; border-color: #e2704c; }
.slider-arrow:hover svg { fill: #fff; }
.slider-arrow svg { width: 16px; height: 16px; fill: #ccc; }
.arrow-left { left: -15px; }
.arrow-right { right: -15px; }

/* Новая карточка с тегом IMG */
.new-card { 
    flex: 1;
    min-width: 300px;
    background: rgba(40,40,40,.7);
    overflow: hidden;
    display: flex; /* Флекс для выравнивания */
    flex-direction: row; /* Картинка слева, текст справа (по умолчанию) */
    border-radius: 8px;
    transition: transform .3s, box-shadow .3s;
    box-shadow: 0 10px 20px rgba(0,0,0,.5);
}

.new-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    border: 1px solid #444;
}

/* Блок картинки */
.new-card-image {
    width: 250px; /* Ширина картинки на ПК */
    flex-shrink: 0; /* Чтобы не сжималась */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000; /* Фон под картинкой, если пропорции не совпадут */
}

.new-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Картинка заполнит блок, обрезая лишнее */
    display: block;
}

/* Ссылка-обертка для текста */
.new-card-link {
    display: flex;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* Блок с текстом */
.new-card-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.new-card-info .cat-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #f0f0f0;
    font-weight: 700;
}

.new-card-info p {
    color: #aaa;
    font-size: 1rem;
    line-height: 1.5;
}

/* --- АДАПТИВ ДЛЯ МОБИЛЬНЫХ (до 768px) --- */
@media (max-width: 768px) {
    .new-card {
        min-width: 0; /* Сбрасываем ограничение */
        width: 100%;
        margin-bottom: 15px; /* Отступ между карточками */
    }

    .new-card-image {
        width: 140px; /* Фиксированная ширина картинки на моб */
        height: auto; /* Высота подстраивается, или задайте фиксированную (напр. 100px) */
        min-height: 100px; /* Минимальная высота */
    }
    
    .new-card-info {
        padding: 10px 15px; /* Компактные отступы */
    }

    .new-card-info .cat-title {
        font-size: 1.1rem; /* Чуть меньше шрифт заголовка */
        margin-bottom: 5px;
    }

    .new-card-info p {
        font-size: 0.9rem; /* Чуть меньше шрифт текста */
    }
}

.hero { 
    height: 800px; 
    background-size: cover; 
    background-position: center; 
    margin-top: 0 !important; 
    box-shadow: inset 0 -100px 100px -50px #1d1d1d; 
    display: flex; 
    align-items: flex-end; 
    position: relative; 
    margin-bottom: 20px; 
}
.hero h1 { font-size: 2.5rem; text-shadow: 0 2px 4px rgba(0,0,0,.7); text-align: left; }
.hero-content { width: 100%; margin-top: auto; padding-bottom: 150px; }

/* --- ХЛЕБНЫЕ КРОШКИ ВВЕРХУ HERO --- */
.hero-breadcrumbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    background: rgba(0, 0, 0, 0.55);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.breadcrumbs {
    margin: 0;
    padding: 12px 0;
    font-size: 0.9rem;
    color: #aaa;
}
.breadcrumbs a { color: #aaa; }
.breadcrumbs a:hover { color: #fff; }

/* --- ЖАНРЫ И ТЕГИ --- */
.genre-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; border-bottom: 1px solid #333; padding-top: 80px; padding-bottom: 20px; width: 100%; }
.tag-link { background: #281b24; color: #fff; border: 1px solid rgba(255,255,255,.15); font-size: 12px; cursor: pointer; transition: .2s linear; text-shadow: 0 0 4px #dc6175, 0 0 8px #dc6175, 0 0 16px #dc6175; height: 36px; line-height: 35px; padding: 0 12px; border-radius: 2px; display: block; text-transform: uppercase; text-align: center; position: relative; margin-top: 0; }
.tag-link:hover { background-color: #8fbcd8; border-color: #8fbcd8; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(143,188,216,.2); }
.tag-link.special-tag { color: #e2704c; border-color: #e2704c; }
.tag-link.special-tag:hover { background-color: #e2704c; color: #fff; border-color: #e2704c; box-shadow: 0 4px 10px rgba(226,112,76,.3); }
.tag-link::before { content: ""; position: absolute; bottom: 35px; left: 50%; transform: translateX(-50%); width: 120px; height: 80px; background-repeat: no-repeat; background-position: bottom center; background-size: contain; pointer-events: none; z-index: 5; transition: all .3s ease; }
.tag-link[href*="bozhya-iskra"]::before { background-image: url('img/bi-goblin.webp'); }
.tag-link[href*="kriminal"]::before { background-image: url('img/krim-goblin.webp'); }
.tag-link[href*="boeviki"]::before { background-image: url('img/boevik-goblin.webp'); }
.tag-link[href*="komedii"]::before { background-image: url('img/komedi-goblin.webp'); }
.tag-link[href*="priklyucheniya"]::before { background-image: url('img/adv-goblin.webp'); }
.tag-link[href*="uzhasy"]::before { background-image: url('img/horror-goblin.webp'); }
.tag-link[href*="triller"]::before { background-image: url('img/triller-goblin.webp'); }
.tag-link[href*="drama"]::before { background-image: url('img/drama-goblin.webp'); }
.tag-link[href*="fantastika"]::before { background-image: url('img/scifi-goblin.webp'); }
.tag-link[href*="fentezi"]::before { background-image: url('img/fantasy-goblin.webp'); }

/* --- КОНТЕНТ --- */
.content-section { padding: 0 0 20px; position: relative; }
.section-title { font-size: 1.8rem; margin: 30px 0 10px; color: #f0f0f0; text-align: center; position: relative; }
.description { padding: 10px 25px 10px 25px;border-radius: 8px; color: #9c9fa3; font-size: 1.1rem; line-height: 1.7;background-color: #1B2024;border: 1px solid #F8E9A8;margin-bottom: 20px; }
.description p { line-height: 25px; margin: 15px 0;text-indent: 20px; }
.description p a { color: #F8E9A8; }
.description p a:hover { color: orange;  }

.tags { display: flex; justify-content: center; gap: 15px; margin: 0 0 20px; flex-wrap: wrap; }
.tag { display: block; padding-left: 5px; line-height: 28px; color: #8e8e8e; font-size: 13px; text-transform: uppercase; }

.categories { display: flex; gap: 30px; margin-bottom: 15px; flex-wrap: wrap; }/* Эффект наведения на карточку категории */
 
 
.logo-rr{margin:15px 0 15px 20px;overflow:hidden;display:flex;padding:10px;width:60px;height:60px;background:url(img/goblin-r.webp) center center/contain no-repeat;border-radius:5px;border:1px solid #fff}
.category-card { flex: 1; min-width: 300px; background: rgba(40,40,40,.7); overflow: hidden; display: flex; transition: transform .3s, box-shadow .3s; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,.5); border-radius: 8px; }
.category-info, .category-info2, .category-infog { padding: 20px; flex: 1; }
.category-infog { padding: 20px 20px 20px 30px; word-spacing: 0.3rem; } 

.category-info h3, .cat-title { font-size: 1.4rem; margin-bottom: 10px; color: #f0f0f0; font-weight: 700; }
.category-info p { color: #aaa; }
.category-image, .category-imagef, .category-imagev, .category-imagew, .category-imagem, .category-images { width: 200px; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; background-size: contain; background-repeat: no-repeat; background-position: center; }
.category-image, .category-imagef { background-image: url(img/perevod_thumb.webp); }
.category-imagev { background-image: url(img/vopros_otvet.webp); }
.category-imagem { background-image: url(img/mylnyj_oper_thumb.webp); }
.category-imagew { background-image: url(img/rec_oper_thumb.webp); }
.category-images { background-image: url(img/sinij_fil_thumb.webp); }

.player-container, .season-player { width: 100%; height: 0; padding-bottom: 56.25%; position: relative; margin-bottom: 30px; box-shadow: 0 10px 30px rgba(0,0,0,.7); border-radius: 8px; overflow: hidden; }
.player-container iframe, .season-player iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.seasons-container { max-width: 900px; margin: 0 auto; }
.season { overflow: hidden; margin-bottom: 15px; border-radius: 8px; background: rgba(40,40,40,.7); }
.season-summary { padding: 15px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.2rem; font-weight: 500; }
.season-summary::after { content: '+'; font-size: 1.5rem; transition: transform .3s; }
.season.active .season-summary::after { transform: rotate(45deg); }
.season-details { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .3s, padding .3s; }
.season.active .season-details { padding: 20px; max-height: 1000px; }
#random-character {
  position: fixed;
  bottom: 0;
  z-index: 9999;
  pointer-events: none;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

/* ЗДЕСЬ ЗАДАЕТСЯ РАЗМЕР КАРТИНОК */
#random-character img {
  width: 250px;
  height: auto;
  display: block;
}

@media (min-width: 1200px) {
  #random-character img {
    width: 300px;
  }
}

/* Анимации появления */
.slide-from-right {
  animation: slideFromRight 0.6s ease-out forwards;
}

.slide-from-left {
  animation: slideFromLeft 0.6s ease-out forwards;
}

.slide-from-bottom {
  animation: slideFromBottom 0.6s ease-out forwards;
}

/* Анимация исчезновения */
.hiding.slide-from-right {
  animation: slideToRight 0.5s ease-in forwards;
}

.hiding.slide-from-left {
  animation: slideToLeft 0.5s ease-in forwards;
}

.hiding.slide-from-bottom {
  animation: slideToBottom 0.5s ease-in forwards;
}

/* Keyframes */
@keyframes slideFromRight {
  from { 
    transform: translateX(100%);
  }
  to { 
    transform: translateX(0);
  }
}

@keyframes slideToRight {
  from { 
    transform: translateX(0);
  }
  to { 
    transform: translateX(100%);
  }
}

@keyframes slideFromLeft {
  from { 
    transform: translateX(-100%);
  }
  to { 
    transform: translateX(0);
  }
}

@keyframes slideToLeft {
  from { 
    transform: translateX(0);
  }
  to { 
    transform: translateX(-100%);
  }
}

@keyframes slideFromBottom {
  from { 
    transform: translateY(100%);
  }
  to { 
    transform: translateY(0);
  }
}

@keyframes slideToBottom {
  from { 
    transform: translateY(0);
  }
  to { 
    transform: translateY(100%);
  }
}

/* При наведении на саму карточку */
.category-card:hover {
    transform: translateY(-5px); /* Чуть всплывает вверх (как у вас было) */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7); /* Тень становится глубже */
    border: 1px solid #444; /* Можно добавить легкую рамку */
}
 /* Выравнивание заголовка в секции просмотра */
.watch-section h2, 
.watch-section .section-title {
    text-align: center;
    width: 100%; /* На случай, если блок сжался */
    margin-bottom: 30px; /* Вернем отступы, если они пропали */
}
.new-reviews, .recommendations h2, .watch-section {
    text-align: center;
    margin-bottom: 30px;
} 
/* === ВАШ СТАРЫЙ БЛОК СЕТКИ (ВОССТАНОВЛЕН) === */
.posters-grid {
    display: flex;
    flex-wrap: nowrap;          /* не переносим */
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
    overflow-x: auto;           /* на узких экранах будет горизонтальный скролл */
    scrollbar-width: none;      /* FF: скрыть полосу прокрутки */
}

.posters-grid::-webkit-scrollbar {
    display: none;              /* Chrome/Safari: скрыть полосу прокрутки */
}

 


.poster { background: linear-gradient(135deg,#2a2a2a,#1a1a1a); overflow: hidden; transition: transform .3s; border-radius: 8px; position: relative; flex: 0 0 calc((100% - 5 * 20px) / 6); max-width: calc((100% - 5 * 20px) / 6);}
.poster:hover { transform: scale(1.05); }
.poster-img { width: 100%; height: 100%; background-size: cover !important; background-position: center !important; transition: transform .3s, opacity .3s; opacity: 0; }
.poster-img.loaded { opacity: 1; }
.poster:hover .poster-img { transform: scale(1.1); }
.poster-title { position: absolute; bottom: 0; left: 0; width: 100%; padding: 10px; background: rgba(0,0,0,.7); font-size: .9rem; text-align: center; }

/* Карточки для разборов */
.cards-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 25px; margin-top: 30px; }
.card, .cardb, .cards { display: block; background-color: #2a2a2a; border-radius: 8px; overflow: hidden; box-shadow: 0 6px 15px rgba(0,0,0,.4); transition: .3s; }
.card img, .cardb img, .cards img { width: 100%; display: block; object-fit: cover; transition: transform .5s; }
.card:hover, .cardb:hover, .cards:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,.6); }
.cards:hover img { transform: scale(1.05); }
.card-content { padding: 15px; }
.card-title { font-size: 1rem; font-weight: 500; color: #f0f0f0; margin: 0 0 5px; line-height: 1.4; }
.card-subtitle { font-size: .85rem; color: #aaa; margin: 0; line-height: 1.4; }

.cardst-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 25px; margin-top: 30px; }
.cardstb-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 25px; margin-top: 30px; }
.cards { aspect-ratio: 16/9; }
.cardb { aspect-ratio: 2/3; }

/* Разное */
.info-block { background-color: #1d1d1d; padding: 30px; margin: 40px 0; box-shadow: 0 8px 20px rgba(0,0,0,.5); border: 1px solid #333; border-radius: 8px; overflow: hidden; }
.info-content { display: flex; flex-direction: column; gap: 25px; align-items: center; }
.info-text h2 { font-size: 1.8rem; color: #f0f0f0; margin-left: 15px; margin-bottom: 15px; }
.review-links { display: flex; flex-direction: column; gap: 15px; }
.review-link { display: block; padding: 15px 20px 15px 40px; color: orange; transition: .3s; font-size: 1.1rem; border-radius: 8px; background: rgba(40,40,40,.7); }
.review-link:hover { background: rgba(30,144,255,.2); color: #8fbcd8; transform: translateX(10px); }
/* Подтягиваем основной контент вверх к заголовку */
.main-content {
    margin-top: -100px; /* Тянем блок вверх. Можете менять число: -80px, -120px */
    position: relative; /* Обязательно для z-index */
    z-index: 5;         /* Чтобы контент был поверх картинки фона */
}

/* Футер */
.wrap_floatt { margin: 10px 0 50px; border-top: 1px solid #3c3c3c; }
.footer { background: #1d1d1d; padding: 20px 0 50px; padding-bottom: calc(30px + env(safe-area-inset-bottom)); width: 100%; display: flex; justify-content: center; }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
.footer-left { display: flex; gap: 25px; }
.footer-right { text-align: right; max-width: 400px; }
.footer-left a, .footer-right a { color: #8fbcd8; display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .9rem; transition: color .3s; }
.footer-right a { color: orange; }
.footer-left a:hover, .footer-right a:hover { color: #fff; }
.wrap_float {border-top: 1px solid #3c3c3c;margin-top: 20px;width: 100%;height: 1px;}

.telegram-icon { width: 19px; height: 19px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238FBCD8'%3E%3Cpath d='M11.7 16.3l.2.4c.2.5.6.6 1 .3l2.6-2.4 4.2 3.2c.8.4 1.3.2 1.5-.7l2.8-13c.2-1-.5-1.4-1.3-1l-18 7c-.9.3-.9.8-.2 1l4.8 1.5 11-7c.4-.2.7-.1.5.2z'/%3E%3C/svg%3E"); }
.email-icon { width: 18px; height: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16' fill='%238FBCD8'%3E%3Cpath d='M18 0H2C.9 0 0 .9 0 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm0 4-8 5-8-5V2l8 5 8-5v2z'/%3E%3C/svg%3E"); }
.picture-icon { width: 18px; height: 15px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16' fill='none' stroke='%238FBCD8'%3E%3Cpath d='M1 11l5-5 3 3 5-5 5 5v3H1v-3z'/%3E%3Ccircle cx='6' cy='5' r='2'/%3E%3Crect x='1' y='1' width='18' height='14' rx='1'/%3E%3C/svg%3E"); }
.book-icon { width: 18px; height: 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16' fill='none' stroke='%238FBCD8' stroke-width='1.2'%3E%3Cpath d='M10 1h9v14h-9zM1 1h9v14H1zM5 5h2M5 8h2M5 11h2M13 5h2M13 8h2M13 11h2'/%3E%3C/svg%3E"); }
.bars-icon { width: 24px; height: 20px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20' fill='%23F4EDFF'%3E%3Crect width='24' height='4' y='0' rx='2'/%3E%3Crect width='24' height='4' y='8' rx='2'/%3E%3Crect width='24' height='4' y='16' rx='2'/%3E%3C/svg%3E"); display: inline-block; }

.mobile-menu-btn { display: none; background: 0 0; border: none; color: #f0f0f0; font-size: 1.5rem; cursor: pointer; padding: 5px; transition: transform .3s; z-index: 1001; }
.mobile-menu-btn.active { transform: rotate(90deg); }

/* --- МЕДИА ЗАПРОСЫ (АДАПТИВ) --- */
@media (max-width: 1024px) {
    .nav-links { display: none; position: fixed; top: 70px; left: 0; right: 0; background: rgba(0,0,0,.98); flex-direction: column; padding: 20px; gap: 15px; box-shadow: 0 10px 20px rgba(0,0,0,.5); z-index: 1000; }
    .nav-links.active { display: flex; }
    .mobile-menu-btn { display: block; }
    .hero h1 { font-size: 2rem; } 
    .top-picks-container { margin-bottom: 20px; margin-top: 10px; }
    .slider-item { flex: 0 0 calc((100% - 75px) / 6); }
    .arrow-left { left: 0; }
    .arrow-right { right: 0; }
}

@media (max-width: 900px) {
    .cards-grid { grid-template-columns: repeat(2,1fr); }
    .cardstb-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 768px) {
    /* 1. Исправляем отступы шапки */
    .header-wrapper { gap: 5px; }

    /* 2. Логотип: сбрасываем обтекание */
    .logo-rr { margin: 5px 15px 5px 5px; width: 40px; height: 40px; padding: 8px; float: left; }

    /* 3. ГЛАВНОЕ: Карточка категории -> ГОРИЗОНТАЛЬНЫЙ ФЛЕКС */
    .category-card {
        display: flex !important;       /* Принудительно флекс */
        flex-direction: row !important; /* Принудительно в строку */
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    /* 4. Картинки категорий: фиксируем ширину слева */
    /* Перечисляем ВСЕ возможные классы картинок */
    .category-imagef,
    .category-imagev,
    .category-imagem,
    .category-images,
    .category-imagew {
        width: 140px !important;     /* Фиксированная ширина картинки */
        min-width: 140px !important; /* Не даем сжиматься */
        height: 90px !important;     /* Фиксированная высота */
        padding-bottom: 0 !important; /* Убираем старые хаки с padding */
        flex-shrink: 0;
        background-size: cover;
        background-position: center;
        border-radius: 4px;          /* Скругление углов картинки */
    }
    
    /* Обычная category-image (если есть) пусть остается большой или скрой ее */
    .category-image { width: 100%; height: 150px; }

        
    /* 5. Текст справа */
    .category-info,
    .category-info2,
    .category-infog {
        padding: 0 !important;
        flex: 1; /* Занимает все оставшееся место */
    }
    .category-info p {margin-bottom: 10px;
    }
    /* Если category-infog был inline, возвращаем block */
    .category-infog { display: block !important; text-align: left; }

    /* Остальные настройки адаптива... */
    .categories, .info-content { flex-direction: column; }
    .cardst-grid { grid-template-columns: 1fr; gap: 15px; }
    .info-block { padding: 20px; }
    
    .hero { height: 60vh; min-height: 400px; padding-top: 60px; margin-top: 0; }
    .hero h1 { font-size: 1.8rem; }
    
    .footer .container { flex-direction: column; text-align: center; gap: 40px; }
    .footer-left, .footer-right { width: 100%; justify-content: center; text-align: center; max-width: 100%; }
    
    .genre-tags { gap: 15px !important; row-gap: 90px !important; padding-top: 80px !important; }
    .tag-link::before { width: 80px; height: 90px; bottom: 38px; }

    /* Постеры: 3 в ряд, 2 ряда */
    .posters-grid { flex-wrap: wrap; overflow-x: visible; justify-content: center; }
    .poster { flex: 0 0 calc((100% - 2 * 20px) / 3); max-width: calc((100% - 2 * 20px) / 3); }

    /* Карточки "Новые разборы" */
    .cards-grid { grid-template-columns: 1fr; }
    .card { display: flex; flex-direction: row; align-items: center; gap: 15px; }
    .card img { width: 40%; max-width: 180px; height: auto; flex-shrink: 0; }
    .card-content { padding: 10px 15px 10px 0; }
}

/* Плавающая иконка в карточке с текстом */
@media (min-width: 769px) {
    .category-card .logo-rr {
        float: left;
    }
    
    .category-infog {
        display: block;
        overflow: hidden; /* Чтобы текст обтекал иконку */
    }
    
}

@media (max-width: 600px) {
    .cards-grid { grid-template-columns: 3fr; max-width: 500px; margin: 20px auto; }
    .cardstb-grid { grid-template-columns: repeat(2,1fr); max-width: 500px; margin: 20px auto; }
    .slider-arrow { display: none !important; }
    .slider-track { gap: 10px; }
    .slider-item { flex: 0 0 28%; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.7rem; }
    .section-title { font-size: 1.5rem; } 
    .logo-container { gap: 10px; }
    .site-title { font-size: 1.2rem; }
    .tags { gap: 8px; }
    .tag { font-size: 12px; }
}
