  :root {
	--body: #EAEFF6;
	--line: #2196F3;
	--bg: #FFFFFF;
	--error: #FFF0F1;
	--success: #EBFAEE;
	--bg_hover: #F0F6FF;
	--text-color: #212121;
	--border: #E5EDF3;
	--button: #2196F3;
	--button_hover: #1B89E4;
	--baner: radial-gradient(circle at center,#2F9DF1 0%,#2175C9 100%);
	--button-red: #FF5A4D;
	--button-red_hover: #E64A3D;
	--button-red-text: #FFFFFF;
	--blok: #2175C9;
}

.dark-mode {
	--body: #1D2328;
	--line: #2D516E;
	--bg: #0B0D0F;
	--error: #FFFFFF;
	--success: #FFFFFF;	
	--bg_hover: #101519;
	--text-color: #D4D4D4;
	--border: #1A1F23;
	--button: #2D516E;
	--button_hover: #27465F;
	--baner: radial-gradient(circle at center,#2D516E 0%,#27465F 100%);
	--button-red: #B43F36;
	--button-red_hover: #A5362F;
	--button-red-text: #FFFFFF;
	--img: brightness(0) invert(1) saturate(0) brightness(63%) contrast(95%) sepia(100%) grayscale(100%);
	--blok: #27465F;
}

a:link, a:visited {
    color: var(--text-color);
    text-decoration: none;
}

a:hover {
    color: var(--text-color);
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%; 
    height: 100%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-sizing: border-box;
}

.preloader img {
    width: 180px;
}

.progress-bar {
    width: 180px;
    height: 3px;
    background-color: var(--bg);
    margin-top: 10px;
    border-radius: 5px;
    position: relative;
    box-sizing: border-box;
}

.progress-bar::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: var(--line);
    border-radius: 5px;
    animation: progress 2s infinite;
    box-sizing: border-box;
}


@keyframes progress {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
}


.loading-container {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--line);
    z-index: 9999;
}

.loading-line {
    height: 100%;
    width: 0;
    background-color: var(--line);
    transition: width 0.3s ease;
}

@keyframes loading {
    0% {
        transform: scaleX(0);
    }
    50% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

.loading-dots {
    display: inline-block;
    font-size: 15px;
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: var(--bg); 
    border-radius: 50%;
    animation: dot 1.2s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot {
    0%, 20%, 100% {
        transform: scale(0);
    }
    50% {
        transform: scale(1);
    }
}



body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--body);
    
}

/* Основні стилі header */
.header {
    background-color: var(--body);
    padding: 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* ВАЖЛИВО: Забезпечуємо фіксоване положення навіть при активному пошуку */
.header.search-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
}
.header-container {
    min-width: 350px;
    max-width: 1258px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    gap: 13px;
    border-radius: 25px;
    background: var(--bg);
    box-sizing: border-box;
    position: relative; /* ✅ додав */
}

.logo {
    display: flex;
    align-items: center;
}

/* Показ/приховування для PC/Mobile */
.pc {
    display: inline-block;
    vertical-align: middle;
}

.mob {
    display: none;
}

@media (max-width: 1084px) {
    .pc {
        display: none !important;
    }
    .mob {
        display: inline-block !important;
    }
}

@media (min-width: 1085px) {
    .pro-nav {
        display: none !important;
    }
}


















/* Стилі кнопок */
.catalog-btn {
    display: flex;
    align-items: center;
    height: 36px;
    font-size: 14px;
    padding: 0 8px;
    border-radius: 25px;
    border: 1px solid var(--border);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    gap: 10px;
    transition: all 0.3s ease;
}

.catalog-btn:hover {
    background-color: var(--bg_hover);
}

.signup-btn {
    display: flex;
    align-items: center;
    height: 36px;
    font-size: 14px;
	color: #FFF;
    padding: 0 8px;
    border-radius: 25px;
	background-color: var(--button);
    border: 0px solid var(--border);
    text-decoration: none;
    font-weight: 500;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.signup-btn:hover {
    background-color: var(--button_hover);
	color: #FFF;
}

.profileToggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}










/* ==== ПК ==== */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute; 
  top: 45px; 
  left: 0;
  width: 300px; 
  background: var(--bg); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  display: none; 
  z-index: 1000; 
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  max-height: calc(100vh - 0px); 
  overflow: hidden;
}
.dropdown-menu.show{ display:block; }

.categories-panel {
  max-height:90vh; 
  overflow-y:auto; 
  background:var(--bg); 
  border-radius:12px;
}

/* ==== Ліва панель ==== */
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  cursor: pointer;
}

.menu-item:hover { background: var(--bg_hover); }

.category_link {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  text-decoration: none;
  color: var(--text-color);
}

.menu-item img {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* ==== Права панель ==== */
.subcategories-panel {
  position: absolute; top: 45px;
  left: 305px; 
  width: 300px; 
  background: var(--bg); 
  border: 1px solid var(--border); 
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  display: none; 
  flex-direction: column;
  max-height: calc(100vh - 45px);
  overflow: hidden; 
}

.subcategories-panel.show{ display:flex; }

.subcategories-header {
  display:flex; align-items:center; gap:10px; padding:12px; 
  background:var(--bg_hover); border-bottom:1px solid var(--border); 
  border-top-left-radius:12px;
  border-top-right-radius:12px;
}

.back-btn {
  display:inline-block; border:0; background:none; cursor:pointer;
}

.subcategories-title a {
  font-size:16px; color:var(--text-color); text-decoration:none; display:flex; align-items:center; gap:6px;
}
.subcategories-title a:hover{ color:var(--button); }

/* Підкатегорії */
.subcategories-list {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 10px;
}

/* Підкатегорії */
.subcategories-list {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 0; /* як у categories-panel */
}

.subcategories-list a {
  font-size: 16px; /* той самий як у категоріях */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px; /* так само як .menu-item */
  background: var(--bg);
  color: var(--text-color);
  text-decoration: none;
  cursor: pointer;
}

.subcategories-list a:hover {
  background: var(--bg_hover); /* такий самий як у категоріях */
}

.category_link,
.subcategory_link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.right-icon {
  margin-left: auto;
  flex-shrink: 0;
}

/* ==== Тоненький скрол для всіх списків ==== */
.categories-panel,
.subcategories-list {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: var(--border) transparent; /* Firefox */
}

.categories-panel::-webkit-scrollbar,
.subcategories-list::-webkit-scrollbar {
  width: 6px; /* ширина скролу */
}

.categories-panel::-webkit-scrollbar-track,
.subcategories-list::-webkit-scrollbar-track {
  background: transparent; /* прозорий фон треку */
}

.categories-panel::-webkit-scrollbar-thumb,
.subcategories-list::-webkit-scrollbar-thumb {
  background-color: var(--border); /* колір скролу */
  border-radius: 12px; /* заокругленість */
}


/* ==== Мобільне меню ==== */
@media (max-width:720px){
  .dropdown-menu, .subcategories-panel {
    position: fixed;
    top:70px; bottom:10px; left:10px; right:10px;
    width: calc(100% - 20px);
    border-radius:12px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background:var(--bg);
    z-index: 1000;
    overflow: hidden;
  }

  .subcategories-list {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius:12px;
  }

  .subcategories-panel{
    border-radius:12px;
  }

  .subcategories-panel.show{ 
    left:10px; 
    right:10px; 
  }
}






/* Загальні стилі для всіх меню */
.more-menu-panel,
.notifications-menu-panel,
.profile-menu-panel {
    position: absolute;
    top: 110%; /* трохи нижче кнопки */
    right: 0;
    background: var(--bg);
    border-radius: 12px;
    min-width: 280px;
    max-width: 90vw;
    max-height: 80vh; /* обмеження висоти по вікну */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow-y: auto;   /* вертикальний скрол */
    overflow-x: hidden; /* не даємо горизонтального */
    transition: all 0.25s ease;
}

/* Тонкий скрол */
.more-menu-panel::-webkit-scrollbar,
.notifications-menu-panel::-webkit-scrollbar,
.profile-menu-panel::-webkit-scrollbar {
    width: 6px; /* ширина скролу */
}

.more-menu-panel::-webkit-scrollbar-track,
.notifications-menu-panel::-webkit-scrollbar-track,
.profile-menu-panel::-webkit-scrollbar-track {
    background: transparent; /* прозорий трек */
}

.more-menu-panel::-webkit-scrollbar-thumb,
.notifications-menu-panel::-webkit-scrollbar-thumb,
.profile-menu-panel::-webkit-scrollbar-thumb {
    background-color: var(--border); /* колір скролу */
    border-radius: 3px; /* заокруглений */
}


/* Заголовок меню */
.menu-header {
	color: var(--text-color);
    padding: 10px 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
}

/* Контент меню */
.menu-content {
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0;
    transition: background 0.2s;
}

/* Контент меню */
.menu-link a {
    display: block;
    padding: 10px 16px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0;
    transition: background 0.2s;
}


.menu-link a:last-child {
    border-bottom: none;
}

.menu-link a:hover {
    background: var(--bg_hover);
}

.menu-no_post {
    display: block;
    padding: 47px 25px;
	background: var(--bg_hover);
    color: var(--text-color);
	font-size: 15px;
    text-decoration: none;
    border-radius: 0;
    transition: background 0.2s;
}


/* Кнопка закриття */
.close-menu {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.2s;
}

.close-menu:hover {
    color: #333;
}

/* Адаптивність: меню під кнопки на мобільних */
@media (max-width: 768px) {
    .more-menu-panel,
    .notifications-menu-panel,
    .profile-menu-panel {
        position: absolute;
        top: 110%;        
        left: 0;          
        right: 0;          
        width: 100%;        
		max-width: 100vw;
        min-width: 0;
        box-sizing: border-box;
        z-index: 1000;
    }
}

.pro-btn {
    align-items: center;
	padding: 10px 38px;
    height: 36px;
    font-size: 14px;
    border-radius: 25px;
	background: var(--bg_hover);
    border: 1px solid var(--border);
    color: var(--button) !important;
    text-decoration: none;
    font-weight: 500;
    gap: 10px;
    transition: all 0.3s ease;
}

















/* Пошукова строка */
.search-bar {
    display: flex;
    align-items: center;
    flex-grow: 1;
    height: 36px;
    border-radius: 50px;
    border: 1px solid var(--border);
    padding: 0 4px;
    background: var(--bg);
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.search-input {
    border: none;
    background: transparent;
    padding: 0 13px;
    font-size: 14px;
    outline: none;
    width: 100%;
}

.search-button {
    background-color: var(--button);
    border: none;
    border-radius: 50%;
    padding: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.search-button:hover {
    background-color: var(--button_hover);
}

/* Кнопка очищення */
.search-clear {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: -4px;
    margin-right: 0px;
    border-radius: 50%;
    display: none; /* спочатку ховаємо */
    align-items: center;
    justify-content: center;
    color: red; /* червоний хрестик */
    opacity: 0.8;
    transition: all 0.2s ease;
    font-size: 22px;     /* трохи менший ніж 28, щоб добре вліз */
    width: 36px;         /* під висоту поля */
    height: 36px;
    line-height: 36px;   /* вирівнює символ по вертикалі */
    flex-shrink: 0;
    order: -1;
}

.search-clear:hover {
    opacity: 1;
    background-color: var(--bg_hover);
}

.search-clear::before {
    content: "×";
    font-weight: bold;
    display: block;       /* гарантія що займе весь line-height */
    text-align: center;
}

/* Клас для показу при активному полі */
.search-bar.active .search-clear {
    display: flex;
}



/* Header right */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

/* Мобільні стилі для розширення пошуку */
@media (max-width: 1084px) {
    .link-text {
        display: none;
    }

    .search-bar.expanded {
        position: fixed;
        left: 107px;
        right: 23px;
        width: auto;
        z-index: 20;
        background: var(--bg);
        border: 1px solid var(--button);

    }

    .search-bar.expanded .search-input {
        font-size: 16px;
    }

    .header-right .catalog-btn,
    .header-right .signup-btn,
    .header-right .profileToggle,
    .header-right .dropdown {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .search-bar.expanded ~ .header-right > *:not(:last-child) {
        opacity: 0.3;
        transform: scale(0.9);
    }

    .search-bar.expanded ~ .header-right > *:last-child {
        opacity: 0;
        transform: translateX(20px);
        pointer-events: none;
    }
}

/* Мобільна іконка пошуку */
.mobile-search-icon {
    display: none;
    align-items: center;
    height: 36px;
    font-size: 14px;
    padding: 0 8px;
    border-radius: 25px;
    border: 1px solid var(--border);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    gap: 10px;
    transition: all 0.3s ease;
}




.mobile-search-icon:hover {
    background-color: var(--bg_hover);
}

.mobile-search-icon img {
    width: 18px;
    height: 18px;
    filter: var(--img);
}

/* Overlay для закриття пошуку */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
}

.search-overlay.active {
    display: block;
}





/* Варіант 4: Для HTML datalist (якщо використовується) */
.search-input::-webkit-list-button {
    display: none !important;
}

.search-input::-webkit-calendar-picker-indicator {
    display: none !important;
}

datalist {
    display: none !important;
}














/* ==============================
   Стилі для мобільних пристроїв <680px
   ============================== */
@media (max-width: 520px) {
    /* Контейнер шапки */
    .header-container {
        min-width: 320px;
        max-width: 1258px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between; /* рівномірний розподіл */
        padding: 9px 12px;
        border-radius: 25px;
        background: var(--bg);
        box-sizing: border-box;
        position: relative;
    }

    /* Логотип - фіксована ширина зліва */
    .logo {
        flex: 0 0 auto;
        margin-right: 8px;
    }

    /* Центральна частина з іконками */
    .header-center {
        display: flex;
        flex: 1;
        justify-content: space-evenly; /* рівномірний розподіл по центру */
        align-items: center;
        gap: 15px;
        margin: 0 8px;
    }


    /* Стилізація всіх кнопок/посилань */

    .header-container .mobile-search-icon {
    display: flex;
    align-items: center;
    height: 36px;
    font-size: 14px;
    padding: 0 8px;
    border-radius: 25px;
    border: 1px solid var(--border);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    gap: 5px;
    transition: all 0.3s ease;
    }


	
	
    /* Ховер ефект для кнопок */
    .header-container .catalog-btn:hover,
    .header-container .signup-btn:hover,
    .header-container .profileToggle:hover,
    .header-container .dropdown:hover {
        background-color: var(--bg_hover);
    }

    /* --- Мобільна іконка пошуку --- */
    .mobile-search-icon {
        background: none;
        border: none;
        cursor: pointer;
    }

    /* --- Форма пошуку (прихована за замовчуванням) --- */
    .search-bar {
        display: none;
        position: fixed;
        top: 19px;
        left: 20px;
        right: 20px;
        width: auto;
        z-index: 1001;
        background: var(--bg);
        border: 1px solid var(--button);
        border-radius: 50px;
    }

    /* --- Форма пошуку при активації --- */
    .search-bar.mobile-expanded {
        display: flex;
        animation: slideInRight 0.3s ease-out;
    }

    .search-bar.mobile-expanded .search-input {
        font-size: 16px;
    }

    /* --- Анімація появи справа --- */
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    /* --- Приховування інших елементів при активному пошуку --- */
    .search-bar.mobile-expanded ~ .header-right .catalog-btn,
    .search-bar.mobile-expanded ~ .header-right .signup-btn,
    .search-bar.mobile-expanded ~ .header-right .profileToggle,
    .search-bar.mobile-expanded ~ .header-right {
        opacity: 0.3;
        transform: scale(0.9);
        pointer-events: none;
        transition: all 0.3s ease;
    }

    /* --- Ховаємо текст на кнопках для мобільних --- */
    .link-text,
    .pc {
        display: none;
    }

    /* Показуємо тільки мобільні елементи */
    .mob {
        display: block;
    }



}

/* За замовчуванням у шапці показуємо, а в меню ховаємо */
.mob394 {
    display: inline-block;
}
.dropdown-menu .earn-nav {
    display: none;
}

/* Якщо менше 395px */
@media (max-width: 394px) {
    /* Приховуємо в шапці */
    .mob394 {
        display: none !important;
    }
    /* Показуємо в меню */
    .dropdown-menu .earn-nav {
        display: block !important;
    }
}


















/* Модальні вікна */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg);
    padding: 20px;
    border-radius: 12px;
    width: 320px;
    max-width: 90%;
    position: relative;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content label {
    display: block;
    margin-top: 12px;
    font-size: 14px;
}

.modal-content input,
.modal-content button {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
}

.modal-content input {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-color);
}

.modal-content button {
    background: var(--button);
    border: none;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-content button:hover {
    background: var(--button_hover);
}

.close {
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.close:hover {
    color: var(--button);
    transform: scale(1.2);
}







.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 12px;
    gap: 12px;
    box-sizing: border-box;
}








.post, .banner_title {
    width: 100%; /* займає всю ширину контейнера */
    max-width: 1280px; /* обмеження по великому екрану */
    box-sizing: border-box; /* щоб padding не розширював ширину */
}


.post {
    display: block;
    background: var(--bg);
    border-radius: 25px;
    color: var(--text-color);
    padding: 10px;
    text-decoration: none;
}


.post a {
	color: var(--button);
}

.filter-btn {
    display: inline-flex; /* замість flex — щоб кнопка займала тільки свій контент */
    align-items: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 25px;
	background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    gap: 8px;
    width: auto;          /* не дає тягнутись */
    max-width: fit-content; /* обмежує по контенту */
}


 .banner_title {
    background: var(--baner);
    border-radius: 25px;
    padding: clamp(20px, 3vw, 45px) clamp(12px, 2vw, 45px); /* вертикально/горизонтально */
    position: relative;
    overflow: hidden;
}

.banner_title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.banner_content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* щоб контент переходив на новий ряд при малих ширинах */
    gap: clamp(10px, 2vw, 20px);
}

.banner_breadcrumb {
	 flex-wrap: wrap;
    font-size: clamp(12px, 1.5vw, 16px); /* маленький шрифт, адаптивний */
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    width: 100%;
    margin-bottom: clamp(5px, 1vw, 10px); /* відступ від верхнього краю */
	margin-left: clamp(15px, 3vw, 35px);
	text-decoration: none;
}

.banner_breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.banner_breadcrumb a:hover {
    text-decoration: underline;
}


.banner-title {
    color: white;
    font-size: clamp(18px, 4vw, 32px); /* автоматичне масштабування */
    font-weight: 700;
    line-height: 1.2;
    margin-left: clamp(15px, 3vw, 35px);
    flex: 1 1 auto; /* займає доступне місце */
}

.banner_icons {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 20px);
    opacity: 0.9;
}

.icon_title {
    width: clamp(36px, 4vw, 48px);
    height: clamp(36px, 4vw, 48px);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.icon_title:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
}

/* Медіа-запити залишаємо для дуже маленьких екранів */
@media (max-width: 360px) {
    .banner_content {
        flex-direction: column;
        align-items: flex-start;
    }

    .banner-title {
        margin-left: 0;
    }

    .banner_icons {
        align-self: flex-start;
    }
}


/* Існуючі стилі */


.post, .banner_title {
    width: 100%;
    max-width: 1280px;
    box-sizing: border-box;
}

.post {
    display: block;
    background: var(--bg);
    border-radius: 25px;
    color: var(--text-color);
    padding: 8px;
    text-decoration: none;
}

.post a {
    color: var(--button);
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 25px;
    border: 1px solid var(--border);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    gap: 8px;
    width: auto;
    max-width: fit-content;
}

.banner_title {
    background: var(--baner);
    border-radius: 25px;
    padding: clamp(20px, 3vw, 45px) clamp(12px, 2vw, 45px);
    position: relative;
    overflow: hidden;
}

.banner_title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.banner_content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: clamp(10px, 2vw, 20px);
}

.banner_breadcrumb {
    flex-wrap: wrap;
    font-size: clamp(12px, 1.5vw, 16px);
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    width: 100%;
    margin-bottom: clamp(5px, 1vw, 10px);
    margin-left: clamp(15px, 3vw, 35px);
    text-decoration: none;
}

.banner_breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.banner_breadcrumb a:hover {
    text-decoration: underline;
}

.banner-title {
    color: white;
    font-size: clamp(18px, 4vw, 32px);
    font-weight: 700;
    line-height: 1.2;
    margin-left: clamp(15px, 3vw, 35px);
    flex: 1 1 auto;
}

.banner_icons {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 20px);
    opacity: 0.9;
}




.post, .banner_title {
    width: 100%;
    max-width: 1280px;
    box-sizing: border-box;
}
.post {
    display: block;
    background: var(--bg);
    border-radius: 25px;
    color: var(--text-color);
    padding: 8px;
    text-decoration: none;
}
.post a {
	color: var(--button);
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 25px;
    border: 1px solid var(--border);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    gap: 8px;
    width: auto;
    max-width: fit-content;
}

 .banner_title {
    background: var(--baner);
    border-radius: 25px;
    padding: clamp(20px, 3vw, 45px) clamp(12px, 2vw, 45px);
    position: relative;
    overflow: hidden;
}

.banner_title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}
.banner_content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: clamp(10px, 2vw, 20px);
}
.banner_breadcrumb {
	 flex-wrap: wrap;
    font-size: clamp(12px, 1.5vw, 16px);
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    width: 100%;
    margin-bottom: clamp(5px, 1vw, 10px);
	margin-left: clamp(15px, 3vw, 35px);
	text-decoration: none;
}
.banner_breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}
.banner_breadcrumb a:hover {
    text-decoration: underline;
}
.banner-title {
    color: white;
    font-size: clamp(18px, 4vw, 32px);
    font-weight: 700;
    line-height: 1.2;
    margin-left: clamp(15px, 3vw, 35px);
    flex: 1 1 auto;
}
.banner_icons {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 20px);
    opacity: 0.9;
}

/* Картки курсів */
.courses-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px; /* ✅ відступ знизу */
}



.course-card {
    background: var(--bg);
    border-radius: 25px;
    overflow: hidden;
    border: 1px solid var(--border);
    padding: 12px; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}



.course-img {
    width: 100%;
    height: 180px; /* фіксована висота */
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Розмитий фон з тієї ж картинки */
.course-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-repeat: repeat;
    filter: blur(20px);
    transform: scale(1.2); /* трохи збільшуємо, щоб розмиття виглядало приємніше */
    z-index: 0;
}

/* Основне зображення курсу */
.course-img img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* вписується повністю */
    object-position: center;
    position: relative;
    z-index: 1;
}



.course-info {
    padding: 16px;
}
.rating {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-color);
}
.course-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--text-color);
}
.course-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}
.course-tags {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}
.course-tags span {
    font-size: 12px;
    color: var(--text-secondary);
}
.category {
    font-size: 12px;
    color: var(--button);
}

@media (max-width: 920px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
@media (max-width: 520px) {
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 5px 15px 15px 15px; 
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background-color: var(--bg_hover);
    color: var(--text-color);
    transform: translateY(-1px);
}

.pagination a.active {
    background-color: var(--button);
    color: var(--button-red-text);
}

.pagination a.active:hover {
    background-color: var(--button_hover);
    transform: translateY(-1px);
}

/* Стилі для стрілок */
.pagination a:first-child,
.pagination a:last-child {
    font-size: 16px;
    padding: 0 10px;
}

/* Адаптивність для різних розмірів екрану */

/* Планшети та великі телефони */
@media (max-width: 768px) {
    .pagination {
        padding: 15px 10px;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .pagination a {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
        padding: 0 8px;
    }
}

/* Мобільні пристрої */
@media (max-width: 600px) {
    .pagination {
        padding: 10px 8px;
        gap: 4px;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .pagination a {
        min-width: 36px;
        height: 36px;
        font-size: 12px;
        padding: 0 6px;
        flex-shrink: 0;
    }
    
    /* Приховуємо деякі номери сторінок на дуже маленьких екранах */
    .pagination a:not(.active):not(:first-child):not(:last-child):not(:nth-child(2)):not(:nth-last-child(2)) {
        display: none;
    }
}

/* Дуже маленькі екрани */
@media (max-width: 400px) {
    .pagination {
        padding: 8px 5px;
        gap: 3px;
    }
    
    .pagination a {
        min-width: 32px;
        height: 32px;
        font-size: 11px;
        padding: 0 4px;
    }
    
    .pagination a:first-child,
    .pagination a:last-child {
        font-size: 14px;
        padding: 0 6px;
    }
}





.banner-wrapper {
    width: 100%;
    border-radius: 25px;
    overflow: hidden;
}

.banner {
    width: 100%;
    height: 100%;
    border-radius: 25px;
    display: flex;
    justify-content: flex-start;
    padding: 40px;
    box-sizing: border-box;
    color: white;
    background: var(--baner);
    overflow: hidden;
    position: relative;
    transition: all 0.5s ease;
}

.banner-content {
    margin-top: 20px;
    max-width: 500px;
    width: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    padding-right: 30%;
    transition: all 0.5s ease;
}

.banner-name {
    font-size: clamp(12px, 1.5vw, 20px); /* менший за h2 */

}

.banner-content h2 {
    font-size: clamp(18px, 2.5vw, 32px); /* заголовок завжди більший */
    line-height: 1.3;
    margin-bottom: 12px;
    transition: all 0.5s ease;
}

.banner-content p {
    font-size: clamp(12px, 1.5vw, 20px); /* менший за h2 */
    line-height: 1.4;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: all 0.5s ease;
}

.btn {
    display: inline-block;
    padding: clamp(6px, 1.2vw, 14px) clamp(12px, 2vw, 28px);
    background: var(--button-red);
    color: var(--button-red-text) !important;
    font-size: clamp(12px, 1.8vw, 18px);
    border-radius: 25px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--button-red_hover);
}

.btn-icon {
    width: 1.4em;
    height: auto;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.banner-name-icon {
    width: 1.5em;
    height: auto;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.banner-image {
    position: absolute;
    right: 0;
    bottom: 0;
    top: 0;
    width: 70%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.5s ease;
}

.banner-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: all 0.5s ease;
}

/* Адаптивні відступи та масштабування тексту */
@media (max-width: 768px) {
    .banner {
        padding: 35px;
        min-height: 220px;
    }

    .banner-content {
        padding-right: 40%;
    }

	.banner-name {
    font-size: clamp(12px, 1.3vw, 18px);
	}
	
    .banner-content h2 {
        font-size: clamp(18px, 3.7vw, 28px);
    }

    .banner-content p {
        font-size: clamp(12px, 1.3vw, 18px);
    }

    .btn {
        font-size: clamp(12px, 1.6vw, 16px);
        padding: clamp(6px, 1.2vw, 12px) clamp(12px, 2vw, 24px);
    }

.banner-image {
    position: absolute;
    right: 0;
    bottom: 0;
    top: 0;
    width: 60%;
    height: 140%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.5s ease;
}

.banner-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: all 0.5s ease;
}
}

@media (max-width: 680px) {
    .banner {
        padding: 20px;
        min-height: 220px;
    }

    .banner-content {
        padding-right: 50%;
    }

	.banner-name {
    font-size: clamp(11px, 1.4vw, 16px);
	}	
	
    .banner-content h2 {
        font-size: clamp(18px, 3.6vw, 28px);
    }

    .banner-content p {
        font-size: clamp(11px, 1.4vw, 16px);
        margin-bottom: 12px;
    }

    .btn {
        font-size: clamp(11px, 1.8vw, 14px);
        padding: clamp(5px, 1.2vw, 10px) clamp(10px, 2vw, 20px);
    }

.banner-image {
    position: absolute;
    right: 0;
    bottom: 0;
    top: 0;
    width: 60%;
    height: 140%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.5s ease;
}

.banner-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: all 0.5s ease;
}
}

    @media (max-width: 480px) {
      .banner {
        padding: 16px;
        aspect-ratio: unset;
        min-height: 200px;
      }

	  .banner-content {
        margin-top: 5px;
        max-width: 100%; 
      }
	  
	.banner-name {
    font-size: clamp(11px, 1.4vw, 16px);
	}	
	  
      .banner-content h2 {
		  font-size: clamp(18px, 3.5vw, 28px);
        margin-bottom: 10px;
      }
      .banner-content p {
		  font-size: clamp(11px, 1.4vw, 16px);
        margin-bottom: 12px;
      }

.banner-image {
    position: absolute;
    right: 0;
    bottom: 0;
    top: 0;
    width: 60%;
    height: 160%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.5s ease;
}

.banner-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: all 0.5s ease;
}


/* Стиль повідомлення */
.message-box {
    display: none;
    padding: 15px 20px;
    margin: 10px auto;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Повідомлення успіху */
.message-box.success {
    background-color: #d4edda; /* світло-зелений */
    color: #155724;           /* темно-зелений текст */
	text-align: center;
}

/* Повідомлення помилки */
.message-box.error {
    background-color: #f8d7da; /* світло-червоний */
    color: #721c24;            /* темно-червоний текст */
	text-align: center;
}


