  :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 {
    background-color: var(--body);
    padding: 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    min-width: 320px;
    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; 
}


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

.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;
}

.sidebar {
	position: fixed;
	top: 0;
	left: -420px;       
	width: 320px;
	height: 100%;
	background: var(--bg);
	box-shadow: 2px 0 8px rgba(0,0,0,0.2);
	padding: 20px;
	transition: left 0.3s ease;
	z-index: 1200;
	display: flex;
	flex-direction: column;
	gap: 20px;
	overflow-y: auto;    
}

.sidebar.active {
	left: 0;
}

.sidebar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px;
}

.sidebar-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: bold;
}

.close-btn {
	background: none;
	border: none;
	font-size: 38px;
	cursor: pointer;
	color: var(--text-color);
	line-height: 1;
	padding: 0;
	margin: 0;
}	

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

.sidebar h3 {
	margin: 0 0 10px;
	font-size: 18px;
	color: var(--button);
}

.sidebar .menu-group {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.sidebar .menu-group a {
	display: block;
	padding: 8px;
	background: var(--body);
	border-radius: 8px;
	text-decoration: none;
	color: var(--text-color);
	text-align: center;
	font-size: 14px;
	transition: background 0.2s;
}

.sidebar .menu-group a:hover {
	background: var(--button_hover);
}

.overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(5px); 
	-webkit-backdrop-filter: blur(5px);
	opacity: 0;
	visibility: hidden;
	transition: 0.3s;
	z-index: 1050;
}


.overlay.active {
	opacity: 1;
	visibility: visible;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  background-color: var(--bg);
  min-width: 160px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border-radius: 6px;
  overflow: hidden;
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: var(--text-color);
  text-decoration: none;
}

.dropdown-menu a:hover {
  background-color: var(--bg_hover);
  border-radius: 25px;
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-icon {
  transition: transform 0.3s;
}

.dropdown.open .dropdown-icon {
  transform: rotate(180deg); 
}

.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);
}

.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;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

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


.login-btn,
.signup-btn {
    height: 36px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}


.login-btn {
    background-color: transparent;
    color: var(--text-color);
}


.signup-btn {
    background-color: var(--button);
    color: #fff;
}


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


.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;
}



.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--body);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1001;
}

.bottom-nav a {
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 0;
    transition: background-color 0.2s;
}

.bottom-nav a:hover {
    background-color: var(--bg_hover);
}

@media (max-width: 1084px) {
    .header-container {
        justify-content: space-between;
        gap: 8px;
        padding: 8px 12px;
    }

    .catalog-btn:not(.dropdown-toggle),
    .login-btn,
    .signup-btn {
        display: none;
    }

    .top-header .top-links .dropdown {
        display: flex;
        align-items: center;
    }

    .top-header .top-links .dropdown .link-text {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

.header-container {
    position: relative;
}

.dropdown-menu {
    position: absolute; 
    top: 60px;           
    right: 0;           
    width: 220px;       
    padding: 5px;
    z-index: 2000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    background: var(--bg);
    border-radius: 15px;
    overflow: hidden;
}

.dropdown.open .dropdown-menu {
    display: flex;
}
}


@media (min-width: 1083px) {
.header-container {
    position: relative;
}

.dropdown-menu {
    position: absolute; 
    top: 60px;          
    right: 0;            
    width: 220px;       
    padding: 5px;
    z-index: 2000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    background: var(--bg);
    border-radius: 15px;
    overflow: hidden;
}

.dropdown.open .dropdown-menu {
    display: flex;
}
	
	
    .bottom-nav {
        display: none;
    }
}

.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);
}
.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: 38px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}
.close:hover {
  color: var(--button);
  transform: scale(1.2);
}

/* ===================== Лівий сайдбар (каталог) ===================== */ 
.sidebar-left { 
position: fixed; 
top: 0; 
left: -420px; 
width: 320px; 
height: 100%; 
background: #f5f6fa; 
box-shadow: 2px 0 8px rgba(0,0,0,0.2); 
padding: 20px; 
transition: left 0.3s ease; 
z-index: 1200; 
display: flex; 
flex-direction: column; 
gap: 20px; 
overflow-y: auto; 
overflow-x: hidden; 
}

 .sidebar-left.active { 
 left: 0; 
 }
 /* Лівий сайдбар — хрестик після заголовка */ 
 .sidebar-left .sidebar-header { 
 display: flex; 
 justify-content: space-between; 
 align-items: center; 
 margin-bottom: 10px; 
 } 
 
 .sidebar-left .sidebar-header h3 { 
 color: #2c3e50; 
 font-size: 20px;
 margin: 0; 
 font-weight: 600; 
 } 
 
 .close-btn { 
 background: none; 
 border: none; 
 font-size: 24px; 
 color: #7f8c8d; 
 cursor: pointer; 
 padding: 5px; 
 border-radius: 4px; 
 transition: background-color 0.2s ease; 
 } 
 
 .close-btn:hover { 
 background-color: rgba(0,0,0,0.1); 
 } 
 
 /* Список категорій в один ряд */ 
 .sidebar-left .menu-group { 
 display: flex; 
 flex-direction: column; gap: 12px; 
 } 
 
 /* Картки категорій */ 
 .category-wrapper { 
 position: relative; 
 } 
 
 .category-card { 
 background: #ffffff; 
 border-radius: 16px; 
 overflow: hidden; 
 position: relative; 
 } 
 
 .category-card:hover { 
 border-color: #1976d2; 
 } 
 
 .category-card a { 
 display: flex; 
 align-items: center; 
 justify-content: space-between; 
 padding: 16px; 
 text-decoration: none; 
 color: inherit; 
 position: relative; 
 } 
 
 /* Ліва частина з іконкою та текстом */ 
 .category-left { 
 display: flex; 
 align-items: center; 
 flex: 1; 
 min-width: 0; 
 } 
 
 /* Кругла іконка категорії */ 
 .category-icon { 
 width: 44px; 
 height: 44px; 
 margin-right: 14px; 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 border-radius: 50%; 
 background: #e3f2fd; 
 font-size: 20px; 
 flex-shrink: 0; 
 transition: all 0.3s ease; 
 } 
 
 .category-card:hover .category-icon { 
 background: #1976d2; 
 } 
 
 .category-icon-img { 
 width: 20px; 
 height: 20px; 
 object-fit: contain; 
 } 
 
 .category-card:hover .category-icon-img { 
 filter: brightness(0) invert(1); 
 } 
 
 /* Інформація про категорію */ 
 .category-info { 
 flex: 1; 
 min-width: 0; 
 } 
 
 .category-name { 
 font-size: 15px; 
 font-weight: 600; 
 line-height: 1.3;
 margin: 0; 
 color: #2c3e50; 
 transition: color 0.3s ease; 
 } 
 
 .category-card:hover .category-name { 
 color: #1976d2; 
 } 
 
 /* Стрілка справа */ 
 .category-arrow { 
 width: 32px; 
 height: 32px; 
 border-radius: 50%; 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 margin-left: 12px; 
 flex-shrink: 0; 
 background: #f8f9fa; 
 border: 1px solid #e9ecef; 
 } 
 
 .category-card:hover .category-arrow { 
 background: #1976d2; 
 border-color: #1976d2; 
 } 
 
 .category-arrow::after { 
 content: '→'; 
 font-size: 14px; 
 font-weight: bold; 
 color: #6c757d; 
 transition: color 0.3s ease; 
 } 
 
 .category-card:hover .category-arrow::after { 
 color: #ffffff; 
 } 
 
 /* Кнопка підкатегорій (прихована) */ 
 .subforum-toggle { 
 display: none; 
 } 
 
 .category-stats { 
 display: none; 
 } 
 
 /* Скролл для лівого сайдбару */ 
 .sidebar-left::-webkit-scrollbar { 
 width: 6px; 
 } 
 .sidebar-left::-webkit-scrollbar-thumb { 
 background: rgba(0,0,0,0.1); 
 border-radius: 3px; 
 } 
 .sidebar-left::-webkit-scrollbar-track { 
 background: transparent; 
 }





/* Контейнер підкатегорій */ 
.subcategories-container { 
position: absolute; 
top: 100%; 
left: 0; 
right: 0; 
background: #ffffff; 
border-radius: 12px; 
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); 
border: 1px solid #e9ecef; 
z-index: 10; 
margin-top: 8px; 
max-height: 200px; 
overflow-y: auto; 
} 

.subcategories-list { 
padding: 12px 0; 
} 

.subcategories-list a { 
display: block; 
padding: 10px 18px; 
font-size: 13px; 
color: #2c3e50; 
text-decoration: none; 
transition: all 0.2s ease; 
border-left: 3px solid transparent; 
} 

.subcategories-list a:hover { 
background-color: #f8f9fa; 
border-left-color: #1976d2; 
padding-left: 22px; 
}


















/* ===================== Правий сайдбар (профіль) ===================== */
.sidebar-right {
    position: fixed;
    top: 0;
    right: -420px;       
    width: 320px;
    height: 100%;
    background: var(--bg);
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    padding: 20px;
    transition: right 0.3s ease;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-right.active {
    right: 0;
}

/* Хрестик перед заголовком */
.sidebar-right .sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px; /* відступ між хрестиком і заголовком */
}

.sidebar-right .sidebar-header h3 {
    margin: 0;
}

/* Інформація профілю вертикально */
.sidebar-right .profile-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Лінки профілю — через всю ширину, без зовнішніх відступів */
.sidebar-right .menu-group {
    display: flex;
    flex-direction: column;
    margin: 0;   /* прибираємо зовнішні відступи */
    padding: 0;
    gap: 0;      /* прибираємо проміжки між блоками */
}

.sidebar-right .menu-group a {
    display: block;
    width: 100%; /* займає всю ширину */
    margin: 0;   /* прибираємо зовнішні відступи */
    padding: 10px;
    background: var(--body);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease;
}

.sidebar-right .menu-group a:hover {
    background: var(--button_hover);
    color: var(--bg);
    transform: scale(1.02);
}

/* Скролл для правого сайдбару */
.sidebar-right::-webkit-scrollbar {
    width: 8px;
}
.sidebar-right::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}
.sidebar-right::-webkit-scrollbar-track {
    background: transparent;
}















.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: 8px;
    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;
    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;
}


