/* Events/Exhibitions Page Styles */

.events_wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.events_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.events_header h1 {
    font-size: 32px;
    font-weight: bold;
    color: #222;
    margin: 0;
}

.btn_write {
    display: inline-block;
    padding: 12px 30px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn_write:hover {
    background: #333;
    transform: translateY(-2px);
}

/* Grid Layout */
.events_grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.event_card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.event_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card_link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card_thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%;
    /* 3:2 ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.card_thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status_badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.status_badge.ongoing {
    background: #4CAF50;
    color: white;
}

.status_badge.ended {
    background: #999;
    color: white;
}

.card_info {
    padding: 20px;
    background: white;
}

.card_title {
    font-size: 16px;
    font-weight: bold;
    color: #222;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card_date {
    font-size: 13px;
    color: #999;
    margin: 5px 0;
}

.card_end {
    font-size: 12px;
    color: #666;
    margin: 5px 0 0 0;
}

.no_events {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 0;
    color: #999;
    font-size: 16px;
}

/* Pagination */
.events_pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
}

.events_pagination a,
.events_pagination strong {
    display: inline-block;
    min-width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
}

.events_pagination a:hover {
    background: #f5f5f5;
    border-color: #999;
}

.events_pagination .page_current {
    background: #000;
    color: #fff;
    border-color: #000;
    font-weight: bold;
}

.events_pagination .page_btn {
    font-size: 18px;
    font-weight: bold;
}

/* View Mode */
.event_view {
    max-width: 900px;
    margin: 0 auto;
}

.view_header {
    padding: 30px 0;
    border-bottom: 2px solid #222;
    margin-bottom: 30px;
}

.view_header h1 {
    font-size: 28px;
    font-weight: bold;
    color: #222;
    margin: 0 0 15px 0;
}

.view_meta {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.view_meta .date {
    color: #999;
}

.view_meta .end_date {
    color: #666;
    font-weight: 500;
}

.view_content {
    padding: 40px 0;
    line-height: 1.8;
    font-size: 15px;
    color: #333;
    min-height: 300px;
}

.view_content img {
    max-width: 100%;
    height: auto;
}

.view_files {
    margin-top: 40px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.view_files h4 {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
}

.view_files ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.view_files li {
    margin-bottom: 8px;
}

.view_files a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.view_files a:hover {
    text-decoration: underline;
    color: #000;
}

.view_files .size {
    color: #999;
    font-size: 13px;
    margin-left: 5px;
}

.view_actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.view_actions a {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn_list {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.btn_list:hover {
    background: #f5f5f5;
    border-color: #999;
}

.btn_edit {
    background: #000;
    color: #fff;
    border: 1px solid #000;
}

.btn_edit:hover {
    background: #333;
}

.btn_delete {
    background: #dc3545;
    color: #fff;
    border: 1px solid #dc3545;
}

.btn_delete:hover {
    background: #c82333;
}

/* Write Mode */
.event_write {
    max-width: 900px;
    margin: 0 auto;
}

.event_write h2 {
    font-size: 24px;
    font-weight: bold;
    color: #222;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #222;
}

.form_group {
    margin-bottom: 25px;
}

.form_group label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form_group .required {
    color: #dc3545;
}

.form_group input[type="text"],
.form_group input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}

.form_group input[type="text"]:focus,
.form_group input[type="date"]:focus {
    outline: none;
    border-color: #000;
}

.form_group input[type="file"] {
    display: block;
    padding: 10px 0;
}

#file_upload_status {
    margin-top: 10px;
    font-size: 13px;
}

.editor_wrap {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1px;
    background: #fff;
}

.help_text {
    font-size: 13px;
    color: #888;
    margin-top: 8px;
    padding-left: 2px;
}

.form_actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.btn_submit {
    padding: 14px 40px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn_submit:hover {
    background: #333;
}

.btn_cancel {
    padding: 14px 40px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn_cancel:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Access Denied */
.access_denied {
    text-align: center;
    padding: 100px 20px;
}

.access_denied h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.access_denied p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.btn_back {
    display: inline-block;
    padding: 12px 30px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 1200px) {
    .events_grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 900px) {
    .events_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .events_header h1 {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .events_grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .events_header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .btn_write {
        width: 100%;
        text-align: center;
    }

    .view_actions {
        flex-direction: column;
    }

    .view_actions a {
        width: 100%;
        text-align: center;
    }
}