@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;700&family=Inconsolata:wght@400&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
}

h1 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 66px;
    color: #FFFAFA;
}

h2 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #FFFAFA;
}

h3 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #FFFAFA;
}

p {
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: 16px;
    color: #FFFAFA;
}

.wrapper {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 8px;
    background-color: #000000;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    background-color: #000000;
}

header {
    position: relative;
    width: 100%;
    z-index: 1000;
    background-color: #000000;
}

header.fixed {
    position: fixed;
    top: 0;
    left: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

main {
    padding-top: 180px;
}

@media (max-width: 1310px) {
    main {
        padding-top: 100px;
    }
}

.menu {
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    min-height: 94px;
}

.center-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.logo-head {
    order: 0;
    flex-shrink: 0;
}

.logo-head img {
    height: 94px;
    width: 118px;
    transition: transform 0.6s ease;
}

.logo-head:hover img {
    transform: scale(1.3);
}

.menu-list {
    list-style: none;
    display: flex;
    transition: transform 0.3s ease, opacity 0.3s ease;
    order: 1;
    justify-content: flex-end;
    margin: 0 20px;
}

.menu-list li {
    margin-left: 25px;
}

.menu-list li:first-child {
    margin-left: 0;
}

.menu-list a {
    font-family: 'Exo 2', sans-serif;
    font-weight: 300;
    font-size: 24px;
    color: #FFFAFA;
    text-decoration: none;
    transition: color 0.4s, transform 0.4s;
    padding-bottom: 5px;
}

.menu-list a:hover {
    color: #ADFF2F;
}

.menu-list .button {
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.menu-list .button:hover {
    background-color: #ADFF2F;
    color: #000000;
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 36px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    order: -1;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.3s ease;
}

.burger-menu:hover {
    transform: scale(1.1);
}

.burger-menu:hover span {
    background: #ADFF2F;
}

.burger-menu span {
    width: 100%;
    height: 4px;
    background: #FFFAFA;
    border-radius: 2px;
    transition: all 0.4s ease;
    box-shadow: 0 0 4px rgba(173, 255, 47, 0.3);
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #111;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    min-width: 200px;
    border-radius: 4px;
}

.dropdown a {
    color: #FFFAFA;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 20px;
}

.dropdown a:hover {
    color: #ADFF2F;
    background-color: #222;
}

.menu-item {
    position: relative;
}

.show {
    display: block;
    visibility: visible;
    opacity: 1;
}

.linkvk {
    order: 2;
    flex-shrink: 0;
}

.linkvk a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: none; /* Убрали зелёный фон */
    transition: transform 0.3s ease; /* Оставили только анимацию масштабирования */
}

.linkvk a:hover {
    background: none; /* Убрали фон при наведении */
    transform: scale(1.1);
}

.vk-icon {
    display: none; /* Убрали, так как используется изображение, а не SVG-иконка */
}

.intro video {
    display: block;
    width: 100%;
    max-width: 1080px;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

@supports not (mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%)) {
    .intro video {
        border: 2px solid #333;
    }
}

.afisha hr,
.looks hr,
.info hr,
.photos hr,
.videos hr,
.teams hr,
.contacts hr,
.footer hr {
    border-color: #d3d604;
    margin: 32px 0;
}

.afisha h1,
.looks h1,
.photos h1,
.info h1,
.videos h1,
.teams h1,
.contactdata h1 {
    text-align: center;
    margin: 30px;
}

.calendar {
    width: 320px;
    background: #222;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    margin: 30px auto;
    color: #FFFAFA;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    margin-bottom: 10px;
    white-space: nowrap;
}

.calendar-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #ADFF2F;
}

.weekdays,
.dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.weekdays span {
    font-weight: bold;
    color: #FFFAFA;
}

.dates span {
    display: block;
    padding: 8px;
    background: #333;
    border-radius: 5px;
    cursor: pointer;
    color: #FFFAFA;
}

.dates span:hover,
.dates span:focus {
    background: #444;
}

.dates .today {
    border: 2px solid #ADFF2F;
    background: #333;
}

.dates .busy {
    background: linear-gradient(45deg, #ADFF2F, #8BCB00);
    color: #000;
    font-weight: bold;
}

.dates .busy:hover,
.dates .busy:focus {
    background: linear-gradient(45deg, #8BCB00, #ADFF2F);
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    max-width: 90%;
    padding: 20px;
    background: #111;
    color: #FFFAFA;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    border: 2px solid #ADFF2F;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1002;
    animation: pulse 0.5s ease-in-out;
}

.popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.9); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

#closePopup {
    background: #ADFF2F;
    border: none;
    color: #000;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    float: right;
    transition: background-color 0.3s ease;
}

#closePopup:hover {
    background: #8BCB00;
}

#eventText {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
}

#eventText h4 {
    font-family: 'Exo 2', sans-serif;
    font-size: 18px;
    margin: 10px 0;
    color: #ADFF2F;
}

#eventText ul {
    list-style: none;
    padding: 0;
}

#eventText ul li {
    margin: 5px 0;
    font-family: 'Inconsolata', monospace;
}

.event-icon {
    font-size: 24px;
    margin-right: 10px;
}

.info-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.info-block img {
    width: 417px;
    height: 583px;
    object-fit: cover;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.info-block-text h3 {
    text-align: center;
}

.info-block-text p {
    text-align: center;
    padding: 20px;
}

.looks-photo {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 20px; /* Добавили gap для равномерных отступов */
}

.photo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.photo-item img {
    width: 300px;
    height: auto; /* Убрали фиксированную высоту, чтобы сохранить пропорции 1:1 */
    object-fit: cover;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.photo-item img:hover {
    transform: scale(1.1);
}

.photo-caption {
    font-weight: 400;
    font-size: 16px;
    color: #FFFAFA;
    text-align: center;
    margin-top: 10px;
    max-width: 300px;
}

.photos-lent {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.photos-lent img {
    width: 100%;
    height: auto; /* Сохраняем пропорции 1:1 */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.photos-lent img:hover {
    transform: scale(1.1);
}

.video-lent {
    display: flex;
    justify-content: center;
    margin: 120px auto;
}

.video-lent video {
    width: 100%;
    max-width: 960px;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.video-lent video:hover {
    transform: scale(1.02);
}

.teamsimgtext {
    display: flex;
    align-items: center;
    flex-direction: column;
    margin: 20px 0;
}

.teams img {
    width: 100%;
    max-width: 550px;
    height: auto; /* Сохраняем пропорции */
    aspect-ratio: 27 / 20; /* Соотношение 5400:4000 */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.teams p {
    text-align: center;
    padding: 0 20px;
}

.contactdata {
    text-align: center;
}

.contactdata p,
.contactdata a {
    margin: 20px;
    font-size: 20px;
}

.footer {
    padding: 20px 0;
}

.about h2,
.about p {
    text-align: center;
    color: #FFFAFA;
    margin: 20px;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #ADFF2F;
    color: #000000;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.3s;
    display: none;
}

.scroll-to-top:hover {
    background-color: #8BCB00;
    transform: scale(1.1);
}

.element-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

.element-visible {
    opacity: 1;
    transform: translateY(0);
}

a:focus,
button:focus,
.dates span[role="button"]:focus {
    outline: 2px solid #ADFF2F;
    outline-offset: 2px;
}

/* Уменьшение размеров на ширине ≤1351px */
@media (max-width: 1351px) {
    .menu {
        padding: 15px 0;
        min-height: 80px;
    }
    .logo-head img {
        height: 80px;
        width: 100px;
    }
    .menu-list a {
        font-size: 20px;
    }
    .menu-list li {
        margin-left: 15px;
    }
    .linkvk a {
        width: 40px;
        height: 40px;
    }
}

/* Бургер-меню на ширине ≤1310px */
@media (max-width: 1310px) {
    h1 {
        font-size: 48px;
    }
    h2 {
        font-size: 24px;
        text-align: center;
    }
    .menu {
        justify-content: space-evenly;
        padding: 10px 0;
        flex-wrap: nowrap;
    }
    .menu-list {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        transform: translateX(-100%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .menu-list.show {
        transform: translateX(0);
        opacity: 1;
        display: flex; /* Оставляем display: flex для плавного закрытия */
    }
    .menu-list li {
        margin: 20px 0;
        animation: fadeIn 0.3s ease-in forwards;
    }
    .menu-list a {
        font-size: 1.8em;
    }
    .dropdown {
        position: relative;
        top: auto;
        left: auto;
        background: rgba(0, 0, 0, 0.7);
        text-align: center;
        width: 100%;
        box-shadow: none;
        opacity: 0;
        transform: translateY(-5px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    .dropdown.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    .dropdown a {
        font-size: 18px;
        padding: 8px 16px;
        border-bottom: 1px solid rgba(173, 255, 47, 0.2);
    }
    .dropdown a:last-child {
        border-bottom: none;
    }
    .dropdown a:hover {
        color: #ADFF2F;
        background: rgba(173, 255, 47, 0.1);
    }
    .burger-menu {
        display: flex;
    }
    .center-container {
        flex-grow: 1;
        justify-content: center;
    }
    .logo-head {
        text-align: center;
    }
    .linkvk {
        margin-left: 0;
    }
    .info-block {
        flex-direction: column;
    }
    .info-block img {
        width: 100%;
        max-width: 417px;
        height: auto;
    }
    .looks-photo {
        flex-wrap: wrap;
        justify-content: center;
    }
    .looks-photo .photo-item {
        width: calc(50% - 20px); /* 2 в ряд */
    }
    .looks-photo img {
        width: 100%;
        height: auto;
        padding: 15px;
    }
    .photos-lent {
        display: block;
        margin: 0 auto;
        max-width: 90%;
    }
    .photo-group {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
        gap: 10px;
    }
    .photo-group img {
        width: calc(45% - 5px);
        height: auto; /* Убрали max-height, чтобы сохранить пропорции 1:1 */
        object-fit: cover;
    }
    .calendar {
        width: 100%;
        max-width: 320px;
    }
    .calendar-header {
        font-size: 16px;
    }
    .dates span {
        padding: 6px;
        font-size: 14px;
    }
    .teams img {
        max-width: 400px;
        height: auto;
    }
    .teams p {
        padding: 0 10px;
    }
    .contactdata p,
    .contactdata a {
        font-size: 16px;
    }
    .popup {
        width: 90%;
    }
}

/* Медиа-запрос для .looks-photo на ширине ≤1225px */
@media (max-width: 1225px) {
    .looks-photo {
        justify-content: center;
    }
    .looks-photo .photo-item {
        width: calc(50% - 20px); /* 2 в ряд, учитывая gap */
    }
    .looks-photo img {
        width: 100%;
        height: auto;
        padding: 15px;
    }
}

/* Медиа-запрос для .looks-photo на ширине ≤925px */
@media (max-width: 925px) {
    .looks-photo .photo-item {
        width: calc(50% - 20px); /* Остаётся 2 в ряд */
    }
    .looks-photo img {
        width: 100%;
        height: auto;
        padding: 15px;
    }

     .popup {
        width: 280px; /* Уменьшаем ширину */
        padding: 15px;
    }
    #eventText {
        font-size: 14px;
    }
    #eventText h4 {
        font-size: 16px;
        margin: 8px 0;
    }
    #eventText ul li {
        margin: 4px 0;
    }
    #closePopup {
        font-size: 14px;
        padding: 4px 8px;
    }
    .event-icon {
        font-size: 20px;
        margin-right: 8px;
    }
}

/* Медиа-запрос для ширины ≤480px */
@media (max-width: 480px) {
    h1 {
        font-size: 36px;
    }
    h2 {
        font-size: 20px;
    }
    .looks-photo {
        flex-direction: column;
        align-items: center;
    }
    .looks-photo .photo-item {
        width: 100%; /* 1 в ряд */
        max-width: 300px; /* Ограничиваем максимальную ширину */
    }
    .looks-photo img {
        width: 100%;
        height: auto;
        padding: 10px;
    }
    .photos-lent {
        display: block;
    }
    .photo-group {
        flex-direction: column;
    }
    .photo-group img {
        width: 100%;
        margin-bottom: 10px;
    }
    .teams img {
        max-width: 350px; /* Увеличили размер для лучшей читаемости */
        height: auto;
    }
    .scroll-to-top {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .popup {
        width: 260px;
        padding: 12px;
    }
    #eventText {
        font-size: 13px;
    }
    #eventText h4 {
        font-size: 15px;
        margin: 6px 0;
    }
    #eventText ul li {
        margin: 3px 0;
    }
    #closePopup {
        font-size: 13px;
        padding: 3px 6px;
    }
    .event-icon {
        font-size: 18px;
        margin-right: 6px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}