/* Mira Kabaeva — Photography Portfolio */
:root {
    --color-bg: #0d0d0d;
    --color-text: #f5f0eb;
    --color-accent: #c9a86c;
    --color-muted: #8a847a;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Jost', -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-weight: 300;
    overflow-x: hidden;
    max-width: 100%;
}

main {
    width: 100%;
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 2rem;
    background: linear-gradient(to bottom, rgba(13,13,13,0.95), transparent);
    transition: background 0.3s;
}

.header.scrolled {
    background: rgba(13,13,13,0.98);
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--color-muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
}

/* Hero — фон задаётся через inline style из админки */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(13,13,13,0.85) 0%, rgba(13,13,13,0.5) 100%);
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(13,13,13,0.6) 100%);
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero-tagline {
    font-size: 1rem;
    color: var(--color-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 500;
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--color-muted);
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.hero-cta:hover {
    background: var(--color-accent);
    color: var(--color-bg);
}

/* Portfolio section */
.portfolio-section {
    padding: 4rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.portfolio-category-item {
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s;
}

.portfolio-category-item:hover {
    transform: scale(1.02);
}

.portfolio-category-cover {
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.portfolio-category-item:hover .portfolio-category-cover {
    transform: scale(1.05);
}

.portfolio-category-label {
    display: block;
    padding: 1rem 0;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
}

/* Prices section */
.prices-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.price-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(201, 168, 108, 0.2);
    border-radius: 8px;
    padding: 2rem;
    transition: border-color 0.3s;
}

.price-card:hover {
    border-color: rgba(201, 168, 108, 0.4);
}

.price-card h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.price-card p {
    color: var(--color-muted);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.price-link {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: all 0.3s;
}

.price-link:hover {
    background: var(--color-accent);
    color: var(--color-bg);
}

/* Gallery — masonry layout */
.gallery-section {
    padding: 4rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-masonry {
    column-count: 2;
    column-gap: 1rem;
}

@media (min-width: 768px) {
    .gallery-masonry {
        column-count: 3;
        column-gap: 1.25rem;
    }
}

@media (min-width: 1200px) {
    .gallery-masonry {
        column-count: 4;
        column-gap: 1.5rem;
    }
}

.gallery-item {
    display: block;
    break-inside: avoid;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    vertical-align: bottom;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-empty {
    text-align: center;
    color: var(--color-muted);
    padding: 4rem 2rem;
    font-style: italic;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    border-radius: 50%;
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
}

/* Contacts */
.contacts {
    padding: 5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.contacts-content {
    text-align: center;
}

.contacts-text {
    margin-bottom: 1.5rem;
    color: var(--color-muted);
}

.contact-instagram,
.contact-telegram {
    display: block;
    color: var(--color-accent);
    font-size: 1.25rem;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: opacity 0.3s;
}

.contact-instagram:hover,
.contact-telegram:hover {
    opacity: 0.8;
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer p {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.3s;
        z-index: 99;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 101;
    }

    .gallery-masonry {
        column-count: 2;
        column-gap: 0.75rem;
    }

    .gallery-item {
        margin-bottom: 0.75rem;
    }

    .portfolio-categories {
        grid-template-columns: 1fr;
        margin-top: 2rem;
    }

    .prices-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        background-position: 60% center;
    }
}
