/*
Theme Name: Custom Portfolio Theme
Theme URI: -
Author: -
Author URI: -
Description: Custom Portfolio Theme inspired by shapeimages.com
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: custom-portfolio-theme
*/

/* Global Styles */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #fff;
}

header {
    text-align: center;
    padding: 20px 0;
    background: #000;
    border-bottom: 1px solid #444;
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
}

header nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 1rem;
    margin: 0 15px;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #fff;
}


main {
    padding: 40px 20px;
}

/*.image-gallery {*/
/*    display: grid;*/
/*    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));*/
/*    gap: 20px;*/
/*}*/
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
    gap: 20px;
}

/* Коли 1 або 2 зображення */
.image-gallery:has(.gallery-item:nth-child(1):nth-last-child(1)),
.image-gallery:has(.gallery-item:nth-child(1):nth-last-child(2)) {
    grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
    justify-content: center;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
    width: 100%;
    /*height: 100%;*/
    display: block;
    object-fit: cover;
    transition: filter 0.3s ease; /*  new overlay */

    height: 100%;
    max-height: 600px; /* або 70vh */
    /*object-fit: contain;*/
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2);
}

/* start overlay */
.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

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

.gallery-item-overlay h3 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    text-align: center;
    padding: 0 15px;
}

.gallery-item-overlay p {
    color: #fff;
    margin: 0;
    font-size: 1rem;
}

.gallery-item a {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* end overlay */
footer {
    text-align: center;
    padding: 20px;
    background: #ffffff;
    color: #666;
    border-top: 1px solid #e5e5e5;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/*header*/
.custom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: white;
    border-bottom: 1px solid #e5e5e5;
    font-family: Arial, sans-serif;
    position: relative;
    flex-wrap: wrap;
}

.custom-logo {
    font-size: 24px;
    font-weight: bold;
    color: black;
    text-decoration: none;
}

/* Гамбургер */
.menu-toggle {
    display: none;
}

/* Показуємо лише на мобільних */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: none;
        border: none;
        padding: 0;
        margin: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .menu-toggle span {
        display: block;
        height: 2px;
        background-color: #000; /* або чорний/інший */
        border-radius: 1px;
        width: 100%;
    }
}

/* Навігація */
.custom-navigation {
    display: flex;
    gap: 20px;
}

.custom-navigation a {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding-bottom: 1px;
    border-bottom: 2px solid transparent;
}

.custom-navigation a:hover {
    color: black;
    border-bottom: 2px solid black;
}

/* Активне посилання */
.custom-navigation a.active {
    color: black;
    border-bottom: 2px solid black;
}

@media (max-width: 768px) {
    .custom-navigation {
        display: none;
        flex-direction: column;
        grid-column: 1 / -1;
        padding-top: 20px;
        align-items: center;
        gap: 10px;
        background-color: white;
        width: fit-content;
        margin: 0 auto;
    }

    .custom-navigation.active {
        display: flex;
    }

    .custom-navigation a {
        line-height: 1.2;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .custom-navigation {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 20px;
    }

    .custom-navigation.active {
        display: flex;
    }
}

     /* Стилі для секції portfolio-description */
 .portfolio-description {
     padding-top: 0;
     padding-right: 5%;
     padding-left: 5%;
     padding-bottom: 5%;
     background-color: #fff;
     text-align: left;
     font-family: "Helvetica Neue", Arial, sans-serif;
     max-width: 800px;
     margin: 0 auto;
 }

.portfolio-description h1 {
    font-size: 48px;
    font-weight: bold;
    color: #111;
    margin-bottom: 20px;
    line-height: 1.2;
    text-align: center;
}

.portfolio-description .subheading {
    font-size: 18px;
    color: #777;
    margin-bottom: 8px;
}

.portfolio-description .description {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-top: 20px;
}


/** Contact Page */
.contact-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 80px 20px;
    font-family: Arial, sans-serif;
    text-align: center;
}

.contact-hero h1 {
    font-size: 48px;
    margin-bottom: 30px;
    color: black;
}

.contact-details .location {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.contact-details .email a {
    font-size: 18px;
    color: black;
    text-decoration: none;
}

.contact-details .email a:hover {
    text-decoration: underline;
}

.contact-socials {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.contact-socials img {
    width: 28px;
    height: 28px;
    transition: opacity 0.3s ease;
}

.contact-socials a:hover img {
    opacity: 0.6;
}

/** About Page */
.about-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 80px 20px;
    font-family: Arial, sans-serif;
    line-height: 1.7;
    color: #222;
}

.about-hero {
    text-align: center;
    margin-bottom: 60px;
}

.about-hero h1 {
    font-size: 48px;
    margin-top: 20px;
}

.about-photo {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}

.about-content p {
    font-size: 17px;
    margin-bottom: 24px;
    color: #444;
}

.about-content a {
    color: black;
    text-decoration: underline;
}

.about-content a:hover {
    color: #666;
}

/** Image Modal */
body.modal-open {
    overflow: hidden;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.image-modal.show {
    display: flex;
    opacity: 1;
}

.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.image-modal.show .image-modal-content {
    transform: scale(1);
}

/* ✕ закриття */
.image-modal-close {
    position: fixed;
    top: 24px;
    right: 32px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.image-modal-prev,
.image-modal-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.image-modal-prev:hover,
.image-modal-next:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.image-modal-prev {
    left: 5vw;
}

.image-modal-next {
    right: 5vw;
}

.image-modal-prev svg,
.image-modal-next svg {
    display: block;
}

/* прозорі області з боків */
.modal-zone {
    position: fixed;
    top: 0;
    width: 40%;
    height: 100vh;
    z-index: 1000;
}

.modal-prev-zone {
    left: 0;
}

.modal-next-zone {
    right: 0;
}

/* приховати на десктопі */
@media (min-width: 769px) {
    .modal-zone {
        display: none;
    }
}

/* стрілки — ховаємо на мобільному */
@media (max-width: 768px) {
    .image-modal-prev,
    .image-modal-next {
        display: none;
    }
}
/* dots */
.image-modal-dots {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 8px;
    z-index: 1001;
}

.image-modal-dots span {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.image-modal-dots span.active {
    background: white;
}

@media (max-width: 768px) {
    .custom-header {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: start;
        padding: 16px 20px;
        background-color: white;
        border-bottom: 1px solid #e5e5e5;
    }

    .custom-logo {
        font-size: 16px;
        font-weight: bold;
        text-decoration: none;
        color: black;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        align-self: start; /* 🚀 ключовий момент */
        margin-left: 12px;
        margin-top: 4px;
    }

    .custom-navigation {
        display: none;
        flex-direction: column;
        grid-column: 1 / -1; /* навігація — на всю ширину */
        padding-top: 20px;
    }

    .custom-navigation.active {
        display: flex;
    }
}



.logo-desktop {
    display: inline;
}

.logo-mobile {
    display: none;
}

@media (max-width: 768px) {
    .logo-desktop {
        display: none;
    }

    .logo-mobile {
        display: inline;
        white-space: normal;
    }
}