/* ===== CSS VARIABLES FOR THEMES ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --text-primary: #1a1a1a;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.08);
    --accent: #000000;
    --accent-hover: #333333;
    --stroke-color: rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
    --bg-primary: #1c1c1c;
    --bg-secondary: #252525;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --accent: #ffffff;
    --accent-hover: #cccccc;
    --stroke-color: rgba(200, 200, 200, 0.18);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: 
        background 0.8s ease, 
        color 0.8s ease;
    position: relative;
}

/* Плавный переход темы для всех элементов */
*, *::before, *::after {
    transition: 
        background-color 0.8s ease,
        color 0.8s ease,
        border-color 0.8s ease,
        box-shadow 0.8s ease;
}

/* ===== ANIMATED BACKGROUND STROKES ===== */
.bg-strokes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1; /* ПОД всем контентом */
    overflow: hidden;
}

.bg-stroke {
    position: absolute;
    width: 100%;
    height: 300px;
    left: 0;
    opacity: 0.6;
    will-change: transform;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bg-stroke:hover {
    opacity: 1 !important; /* При наведении всегда светлее */
}

.bg-stroke-path {
    fill: none;
    stroke: var(--stroke-color);
    stroke-width: 1; /* Ещё тоньше */
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.8s ease, opacity 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .section-title, .about__title, .header__logo {
    font-family: 'Lora', serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease, color 0.3s ease;
}

a:hover {
    opacity: 0.85;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.4s ease, border-color 0.4s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .header {
    background: rgba(28, 28, 28, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header__logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    font-family: 'Lora', serif;
}

.header__link {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header__link:hover {
    color: var(--text-primary);
    opacity: 1;
}

.header__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ===== SHADER BUTTON (МЕНЮ) ===== */
.shader-button {
    position: relative;
    width: 110px; /* Увеличил с 100px */
    height: 40px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none; /* Убрал подчёркивание ссылки */
}

.shader-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.shader-button__text {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

/* Адаптив для кнопки */
@media (max-width: 768px) {
    .shader-button {
        width: 90px; /* Чуть шире для "Главная" */
        height: 36px;
    }
    
    .shader-button__text {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .shader-button {
        width: 80px;
        height: 32px;
    }
    
    .shader-button__text {
        font-size: 10px;
        letter-spacing: 0.3px;
    }
}

/* ===== THEME TOGGLE (VERTICAL) ===== */
.theme-toggle {
    position: relative;
    width: 28px;
    height: 52px;
    background: var(--bg-tertiary);
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.theme-toggle__slider {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .theme-toggle__slider {
    transform: translate(-50%, 24px);
    background: #fff;
}

/* ===== INFINITE CAROUSEL (HORIZONTAL) ===== */
.carousel {
    padding: 100px 0;
    overflow: hidden;
    background: transparent; /* Прозрачный фон */
    position: relative;
    cursor: grab;
}

/* Размытый фон под каруселью для глубины */
.carousel__blur {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    opacity: 0.7;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
    pointer-events: none;
}

.carousel:active {
    cursor: grabbing;
}

.carousel__viewport {
    overflow: hidden;
    width: 100%;
}

.carousel__track {
    display: flex;
    gap: 24px;
    will-change: transform;
    align-items: center;
    user-select: none;
}

.carousel__item {
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;

    /* ЕДИНАЯ ВЫСОТА 400px */
    height: 400px;
    width: auto;

    /* Убрал opacity: 0 — фото видны сразу */
    display: block;
    transition: transform 0.3s ease;
    
    /* ✨ КОМБИНИРОВАННЫЙ ПОДХОД */
    /* Лёгкая прозрачность для видимости фона */
    opacity: 0.95;
    
    /* Мягкая тень для эффекта парения */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    
    /* Тонкая обводка */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ссылки в карусели */
.carousel__item.carousel__item--wide {
    display: block;
}

.carousel__item.carousel__item--wide:hover {
    transform: scale(1.02);
    opacity: 1;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Отключаем перетаскивание для элементов карусели */
.carousel__item,
.carousel__item img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Отключаем выделение для трека карусели */
.carousel__track {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Горизонтальные фото (16:9) — автоматически шире */
.carousel__item--wide {
    height: 400px;
    width: auto;
}

.carousel__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    pointer-events: none;
}

.carousel__item:hover .carousel__img {
    transform: scale(1.05);
}

/* Градиенты по краям для плавного перехода */
.carousel::before,
.carousel::after {
    content: '';
    position: absolute;
    top: 100px;
    width: 150px;
    height: calc(100% - 200px);
    pointer-events: none;
    z-index: 10; /* Поверх линий фона */
}

.carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-primary), transparent);
}

.carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-primary), transparent);
}

.carousel__track.dragging {
    transition: none !important;
}

/* Адаптив */
@media (max-width: 1024px) {
    .carousel__item {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .carousel {
        padding: 60px 0;
    }
    
    .carousel__item {
        height: 300px;
    }
    
    .carousel::before,
    .carousel::after {
        width: 80px;
        top: 60px;
        height: calc(100% - 120px);
    }
}

@media (max-width: 480px) {
    .carousel__item {
        height: 250px;
    }
}

/* ===== TYPES OF SHOOTING ===== */
.types {
    padding: 40px 0 100px;
    position: relative;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-primary);
}

.types__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.types__item {
    text-align: center;
}

.types__image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    aspect-ratio: 3/4;
    cursor: pointer;
    background: var(--bg-secondary);
}

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

.types__item:hover .types__img {
    transform: scale(1.08);
}

.types__label {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ===== ABOUT ===== */
.about {
    padding: 80px 0 120px;
    background: linear-gradient(180deg, transparent, var(--bg-secondary), transparent);
    transition: background 0.4s ease;
    position: relative;
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about__title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.about__text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.about__pricing {
    margin: 32px 0;
    padding: 24px;
    background: var(--bg-tertiary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: background 0.4s ease, border-color 0.4s ease;
}

.about__price-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.about__list {
    list-style: none;
}

.about__list-item {
    font-size: 14px;
    color: var(--text-muted);
    padding: 4px 0;
    position: relative;
    padding-left: 18px;
}

.about__list-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-primary);
}

.about__buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.btn {
    padding: 14px 32px;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

.btn--primary {
    background: var(--accent);
    color: var(--bg-primary);
    border: 2px solid var(--accent);
}

.btn--primary:hover {
    background: transparent;
    color: var(--accent);
    opacity: 1;
}

.btn--secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn--secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    opacity: 1;
}

.about__note {
    font-size: 12px;
    color: var(--text-muted);
}

.about__image-wrapper {
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: var(--bg-secondary);
}

.about__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== FOOTER ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transition: background 0.4s ease, border-color 0.4s ease;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer__links {
    display: flex;
    gap: 24px;
}

.footer__link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.footer__link:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .about__grid {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header__link {
        position: static;
        transform: none;
    }
    
    .header__container {
        gap: 16px;
        flex-wrap: wrap;
    }
    
    .header__logo {
        font-size: 20px;
    }
    
    .shader-button {
        width: 80px;
        height: 36px;
    }
    
    .shader-button__text {
        font-size: 11px;
    }
    
    .theme-toggle {
        width: 24px;
        height: 44px;
    }
    
    .theme-toggle__slider {
        width: 18px;
        height: 18px;
    }
    
    [data-theme="dark"] .theme-toggle__slider {
        transform: translate(-50%, 20px);
    }
    
    .types__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about__title {
        font-size: 32px;
    }
    
    .about__image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .footer__content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .shader-button {
        width: 70px;
        height: 32px;
    }
    
    .shader-button__text {
        font-size: 10px;
        letter-spacing: 0.3px;
    }
    
    .theme-toggle {
        width: 22px;
        height: 40px;
    }
    
    .theme-toggle__slider {
        width: 16px;
        height: 16px;
    }
    
    [data-theme="dark"] .theme-toggle__slider {
        transform: translate(-50%, 18px);
    }
    
    .types__grid {
        grid-template-columns: 1fr;
    }
    
    .about__title {
        font-size: 28px;
    }
    
    .about__buttons {
        flex-direction: column;
    }
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

/* ===== SCROLL NAVIGATION ===== */
.scroll-nav {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none; /* Пропускаем клики когда кнопки не видны */
}

.scroll-nav__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto; /* Кнопки кликабельные */
}

.scroll-nav__btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.scroll-nav__btn:active {
    transform: scale(0.95);
}

[data-theme="dark"] .scroll-nav__btn {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .scroll-nav__btn:hover {
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

.lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox__content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox__image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox__image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: grab;
}

.lightbox__image:active {
    cursor: grabbing;
}

.lightbox__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lightbox__close:hover {
    opacity: 1;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 16px;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox__nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.lightbox__nav--prev {
    left: -60px;
}

.lightbox__nav--next {
    right: -60px;
}

.lightbox__counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

/* Адаптив для лайтбокса */
@media (max-width: 768px) {
    .lightbox__nav--prev {
        left: 10px;
    }
    
    .lightbox__nav--next {
        right: 10px;
    }
    
    .lightbox__close {
        top: 10px;
        right: 10px;
    }
    
    .lightbox__counter {
        bottom: 10px;
    }
}

[data-theme="dark"] .theme-wave {
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0) 100%);
}

.theme-wave--from-bottom {
    background: linear-gradient(0deg, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0.03) 50%, 
        rgba(0, 0, 0, 0) 100%);
}

[data-theme="dark"] .theme-wave--from-bottom {
    background: linear-gradient(0deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0) 100%);
}

.theme-wave.animating {
    height: 100%;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.types__item,
.about__content {
    animation: fadeInUp 0.6s ease forwards;
}