/*
Theme Name: Perfekt photo
Theme URI: https://perfekt.photo
Template: hello-elementor
Author: TurLab
Author URI: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
Description: Hello Elementor is a lightweight and minimalist WordPress theme that was built specifically to work seamlessly with the Elementor site builder plugin. The theme is free, open-source, and designed for users who want a flexible, easy-to-use, and customizable website. The theme, which is optimized for performance, provides a solid foundation for users to build their own unique designs using the Elementor drag-and-drop site builder. Its simplicity and flexibility make it a great choice for both beginners and experienced Web Creators.
Tags: accessibility-ready,flexible-header,custom-colors,custom-menu,custom-logo,featured-images,rtl-language-support,threaded-comments,translation-ready
Version: 3.5.1.1788345560
Updated: 2026-09-02 13:39:20

*/
/* ==================================================
   MENU TOP
   Десктоп и планшет — автоматическое количество
   Мобильный — по 2 кнопки в ряд
================================================== */

/* Обычное меню */
.menu-top .tahefobu-nav-menu-container {
    display: block !important;
    width: 100% !important;
}

/* Список пунктов */
.menu-top ul,
.menu-top .tahefobu-nav-menu-horizontal {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;

    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Одинаковый размер всех кнопок */
.menu-top ul li {
    box-sizing: border-box !important;

    flex: 0 0 183px !important;
    width: 183px !important;
    height: 60px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: linear-gradient(to top, #42a818, #41f11d);
    border: 2px solid #0e66ad;
    border-radius: 5px;
    text-align: center;
    overflow: hidden;
}

/* Убираем отступы, добавленные виджетом */
.menu-top ul li:not(:last-child) {
    margin-right: 0 !important;
}

/* Ссылка занимает всю кнопку */
.menu-top ul li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;

    padding: 0 8px !important;
    margin: 0 !important;

    white-space: nowrap !important;
    text-align: center !important;
}

/* Наведение и активная страница */
.menu-top ul li:hover,
.menu-top ul li.current-menu-item {
    background: linear-gradient(to top, #41f11d, #42a818);
    border-color: #f31111;
}

/* ==================================================
   МОБИЛЬНАЯ ВЕРСИЯ
================================================== */

@media (max-width: 767px) {

    /* Убираем гамбургер */
    .menu-top .tahefobu-mobile-nav-menu-container {
        display: none !important;
    }

    /* Показываем обычное меню */
    .menu-top .tahefobu-nav-menu-container {
        display: block !important;
        width: 100% !important;
    }

    .menu-top ul,
    .menu-top .tahefobu-nav-menu-horizontal {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px !important;
    }

    /* По две одинаковые кнопки */
    .menu-top ul li {
        flex: 0 0 calc((100% - 4px) / 2) !important;
        width: calc((100% - 4px) / 2) !important;
        height: 44px !important;
    }

    .menu-top ul li > a {
        padding: 0 4px !important;
    }
}

/* Фиксируем высоту и обрезку для картинок внутри нашей карусели */
.home-card-carousel .swiper-slide-inner {
    height: 250px !important;
}

.home-card-carousel .swiper-slide-image {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
}

@media (max-width: 767px) {
    /* Принудительно зануляем пиксельную ширину, которую Swiper вешает инлайном */
    .home-card-carousel .swiper-slide {
        width: 100% !important;
        flex-shrink: 0 !important;
    }
    
    /* Заставляем обертку слайдера строго следовать ширине экрана */
    .home-card-carousel .swiper {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ========================================
   ГАЛЕРЕЯ ПОРТФОЛИО
   ======================================== */

.portfolio-gallery {
    display: grid;

    /* 3 колонки на десктопе */
    grid-template-columns: repeat(3, minmax(0, 1fr));

    /* Расстояние между фотографиями */
    gap: 15px;

    /* Не растягиваем элементы по высоте */
    align-items: start;
}


/* Ссылка-обёртка каждой фотографии */
.portfolio-gallery__item {
    display: block;
    text-decoration: none;
}


/* Само изображение */
.portfolio-gallery__image {
    display: block;

    /* Фото занимает всю ширину своей колонки */
    width: 100%;

    /* Сохраняем исходные пропорции изображения */
    height: auto;
}


/* ========================================
   ПЛАНШЕТ
   Elementor breakpoint: 1024px
   ======================================== */

@media (max-width: 1024px) {

    .portfolio-gallery {
        /* На планшете показываем 2 колонки */
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ========================================
   МОБИЛЬНЫЙ
   Elementor breakpoint: 767px
   ======================================== */

@media (max-width: 767px) {

    .portfolio-gallery {
        /* На телефоне фотографии идут в одну колонку */
        grid-template-columns: 1fr;
    }

}