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

:root {
    --terracotta: #C67B5C;
    --sage-dark: #5C6B4A;
    --cream: #FAF7F2;
    --cream-dark: #F0EBE3;
    --charcoal: #2C2C2C;
    --warm-gray: #6B6560;
    --sand: #D4C5B0;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: var(--charcoal);
    background: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    line-height: 1.2;
}

/* ---------- Шапка ---------- */
header {
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(198, 123, 92, 0.1);
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    letter-spacing: 0.05em;
    color: var(--charcoal);
    text-decoration: none;
}

.logo span { color: var(--terracotta); font-style: italic; }

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

nav a, .back-link {
    text-decoration: none;
    color: var(--warm-gray);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s;
}

nav a:hover, .back-link:hover { color: var(--terracotta); }

/* ---------- Hero ---------- */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(198,123,92,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(139,154,107,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.hero-subtitle {
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1.5rem;
}

.hero h1 { font-size: clamp(3rem, 8vw, 5.5rem); margin-bottom: 1.5rem; }
.hero h1 em { font-style: italic; color: var(--terracotta); }

.hero-description {
    font-size: 1.1rem;
    color: var(--warm-gray);
    margin-bottom: 3rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--sand);
}

.stat { text-align: center; }

.stat-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    color: var(--terracotta);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--warm-gray);
}

/* ---------- Секции ---------- */
section { padding: 6rem 3rem; }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.section-header p { color: var(--warm-gray); max-width: 500px; margin: 0 auto; }

.section-tag {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1rem;
    display: block;
}

/* ---------- Галерея ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.plant-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
    display: block;
    text-decoration: none;
    color: inherit;
}

.plant-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.plant-card-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--cream-dark);
    overflow: hidden;
    position: relative;
}

.plant-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.plant-card:hover .plant-card-image img { transform: scale(1.06); }

.plant-card-content { padding: 1.5rem; }

.plant-card-name { font-size: 1.4rem; margin-bottom: 0.3rem; }

.plant-card-latin {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--sage-dark);
    margin-bottom: 0.8rem;
}

.plant-card-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    background: var(--cream);
    border-radius: 20px;
    color: var(--warm-gray);
    letter-spacing: 0.05em;
}

.tag.favorite { background: rgba(198,123,92,0.1); color: var(--terracotta); }

/* ---------- Избранное ---------- */
.favorites { background: var(--cream-dark); }

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.favorite-item { text-align: center; }

.favorite-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: white;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}

.favorite-item:hover .favorite-image { transform: scale(1.05); }

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

.favorite-name { font-size: 1.3rem; }

/* ---------- Кнопки и футер ---------- */
.btn {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: var(--charcoal);
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 50px;
    transition: background 0.3s, transform 0.3s;
}

.btn:hover { background: var(--terracotta); transform: translateY(-2px); }

.coming-soon {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--terracotta);
    color: white;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 20px;
    margin-top: 1rem;
}

footer { text-align: center; padding: 3rem; border-top: 1px solid var(--sand); }

.footer-logo { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; margin-bottom: 0.5rem; }
.footer-logo span { color: var(--terracotta); font-style: italic; }
footer p { font-size: 0.8rem; color: var(--warm-gray); }

/* ---------- Страница растения ---------- */
.plant-detail { max-width: 1200px; margin: 0 auto; padding: 3rem; }

.plant-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: center;
}

.plant-image-main {
    aspect-ratio: 1;
    background: var(--cream-dark);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06);
}

.plant-image-main img { width: 100%; height: 100%; object-fit: cover; display: block; }

.plant-info h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 0.5rem; }

.plant-latin { font-size: 1.2rem; font-style: italic; color: var(--sage-dark); margin-bottom: 2rem; }

.plant-description { color: var(--warm-gray); margin-bottom: 2rem; line-height: 1.8; }

.tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.5rem; }

.care-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.care-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}

.care-icon { font-size: 2rem; margin-bottom: 0.8rem; }

.care-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-bottom: 0.3rem;
}

.care-value { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; }

.photo-gallery { margin-top: 3rem; }
.photo-gallery h2 { font-size: 2rem; margin-bottom: 2rem; }

.gallery-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.gallery-item {
    aspect-ratio: 1;
    background: var(--cream-dark);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
    cursor: pointer;
}

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

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

.timeline {
    margin-top: 4rem;
    padding: 3rem;
    background: var(--cream-dark);
    border-radius: 16px;
}

.timeline h2 { font-size: 2rem; margin-bottom: 2rem; }

.timeline-item {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--sand);
}

.timeline-item:last-child { border-bottom: none; }

.timeline-date { min-width: 120px; font-size: 0.85rem; color: var(--terracotta); }
.timeline-text { color: var(--warm-gray); }

.plant-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--sand);
}

.plant-nav a {
    text-decoration: none;
    color: var(--warm-gray);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.plant-nav a:hover { color: var(--terracotta); }

/* ---------- Бургер-меню ---------- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 110;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--charcoal);
    border-radius: 2px;
    position: absolute;
    left: 10px;
    transition: transform 0.3s ease, top 0.3s ease, background 0.3s ease;
}

.menu-toggle span { top: 21px; }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }

.menu-toggle.active span { background: transparent; }
.menu-toggle.active span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.active span::after { top: 0; transform: rotate(-45deg); }

body.no-scroll { overflow: hidden; }

/* ---------- Адаптивность ---------- */
@media (max-width: 768px) {
    header {
        padding: 1.5rem;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(250, 247, 242, 0.98);
    }

    nav {
        position: fixed;
        inset: 0;
        background: rgba(250, 247, 242, 0.98);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 105;
    }

    nav.open {
        opacity: 1;
        visibility: visible;
    }

    nav ul {
        flex-direction: column;
        gap: 2.2rem;
        text-align: center;
    }

    nav a {
        font-size: 1.15rem;
        letter-spacing: 0.25em;
    }

    .menu-toggle { display: block; }

    section { padding: 4rem 1.5rem; }
    .stats { flex-direction: column; gap: 1.5rem; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .plant-detail { padding: 2rem 1.5rem; }
    .plant-header { grid-template-columns: 1fr; gap: 2rem; }
    .gallery-row { grid-template-columns: repeat(2, 1fr); }
    .timeline-item { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 400px) {
    .logo { font-size: 1.3rem; }
}
   /* ---------- Плейсхолдеры и пустые состояния ---------- */
   .plant-card.placeholder {
       background: transparent;
       border: 2px dashed var(--sand);
       box-shadow: none;
       display: flex;
       align-items: center;
       justify-content: center;
       text-align: center;
       min-height: 300px;
       padding: 2rem;
       color: var(--warm-gray);
       cursor: default;
   }
   .plant-card.placeholder:hover { transform: none; box-shadow: none; }
   .placeholder-number {
       font-family: 'Cormorant Garamond', serif;
       font-size: 2.2rem;
       color: var(--terracotta);
       display: block;
       margin-bottom: 0.5rem;
   }
   .favorite-empty {
       width: 180px;
       height: 180px;
       border-radius: 50%;
       border: 2px dashed var(--sand);
       margin: 0 auto 1.5rem;
       display: flex;
       align-items: center;
       justify-content: center;
       font-size: 2.2rem;
       color: var(--sand);
   }
   .favorite-item p {
       color: var(--warm-gray);
       font-size: 0.9rem;
       max-width: 260px;
       margin: 0 auto;
   }
   .timeline-empty { color: var(--warm-gray); }
/* ---------- Hero с фоновым фото ---------- */
.hero.has-photo {
    background:
        linear-gradient(135deg, rgba(250,247,242,0.88) 0%, rgba(240,235,227,0.92) 100%),
        url('photos/collection/shelf-1.jpg') center/cover no-repeat;
    min-height: 90vh;
}

.hero.has-photo .hero-content {
    background: rgba(250, 247, 242, 0.75);
    backdrop-filter: blur(8px);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* ---------- Секция "Вид на коллекцию" ---------- */
.collection-view {
    background: var(--cream);
    padding: 6rem 3rem;
}

.collection-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.collection-view-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--cream-dark);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.collection-view-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.collection-view-item:hover img {
    transform: scale(1.04);
}

.collection-view-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    color: white;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .collection-view { padding: 4rem 1.5rem; }
    .collection-view-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
/* ---------- Лайтбокс (увеличение фото по клику) ---------- */
.lightbox {
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

.lightbox:hover {
    opacity: 0.85;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.92);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
    padding: 2rem;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 1001;
}

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

.lightbox-caption {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.8);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    text-align: center;
    z-index: 1001;
}
