/* Общие стили для тела страницы */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

/* Стили для формы регистрации */
.container {
    background-color: #fff;
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    margin: 40px auto;
}

.container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="datetime-local"],
input[type="file"],
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.consent-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.consent-container input[type="checkbox"] {
    margin-right: 10px;
}

button[type="submit"] {
    width: 100%;
    background-color: #007bff;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #0056b3;
}

/* Стили для страницы мероприятий (НОВЫЙ МАКЕТ) */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.event-card {
    display: flex;
    align-items: flex-start;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-image-container {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    margin-right: 20px;
}

.event-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.event-right-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-details {
    flex-grow: 1;
}

.event-details h2 {
    color: #007bff;
    margin-top: 0;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.event-details p {
    margin: 5px 0;
}

.event-details strong {
    color: #555;
}

.event-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    margin-top: auto;
}

.details-button,
.registration-button,
.registration-status {
    text-decoration: none;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.details-button {
    background-color: #007bff;
}

.details-button:hover {
    background-color: #0056b3;
}

.registration-button {
    background-color: #28a745;
}

.registration-button:hover {
    background-color: #218838;
}

.registration-status {
    background-color: #dc3545;
}

/* --- Стили для страницы event_details.php --- */

.details-container {
    max-width: 900px;
    margin: 40px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.event-hero {
    position: relative;
    height: 300px; /* Высота блока с фото */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.event-title-overlay {
    font-size: 2.5em;
    margin: 0;
    padding-bottom: 20px;
    text-align: center;
}

.event-content {
    padding: 20px;
}

.event-description {
    margin-bottom: 20px;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.event-meta p {
    margin: 0;
    flex: 1 1 200px;
}

.event-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.event-link-button,
.registration-button,
.registration-status {
    text-decoration: none;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.event-link-button {
    background-color: #007bff;
}

.registration-button {
    background-color: #28a745;
}

.registration-status.registration-closed {
    background-color: #dc3545;
}
/* Стили для форматированного текста в описании */
.event-description p {
    margin-bottom: 1em;
}

.event-description ul,
.event-description ol {
    margin-bottom: 1em;
    padding-left: 20px;
}

.event-description li {
    margin-bottom: 0.5em;
}

.event-description strong,
.event-description b {
    font-weight: bold;
}

.event-description em,
.event-description i {
    font-style: italic;
}
/* Основной контейнер */
/* --- Стили для админ-панели --- */

/* Общий контейнер */
.admin-container {
    max-width: 100%;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.admin-container h2 {
    color: #007bff;
    text-align: center;
    margin-bottom: 20px;
}

/* Таблица с мероприятиями */
.event-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.event-table th,
.event-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.event-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
}

.event-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.event-table tr:hover {
    background-color: #f1f1f1;
}

/* Группа кнопок */
.button-group {
    display: flex;
    gap: 10px;
}

/* Стили кнопок */
.button-add,
.button-edit,
.button-delete,
.button-logout {
    text-decoration: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease;
}

.button-add {
    background-color: #28a745;
    margin-bottom: 20px;
}

.button-edit {
    background-color: #ffc107;
}

.button-delete {
    background-color: #dc3545;
}

.button-logout {
    background-color: #6c757d;
}

.button-add:hover { background-color: #218838; }
.button-edit:hover { background-color: #e0a800; }
.button-delete:hover { background-color: #c82333; }
.button-logout:hover { background-color: #5a6268; }

.button-view {
    background-color: #007bff; /* Цвет для кнопки "Участники" */
    text-decoration: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease;
}

.button-view:hover {
    background-color: #0056b3;
}
/* Стили для текущего изображения в форме редактирования */
.current-event-image {
    max-width: 250px; /* Увеличим или уменьшим ширину по вашему желанию */
    height: auto; /* Сохраняем пропорции */
    border: 1px solid #ddd; /* Добавляем тонкую рамку */
    border-radius: 8px; /* Немного скругляем углы */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Легкая тень */
    margin-top: 10px; /* Отступ сверху */
    margin-bottom: 20px; /* Отступ снизу */
    display: block; /* Чтобы изображение занимало всю ширину контейнера и не "плавало" */
}

/* Дополнительно, можно стилизовать текст "Текущее изображение:" */
.admin-form p { /* Или создайте отдельный класс, если есть другие <p> */
    margin-bottom: 5px;
    font-weight: bold;
    color: #495057;
}
/* --- Styles for the events page header --- */

/* --- Styles for the events page header --- */

.page-header {
    max-width: 1100px;
    margin: 0 auto 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.header-content-wrapper {
    display: flex; /* Makes the wrapper a flex container */
    align-items: center; /* Vertically aligns items to the center */
    gap: 20px; /* Adds space between the logo and the text */
    margin-bottom: 20px;
}

.main-logo-inline {
    max-width: 300px; /* Adjust the logo size as needed */
    height: auto;
    flex-shrink: 0; /* Prevents the logo from shrinking */
}

.header-text {
    text-align: left; /* Aligns the text to the left */
}

.header-text h1 {
    font-size: 1.8em;
    color: #007bff;
    margin: 0;
}

.header-text p {
    font-style: italic;
    color: #555;
    margin: 5px 0 0 0; /* Adjust margin to reduce space between title and text */
}

.page-header ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.page-header li a {
    text-decoration: none;
    font-weight: bold;
    color: #007bff;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.page-header li a:hover {
    border-bottom-color: #007bff;
}
/* --- Стили для страницы входа (admin_login.php) --- */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Занимает всю высоту экрана */
    background-color: #f0f2f5;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-box h2 {
    color: #333;
    margin-bottom: 25px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box; /* Учитывает padding и border в общей ширине */
    font-size: 16px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-box button:hover {
    background-color: #0056b3;
}

.login-box .error-message {
    color: #dc3545;
    margin-top: 15px;
    font-weight: bold;
}