* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    background: #010101;
    color: #f2f2f2;
    font-family: "Athelas", serif;
}

/* هدر سایت */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 60px;
    text-transform: uppercase;
    mix-blend-mode: difference;
    pointer-events: none;
}

.site-logo {
    position: absolute;
    left: 60px;
    color: #f2f2f2;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: none;
    pointer-events: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 56px;
    pointer-events: auto;
}

.site-nav a {
    color: #f2f2f2;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: opacity 0.25s ease;
}

.site-nav a:hover {
    opacity: 0.6;
}

/* بخش اصلی گالری */
.gallery-page {
    width: 100%;
    padding: 160px 0 120px;
}

/* هدر گالری: p زیر h1 و تا وسط صفحه با فاصله بین پاراگراف‌ها */
.gallery-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 80px;
    padding: 0 60px;
}

.gallery-header h1 {
    font-size: 2.5rem;
    font-weight: normal;
    margin-bottom: 30px; /* فاصله عنوان از اولین پاراگراف */
}

.gallery-header p {
    width: 50%; /* محدود کردن تا وسط صفحه */
    max-width: 800px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
    color: #f2f2f2;
    margin-bottom: 24px; /* ایجاد خط فاصله بین پاراگراف‌ها */
}

/* حذف فاصله آخرین پاراگراف برای تمیزی چیدمان */
.gallery-header p:last-child {
    margin-bottom: 0;
}

/* کانتینر اسکرول شونده گالری */
.gallery-container {
    display: flex;
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
}

.gallery-container::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    flex: 0 0 20%;
    width: 20%;
    scroll-snap-align: start;
    position: relative;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 35vh;
    object-fit: cover;
    filter: brightness(1);
    transition: filter 0.3s ease;
}

.gallery-item:hover img {
    filter: brightness(.1);
}

/* نام عکس */
.photo-name {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 1.2rem;
    color: #f2f2f2;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .photo-name {
    opacity: 1;
}

@media (max-width: 1024px) {
.site-header {
    justify-content: flex-start;
    padding: 20px 20px;
  }
  .site-logo {
    font-size: 1.3rem;
    left: auto;
    position: static;
  }

  .site-nav {
    margin-left: auto;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .site-nav a {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
  }

  .gallery-page {
        display: flex; 
        flex-direction: row; 
        padding: 120px 60px 80px; 
        gap: 40px; 
    }

    .gallery-header {
        padding: 0 20px;
        margin-left: -30px;
        flex: 2; 
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0; 
        padding: 0;

    }

    .gallery-header h1 {
        font-size: 2.15rem;
        margin-bottom: 20px;
    }

    .gallery-header p {
        font-size: 1rem;
        line-height: 1.8;
        width: 100%;
        margin-bottom: 18px;
        max-width: none; 
    }

    .gallery-container {
        flex-direction: column;
        flex: 1; 
        gap: 0;
        overflow-x: hidden; 
        overflow-y: auto; 
        max-height: 100%; 
        scrollbar-width: thin; 
        -ms-overflow-style: auto;
        justify-content: flex-start;
        padding-right: 0;
    }

    .gallery-container::-webkit-scrollbar {
        display: block;
        width: 4px;
    }

    .gallery-container::-webkit-scrollbar-thumb {
        background-color: #010101;
        border-radius: 1px;
    }

    .gallery-item {
        width: 100%;
        flex: 0 0 auto;
        scroll-snap-align: unset;
    }

    .gallery-item img {
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 500px) {
  .site-header {
    padding: 18px 16px;
  }
  .site-nav {
    gap: 10px;
  }
  .site-nav a {
    font-size: 0.68rem;
  }

  .gallery-page {
        display: flex; 
        flex-direction: row; 
        padding: 80px 50px 50px; 
        gap: 30px; 
    }

    .gallery-header h1 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .gallery-header p {
        font-size: .96rem;
        line-height: 1.8;
        width: 100%;
        margin-bottom: 18px;
        max-width: none; 
    }

    .gallery-container {
        flex-direction: column;
        flex: 1; 
        gap: 0;
        overflow-x: hidden; 
        overflow-y: auto; 
        max-height: 100%; 
        scrollbar-width: thin; 
        -ms-overflow-style: auto;
        justify-content: flex-start;
        padding-right: 0;
    }

    .gallery-container::-webkit-scrollbar {
        display: block;
        width: 4px;
    }

    .gallery-container::-webkit-scrollbar-thumb {
        background-color: #010101;
        border-radius: 1px;
    }

    .gallery-item {
        flex: 0 0 0;
        width: 100%;
        flex: 0 0 auto;
        scroll-snap-align: unset;
    }

    .gallery-item img {
        height: auto;
        aspect-ratio: 1 / 1;
        filter: brightness(0.1);
    }

    .gallery-item:hover img {
    filter: brightness(1);
}

.photo-name {
    font-size: .8rem;
    opacity: 1;
    left: 10px;
}

}


