body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('images/7.jpg');
    background-size: cover;
    background-position: right center;
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-theme {
    background-image: url('images/6.jpg');
    color: #eee;
    background-position: center;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}
/*шапка сайта*/
header {
    background-color: #3498db;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

header.dark-theme {
    background-color: #222;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    transition: color 0.3s;
    cursor: default;
}

.logo span {
    font-weight: 300;
}

.logo.dark-theme {
    color: #ffc107;
}

nav {
    display: flex;
    justify-content: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 20px;
    font-size: 18px;
    transition: color 0.3s, background-color 0.3s;
    padding: 10px 15px;
    border-radius: 25px;
    border: 2px solid transparent;
}

nav a.dark-theme {
    color: #eee;
}

nav a:hover,
nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #e0f7fa;
    border-color: #e0f7fa;
}

nav a.dark-theme:hover,
nav a.dark-theme.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e0f7fa;
    border-color: #e0f7fa;
}
/*основной  контент*/
main {
    padding: 20px;
    margin: 20px auto;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-grow: 1;
    transition: background-color 0.3s;
}

main.dark-theme {
    background-color: rgba(0, 0, 0, 0.8);
}
/*Стили секций*/
section {
    padding: 20px;
    display: none;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

section.active {
    display: block;
}

section.dark-theme {
    background-color: rgba(0, 0, 0, 0.7) !important;
    color: #eee;
}
/*Заголовки*/
h1,
h2 {
    color: #3498db;
    text-align: center;
    margin-bottom: 20px;
    transition: color 0.3s;
}

h1.dark-theme,
h2.dark-theme {
    color: #ffc107;
}

/* Главный слайдер*/
#home .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.main-slider {
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.main-slider .slider-item {
    flex: 0 0 100%;
    transition: transform 0.5s ease;
    display: none;
    text-align: center;
}

.main-slider .slider-item.active {
    display: block;
}

.slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.main-slider img {
    width: 100%;
    height: 700px;
    border-radius: 5px;
    object-fit: cover;
    margin-bottom: 10px;
    max-width: 100%;
    height: auto;
    display: block;
}

.slide-info {
    width: 100%;
    padding: 10px 0;
    text-align: center;
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    outline: none;
}

.slider-button:hover {
    background-color: rgba(0, 0, 0, 0.5)
}

.slider-button.prev {
    left: 10px;
}

.slider-button.next {
    right: 10px;
}

/* Новости */
.news-block {
    width: 100%;
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.news-block.dark-theme {
    background-color: #333;
}

.news-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    transition: border-color 0.3s;
}

.news-item.dark-theme {
    border-bottom: 1px solid #555;
}

.news-item:last-child {
    border-bottom: none;
}
/*Заголовок*/
.news-item h3 {
    font-size: 1.2em;
    color: #3498db;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.news-item h3.dark-theme {
    color: #ffc107;
}

.news-item p {
    font-size: 0.9em;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.news-item p.dark-theme {
    color: #eee;
}

.news-date {
    font-size: 0.8em;
    color: #888;
    transition: color 0.3s;
}

.news-date.dark-theme {
    color: #eee;
}

/* Форма подписки */
.subscribe-form-container {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.subscribe-form-container p {
    margin-bottom: 10px;
    transition: color 0.3s;
}

.subscribe-form-container p.dark-theme {
    color: #eee;
}

.subscribe-form-container form {
    display: flex;
    flex-direction: row;
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form-container input[type="email"] {
    margin-right: 10px;
    flex-grow: 1;
}

/* Календарь */
.calendar-container {
    position: relative;
    margin-bottom: 20px;
    max-width: 100%;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.calendar {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 10px;
    font-size: 1.1em;
    padding: 20px;
    box-sizing: border-box;
    transition: background-color 0.3s;
}

.calendar.dark-theme {
    background-color: #333;
    border: 1px solid #555;
}
/*Ячейки таблицы*/
.calendar th {
    background-color: #f0f0f0;
    color: #555;
    font-weight: bold;
    font-size: 1.2em;
}

.calendar td {
    padding: 16px;
    text-align: center;
    border: 1px solid #ddd;
    transition: background-color 0.3s, color 0.3s;
    font-size: 1.1em;
}

.calendar th.dark-theme {
    background-color: #444;
    color: #eee;
}

.calendar td.dark-theme {
    border: 1px solid #555;
}

.calendar td {
    cursor: pointer;
    background-color: #fff;
    transition: background-color 0.3s;
}

.calendar td.dark-theme {
    background-color: #333;
    color: #eee;
}

.calendar td:hover {
    background-color: #f0f0f0;
    transition: background-color 0.3s;
}

.calendar td.dark-theme:hover {
    background-color: #444;
}

.calendar td.event-day {
    background-color: #fff;
    transition: background-color 0.3s;
}

.calendar td.upcoming-event {
    background-color: hsl(34, 85%, 60%);
    font-weight: bold;
}

.calendar td.upcoming-event.dark-theme {
    background-color: hsl(34, 85%, 60%);
    color: #333;
    
}

.calendar td.current-week-event {
    background-color: #4dee52;
    font-weight: bold;
    transition: background-color 0.3s;
}

.calendar td.current-week-event.dark-theme {
    background-color: #4dee52;
    color: #333;
}

.calendar td.past-event {
    background-color: #f79393ef;
    transition: background-color 0.3s;
}

.calendar td.past-event.dark-theme {
    background-color: #f79393ef;
    color: #eee;
}

.calendar td.current-day-event {
    background-color: #888;
    color: #fff;
    transition: background-color 0.3s;
}

.calendar td.current-day-event.dark-theme {
    background-color: #aaa;
    color: #333;
}
/*Навигация календаря*/
.calendar-navigation {
    margin-top: 10px;
    text-align: center;
}

.calendar-navigation button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 25px;
    margin: 0 5px;
    outline: none;
    transition: background-color 0.3s;
}

.calendar-navigation button:hover {
    background-color: #2980b9;
}

.calendar td.other-month-day {
    color: #aaa;
    background-color: #f0f0f0;
    transition: background-color 0.3s, color 0.3s;
   }
.calendar td.other-month-day.dark-theme {
    color: #555;
   background-color: #222;
   }

.calendar td.sunday {
    color: #e41e32; 
    transition: color 0.3s;
}
.calendar td.sunday.dark-theme {
  color: #e41e32;
}

.calendar th:nth-child(7) {
    color: #e41e32; /* Красный цвет текста для "Вс" */
}

.calendar th:nth-child(7).dark-theme {
    color: #e41e32;
}
/*Стили модального окна*/
.event-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.event-popup-content {
     background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    text-align: left;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, color 0.3s;
}

.event-popup-content.dark-theme {
    background-color: #333;
    color: #eee;
}

.event-popup-content .close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

/* Формы */
form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 0 auto;
}

form input, /*полей ввода*/
form textarea,/*текстовых областей*/
form select { /*выпадающих списков*/
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

form input.dark-theme,
form textarea.dark-theme,
form select.dark-theme {
    background-color: #444;
    color: #eee;
    border: 1px solid #555;
}

form input:focus,
form textarea:focus,
form select:focus {
    border-color: #3498db;
}

form button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 4px;
    outline: none;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #2980b9;
}

form button.dark-theme {
    background-color: #333;
    color: #eee;
}

form button.dark-theme:hover {
    background-color: #222;
}

footer {
    background-color: #3498db;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

footer.dark-theme {
    background-color: #222;
}

a.button,
.popup-register-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s;
}

.popup-register-button.registered {
    background-color: #95a5a6;
    cursor: not-allowed;
}

a.button.dark-theme,
.popup-register-button.dark-theme {
    background-color: #333;
    color: #eee;
}

a.button:hover,
.popup-register-button:hover {
    background-color: #2980b9;
}

a.button.dark-theme:hover,
.popup-register-button.dark-theme:hover {
    background-color: #222;
}

.cancel-event-button {
    background-color: #e74c3c; 
    color: white;
    border: none;
    padding: 12px 20px; 
    cursor: pointer;
    border-radius: 4px;
    margin-top: 10px;
    margin-left: 10px; 
    transition: background-color 0.3s;
    display: inline-block;
    text-decoration: none; 
    font-size: 1em; 
}

.cancel-event-button:hover {
    background-color: #c0392b; /* Более темный красный */
}
/*Стили слайдера:*/
.slide-info h3 {
    margin-bottom: 10px;
    color: #3498db;
    font-size: 1.5em;
    transition: color 0.3s;
}

.slide-info h3.dark-theme {
    color: #ffc107;
}

.slide-info p {
    margin-bottom: 10px;
    transition: color 0.3s;
}

.slide-info p.dark-theme {
    color: #eee;
}

.slide-info a {
    margin-top: 10px;
}
/*Стили описаний события*/
.event-details {
    text-align: center;
}

.event-details p {
    margin-bottom: 15px;
    font-size: 1.2em;
    transition: color 0.3s;
}

.event-details p.dark-theme {
    color: #eee;
}

.event-details button {
    margin-top: 20px;
    font-size: 1.1em;
}

#registration-form {
    text-align: center;
}

#registered-events-list ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

#registered-events-list li {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
    text-align: left;
    transition: background-color 0.3s, color 0.3s;
}

#registered-events-list li.dark-theme {
    background-color: #333;
    color: #eee;
}

.current-events-block {
    width: 100%;
    margin-bottom: 20px;
    padding: 15px;
}

.current-events-block h2 {
    text-align: left;
    transition: color 0.3s;
}

.current-events-block h2.dark-theme {
    color: #ffc107;
}

.current-events-block ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.current-events-block li {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
    text-align: left;
    transition: background-color 0.3s, color 0.3s;
    color: #333;
}

.current-events-block li.dark-theme {
    background-color: #333;
    color: #eee;
}

#registered-events-list ul li {
   transition: background-color 0.3s, color 0.3s;
    background: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
    text-align: left;
    color: #333;
}

#registered-events-list ul li.dark-theme {
    background-color: #333;
    color: #eee;
}

/*Стили кнопки переключения темы*/
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #fff;
    transition: color 0.3s;
}

#theme-toggle.dark-theme {
    color: #eee;
}

@media (max-width: 767px) {
    .container {
        padding: 0 10px;
    }

    header .container {
        flex-direction: column;
        align-items: center;
    }

    .logo {
        margin-bottom: 10px;
    }

    nav {
        flex-direction: column;
        text-align: center;
    }

    nav a {
        margin: 5px 0;
        display: block;
    }

     .main-slider img {
       height: 300px;
    }
    .main-slider .slide-info h3 {
        font-size: 1.2em;
    }
    .modal-content{
    width: 90%;
    margin: 10% auto;
    }
}

/* Для планшетов (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
        .main-slider img {
       height: 500px;
    }
}

/* Для больших экранов (>= 992px) */
@media (min-width: 992px) {
    nav {
        flex-direction: row;
    }
}

.social-links {
    text-align: center;
    margin-top: 20px;
}

.social-links p {
    margin-bottom: 10px;
    transition: color 0.3s;
}

.social-links p.dark-theme {
    color: #eee;
}

.social-icon {
    display: inline-block;
    margin: 0 10px;
    font-size: 30px;
    color: #3498db;
    transition: color 0.3s;
}

.social-icon:hover {
    color: #2980b9;
}

.social-icon.dark-theme {
    color: #ffc107;
}

.social-icon.dark-theme:hover {
    color: #d49f04;
}

#contacts p {
    transition: color 0.3s;
}
#contacts.dark-theme p {
    color: #eee;
}

#contacts a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

#contacts.dark-theme a {
    color: #ffc107;
}

#contacts a:hover {
    color: #2980b9;
}

#contacts.dark-theme a:hover {
    color: #d49f04;
}