@import "../global.css";

/* Header */
#header {
    background: url("../../img/gallery-header-background.webp") no-repeat fixed center;
    min-width: 100%;
    min-height: 550px;
    height: 30vh;
    background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    -webkit-background-size: cover;
    z-index: 0;
    display: flex;
    align-items: center;
}

#header .content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    padding: 150px;
    width: 100%;
}

#header .content .info {
    display: flex;
    flex-direction: column;
}

#header .content .info p {
    color: var(--white-color);
    text-transform: uppercase;
    font-size: 18px;
    font-weight: 600;
}

#header .content .info .title {
    color: var(--white-color);
    text-transform: uppercase;
    font-size: 65px;
    font-weight: f00;
}

#header .content .info .title span {
    color: var(--main-color);
}

#header .content .description {
    color: var(--white-color);
    font-size: 18px;
    font-weight: 400;
    max-width: 600px;
    line-height: 1.6;
}

#header .content .info p,
#header .content .info .title,
#header .content .description {
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Wave */
.wave-top {
    position: relative;
    bottom: 69px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.wave-top svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
    transform: rotateY(180deg);
}

.wave-top .shape-fill {
    fill: var(--background-color);
}

/* Gallery Tabs */
.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    background: var(--soft-black-color);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.gallery-tabs .tab-button {
    flex: 1;
    min-width: 120px;
    background: transparent;
    color: var(--description-color);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
}

.gallery-tabs .tab-button:hover {
    color: var(--white-color);
    background: var(--hover-color);
}

.gallery-tabs .tab-button.active {
    background-color: var(--main-color);;
    color: var(--white-color);
}

/* Screens/Maparts */
.screen-card, .mapart-card {
    cursor: pointer;
}

/* Screens */
.screens-section {
    padding: 50px 5%;
    background-color: var(--background-color);
    color: var(--white-color);
    text-align: center;
}

.screens-section .screens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    justify-content: center;
    justify-items: center;
}

.screens-section .screens-grid .screen-card {
    background: var(--soft-black-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 450px;
    width: 100%;
}

.screens-section .screens-grid .screen-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.screens-section .screens-grid .screen-card .screen-img-wrapper {
    width: 100%;
    padding-top: 56.25%;
    position: relative;
    overflow: hidden;
    background: var(--soft-black-color);
}

.screens-section .screens-grid .screen-card .screen-img-wrapper img {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.screens-section .screens-grid .screen-card:hover .screen-img-wrapper img {
    transform: scale(1.05);
}

.screens-section .screens-grid .screen-card .screen-info {
    padding: 20px;
    text-align: left;
}

.screens-section .screens-grid .screen-card .screen-info .screen-meta {
    font-size: 0.95rem;
    color: var(--description-color);
    margin: 3px 0;
}

/* Maparts */
.maparts-section {
    padding: 50px 5%;
    background-color: var(--background-color);
    color: var(--white-color);
    text-align: center;
}

.maparts-section .mapart-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 100;
}

.maparts-section .mapart-filters .custom-select {
    position: relative;
    width: 220px;
    user-select: none;
}

.maparts-section .mapart-filters .select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--soft-black-color);
    border-radius: 12px;
    color: var(--description-color);
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.maparts-section .mapart-filters .select-trigger:hover {
    color: var(--white-color);
    background: var(--hover-color);
}

.maparts-section .mapart-filters .select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--soft-black-color);
    border-radius: 0 0 12px 12px;
    display: block;
    z-index: 500;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.maparts-section .mapart-filters .select-options::-webkit-scrollbar { width: 6px; }
.maparts-section .mapart-filters .select-options::-webkit-scrollbar-thumb { background: var(--grey-color); border-radius: 10px; }

.maparts-section .mapart-filters .custom-select.open .select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0px);
}

.maparts-section .mapart-filters .custom-select.open .select-trigger {
    border-radius: 12px 12px 0 0;
    background: var(--hover-color);
}

.maparts-section .mapart-filters .option {
    padding: 12px 20px;
    color: var(--description-color);
    cursor: pointer;
    transition: all 0.2s;
}

.maparts-section .mapart-filters .option:hover {
    background: var(--hover-color);
    color: var(--white-color);
}

.maparts-section .mapart-filters .option.selected {
    background: var(--main-color);
    color: var(--white-color);
}

.maparts-section .mapart-count {
    color: var(--description-color);
    margin-bottom: 40px;
    font-size: 0.95rem;
    text-align: center;
}

.maparts-section .maparts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center;
    justify-items: center;
}

.maparts-section .maparts-grid .mapart-card .mapart-img-wrapper {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    background: var(--soft-black-color);
}

.maparts-section .maparts-grid .mapart-card .mapart-img-wrapper img {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.maparts-section .maparts-grid .mapart-card:hover .mapart-img-wrapper img {
    transform: scale(1.05);
}

.maparts-section .maparts-grid .mapart-card .mapart-img-wrapper img {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.maparts-section .maparts-grid .mapart-card {
    background: var(--soft-black-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 300px;
    width: 100%;
}

.maparts-section .maparts-grid .mapart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.maparts-section .maparts-grid .mapart-card .mapart-img-wrapper .mapart-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.maparts-section .maparts-grid .mapart-card .mapart-info {
    padding: 20px;
    text-align: left;
}

.maparts-section .maparts-grid .mapart-card .mapart-info .mapart-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    display: block;
    line-height: 1.3;
    border-bottom: 1px solid var(--hover-color);
}

.maparts-section .maparts-grid .mapart-card .mapart-info .mapart-meta {
    font-size: 0.95rem;
    color: var(--description-color);
    margin: 3px 0;
}

/* Lightbox */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.gallery-modal .gallery-modal-content {
    background: var(--soft-black-color);
    width: auto;
    max-width: 95vw;
    max-height: 90vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.gallery-modal .gallery-modal-content .close-modal {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--white-color);
    transition: 0.3s;
}

.gallery-modal .gallery-modal-content .close-modal:hover {
    color: var(--red-color);
}

.gallery-modal .gallery-modal-content .modal-body {
    display: flex;
    flex-direction: row;
    padding: 40px;
    gap: 20px;
}

.gallery-modal .gallery-modal-content .modal-body .modal-image {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 0 auto;
    height: 80vh;
}

.gallery-modal .gallery-modal-content .modal-body .modal-image img {
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border-radius: 10px;
}

.gallery-modal .gallery-modal-content .modal-body .modal-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 25px;
    padding-left: 20px;
}

.gallery-modal .gallery-modal-content .modal-body .modal-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    color: var(--white-color);
    margin-bottom: 12px;
    line-height: 1.3;
    border-bottom: 2px solid var(--hover-color);
}

.gallery-modal .gallery-modal-content .modal-body .modal-info p {
    font-size: 0.95rem;
    color: var(--description-color);
}

/* Responsive */
/* Header */
@media screen and (max-width: 1625px) {
    #header .content {
        padding: 150px 90px;
    }
}

@media screen and (max-width: 1361px) {
    #header .content {
        flex-direction: column;
        padding: 120px 90px;
    }
}

@media screen and (max-width: 819px) {
    #header .content {
        padding: 150px 30px;
    }

    #header .content .info .minecraft-server-ip {
        font-size: 15px;
    }

    #header .content .info .title {
        font-size: 40px;
    }

    #header .content .info .description {
        font-size: 16px;
    }
}

@media screen and (max-width: 530px) {
    #header .content {
        justify-content: start;
        align-items: start;
    }

    #header .content .info .title {
        font-size: 30px;
    }
}

/* Wave */
@media screen and (max-width: 831px) {
    .wave-top {
        bottom: 29px;
    }

    .wave-top svg {
        height: 30px;
    }
}

/* Gallery Filters */
@media (max-width: 768px) {
  .mapart-filters {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 0 20px;
  }

  .mapart-filters .custom-select {
        width: 100%;
        max-width: 400px;
  }
}

@media (max-width: 480px) {
  .mapart-filters {
        padding: 0 15px;
  }

  .mapart-filters .custom-select {
        max-width: 100%;
  }

  .mapart-filters .select-trigger {
        padding: 10px 15px;
        font-size: 0.9rem;
  }

  .mapart-filters .option {
        padding: 10px 15px;
        font-size: 0.9rem;
  }
}

/* Lightbox */
@media (max-width: 1350px) {
  .gallery-modal .gallery-modal-content {
        max-width: 95vw;
        max-height: 90vh;
        margin: auto;
  }

  .gallery-modal .gallery-modal-content .modal-body {
        flex-direction: column;
        align-items: center;
        padding: 25px 20px 20px 20px;
        gap: 20px;
  }

  .gallery-modal .gallery-modal-content .modal-body .modal-image {
        width: 100%;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
  }

  .gallery-modal .gallery-modal-content .modal-body .modal-image img {
        min-width: 80vw;
        max-width: 100%;
        max-height: 60vh;
        width: auto;
        height: auto;
        object-fit: contain;
  }

  .gallery-modal .gallery-modal-content .modal-body .modal-info {
        width: 100%;
        text-align: center;
        padding: 0;
  }

  .gallery-modal .gallery-modal-content .modal-body .modal-info h3 {
        font-size: 1.2rem;
  }

  .gallery-modal .gallery-modal-content .modal-body .modal-info p {
        font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .gallery-modal .gallery-modal-content .modal-body .modal-image img {
        min-width: 75vw;
        max-height: 55vh;
  }

  .gallery-modal .gallery-modal-content .modal-body .modal-info h3 {
        font-size: 1.1rem;
  }

  .gallery-modal .gallery-modal-content .modal-body .modal-info p {
        font-size: 0.8rem;
  }
}
