@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600&display=swap');

body{
    background-color: #2C3E50;
    font-family: "Comfortaa", sans-serif;
    margin-left: 20px;
    margin-right: 20px;
    padding: 0;
    }
* {
    text-decoration: none;
}

menu, ol, ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.homebrew{
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    backdrop-filter: blur(20px);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 5px;
    justify-content: space-between;
    background-color: rgb(255, 210, 49);
    box-shadow: 0px 1px 1px rgb(255, 210, 49);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    
}

.homebrew a{
    color: black;
}

.homebrew.scrolled {
  background-color: rgba(255, 210, 49, 0.667);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}


.client {
    display: flex;
    gap: 5px;
    margin-right: 10px;
    position: relative;
    width: 50px;
    height: 50px;
    overflow: visible; /* ВАЖНО */
}

.client:hover{
  cursor: pointer;
  transform: scale(1.1);
  transition: all 0.3s;
}


.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: block;
}

/* Шапка */
.hat {
    position: absolute;
    top: -20px;      /* подгоняй */
    right: -10px;     /* подгоняй */
    width: 40px;     /* размер шапки */
    transform: rotate(25deg); /* наклон */
    pointer-events: none; /* чтобы не мешала кликам */
}

/* Кнопка-гамбургер */
.menu-btn {
    width: 30px;
    height: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-btn span {
    display: block;
    height: 4px;
    background: #333;
    border-radius: 2px;
    transition: 0.3s;
}

/* Боковое меню */
.side-menu {
    position: fixed;
    top: 0;
    left: -100%; /* полностью за экраном */
    width: 250px;
    height: 100%;
    background: #7331ff;
    color: #ffffff;
    padding: 60px 20px;
    transition: left 0.3s ease;
    z-index: 1000;
    box-shadow: 10px 10px 10px rgba(0,0,0,0.1);
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;

}

.side-menu.active {
    left: 0; /* выезжает */
}

.side-menu ul {
    list-style: none;
    padding: 0;
}

.side-menu ul li {
    margin: 20px 0;
}

.side-menu hr{
    background-color: rgb(255, 255, 255);
    height: 1px;
    border: none;
}

.side-menu ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
}

.closeMenu{
    float: right;
    font-size: 20px;
    cursor: pointer;
}

/* эффект при фокусе */
#searchInput {
  width: 100%;
  max-width: 500px;       /* ограничение по ширине */
  padding: 12px 20px;
  font-size: 16px;
  border: 2px solid #555; /* начальный цвет границы */
  border-radius: 25px;     /* круглые края */
  outline: none;
  background-color: #1c1c1c; /* темный фон */
  color: white;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

/* при фокусе плавно меняем границу и тень */
#searchInput:focus {
  border-color: #ffd231;
  box-shadow: 0 0 10px #ffd2316f;
}

/* стиль placeholder */
#searchInput::placeholder {
  color: #aaa;
  transition: color 0.3s;
}

#searchInput:focus::placeholder {
  color: #ddd;
}

div > #searchInput {
  display: block;
  margin: 10px auto;
}

.search-wrapper {
    position: relative; /* обёртка должна быть относительной */
    max-width: 500px;
    margin: 0 auto;
}

#searchResults {
    position: absolute; /* теперь блок поверх */
    top: 100%;          /* сразу под input */
    left: 0;
    width: 100%;
    z-index: 10000;
    max-width: 500px;
    background-color: #ffd231;
    border: 1px solid rgba(85, 85, 85, 0.426);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    padding: 10px;
    box-sizing: border-box;
    display: none;
    gap: 10px; /* расстояние между карточками */
    padding: 10px; /* внутренний отступ у всего блока */
    flex-direction: column;
}


.search-result-item {
    padding: 10px 15px; /* внутренние отступы */
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-result-item:hover {
    background-color: #b99925;
    cursor: pointer;
    border-radius: 10px;
}


.result-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s;
}


/* Иконка приложения */
.result-icon {
    width: 40px; /* размер иконки */
    height: 40px;
    object-fit: cover;
    border-radius: 5px; /* чуть скругляем, если нужно */
}

/* Текст рядом с иконкой */
.result-text {
    font-size: 16px;
    font-weight: bold;
}






.btnNAVI{
    font-size: 25px;
    border: 1.5px solid black; 
    padding: 5px; 
    height: 20px; 
    width: 20px; 
    justify-content: center; 
    align-items: center;
    display: flex; 
    border-radius: 5px;
}

.btnNAVI:hover{
    background-color: #00000031;
}

.underline-hover {
  position: relative;
  display: inline-block;
  cursor: pointer;
  color: #ffffff;
  text-decoration: none; /* убираем стандартное подчеркивание */
}

/* псевдоэлемент для линии */
.underline-hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px; /* толщина линии */
  background-color: #ffffff; /* цвет линии */
  transition: width 0.4s ease; /* плавная анимация */
}

/* при наведении линия растягивается */
.underline-hover:hover::after {
  width: 100%;
}






.havka {
    color: rgb(0, 0, 0);
    background-color: #ffd231;
    border-radius: 20px;
    padding: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.havka:hover{
    transform: scale(1.03);
}



.havka h1 {
    margin: 0;
}


.abaHaba{
    color: rgb(255, 255, 255);
    background-color: #7331ff;
    border-radius: 20px;
    padding: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 0;
    text-align: center;
    gap: 10px;
}

.projects-wrapper {
    max-width: 1200px;
    margin: 80px auto 20px; /* отступ сверху для navbar */
    padding: 0 15px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Карточка фиксированной высоты */
.project-card {
  position: relative;
  background-color: #ffd231;
  border-radius: 15px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 300px; /* ← фиксированная высота карточки */
  overflow: hidden; /* обрезает длинные описания */
  box-sizing: border-box;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    background-color: #ffd231f1;
}

.project-card img {
    width: 100px;
    height: 100px;
    display: flex;
    margin-right: auto;
    margin-left: auto;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
    background-color: black;
}

.project-card h3 {
    margin: 5px 0;
    font-size: 18px;
    text-align: center;
}

.project-card p {
  font-size: 14px;
  text-align: center;
  color: #333;
  margin: 5px 0;

  display: -webkit-box;
  -webkit-line-clamp: 5;   /* максимум 6 строк */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;

  /* flex-grow: 1; <- убрать! */
}

.project-card a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: black;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.project-card .icon-blur-bg {
  position: absolute;
  top: 10px;   /* совпадает с padding карточки */
  left: 10px;
  right: 10px;
  height: 50%; /* половина высоты карточки */
  
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;

  filter: blur(15px);
  opacity: 0.3;

  z-index: 0;
  border-radius: 15px 15px 0 0;
}

.project-card .icon {
  position: relative;
  width: 80px;       /* размер иконки */
  height: 80px;
  object-fit: contain;
  z-index: 1;
  margin-bottom: 10px;
  border-radius: 10px;
}








/* Нижняя часть прижата к низу */
.project-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
    font-size: 14px;
    opacity: 0.9;
}

#loadMoreBtn {
    display: block;
    margin: 20px auto 0 auto;
    padding: 10px 20px;
    color: #ffffff;
    background-color: #7331ff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

#loadMoreBtn:hover {
    background-color: #ffd231;
    color: #000000;
}

.show-more-btn{
    display: block;
    margin: 20px auto 0 auto;
    padding: 10px 20px;
    color: #ffffff;
    background-color: #7331ff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.show-more-btn:hover {
    background-color: #b99925;
    color: #ffffff;
}





.top-developers {
    z-index: 0;
    text-align: center;
    background-color: #ffd231;
    border-radius: 20px;
    padding: 20px;
    color: rgb(0, 0, 0);
}

.top-developers p {
    color: white;
}
.cards-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto; /* горизонтальный скролл */
    padding-bottom: 10px; /* чтобы не обрезался контент на скролле */
    -webkit-overflow-scrolling: touch; /* плавная прокрутка на iOS */
    scrollbar-width: none; /* Firefox */
}

.cards-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}






.cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* перенос карточек на новую строку */
}

.card {
    flex: 0 0 150px; /* ширина карточки */
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    color: black;
    position: relative;
    transition: all 0.3s;
    z-index: 100;
}


.card:hover{
    cursor: pointer;
}

.card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 10px 0;
}

.card .place {
    position: absolute;
    top: -10px;
    left: -10px;
    background-color: #fff;
    color: black;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}





.teaser {
    z-index: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #7331ff;
    padding: 20px;
    border-radius: 20px;
    gap: 20px;
    flex-wrap: nowrap;
}

.teaser img {
    max-width: 50%;
    border-radius: 10px;
    height: auto;
}

/* блок с текстом */
.teaser-text {
    color: white;
    flex: 1;
}

.teaser-text p {
    margin: 5px 0;
    color: rgb(183, 183, 183);
}

.teaser-text {
    font-size: 14px;
    color: #ddd;
    margin-bottom: 10px;
}

/* адаптив */
@media (max-width: 768px) {
    .teaser {
        flex-direction: column; /* перенос на телефон */
        text-align: center;
    }

    .teaser img {
        max-width: 100%;
    }

    .teaser-text {
        width: 100%;
    }
}

.seeAll {
    border: none;
    background-color: #ffd231;
    font-family: "Comfortaa", sans-serif;
    border-radius: 5px;
    font-size: 20px;
    padding: 8px 16px;
    cursor: pointer;
    color: black;
}
.seeAll:hover{
  text-decoration: underline;
}






/* Адаптив для телефонов */
@media (max-width: 600px) {
    .cards {
        gap: 10px;
        justify-content: center;
    }
    .card {
        flex: 0 0 45%; /* примерно две карточки в ряд */
        margin-bottom: 15px;
    }
}


@keyframes jump {
    0%   { transform: translateY(0); }
    25%  { transform: translateY(-50px); }
    50%  { transform: translateY(0); }
    75%  { transform: translateY(-25px); }
    100% { transform: translateY(0); }
}










.category-block {
  margin-bottom: 40px;
}

.category-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
}
.category-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-scroll .project-card {
  flex: 0 0 250px;
}

/* Контейнер всех категорий (вертикально) */
.projects-grid {
  display: flex;
  flex-direction: column; /* <-- вертикальное расположение категорий */
  gap: 40px;
}

/* Отдельная категория */
.category-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Горизонтальная лента карточек */
.category-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 40px 10px 20px; /* 👈 немного меньше слева */
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #7331ff transparent;
}

.category-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Карточки внутри ленты */
.category-scroll .project-card {
  flex: 0 0 250px; /* фикс ширина */
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Каждая категория */
.category-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-title {
  color: white;
  font-size: 22px;
  margin: 0 0 5px 10px;
  cursor: pointer;
}

/* Обёртка с кнопками и лентой */
.scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Лента карточек */
.category-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 40px; /* чтобы карточки не прилипали к кнопкам */
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #7331ff transparent;
}

.category-scroll::-webkit-scrollbar {
  height: 6px;
}
.category-scroll::-webkit-scrollbar-thumb {
  background-color: #7331ff;
  border-radius: 10px;
}



/* Кнопки прокрутки */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  
  background-color: rgba(115, 49, 255, 0.8);
  border: none;
  color: white;
  font-size: 22px;

  cursor: pointer;

  width: 50px;   /* 👈 одинаковые размеры */
  height: 50px;  /* 👈 чтобы была круглая */

  border-radius: 50%;

  display: flex;              /* 👈 стрелка теперь по центру */
  justify-content: center;
  align-items: center;

  transition: 0.3s;
  z-index: 2;

  opacity: 0;   /* невидимо, но НЕ ломает layout */
  pointer-events: none; /* чтобы нельзя было кликать, пока скрыто */
}

/* Когда нужно показать кнопку */
.scroll-btn.show {
  opacity: 1;
  pointer-events: auto;
}

.scroll-btn:hover {
  background-color: #ffd231;
  color: black;
  box-shadow: 0 0 15px rgb(0, 0, 0);
}

.scroll-btn.left {
  left: 5px;
}

.scroll-btn.right {
  right: 5px;
}

/* На мобильных скрываем */
@media (max-width: 768px) {
  .scroll-btn {
    display: none !important;
  }
}






.scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}


.loader {
  border: 8px solid #f3f3f3; /* светлый фон */
  border-top: 8px solid #7331ff; /* основной цвет */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 50px auto; /* по центру */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.guest-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #ffd231;
    color: black;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgb(0, 0, 0);
    border: 0 0 10px solid #7331ff;
    font-size: 16px;
    z-index: 9999;
    animation: popupIn 0.3s ease forwards;
    text-align: center;
    cursor: pointer;
}

.guest-popup.fade-out {
    animation: popupOut 0.4s ease forwards;
}

@keyframes popupIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popupOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}





#toTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: none;
    background: #7331ff;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px rgb(0, 0, 0);
    font-size: 20px;
    display: none; /* по умолчанию скрыта */
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    z-index: 100000;
}

#toTopBtn:hover {
    background: #7231ffe0;
}
