:root {
    --primary-color: #2b2b2b; 
    --primary-hover: #d62839; 
    --text-color: #2b2b2b;
    --text-muted: #666666; 
    --bg-color: #ffffff;
    --bg-light: #fafafa;
    --footer-bg: #1c211d;
    --header-height: 70px; 
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

html { scroll-behavior: smooth; background-color: var(--bg-light); }

body {
    margin: 0; font-family: var(--font-body); color: var(--text-color);
    background-color: transparent; padding-top: var(--header-height); line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box; 
}

main {
    flex-grow: 0; 
    width: 100%;
}

body::before {
    content: ""; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80vw; height: 80vh; background-image: url('./images/svg/2.svg');
    background-size: contain; background-repeat: no-repeat; background-position: center;
    opacity: 0.02; z-index: -1; pointer-events: none; 
}

h1, h2, h3 { font-family: var(--font-heading); margin-top: 0; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
.header {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02); z-index: 1000;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { display: flex; align-items: center; }
.logo-icon { width: 40px; height: 40px; background-image: url('./images/svg/3.svg'); background-size: contain; background-repeat: no-repeat; background-position: center; }
.nav { display: flex; align-items: center; }
.nav a { text-decoration: none; color: var(--text-color); margin-left: 32px; font-weight: 500; font-size: 0.95rem; transition: color 0.3s ease; }
.nav a:hover { color: var(--primary-hover); }

/* HERO */
.hero-section { padding: 120px 0 80px; text-align: center; }
.hero-content { max-width: 760px; margin: 0 auto; }
.hero-section h1 { font-size: 3.8rem; color: var(--text-color); margin-bottom: 24px; line-height: 1.15; letter-spacing: -0.5px; }
.hero-section p { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 0; line-height: 1.7; }
.social-links { display: flex; justify-content: center; gap: 24px; margin-top: 45px; }
.btn-social-icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; background-color: white; border: 1px solid rgba(0, 0, 0, 0.05); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03); transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.btn-social-icon .icon { display: block; width: 28px; height: 28px; background-color: var(--text-color); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; transition: all 0.4s ease; }
.icon-vk { -webkit-mask-image: url('./images/svg/svg-socialmedia/vk.svg'); mask-image: url('./images/svg/svg-socialmedia/vk.svg'); }
.icon-tg { -webkit-mask-image: url('./images/svg/svg-socialmedia/telega.svg'); mask-image: url('./images/svg/svg-socialmedia/telega.svg'); }
.btn-social-icon:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(214, 40, 57, 0.15); border-color: var(--primary-hover); }
.btn-social-icon:hover .icon { background-color: var(--primary-hover); transform: scale(1.1); }

/* =========================================
   ПЛАВНОЕ РАЗДВИГАНИЕ ЭКРАНА (ОПУСКАНИЕ ФУТЕРА)
========================================= */
.async-section {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    /* Умная математическая кривая для плавного выдвижения: начинает быстро, заканчивает очень мягко */
    transition: max-height 1.2s cubic-bezier(0.25, 1, 0.5, 1), 
                padding-top 1.2s cubic-bezier(0.25, 1, 0.5, 1),
                padding-bottom 1.2s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.8s ease 0.3s;
}

#prices.is-loaded {
    opacity: 1;
    max-height: 600px;
    padding-top: 80px !important;
    padding-bottom: 100px !important;
}

#showcase.is-loaded {
    opacity: 1;
    max-height: 1000px; /* Раздвигаем секцию на нужную высоту */
    padding-top: 60px !important;
    padding-bottom: 0 !important;
}

/* ЗАГОЛОВКИ СЕКЦИЙ */
.showcase-section { 
    position: relative; z-index: 1; 
}
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.8rem; margin-bottom: 12px; color: var(--text-color); }
.subtitle { color: var(--text-muted); font-size: 1.1rem; }

/* =========================================
   ИДЕАЛЬНЫЙ СРЕЗ ВК-ЛЕНТЫ
========================================= */
.vk-feed-wrapper {
    position: relative;
    min-height: 650px; 
    max-height: 650px; 
    overflow: hidden; 
    transition: max-height 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), height 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%;
}

.vk-feed-wrapper.is-expanded {
    padding-bottom: 0; 
}

/* Градиент до раскрытия */
.vk-feed-fade {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 280px; 
    background: linear-gradient(to bottom, rgba(250, 250, 250, 0) 0%, rgba(250, 250, 250, 0.85) 60%, rgba(250, 250, 250, 1) 100%);
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 50px; 
    z-index: 20; pointer-events: none;
}

.vk-feed-wrapper.is-expanded .vk-feed-fade { display: none !important; }

/* Градиент ВНИЗУ раскрытой ленты */
.vk-feed-wrapper::after {
    content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 280px; 
    background: linear-gradient(to bottom, rgba(250, 250, 250, 0) 0%, rgba(250, 250, 250, 0.85) 60%, rgba(250, 250, 250, 1) 100%);
    pointer-events: none; z-index: 15; opacity: 0; transition: opacity 0.8s ease;
}

.vk-feed-wrapper.is-expanded::after { opacity: 1; }

.btn-primary {
    padding: 18px 48px; border-radius: 100px; 
    background-color: var(--footer-bg); 
    color: white; border: none; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15); pointer-events: auto; 
}
.btn-primary:hover { 
    background-color: #2e3630; 
    transform: translateY(-4px); 
    box-shadow: 0 12px 35px rgba(28, 33, 29, 0.35); 
}

/* =========================================
   СЕТКА MASONRY
========================================= */
.vk-grid { display: block; width: 100%; }

.vk-card {
    background: white; border-radius: 24px; overflow: hidden; box-sizing: border-box; 
    margin-bottom: 24px; border: 1px solid rgba(0,0,0,0.06); position: relative; z-index: 10; 
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s;
}

.vk-grid-sizer, .vk-card { width: 23.5%; }
.vk-gutter-sizer { width: 2%; }

.vk-card:hover { transform: translateY(-4px); }
.vk-card-link { display: block; width: 100%; height: auto; overflow: hidden; background-color: #f4f4f4; border-radius: 24px 24px 0 0; }
.vk-card img { display: block; width: 100%; height: auto; object-fit: cover; }
.vk-card-content { padding: 14px 18px; }
.vk-card-text { font-size: 0.9rem; line-height: 1.6; color: #4a4a4a; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* =========================================
   ФУТЕР
========================================= */
.footer {
    background: var(--footer-bg); color: white; padding: 80px 0; text-align: center;
    position: relative; z-index: 25; margin-top: 0; 
    flex-grow: 1; /* Заполняет пустоту снизу, если контента мало */
}

.footer h2 { color: white; font-size: 2.2rem; margin-bottom: 30px; }
.footer-info p { color: rgba(255, 255, 255, 0.7); margin-bottom: 12px; font-size: 1.05rem; }
.footer-info strong { color: white; font-weight: 500; }
.phone-link { color: white; text-decoration: none; transition: opacity 0.3s ease; }
.phone-link:hover { opacity: 0.7; }

/* =========================================
   КАРУСЕЛЬ ЦЕН
========================================= */
.prices-section { background-color: var(--bg-color); }
.carousel-container { width: 100%; overflow: hidden; }
.prices-carousel { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 20px 0 40px; cursor: grab; user-select: none; scrollbar-width: none; -ms-overflow-style: none; }
.prices-carousel::-webkit-scrollbar { display: none; }
.prices-carousel.is-dragging { scroll-behavior: auto !important; scroll-snap-type: none !important; cursor: grabbing !important; }
.price-card { position: relative; flex: 0 0 calc((100% - 72px) / 4); scroll-snap-align: start; border-radius: 24px; background: transparent; border: none; transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.price-card:hover { transform: translateY(-8px); }
.price-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; display: block; border-radius: 24px; background-color: #f4f4f4; pointer-events: none; border: 1px solid rgba(0,0,0,0.06); }
.price-card-info { position: absolute; bottom: 16px; right: 16px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 10px 20px; border-radius: 100px; box-shadow: 0 8px 20px rgba(0,0,0,0.1); text-align: right; }
.price-card-price { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--text-color); margin: 0; line-height: 1; }

/* =========================================
   АДАПТИВНОСТЬ
========================================= */
.mobile-menu-toggle { display: none; flex-direction: column; justify-content: space-between; width: 32px; height: 22px; background: transparent; border: none; cursor: pointer; z-index: 1001; padding: 0; }
.mobile-menu-toggle span { width: 100%; height: 2px; background-color: var(--primary-color); transition: all 0.3s ease; }

@media (max-width: 1400px) {
    .vk-grid-sizer, .vk-card { width: 32%; }
    .vk-gutter-sizer { width: 2%; }
    .price-card { flex: 0 0 calc((100% - 48px) / 3); }
}

@media (max-width: 992px) {
    .vk-grid-sizer, .vk-card { width: 48%; }
    .vk-gutter-sizer { width: 4%; }
    .price-card { flex: 0 0 calc((100% - 24px) / 2); }
}

@media (max-width: 768px) {
    :root { --header-height: 60px; }
    .hero-section h1 { font-size: 2.5rem; margin-bottom: 15px; }
    .section-header h2 { font-size: 2.2rem; }
    .hero-section { padding: 80px 0 40px; }
    .header-inner { justify-content: center; position: relative; }
    .logo-icon { width: 32px; height: 32px; }
    .mobile-menu-toggle { display: flex; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
    .nav { position: fixed; top: var(--header-height); left: 0; width: 100%; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); flex-direction: column; align-items: center; padding: 30px 0; gap: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.05); transform: translateY(-150%); opacity: 0; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); z-index: 999; }
    .nav a { margin: 0; font-size: 1.2rem; }
    .nav.is-active { transform: translateY(0); opacity: 1; }
    .mobile-menu-toggle.is-active span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
    .mobile-menu-toggle.is-active span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.is-active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }
    .vk-feed-wrapper { min-height: 550px; max-height: 550px; }
}

@media (max-width: 600px) {
    .vk-grid-sizer, .vk-card { width: 100%; }
    .vk-gutter-sizer { width: 0; }
    .price-card { flex: 0 0 calc(100% - 16px); }
    .social-links { gap: 20px; }
    .btn-social-icon { width: 54px; height: 54px; }
    .btn-social-icon .icon { width: 24px; height: 24px; }
}