:root{
  --accent: #2d89ef;
  --bg: #ffffff;
  --muted: #f5f6f8;
  --text: #222;
  --glass: rgba(0,0,0,0.05);
  --radius: 10px;
  --container: 1200px; /* менять ширину контейнера сайта */
}

*{box-sizing:border-box}
body{margin:0;font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}
.container{max-width:var(--container);margin:0 auto;padding:20px}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:10px 0}
.brand{display:flex;align-items:center;gap:10px}
.logo{width:48px;height:48px;object-fit:contain}
.site-name{font-weight:700;font-size:18px}
.main-nav a{margin-left:18px;text-decoration:none;color:var(--text);padding:8px 6px;border-radius:6px}
.main-nav a:hover{background:var(--muted)}
.main-nav .btn{background:var(--accent);color:white;padding:8px 12px;border-radius:8px;text-decoration:none}

.hero{width:100%;overflow:hidden;background:var(--muted)}
.hero-slider{display:flex;transition:transform .5s ease;height:320px}
.hero-slider .slide{flex:0 0 100%;height:320px}
.hero-slider img{width:100%;height:100%;object-fit:cover;display:block}

.section{padding:30px 0}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.section-head h2{margin:0}
.filters{display:flex;gap:10px;align-items:center}
.filters select,input{padding:8px;border-radius:8px;border:1px solid #e6e6e6;background:white}

.projects-grid{display:grid;grid-template-columns: repeat(4, 1fr);gap:18px}

/* карточка проекта */
.card{background:white;border-radius:12px;box-shadow:0 6px 20px rgba(0,0,0,0.05);overflow:hidden;display:flex;flex-direction:column}
.card .card-slider{position:relative;height:180px;overflow:hidden;background:#eee}
.card .card-slider img{width:100%;height:180px;object-fit:cover;display:block}
.card .card-body{padding:12px;flex:1;display:flex;flex-direction:column;gap:8px}
.card h3{margin:0;font-size:16px}
.card p{margin:0;color:#555;font-size:14px}
.status{font-weight:600;font-size:13px}
.goal{font-size:14px;color:#333}
.progress{height:10px;background:var(--muted);border-radius:999px;overflow:hidden;margin:6px 0}
.progress .bar{height:100%;background:linear-gradient(90deg,var(--accent),#1976d2);width:0%}

.site-footer{background:#fafafa;padding:24px 0;margin-top:30px;border-top:1px solid #eee}
.footer-grid{display:flex;gap:30px;justify-content:space-between}
.footer-grid h4{margin:0 0 8px 0}
.footer-bottom{text-align:center;padding:14px 0;color:#777;border-top:1px solid #eee;margin-top:16px}

.project-detail .tabs{display:flex;gap:8px;border-bottom:1px solid #eee;margin-bottom:14px}
.tab{padding:10px 14px;cursor:pointer;border-radius:8px 8px 0 0;background:transparent}
.tab.active{background:white;border:1px solid #eee;border-bottom:1px solid white}
.tab-content{background:white;padding:16px;border-radius:8px;border:1px solid #eee}

/* responsive */
@media (max-width: 1100px){.projects-grid{grid-template-columns: repeat(3,1fr)}}
@media (max-width: 860px){.projects-grid{grid-template-columns: repeat(2,1fr)}; .hero-slider{height:240px}.hero-slider .slide{height:240px}}
@media (max-width: 600px){
  .header-inner{flex-direction:column;align-items:flex-start;gap:12px}
  .main-nav{display:flex;flex-wrap:wrap;gap:6px}
  .projects-grid{grid-template-columns: 1fr}
  .hero-slider{height:180px}.hero-slider .slide{height:180px}
  .filters{flex-direction:column;align-items:stretch}
}
/* Фиксированное меню */
.main-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav a {
    margin-left: 25px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

/* Бургер */
.burger {
    width: 25px;
    height: 20px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: space-between;
}

.burger span {
    display: block;
    height: 3px;
	width: 28px;
    background: #333;
    border-radius: 3px;
}

/* 📱 Мобильная версия */
@media (max-width: 768px) {

    .nav {
		position: absolute;
        top: 60px;
        left: 0;
		right: 0;
        width: 100%;
        display: none;
        flex-direction: column;
        background: #ffffff;
        padding: 15px 0;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
		z-index: 9999;
    }

    .nav a {
        padding: 15px 20px;
        margin: 0;
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    .burger {
        display: flex;
		flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }

    .nav.open {
        display: flex;
    }
}

/* ===== СТИЛИ ДЛЯ ФИЛЬТРОВ, БУРГЕРА И ПРОГРЕСС-БАРА ===== */

.filter-section {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    flex: 1;
    min-width: 200px;
}

.filter-select, #filterStatus, #filterType, #sortBy {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-width: 180px;
    background: white;
}

/* Прогресс-бар (шире + процент внутри) */
.progress {
    width: 100%;
    background: #f1f3f5;
    border-radius: 12px;
    height: 30px;
    overflow: hidden;
    margin-top: 10px;
}

.progress .bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #218838);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px 0 0 12px;
    transition: width 0.5s ease;
    font-size: 14px;
    white-space: nowrap;
}

/* Адаптивность для фильтров */
@media (max-width: 768px) {
  .filter-section {
    flex-direction: column;
    gap: 10px;
  }
  .filter-select, .search-box { width: 100%; min-width: 0; }
}

/* ===== Стили для фиксированного верхнего меню и бургер-меню ===== */
.main-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: #fff;
    box-shadow: 0 3px 18px rgba(0,0,0,0.06);
    z-index: 9999;
}
.nav-container { display:flex; justify-content:space-between; align-items:center; padding:12px 20px; }
.nav-container .logo { display:flex; align-items:center; gap:10px; font-weight:700; }
.nav { display:flex; gap:18px; align-items:center; }
.nav a { text-decoration:none; color:var(--text); padding:6px 8px; border-radius:6px; }
.burger { display:none; width:28px; cursor:pointer; flex-direction:column; gap:5px; }
.burger span { height:3px; background:#333; display:block; border-radius:3px; }

/* мобильное меню */
@media (max-width: 768px) {
  .nav { display:none; position:absolute; top:60px; left:0; right:0; background:#fff; flex-direction:column; box-shadow:0 6px 20px rgba(0,0,0,0.08); }
  .nav.open { display:flex; }
  .burger { display:flex; }
}


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

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
}


/* Активный пункт меню — нижняя линия */
.nav a.active {
    position: relative;
    font-weight: 600;     /* можно убрать, если не нужно */
}

.nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;         /* расстояние от текста до подчеркивания */
    width: 100%;
    height: 2px;          /* толщина линии */
    background-color: #007bff;  /* выбери цвет под фирменный */
    border-radius: 2px;
}

/* выделение цветом (можешь изменить) */
.nav a.active {
    color: #007bff;        /* выделение цветом (можешь изменить) */
    font-weight: 600;
/*    border-bottom: 2px solid #007bff;*/
}

/* скрол для всех страниц, чтоб меню не шаталось */
html {
    overflow-y: scroll;
}





/* это основной слайдер на гл.странице с кнопкой и текстом */
.hero {
    position: relative;
    width: 100%; /* можно регулировать ширину */
    max-height: 500px; /* можно регулировать высоту */
    overflow: hidden;
	margin-top: 0px;  /* делает отступ слайдера от верхней панели МЕНЮ */
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* это в слайдере кнопка и текст в десктопе */
.hero-overlay {
    position: absolute;
    bottom: 80px;        /* отступ от нижнего края слайдера */
    left: 19%;           /* перемещение относительно контейнера вправо-влево */
	padding-left: 0px; /* отступ от контейнера */
    max-width: 400px;    /* регулируемая ширина области текста ОБЩАЯ - Может не нужна */
    text-align: left;    
    color: #2b2b2b;
	z-index: 10;          /* обязательно! пока под вопросом */
}

.hero-overlay h1 {
	max-width: 300px;    /* регулируемая ширина области Гл.текста */
	font-size: 3rem;
    margin-bottom: 10px; /* это пространства между строками */
}

.hero-overlay p {
	max-width: 340px;    /* регулируемая ширина области Вспомогат.текста */
    font-size: 1.2rem;
    margin-bottom: 50px; /* пространства между строками */
}

.hero-overlay .btn {
    padding: 15px 80px;
	 font-size: 20px;           /* размер текста */
    background-color: #007bff; /* можно под цвет сайта */
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.7s;
}

.hero-overlay .btn:hover {
    background-color: #0056b3; /* цвет при наведении */
}


/* это слайдер, текст и кнопка в слайдере для мобильной версии */

@media (max-width: 768px) {
	
	
	/* это сам слайдер в мобильной версии */
.hero {
    position: relative;
    width: 100%; /* можно регулировать ширину */
    height: 250px; /* можно регулировать высоту */
	max-height: none;    /* отключаем max-height чтобы не мешал */
    overflow: hidden;
	margin-top: 0px;  /* делает отступ слайдера от верхней панели МЕНЮ */
}
	
	/* это параметры картинки в слайдере в мобильной версии */
.hero-image img {
    height: 100%;       /* картинка растягивается по высоте блока */
    width: 100%;
    object-fit: cover;  /* не даст картинке деформироваться */
}
	
	
	/* это в слайдере кнопка и текст в моб.версии */
    .hero-overlay {
        top: 10px;   /* отступ сверху внутри слайдера */
		bottom: 30px;      /* расположение выше-ниже, отступ то нижнего края слайдера */
        left: 20px;        /* сдвиг влево-вправо */
        right: 10px;       /* чтобы текст и кнопка не уходили за экран */
        
        max-width: 200px;    /* регулируемое ограничение блока текста */
        padding-right: 20px; /* чтобы текст не прилипал к краю */
        text-align: left;
        overflow-wrap: break-word; /* перенос слов */
        word-wrap: break-word;     /* перенос длинных слов */
        hyphens: auto;             /* автоматические переносы */
		z-index: 10;
		
        font-size: 14px;
        position: absolute; /* обязательно, чтобы overlay был над картинкой */
		padding: 0 10px;
    }
	
	  .hero-overlay h1 {
        font-size: 1.6rem;     /* шрифт главного текста слайдера */
        line-height: 1.2;
        margin-bottom: 8px;   /* пространства между строками внизу текста */
    }

    .hero-overlay p {
        font-size: 0.8rem;       /* шрифт вспомогательного текста */
         line-height: 1.35;
		margin-bottom: 20px;     /* пространства между строками внизу текста */
    }

    .hero-overlay .btn {
        display: inline-block;  /* кнопка видна */
        width: auto;            /* не растягивается */
        font-size: 14px;        /* можно подогнать размер текста кнопки */
        padding: 10px 30px;      /* размер кнопки под мобильный экран */
		border-radius: 6px;
		z-index: 20;
    }
}
}

/* Стили для логотипа */
.logo {
    text-decoration: none !important; /* убрать подчеркивание */
    color: #1a1a1a;                   /* сделаем тёмно-серый */
    display: flex;
    align-items: center;
}

/* Если нужно изменить цвет текста логотипа */
.logo-text {
    color: #1a1a1a; /* можно поставить свой цвет, например #000 или #0048ff */
    font-weight: 600;
    text-decoration: none;
}

/* Чтобы не было синего при наведении */
.logo:hover,
.logo:focus {
    text-decoration: none !important;
    color: #1a1a1a;
}


/* ✔ Починка цвета и подчёркивания логотипа */
.main-header .logo,
.main-header .logo:link,
.main-header .logo:visited {
    text-decoration: none !important;
    color: #000 !important; /* сделай любой цвет */
}

/* ✔ Цвет и стиль текста внутри логотипа */
.main-header .logo-text {
    text-decoration: none !important;
    color: #000 !important;
    font-weight: 600;
}

/* ✔ При наведении — без изменений */
.main-header .logo:hover,
.main-header .logo-text:hover {
    text-decoration: none !important;
    color: #000 !important;
}

/* Убираем подчёркивание и цвет у ссылки логотипа */
#mainLogo,
#mainLogo:link,
#mainLogo:visited,
#mainLogo:hover,
#mainLogo:focus {
    color: #000 !important;
    text-decoration: none !important;
}

/* Цвет текста рядом с логотипом */
#mainLogoText {
    color: #000 !important;
    text-decoration: none !important;
}

/* ============================
   ДЕСКТОПНАЯ ВЕРСИЯ ФИЛЬТРОВ ПРОЕКТОВ
   ============================ */

.section-head {
    display: block;  /* вместо flex */
    width: 100%;
    margin-bottom: 20px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
}
.projects-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.filters-toggle {
    display: none;  /* скрыта на десктопе */
}

.filters-panel {
    display: flex; /* десктоп — фильтры всегда видны */
}

/* ============================
   МОБИЛЬНАЯ ВЕРСИЯ ФИЛЬТРОВ ПРОЕКТОВ
   ============================ */
@media (max-width: 768px) {

  /* Контейнер фильтров */
 .filters {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  width: 100%;
  justify-content: flex-start; /* чтобы фильтры не «слипались» к правому краю */
  box-sizing: border-box;
  gap: 10px;
  align-items: center;
}

/* Кнопка в мобильной версии */
.filters-toggle {
  display: block;
  padding: 10px 15px;
  background: #007bff;
  color: white;
  border: none;
  width: 100%;
  border-radius: 6px;
  font-size: 16px;
}

/* Панель фильтров */
.filters-panel {
  display: none; /* по умолчанию скрыто */
  flex-wrap: wrap;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  gap: 10px;
}
	 .filters-panel.open {
    display: flex;
  }
	.section-head {
    display: block;
	flex-direction: column; /* вместо row */
    gap: 12px;              /* расстояние между заголовком и фильтрами */
    width: 100%;
    margin-bottom: 20px;
}
	
	.projects-grid {
        grid-template-columns: 1fr; /* ✔ Правильно */
        gap: 15px;
    }

	
	/* Кнопка "ПОДРОБНЕЕ" на мини-проектах */
.card .details-btn { display: inline-block; padding: 8px 14px; background: #f0f0f0; /* светло-серый фон */ color: #333; text-decoration: none; border-radius: 6px; transition: 0.3s; font-weight: 600; text-align: center; }

	
	/* Hover только для десктопа */
@media (min-width: 769px) {
  .card .details-btn:hover {
    background: #2d89ef; /* синий при наведении */
    color: white;
  }
}