:root {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --card-bg: #2d2d2d;
    --hover-color: #404040;
    --border-color: #444444;
    --tab-active-bg: #3a3a3a;
    --tab-hover-border: #ffffff;
}
.light-theme {
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f5f5f5;
    --hover-color: #e0e0e0;
    --border-color: #dddddd;
    --tab-active-bg: #e0e0e0;
    --tab-hover-border: #333333;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}
.header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}
.theme-toggle:hover {
    background: var(--hover-color);
}

/* Стил за текста за проекта */
.project-description {
    max-width: 800px;
    margin: 20px auto;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
}
.read-more-link {
    color: #4d90fe;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 5px;
}
.read-more-link:hover {
    color: #8ab4f8;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}
.video-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}
.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.thumbnail {
    width: 100%;
    height: 169px;
    object-fit: cover;
    display: block;
}
.video-info {
    padding: 15px;
}
.video-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #888;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-content {
    width: 1200px;
    max-width: 95vw;
    max-height: 95vh;
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.modal-content-text {
    width: 800px;
    max-width: 95vw;
    max-height: 90vh;
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}
.modal-content-text .text-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: calc(90vh - 140px - 60px);
}
.modal-content-text h2 {
    text-align: center;
    margin-bottom: 15px;
}
.modal-content-text p {
    margin-bottom: 10px;
}
.modal-buttons {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px 20px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}
.text-modal-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}
.text-modal-btn:hover {
    background: var(--hover-color);
}
.text-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}
.video-frame {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
}
@media (max-width: 1250px) {
    .modal-content {
        width: 95vw;
    }
    .video-frame {
        aspect-ratio: 16/9;
        height: auto;
    }
}
@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    .video-frame {
        aspect-ratio: 16/9;
        height: auto;
    }
    .modal-content-text {
        width: 95vw;
    }
    .modal-content-text .text-content {
        padding: 15px;
        max-height: calc(90vh - 50px);
    }
}
@media (max-width: 480px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
    .video-frame {
        aspect-ratio: 16/9;
        height: auto;
    }
    .theme-toggle {
        position: static;
        margin: 10px auto;
        display: block;
    }
    .modal-content-text {
        width: 95vw;
        max-height: 85vh;
    }
    .modal-content-text .text-content {
        padding: 10px;
        max-height: calc(85vh - 40px);
    }
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .text-modal-btn {
        width: 100%;
    }
}

/* Поправка за мобилен пейзажен режим - fullscreen без черни ивици */
@media (orientation: landscape) and (max-width: 1024px) {
    .modal-content {
        width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        background: black;
    }
    .video-frame {
        width: 100%;
        height: 100%;
        object-fit: cover; /* запълва екрана, като изрязва излишното */
    }
}

.fb-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 8px;
}
.fb-buttons > div {
    filter: brightness(1.1);
    transform: scale(1);
    transition: transform 0.3s ease;
}
.fb-buttons > div:hover {
    transform: scale(1.05);
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0;
}

h1 {
    text-align: center;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}
.item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    text-decoration: none;
    color: #000;
    transition: transform 0.2s ease;
}
.item:hover {
    transform: scale(1.03);
}
.item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.item h3 {
    padding: 10px;
    text-align: center;
}
/* --- Меню --- */
.navbar {
    background: #222;
    padding: 10px 0;
    display: flex;
    justify-content: center;
}

.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navbar li {
    position: relative;
}

.navbar > ul > li {
    margin: 0 15px;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    display: block;
    transition: background 0.3s;
}

.navbar a:hover {
    background: #444;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #333;
    min-width: 200px;
    z-index: 999;
}

.dropdown li {
    border-bottom: 1px solid #444;
}

.dropdown a {
    padding: 10px 15px;
}

.navbar li:hover .dropdown {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-5px);}
    to {opacity: 1; transform: translateY(0);}
}

/* Основен стил за менюто */
.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.navbar > ul > li {
    display: inline-block; /* Само главните елементи са хоризонтални */
    position: relative;
}

.navbar ul li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #fff;
    background-color: #333;
}

.navbar ul li a:hover {
    background-color: #555;
}

/* Dropdown меню */
.navbar ul li ul.dropdown {
    display: none; /* Скрито по подразбиране */
    position: absolute;
    top: 100%; /* Появява се под главния линк */
    left: 0;
    background-color: #333;
    min-width: 200px; /* Може да се увеличи за дълги линкове */
    z-index: 1000;
    padding: 0;
}

/* Елементите в dropdown да са вертикални */
.navbar ul li ul.dropdown li {
    display: block;
}

.navbar ul li:hover ul.dropdown {
    display: block; /* Показване при hover */
}



.video-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

#prevVideoBtn {
    left: 15px;
}

#nextVideoBtn {
    right: 15px;
}

.video-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative; /* Необходимо за абсолютно позициониране на бутоните */
}

.gallery-group-title {
    grid-column: 1 / -1; /* заема всички колони */
    width: 100%;
    padding: 10px;
    margin: 20px 0 10px 0;
    background-color: #222;
    color: #fff;
    font-size: 1.4em;
    font-weight: bold;
    border-left: 5px solid #ff6600;
}


.video-title-sub {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    max-width: 90%;
	
}

/* Навбар контейнер */
.navbar {
  background: #222;
  padding: 10px 0;
}

/* Контейнерът на навигацията */
.navbar {
  background: #222;
  padding: 10px 0;
}

/* Главният списък */
.navbar > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center; /* центрира само главните <li> */
  gap: 20px;
}

/* Основните бутони */
.navbar > ul > li {
  position: relative;
}

.navbar > ul > li > a {
  display: block;
  padding: 10px 15px;
  color: white;
  text-decoration: none;
  background: #333;
  border-radius: 4px;
}

.navbar > ul > li > a:hover {
  background: #444;
}

/* Подменю (dropdown) */
.navbar .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;                /* пада точно под "Концерти ▼" */
  background: #333;
  min-width: 180px;
  z-index: 1000;
  padding: 0;
}

.navbar .dropdown li a {
  padding: 8px 12px;
  white-space: nowrap;
}

.navbar li:hover > .dropdown {
  display: block;
}

/* Главно меню центрирано */
.navbar > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center; /* центрира бутоните */
  gap: 20px;
}

/* Основни бутони */
.navbar > ul > li {
  position: relative;
}

.navbar > ul > li > a {
  display: block;
  padding: 10px 15px;
  color: #fff;
  text-decoration: none;
  background: #333;
  border-radius: 4px;
}

.navbar > ul > li > a:hover {
  background: #444;
}

/* Подменю */
.navbar .dropdown {
  display: none;              /* скрито по подразбиране */
  position: absolute;
  top: 100%;                  /* точно под главния бутон */
  left: 0;                    /* изравнено по ляво */
  background: #333;
  min-width: 180px;
  z-index: 1000;
  padding: 0;
  margin: 0;
  list-style: none;
}

.navbar .dropdown li a {
  display: block;
  padding: 8px 12px;
  color: #fff;
  text-decoration: none;
}

.navbar .dropdown li a:hover {
  background: #555;
}

/* Показване на падащото при hover */
.navbar li:hover > .dropdown {
  display: block;
}
