/* Custom styles for photographer case page */
:root {
    --primary-color: #ea5d62;
}

body {
    font-family: 'Montserrat', sans-serif;
}

/* 🟢 ---------- СТИЛИ ДЛЯ ПЕРВОГО ЭКРАНА ---------- */
.case-hero {
    max-width: 1320px;
    margin: 0 auto;
    padding: 85px 55px 0 55px !important;
    background: rgb(249, 249, 249);
    border-radius: 0 0 20px 20px;
}

.case-hero-left{
    z-index: 10;
}

.case-hero-row {
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-hero-title {
    font-size: 2.3rem;
    font-weight: 780;
    line-height: 1.2;
    color: #343d4a;
    margin-bottom: 24px;
    text-transform: uppercase;
    font-family: "Dela Gothic One";
}

.case-hero-desc {
    font-size: 1.1rem;
    color: #36363b;
    margin-bottom: 0;
    max-width: 98%;
}

.case-hero-image-wrap {
    min-width: 220px;
    padding: 0 8px;
    display: flex;
    justify-content: flex-end;
}

.case-hero-image {
    position: relative;
    display: inline-block;
    border-radius: 50%;
    padding: 18px 10px 25px 10px;
    background: none;
    transition: box-shadow 0.4s cubic-bezier(.39,.575,.565,1);
    bottom: -35px;
    right: 35px;
    z-index: 0;
}

.case-hero-image::before,
.case-hero-image::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.case-hero-image::before {
    width: 600px;
    height: 600px;
    background: #fae4e2;
    z-index: 0;
}

.case-hero-image::after {
    width: 450px;
    height: 450px;
    background: #ea5d6211;
    z-index: 1;
}

.case-hero-image picture {
    max-height: 480px;
    z-index: 2;
    position: relative;
    max-width: 130%;
    bottom: -65px;
}

.case-hero-right {
    padding-left: 32px;
    padding-right: 8px;
}

.case-hero-review {
    background: #fff;
    border-radius: 27px;
    box-shadow: 0 7px 32px rgba(234,93,98,0.10);
    padding: 27px 34px 20px 28px;
    font-size: 1.1rem;
    color: #242021;
    margin-left: auto;
    max-width: 370px;
    position: relative;
    line-height: 1.4;
}

.case-hero-review:before {
    content: "";
    background: url('https://img.icons8.com/ios-filled/50/ea5d62/quote-left.png') no-repeat center;
    opacity: 0.13;
    width: 48px;
    height: 48px;
    position: absolute;
    left: 12px;
    top: 18px;
}

.case-hero-review-author {
    font-size: 1rem;
    color: #ea5d62;
    margin-top: 20px;
    text-align: right;
}

.case-hero-btn-wrap {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
    position: relative;
    top: -50px;
}

.case-hero-btn {
    background: #ea5d62;
    color: #fff;
    border-radius: 44px;
    padding: 14px 46px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 650;
    box-shadow: 0 2px 12px 0 #ea5d6233;
    display: inline-block;
    transition: background 0.22s, transform 0.22s;
    border: none;
    position: relative;
}

.case-hero-btn:hover,
.case-hero-btn:focus {
    background: #ff767c;
    color: #fff;
    transform: translateY(-2px) scale(1.04);
}

/* Адаптив */

@media (max-width: 991px) {
    .case-hero{padding: 105px 55px 0 55px !important}
    .case-hero-row { flex-direction: column; min-height: 0; }
    .case-hero-left, .case-hero-right, .case-hero-image-wrap { max-width: 100%; padding: 0 !important; }
    .case-hero-right { margin-top: 26px; }
    .case-hero-btn-wrap {margin: 80px 0 0 0;flex-flow: row;width: 100%;}
    .case-hero-btn-wrap > .btn-primary{font-size: 14px;}
    .case-hero-image-wrap{max-height: 245px;}
    .case-hero-image{padding-top: 0!important;bottom: 35px!important;}
    .case-hero-image::before{width: 300px;height: 300px;}
    .case-hero-image::after{width: 200px;height: 200px;}
    .case-hero-image::before, .case-hero-image::after{top: 75%;}

    .portfolio-gallery{border-radius: 30px!important;}
}
@media (max-width: 576px) {
    .case-hero {
        padding: 34px 0 30px 0;
    }
    .case-hero-image img {
        max-height: 290px;
    }
    .case-hero-review { padding: 19px 14px 13px 14px; font-size: 14px; }
    .case-hero-review-author{font-size: 14px;}
    .case-hero-title { font-size: 1.32rem; }
}

.case-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.75s cubic-bezier(.16,1,.3,1), transform 0.75s cubic-bezier(.16,1,.3,1);
}

.case-animate.visible {
    opacity: 1;
    transform: none;
}
/*  🔴---------- СТИЛИ ДЛЯ ПЕРВОГО ЭКРАНА ---------- */


/*  🟢---------- СТИЛИ ДЛЯ ОПИСАНИЯ ---------- */
.case-summary .container {
    padding: 0!important;
}

.case-card {
    position: relative;
    background: #fff;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 6px 22px rgba(14,30,37,0.08);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.case-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 26px rgba(14,30,37,0.1);
}

/* --- Иконка в углу --- */
.case-icon {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 90px;
    height: 90px;
    opacity: 0.08;
    pointer-events: none;
    overflow: hidden;
}

.case-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
}

/* --- Контент --- */
.case-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.case-card p {
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0;
}

.facts {
    border-top: 1px solid rgba(0,0,0,0.08);
    margin-top: 1rem;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #444;
}

.facts div {
    margin-bottom: 0.3rem;
}

/* --- Анимация появления --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Адаптив --- */
@media (max-width: 767.98px) {
    .case-card {
        padding: 1.5rem;
    }
    .case-icon {
        width: 70px;
        height: 70px;
        top: -15px;
        right: -15px;
    }
}

/*  🔴---------- СТИЛИ ДЛЯ ОПИСАНИЯ ---------- */

/*  🟢---------- СТИЛИ ДЛЯ ГАЛЕРЕИ ---------- */
.portfolio-gallery {
    background-color: #f9f9f9;
    border-radius: 80px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Masonry Grid Container */
.grid {
    margin: 0 auto;
}

/* Элементы сетки */
.grid-item {
    width: calc(25% - 15px);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

/* Видимость по скроллу */
.grid-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Адаптив для планшетов */
@media (max-width: 991px) {
    .grid-item {
        width: calc(33.333% - 15px);
    }
}

/* Адаптив для телефонов */
@media (max-width: 767px) {
    .grid-item {
        width: calc(50% - 10px);
        margin-bottom: 15px;
    }
}

/* Ссылка и picture обязаны быть блочными и растянутыми */
.grid-item a,
.grid-item picture {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    cursor: pointer;
}

/* Собственно изображение — внутри Masonry */
.grid-item picture img,
.grid-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0;
    backface-visibility: hidden;
}

/* Placeholder для lazy loading изображений */
.grid-item picture img.lazy-image:not([src]),
.grid-item img.lazy-image:not([src]) {
    min-height: 300px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Простой hover */
.grid-item a:hover img,
.grid-item a:hover picture img {
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

/* Кастомизация PhotoSwipe под фирменный цвет */
.pswp__button--arrow {
    background-color: rgba(234, 93, 98, 0.9);
}

.pswp__button--arrow:hover {
    background-color: #ea5d62;
}

.pswp__button--close {
    color: #ea5d62;
}

.pswp__button--close:hover {
    color: #d94d52;
}

.pswp__counter {
    color: #ea5d62;
    font-weight: 600;
}

/* Overlay фон */
.pswp__bg {
    background: rgba(0, 0, 0, 0.95);
}

@media (prefers-reduced-motion: reduce) {
    .grid-item,
    .grid-item img,
    .grid-item picture img {
        transition: none !important;
    }
}

/*  🔴---------- СТИЛИ ДЛЯ ГАЛЕРЕИ ---------- */


/*  🟢---------- СТИЛИ ДЛЯ ПОРТФОЛИО ---------- */
.service-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--card-radius, 18px);
    background: #f7f7f7;
    transition: transform .28s ease, box-shadow .28s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(14, 30, 37, .12);
}

/* Соотношение сторон */
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-3-2 { aspect-ratio: 3 / 2; }
.ratio-2-1 { aspect-ratio: 2 / 1; }
.ratio-1-1 { aspect-ratio: 1 / 1; }

/* Изображение */
.service-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(.96);
    transition: filter .3s ease, transform .4s ease;
    opacity: 1!important;
}

.service-card:hover .service-media {
    filter: brightness(.72);
    transform: scale(1.04);
}

/* Метка в левом верхнем углу */
.service-overlay {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 3;
    font-weight: 600;
    font-size: 14px;
}

.tag {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border-radius: 12px;
    min-width: 36px;
    padding: 4px 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .08);
    backdrop-filter: blur(4px);
    transition: background .25s ease;
}

.service-card:hover .tag {
    background: #fff;
}

/* CTA стрелка */
.service-cta {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .08);
    font-weight: 700;
    font-size: 22px;
    transition: transform .25s ease, background .25s ease;
}

.service-card:hover .service-cta {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 1);
}

/* Форма обратной связи */
.white-card {
    background: #fff;
    border-radius: var(--card-radius, 18px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
    transition: box-shadow .25s ease;
}

.white-card:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, .08);
}

.white-card input,
.white-card button {
    height: 48px;
    font-size: 15px;
    border-radius: 10px;
}

.white-card input:focus {
    border-color: var(--accent, #EA5D62);
    box-shadow: 0 0 0 2px rgba(234, 93, 98, .2);
}

.white-card button {
    background: var(--accent, #EA5D62);
    border: none;
    color: #fff;
    font-weight: 600;
    transition: background .25s ease;
}

.white-card button:hover {
    background: #d54c52;
}

/* Заголовки и общие элементы */
.section-title {
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 24px;
    text-align: center;
}

.section-title small {
    font-weight: 400;
    font-size: 16px;
}

/* Адаптивность */
@media (max-width: 767px) {
    .service-overlay {
        font-size: 13px;
        left: 10px;
        top: 10px;
    }

    .tag {
        padding: 3px 8px;
    }

    .service-cta {
        width: 34px;
        height: 34px;
        font-size: 18px;
        right: 10px;
        bottom: 10px;
    }

    .white-card input,
    .white-card button {
        height: 46px;
    }
}
/*  🔴---------- СТИЛИ ДЛЯ ПОРТФОЛИО ---------- */