/* Общи настройки */
body { font-family: 'Segoe UI', sans-serif; background-color: #efe5d8; margin: 0; color: #2c2c2c; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 10px; box-sizing: border-box; }

/* Header */
header { background: linear-gradient(0deg, #d97b2b, #d97b2b); color: white; padding-bottom: 0px; }
.header-top { display: flex; align-items: center; justify-content: flex-start; padding: 0px; }
.header-top .school-title { margin-left: 10px; }

/* Увеличен шрифт на името и слогана */
.school-title h1 { font-size: 28px; color: #7b0f12; margin: 0; }
.school-title h2 { font-size: 22px; color: #7b0f12; margin: 0; }
.school-title p { font-size: 16px; color: rgba(0,0,0,0.7); margin-top: 4px; }

/* Основно меню */
.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: space-evenly;
  background-color: #7b0f12;
  margin: 0;
  padding: 0;
}

.nav-item {
  flex: 1;
  text-align: center;
  position: relative;
}

.nav-item > a {
  display: block;
  padding: 12px 10px;
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.nav-item:hover { background-color: #b85a2a; }

/* Подменюта - вертикално, скрити по подразбиране */
.nav-item.has-sub .submenu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #7b0f12;
  z-index: 50;
}

/* Показване при hover */
.nav-item:hover > .submenu {
  display: flex;
}

.submenu li { width: 100%; }

.submenu a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.submenu a:hover { background-color: #d97b2b; }

/* Акцент блокове */
.horizontal-accents { display: flex; gap: 20px; flex-wrap: wrap; padding: 0 10px; margin-top: 10px;}
.accent-block { flex: 1 1 calc(25% - 15px); background: #f7efe8; text-align: center; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.accent-block img { width: 100%; height: auto; display: block;}
.accent-body { padding: 18px; }
.accent-body h2, .accent-body p { margin: 0; }
.accent-body h2 { color: #7b0f12; }
.accent-body p { color: #333; }

/* Линкове в акцент блоковете */
.accent-block a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease;
}
.accent-block a:hover { transform: scale(1.1); }

/* Footer */
footer { background-color: #7b0f12; color: white; margin: 10px 10px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 0px; }

/* Линкове във футър без подчертаване, с увеличаване при hover */
footer a {
  color: #f7efe8;
  text-decoration: none;
  transition: transform 0.2s ease;
}
footer a:hover { transform: scale(1.1); }

/* Бързи връзки: само Новини и Прием */
.footer-col ul { padding: 0; list-style: none; margin: 0; }
.footer-col ul li { display: none; }
.footer-col ul li:nth-child(1), 
.footer-col ul li:nth-child(2) { display: list-item; }

/* Responsive */
@media (max-width: 1024px) { .accent-block { flex: 1 1 calc(50% - 10px); } }
@media (max-width: 768px) {
  .header-top { flex-direction: column; text-align: center; }
  .main-nav ul { flex-wrap: wrap; }
  .slides img { width: 100%; height: auto;}
  .accent-block { flex: 1 1 100%; }
  .accent-body h2 { font-size: 18px; }
  .school-title h1 { font-size: 24px; }
  .school-title p { font-size: 16px; }
}

/* ================================= */
/* Галерия – full-width, responsive grid */
.gallery{
  width: 100%;            
  padding: 20px;          
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
  gap: 16px;
  box-sizing: border-box;
}

.gallery-item{
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn .6s forwards;
  transition: transform 0.3s;
}

/* Снимки в галерията */
.gallery-item img{
  width: 100%;
  aspect-ratio: 16/9;         
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.gallery-item:hover img{
  transform: scale(1.05);
}

/* Линкове в галерията – премахваме underline */
.gallery-item a {
  text-decoration: none !important;
  color: inherit;
  display: block;
}

.gallery-item .desc {
  text-decoration: none !important; /* сигурно премахва подчертавката */
  display: block;
  color: #7b0f12;
  padding: 8px 4px;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* Плавно появяване */
@keyframes fadeIn{
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive височина на снимките */
@media(max-width:1000px){
  .gallery-item img{height:200px;}
}

@media(max-width:700px){
  .gallery-item img{height:180px;}
}

@media(max-width:450px){
  .gallery-item img{height:150px;}
}