/* events.css - для event.html, event_create.html, eventGal.html */

/* ============================================
   СТРАНИЦА СПИСКА МЕРОПРИЯТИЙ (event.html)
   ============================================ */
.events-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-title-block {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-title-block h1 {
    font-size: 2.2rem;
    font-weight: 400;
    color: #7c5237;
}

/* Кнопка добавления */
.add-event-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 10px 24px;
    background: #2c2c2c;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.add-event-btn:hover {
    background: #1a1a1a;
    color: white;
}

/* ============================================
   ПАНЕЛЬ ФИЛЬТРОВ
   ============================================ */
.search-filter-panel {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 3rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 220px;
}

.search-input-wrapper {
    flex: 2;
}

.filter-group label {
    font-size: 1rem;
    font-weight: 600;
    color: #444;
}

.filter-group input,
.filter-group select {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    background-color: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.input-with-icon input {
    padding-left: 35px;
}

.clear-filters-btn {
    padding: 10px 20px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    color: #555;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 43px;
}

.clear-filters-btn:hover {
    background-color: #e2e2e2;
}

/* ============================================
   СЕТКА КАРТОЧЕК
   ============================================ */
.events-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 3rem;
}

.catalog-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.card-img {
    position: relative;
    height: 200px;
    background-color: #eee;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f0;
    color: #aaa;
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #7c5237;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-date {
    font-size: 1rem;
    color: #7c5237;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-content h3 {
    font-size: 1.5rem;
    color: #222;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-text {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-btn {
    text-align: center;
    text-decoration: none;
    background-color: #333;
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.card-btn:hover {
    background-color: #535353;
    color: #fff;
}

/* ============================================
   ФОРМА СОЗДАНИЯ (event_create.html)
   ============================================ */
.form-page {
    min-height: 100vh;
    background: #eeeeee;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
}

.form-container {
    max-width: 800px;
    width: 100%;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid #e8e8e8;
}

.form-container h1 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8e8e8;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #4a4a4a;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2c2c2c;
}

.form-textarea {
    resize: vertical;
}

.upload-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #9a9a9a;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ============================================
   ГАЛЕРЕЯ МЕРОПРИЯТИЯ (eventGal.html)
   ============================================ */
.gallery-page {
    min-height: 100vh;
    padding: 2rem;
}

.gallery-page .container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.gallery-page h1 {
    font-size: 2.2rem;
    font-weight: 300;
    color: #2c2c2c;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e8e8e8;
    letter-spacing: -0.3px;
}

.gallery-page .event-date {
    font-size: 0.9rem;
    font-weight: 400;
    color: #8a8a8a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-page .event-description {
    background: #f0f0f0;
    padding: 2rem 3rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.gallery-page .event-description p {
    color: #797979;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    background: #ffffff;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.gallery-item a {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.photo-caption {
    padding: 0.75rem;
    font-size: 0.8rem;
    font-weight: 400;
    color: #5a5a5a;
    text-align: center;
    background: #fafaf8;
    border-top: 1px solid #e8e8e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-photos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #9a9a9a;
    font-weight: 400;
    background: #fafaf8;
    border-radius: 12px;
    border: 1px dashed #d0d0d0;
}

/* ============================================
   АДАПТИВ
   ============================================ */
@media (max-width: 1000px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .gallery-page {
        padding: 1rem;
    }

    .gallery-page .container {
        padding: 1.5rem;
    }

    .gallery-page h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 700px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-page h1 {
        font-size: 1.5rem;
    }

    .gallery-page .event-description {
        padding: 1.2rem 1.5rem;
    }

    .events-catalog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .events-page-container {
        padding: 1rem;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .clear-filters-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-page h1 {
        font-size: 1.3rem;
    }

    .gallery-page .event-description {
        padding: 1rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .form-buttons {
        flex-direction: column;
    }

    .form-buttons button {
        width: 100%;
    }
}