/* 1. ЗМІННІ ТА БАЗОВІ НАЛАШТУВАННЯ*/
:root {
    --color-light: #ffffff;
    --color-dark: #000000;
    --color-accent: #32373c;
    --font-logo: 'Playfair Display', serif;
    --font-heading: 'Roboto Slab', serif;
    --font-body: 'Roboto', sans-serif;
    --font-italic-accent: 'Playfair Display', serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-dark);
    background-image: url(img/icons/background.png);
    background-repeat: repeat;
    background-size: 1600px;
    line-height: 1.6;
}

a {
    color: var(--color-dark);
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

main, .hero-section, .contact-info-grid {
    background-color: transparent !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 2. ТИПОГРАФІЯ ТА СТИЛІ КНОПОК */
.italic-text {
    font-family: var(--font-italic-accent);
    font-style: italic;
    font-weight: 400;
}

.section-title {
    font-size: 3rem;
    font-weight: 100;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
}

.section-sub-title {
    font-family: var(--font-heading);
    font-size: 2rem; 
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 30px;
}

/* Кнопки */
.primary-button {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid var(--color-dark);
    line-height: 1;
    transition: background-color 0.3s, color 0.3s;
}

.primary-button.dark-button {
    background-color: var(--color-dark);
    color: var(--color-light);
    border-color: var(--color-dark);
}

.primary-button.light-button {
    background-color: var(--color-light);
    color: var(--color-dark);
    border-color: var(--color-dark);
}

.primary-button .button-icon {
    margin-right: 10px;
}

.primary-button:hover {
    opacity: 1;
    background-color: var(--color-accent);
    color: var(--color-light);
    border-color: var(--color-accent);
}

/* 3. ШАПКА САЙТУ (ВЕРСІЯ ДЛЯ ПК) */
.main-header {
    background-color: var(--color-light);
    padding: 15px 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1500px;
}

.header-logo-img {
    height: 40px;
    max-width: 400px;
    display: block;
}

.main-nav .menu {
    display: flex;
    list-style: none;
    font-size: 15px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-nav .menu-item {
    margin: 0 15px;
}

.header-social-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-social-icons a {
    font-size: 18px;
    color: var(--color-dark);
    opacity: 1;
    transition: opacity 0.3s;
}

/* 4. МОБІЛЬНЕ МЕНЮ ТА НАВІГАЦІЯ */
.mobile-header-wrapper { display: none; }
.desktop-only { display: block; }
.mobile-only { display: none; }

/* 5. ЗАГАЛЬНІ СЕКЦІЇ (HERO, ЗАГОЛОВКИ) */
.hero-section {
    padding-top: 50px; 
    padding-bottom: 50px;
    background-color: var(--color-light);
    text-align: center; 
}

.contact-clone .hero-section {
    padding-top: 50px; 
    padding-bottom: 50px;
}

.main-text-logo {
    font-family: var(--font-logo);
    font-size: 8rem;             
    font-weight: 300;            
    letter-spacing: 20px;        
    text-transform: uppercase;   
    line-height: 1;
    color: var(--color-dark);
    margin: 0;
    display: inline-block;
    max-width: 90%;
    white-space: nowrap; 
}

.headline-section {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 50px 20px;
}

.headline-section .section-title {
    font-size: 3rem;
    font-weight: 100;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* 6. ЕЛЕМЕНТИ ГОЛОВНОЇ СТОРІНКИ (СЛАЙДЕР, ВІТАННЯ) */

/* Slider */
.visual-hero-section {
    position: relative;
    height: 100vh;
    min-height: 800px;
    background-color: var(--color-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.image-slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    opacity: 0;
    transition: opacity 0.7s ease-in-out; 
}

.slide.active {
    opacity: 1;
}

.hero-overlay-text {
    position: relative;
    z-index: 2;
    color: var(--color-light);
    text-align: center;
    text-transform: uppercase;
}

/* Welcome Section */
.welcome-section {
    padding: 100px 20px;
}

.content-wrapper {
    display: flex;
    gap: 50px;
    align-items: center;
}

.col-image, .col-text {
    flex: 1;
}

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

.welcome-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 100;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.welcome-body p {
    font-size: 1rem;
    margin-bottom: 15px;
}

/* Instagram Section */
.instagram-feed-section {
    padding-bottom: 80px;
}

.instagram-centered-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.instagram-media {
    min-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* 7. СТИЛІ ПОРТФОЛІО ТА ГАЛЕРЕЇ */

/* Home Page Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 10px 20px;
    background-color: var(--color-light);
}

.grid-item {
    position: relative;
    overflow: hidden;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.central-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.central-image .primary-button {
    position: absolute;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}

.central-image:hover .primary-button {
    opacity: 1;
}

/* Main Portfolio Page Gallery */
.main-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 50px 20px;
    background-color: var(--color-light);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background-color: var(--color-dark);
    transition: all 0.4s ease-in-out;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.main-gallery-grid:hover .gallery-item {
    opacity: 0.6;       
    transform: scale(0.95); 
}

.main-gallery-grid .gallery-item:hover {
    opacity: 1;         
    transform: scale(1.08); 
    filter: grayscale(0%);  
    z-index: 2;        
    box-shadow: 0 15px 30px rgba(0,0,0,0.2); 
}

/* 8. СТОРІНКА ЗАМОВЛЕННЯ ТА КОНТАКТИ */
.contact-info-grid .content-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: flex-start;
    padding: 100px 20px;
}

.step-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 5px;
}

.text-block p, .contact-details-block p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    font-weight: 450;
}

.contact-details-block p a {
    font-weight: 400;
    text-decoration: underline;
}

.social-links-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.form-placeholder {
    margin-top: 40px;
    padding: 30px;
    border: 1px dashed var(--color-dark);
    text-align: center;
    background: rgba(0, 0, 0, 0.03);
}

/* CTA Section */
.contact-cta-section {
    padding: 150px 20px;
    text-align: center;
    background-size: cover;
    background-position: center;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-light);
    position: relative;
}

.contact-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.contact-cta-section > * {
    position: relative;
    z-index: 1;
}

.cta-subtitle {
    font-family: var(--font-italic-accent);
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 5px;
    color: var(--color-light);
}

.cta-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 100;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--color-light);
}

.cta-description {
    max-width: 500px;
    margin: 0 auto 30px;
    font-weight: 300;
    color: var(--color-light);
}

/* 9. ФУТЕР САЙТУ*/
footer {
    background-color: var(--color-light);
}

.footer-links-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    gap: 50px;
}

.footer-nav {
    display: flex;
    gap: 50px;
    align-items: center;
}

.footer-nav .nav-col {
    display: flex;        
    justify-content: center; 
    align-items: center;
    gap: 50px;             
}

.footer-nav a {
    font-size: 1rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copyright-bar {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    font-size: 0.8rem;
}

/* --- СТИЛІ ДЛЯ МОДАЛЬНОГО ВІКНА (POPUP) --- */

/* Сітка товарів */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Адаптивна сітка */
    gap: 20px;
    padding: 40px 20px;
}

.portfolio-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 3/4; /* Робимо фото однаковими за пропорцією */
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Ефект при наведенні */
.portfolio-item:hover img {
    transform: scale(1.05);
}

.item-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .item-overlay {
    opacity: 1;
}

.item-overlay span {
    color: #fff;
    border: 1px solid #fff;
    padding: 10px 20px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

/* Саме модальне вікно (фон) */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Темніший фон */
    align-items: center;
    justify-content: center;
    padding: 0; /* Прибираємо відступи, щоб фото було на весь екран */
}

.modal-content.only-gallery {
    background-color: transparent; /* Прозорий фон контейнера */
    width: 100%;
    height: 100%;
    max-width: none;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-body {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-gallery.full-width {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

#modal-main-image {
    max-width: 90%;  /* Картинка не прилипає до країв */
    max-height: 90vh; /* Висота не більше 90% екрану */
    width: auto;
    height: auto;
    object-fit: contain; /* ВАЖЛИВО: Картинка показується повністю, не обрізається */
    border-radius: 4px;
}

/* Кнопки навігації */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 20px;
    cursor: pointer;
    font-size: 30px;
    transition: 0.3s;
    border-radius: 50%;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.prev { left: 20px; }
.next { right: 20px; }

/* Хрестик закриття */
.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 45px;
    color: white;
    cursor: pointer;
    z-index: 1001;
    opacity: 0.8;
}

.close-modal:hover { opacity: 1; }

/* Адаптив для телефону */
@media (max-width: 768px) {
    .modal-body { flex-direction: column; }
    .modal-gallery { height: 350px; min-height: unset; }
    .modal-info { padding: 20px; }
    .modal-content { max-height: 95vh; }
}

/* 10. АДАПТИВНІСТЬ */
@media (max-width: 1024px) {
    .main-header { display: none; }
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important;}
    
    .header-inner, .main-nav { display: none; }

    .footer-links-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-nav { 
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .footer-nav a {
        margin: 5px 0;
        display: block;
    }

    .copyright-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .mobile-header-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--color-light);
    }
    
    .mobile-logo-link img {
        height: 35px;
        width: auto;
        display: block;
    }

    .burger-button {
        display: block;
        cursor: pointer;
        z-index: 1002;
    }

    .menu-text {
        font-weight: 700;
        text-transform: uppercase;
    }

    .burger-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--color-light);
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        z-index: 1001;
        overflow-y: auto;
    }

    #nav-toggle-mobile:checked ~ .burger-navigation {
        transform: translateX(0);
    }
    
    .mobile-menu-content {
        padding: 100px 50px;
        text-align: center;
    }

    .mobile-menu-content img {
        width: 200px;
        margin-bottom: 50px;
    }
    
    .mobile-menu-list {
        list-style: none;
        font-size: 1.5rem;
        line-height: 2.5;
        text-transform: uppercase;
        margin-bottom: 50px;
    }
    
    .mobile-social-links a {
        font-size: 1.5rem;
        margin: 0 15px;
    }

    .visual-hero-section::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0.4, 0);
        z-index: 1;
    }

    .hero-overlay-text {
        z-index: 2;
        padding: 0 15px;
    }
    
    .main-text-logo {
        font-size: 5rem;
        letter-spacing: 15px;
        color: #000;
    }

    .welcome-section .content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .mobile-only.full-width-button-container {
        grid-column: 1 / -1;      
        display: flex !important; 
        justify-content: center;  
        align-items: center;
        width: 100%;
        margin-top: 20px;
        margin-bottom: 20px;      
    }

    .portfolio-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .portfolio-grid .grid-item:nth-child(3) {
        grid-column: 1 / -1;
        width: calc(50% - 5px);
        margin: 0 auto;
    }
    
    .central-image .primary-button {
        display: none; 
    }

    .contact-info-grid .content-grid-2 {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-cta-section {
        padding: 60px 20px;
        min-height: auto;
        background-attachment: scroll;
        background-position: center;
        background-size: cover;
    }
    
    .cta-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .main-gallery-grid {
        grid-template-columns: repeat(2, 1fr); 
    }

    .visual-hero-section {
        min-height: unset !important; 
        height: auto !important;
        aspect-ratio: 3 / 2;
    }

    .hero-section {
        padding-top: 80px;
    }

    .main-text-logo{
        font-size: 3.5rem; 
        letter-spacing: 5px;
    }

    .welcome-section .content-wrapper {
        flex-direction: row !important; 
        align-items: center; 
        gap: 15px; 
        padding: 0 10px;
    }

    .col-image {
        flex: 0 0 40%; 
        max-width: 40%;
    }

    .col-text {
        flex: 0 0 60%; 
        max-width: 60%;
        text-align: left; 
    }

    .welcome-title {
        font-size: 3rem !important; 
        margin-bottom: 10px;
        line-height: 1.1;
    }

    .welcome-body p {
        font-size: 0.85rem !important; 
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .welcome-section .primary-button {
        padding: 8px 12px;
        font-size: 14px;
        width: auto;
    }
    
    .welcome-section .primary-button .button-icon {
        margin-right: 5px;
    }
}

@media (max-width: 480px) {
    .main-gallery-grid {
        grid-template-columns: 1fr; 
    }

    .main-text-logo {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
}