/**
 * Event Gallery Styles - Minimal
 */

.event-gallery-container {
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 24px;
}

.gallery-header {
    text-align: center;
    margin-bottom: 42px;
}

.gallery-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.gallery-subtitle {
    font-size: 1.5rem;
    color: #666;
    margin: 0;
    line-height: 1.45;
}

.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* Selected Entries */
.selected-entries-section {
    margin-bottom: 80px;
    padding-bottom: 40px;
    border-bottom: 2px solid #e0e0e0;
}

.gallery-grid-selected {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

@media (min-width: 1200px) {
    .gallery-grid-selected {
        grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
        gap: 40px;
    }
}

.gallery-grid-selected .gallery-item-content {
    padding: 25px;
}

.gallery-grid-selected .gallery-item-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.gallery-grid-selected .gallery-item-award {
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 600;
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
}

/* Winners Section */
.winners-section {
    margin-bottom: 80px;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    background: #000;
    color: #fff;
    margin: 0 0 38px 0;
    padding: 5px 15px 10px;
    display: inline-block;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.topic-section {
    margin-bottom: 60px;
}

.topic-title {
    font-size: 1.75rem;
    font-weight: 600;
    background: #000;
    color: #fff;
    margin: 0 0 25px 0;
    padding: 5px 15px 10px;
    display: inline-block;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.entry-type-section {
    margin-bottom: 50px;
}

.entry-type-title {
    font-size: clamp(1.2rem, 1.5vw, 1.55rem);
    line-height: 1.35;
    font-weight: 600;
    color: #111;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    margin: 0 0 20px 0;
}

/* Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.gallery-modal-content {
    position: relative;
    background: #fff;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.gallery-modal-close {
    box-shadow: none;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: unset;
    color: #000000;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-modal-close:hover {
    background: unset;
    color: red;
}

.gallery-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.modal-gallery-section {
    background: #f5f5f5;
    padding: 30px;
}

.modal-main-image {
    width: 100%;
    margin-bottom: 20px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.modal-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    max-height: 150px;
    overflow-y: auto;
}

.modal-thumbnail {
    width: 80px;
    height: 80px;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modal-thumbnail:hover {
    border-color: #333;
}

.modal-thumbnail.active {
    border-color: #1a1a1a;
}

.modal-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details-section {
    padding: 40px;
    overflow-y: auto;
}

.modal-author-info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-author-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.modal-author-country {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

.modal-entry-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.modal-entry-award {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.modal-entry-description {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 30px;
    white-space: pre-wrap;
}

.modal-social-share {
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.social-share-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-share-btn svg {
    width: 18px;
    height: 18px;
}

.social-share-x:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.social-share-facebook:hover {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.social-share-linkedin:hover {
    background: #0a66c2;
    color: #fff;
    border-color: #0a66c2;
}

/* Professional Gallery Layout */
.win_gallery-category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 240px));
    justify-content: center;
    gap: 28px;
    align-items: start;
    width: 100%;
}

.win_gallery-category-list::after {
    display: none;
    content: none;
}

.gallery-item {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}

.gallery-item-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background: #f4f4f4;
}

.gallery-item-image-wrapper img,
img.gallery-item-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.gallery-item:hover .gallery-item-image-wrapper img,
.gallery-item:hover img.gallery-item-image {
    transform: scale(1.035);
    filter: saturate(1.02) contrast(1.02);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    padding: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.18) 42%, rgba(0, 0, 0, 0.74) 100%);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.gallery-item-image-wrapper:hover .gallery-item-overlay,
.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

h4.gallery-item-title {
    display: inline-block;
    max-width: 100%;
    margin: 0;
    padding: 7px 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.78);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.gallery-item-info p.user-name {
    display: inline-block;
    margin: 0;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
}

.gallery-item-award {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 11px;
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(6px);
    white-space: nowrap;
}

.award_gold {
    background: rgba(196, 166, 60, 0.94);
    color: #fff;
}

.award_silver {
    background: rgba(146, 146, 169, 0.94);
    color: #fff;
}

.award_bronze {
    background: rgba(159, 94, 39, 0.94);
    color: #fff;
}

.award_honorable_mention {
    background: rgba(88, 151, 190, 0.94);
    color: #fff;
}

.gallery-item:has(.award_gold) {
    order: 1;
}

.gallery-item:has(.award_silver) {
    order: 2;
}

.gallery-item:has(.award_bronze) {
    order: 3;
}

.gallery-item:has(.award_honorable_mention) {
    order: 4;
}

.selected-entries-section .gallery-item.winner-image-out {
    max-width: none;
}

.selected-entries-section img.gallery-item-image {
    max-height: none;
}

.selected-entries-section .gallery-item-image-wrapper {
    aspect-ratio: 16 / 10;
}


.win_gallery-category-list.win_gallery-top_entries {
    grid-template-columns: repeat(auto-fill, minmax(540px, 1fr));
}

/* Responsive */
@media (max-width: 1280px) {
    .win_gallery-category-list {
        grid-template-columns: repeat(auto-fill, minmax(210px, 235px));
        justify-content: center;
    }
}

@media (max-width: 980px) {
    .event-gallery-container {
        padding: 36px 18px;
    }

    .win_gallery-category-list {
        grid-template-columns: repeat(auto-fill, minmax(210px, 235px));
        justify-content: center;
        gap: 22px;
    }

    .gallery-modal-body {
        grid-template-columns: 1fr;
    }

    .modal-gallery-section {
        padding: 15px;
    }

    .modal-details-section {
        padding: 20px 15px;
    }
}

@media (max-width: 640px) {
    .event-gallery-container {
        padding: 28px 14px;
    }

    .win_gallery-category-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .gallery-title {
        font-size: 1.85rem;
    }

    .gallery-subtitle {
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 1.45rem;
    }

    .topic-title {
        font-size: 1.3rem;
    }

    .gallery-item-overlay {
        opacity: 1;
        padding: 14px;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.13) 45%, rgba(0, 0, 0, 0.72) 100%);
    }

    .gallery-item:hover {
        transform: none;
    }

    .gallery-item:hover .gallery-item-image-wrapper img,
    .gallery-item:hover img.gallery-item-image {
        transform: none;
    }

    .gallery-item-award {
        min-height: 25px;
        padding: 5px 10px;
        font-size: 11px;
    }

    .social-share-buttons {
        flex-direction: column;
    }

    .social-share-btn {
        width: 100%;
        justify-content: center;
    }
}
