@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;700&family=Montserrat:wght@300;500;700&display=swap');

:root {
    --primary: #ff66b2;
    --dark: #1a1a1a;
    --light: #ffffff;
    --off-white: rgba(255, 253, 245, 0.95);
    --gold: #d4af37;
    --gradient: linear-gradient(135deg, #9d50bb, #ff66b2);
    --heading-font: 'Cormorant Garamond', serif;
    --body-font: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--body-font);
}

html {
  background: #090d00;
}

/* BACKGROUND */

#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -999; /* Более низкий z-index */
  pointer-events: none; /* Чтобы не мешало взаимодействию */
}

#bg canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
body {
    color: var(--dark);
    padding-top: 90px;
    position: relative; /* Важно для z-index контекста */
    background: transparent !important; /* Уберите фон у body */
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: transparent;
    transition: all 0.4s ease;
}

header.scrolled {
    background: linear-gradient(135deg, #1a2a6c, #3a7bd5, #1a2a6c);
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 15px 5%;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.logo img {
    height: 60px;
    width: auto;
    transition: all 0.4s ease;
}

header.scrolled .logo img {
    height: 50px;
}

/* Navigation */
.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    font-size: 20px;
    position: relative;
    transition: all 0.4s ease;
    padding-bottom: 5px;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}

.nav-links a:hover:after {
    width: 100%;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 12px;
    margin-right: auto;
    margin-left: 10px;
}

.social-icons a {
    color: var(--light);
    font-size: 1.7rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

header.scrolled .social-icons a {
    color: white;
}

/* Booking Button */
.booking-btn-container {
    margin-left: auto;
    z-index: 1001;
}

.btn-book {
    background: var(--gradient);
    color: white;
    padding: 15px 35px;
    border-radius: 35px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    white-space: nowrap;
}

.btn-book:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.3);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: url('../images/Шапка Сайт.png') center/cover no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: -90px;
}

.hero-content {
    text-align: center;
    color: var(--off-white);
    padding: 0 20px;
    position: absolute;
    bottom: 40%;
    left: 0;
    right: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 1.8rem;
    letter-spacing: 0.5em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: rgba(255, 253, 245, 0.9);
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 6rem;
    margin: 1rem 0;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.hero-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 1.8rem;
    letter-spacing: 0.5em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: rgba(255, 253, 245, 0.9);
}

.hero-text .heart-emoji {
    opacity: 0;
    transform: scale(0);
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hero-text:hover .heart-emoji {
    opacity: 1;
    transform: scale(1.2) rotate(15deg);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    z-index: 1;
}

.hero-content > * {
    position: relative;
    z-index: 2;
}

/* Designs Section */
.designs-section {
    padding: 80px 0;
    min-height: 100vh;
}

.designs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.designs-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 2px;
}

.designs-subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #ffffff;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Categories */
.design-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
}

.category-btn {
    padding: 12px 24px;
    border: 2px solid #e6e0f3;
    background: white;
    color: #000;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.category-btn:hover {
    border-color: #c5b5e6;
    color: #333;
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, #8a6bc9 0%, #6c4bb1 100%);
    color: white;
    border-color: #8a6bc9;
    box-shadow: 0 4px 15px rgba(138, 107, 201, 0.3);
}

/* Gallery */
.designs-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
    min-height: 400px;
}

.design-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.design-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.design-image-container {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.design-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.design-card:hover .design-image {
    transform: scale(1.05);
}

.design-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.design-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: #8a6bc9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.design-info {
    padding: 20px;
}

.design-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.design-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* CTA Section */
.designs-cta {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
}

.designs-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.designs-cta p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 25px;
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #8a6bc9 0%, #6c4bb1 100%);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 107, 201, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(138, 107, 201, 0.4);
}

/* Animation for filtering */
.design-card.fade-out {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
}

.design-card.fade-in {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.design-card.hidden {
    display: none;
}

/* Loading state */
.loading {
    text-align: center;
    margin-top: 15px;
    color: #888;
}

/* Desktop Social Icons */
.desktop-social-icons {
    display: flex;
    gap: 12px;
    margin-right: auto;
    margin-left: 10px;
}

.desktop-social-icons a {
    color: var(--light);
    font-size: 1.7rem;
    transition: all 0.3s ease;
}

.desktop-social-icons a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

header.scrolled .desktop-social-icons a {
    color: white;
}
/* ==================== АДАПТИВНОСТЬ ДЛЯ СЕКЦИИ ДИЗАЙНОВ ==================== */

/* Планшеты и небольшие ноутбуки (1024px и меньше) */
@media (max-width: 1024px) {
    .designs-section {
        padding: 70px 0;
    }
    
    .designs-title {
        font-size: 2.2rem;
    }
    
    .designs-subtitle {
        font-size: 1rem;
        margin-bottom: 35px;
        max-width: 500px;
    }
    
    .designs-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .design-image-container {
        height: 220px;
    }
    
    .design-categories {
        margin-bottom: 40px;
    }
    
    .category-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .designs-cta {
        padding: 35px;
        max-width: 550px;
    }
    
    .designs-cta h3 {
        font-size: 1.4rem;
    }
}

/* Планшеты (768px и меньше) */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
    
    header {
        padding: 15px 4%;
    }
    
    .logo img {
        height: 50px;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: linear-gradient(135deg, #1a2a6c, #3a7bd5, #1a2a6c);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 20px;
        padding: 10px 20px;
    }
    
    .desktop-social-icons {
        display: none;
    }
    
    .booking-btn-container {
        margin-left: 0;
    }
    
    .btn-book {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--light);
        font-size: 1.8rem;
        cursor: pointer;
        z-index: 1000;
    }
    
    /* Hero Section */
    .hero {
        margin-top: -80px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        letter-spacing: 0.3em;
    }
    
    .hero-text {
        font-size: 1.4rem;
        letter-spacing: 0.3em;
    }
    
    .hero-content {
        bottom: 35%;
    }
    
    /* Designs Section */
    .designs-section {
        padding: 60px 0;
    }
    
    .designs-title {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .designs-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
        padding: 0 15px;
    }
    
    .design-categories {
        gap: 12px;
        margin-bottom: 35px;
        padding: 0 10px;
    }
    
    .category-btn {
        padding: 9px 18px;
        font-size: 0.85rem;
    }
    
    .designs-gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
        padding: 0 10px;
    }
    
    .design-image-container {
        height: 200px;
    }
    
    .design-info {
        padding: 15px;
    }
    
    .design-title {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .design-description {
        font-size: 0.85rem;
    }
    
    .designs-cta {
        padding: 30px 20px;
        margin: 0 15px;
        max-width: 100%;
    }
    
    .designs-cta h3 {
        font-size: 1.3rem;
    }
    
    .designs-cta p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .cta-button {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
}

/* Большие смартфоны (576px и меньше) */
@media (max-width: 576px) {
    body {
        padding-top: 70px;
    }
    
    header {
        padding: 12px 3%;
    }
    
    .logo img {
        height: 40px;
    }
    
    .btn-book {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    /* Hero Section */
    .hero {
        margin-top: -70px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 0.2em;
        margin-bottom: 1rem;
    }
    
    .hero-text {
        font-size: 1.2rem;
        letter-spacing: 0.2em;
        margin-top: 1.5rem;
    }
    
    .hero-content {
        bottom: 30%;
        padding: 0 15px;
    }
    
    /* Designs Section */
    .designs-section {
        padding: 50px 0;
    }
    
    .designs-title {
        font-size: 1.8rem;
    }
    
    .designs-subtitle {
        font-size: 0.9rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .design-categories {
        gap: 10px;
        margin-bottom: 30px;
        padding: 0 5px;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .designs-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        padding: 0 5px;
    }
    
    .design-image-container {
        height: 180px;
    }
    
    .design-overlay {
        top: 10px;
        right: 10px;
        padding: 4px 10px;
    }
    
    .design-category {
        font-size: 0.75rem;
    }
    
    .design-info {
        padding: 12px;
    }
    
    .design-title {
        font-size: 1rem;
    }
    
    .design-description {
        font-size: 0.8rem;
    }
    
    .designs-cta {
        padding: 25px 15px;
        margin: 0 10px;
    }
    
    .designs-cta h3 {
        font-size: 1.2rem;
    }
    
    .designs-cta p {
        font-size: 0.9rem;
        margin-bottom: 18px;
    }
    
    .cta-button {
        padding: 11px 25px;
        font-size: 0.9rem;
    }
}

/* Маленькие смартфоны (375px и меньше) */
@media (max-width: 375px) {
    body {
        padding-top: 60px;
    }
    
    header {
        padding: 10px 3%;
    }
    
    .logo img {
        height: 35px;
    }
    
    .btn-book {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .nav-links {
        width: 85%;
    }
    
    .nav-links a {
        font-size: 18px;
        padding: 8px 0;
    }
    
    /* Hero Section */
    .hero {
        margin-top: -60px;
    }
    
    .hero-title {
        font-size: 2.3rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 0.15em;
    }
    
    .hero-text {
        font-size: 1.1rem;
        letter-spacing: 0.15em;
    }
    
    .hero-content {
        bottom: 25%;
        padding: 0 10px;
    }
    
    /* Designs Section */
    .designs-section {
        padding: 40px 0;
    }
    
    .designs-title {
        font-size: 1.6rem;
    }
    
    .designs-subtitle {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
    
    .design-categories {
        gap: 8px;
        margin-bottom: 25px;
    }
    
    .category-btn {
        padding: 7px 14px;
        font-size: 0.75rem;
    }
    
    .designs-gallery {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0;
    }
    
    .design-card {
        margin: 0 10px;
    }
    
    .design-image-container {
        height: 160px;
    }
    
    .design-overlay {
        top: 8px;
        right: 8px;
        padding: 3px 8px;
    }
    
    .design-category {
        font-size: 0.7rem;
    }
    
    .design-info {
        padding: 10px;
    }
    
    .design-title {
        font-size: 0.95rem;
    }
    
    .design-description {
        font-size: 0.75rem;
    }
    
    .designs-cta {
        padding: 20px 12px;
        margin: 0 8px;
    }
    
    .designs-cta h3 {
        font-size: 1.1rem;
    }
    
    .designs-cta p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .cta-button {
        padding: 10px 22px;
        font-size: 0.85rem;
    }
}

/* Очень маленькие смартфоны (320px и меньше) */
@media (max-width: 320px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
        letter-spacing: 0.1em;
    }
    
    .hero-text {
        font-size: 1rem;
        letter-spacing: 0.1em;
    }
    
    .designs-title {
        font-size: 1.5rem;
    }
    
    .designs-subtitle {
        font-size: 0.8rem;
    }
    
    .category-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .design-image-container {
        height: 150px;
    }
    
    .designs-cta {
        padding: 18px 10px;
    }
    
    .designs-cta h3 {
        font-size: 1rem;
    }
    
    .designs-cta p {
        font-size: 0.8rem;
    }
    
    .cta-button {
        padding: 9px 20px;
        font-size: 0.8rem;
    }
}

/* Ландшафтная ориентация для мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 120vh;
    }
    
    .hero-content {
        bottom: 30%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-text {
        font-size: 1.1rem;
        margin-top: 1rem;
    }
    
    .nav-links {
        padding-top: 60px;
        gap: 15px;
    }
    
    .nav-links a {
        font-size: 16px;
        padding: 6px 0;
    }
    
    /* В ландшафте показываем 2 колонки */
    .designs-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Для высоких устройств (iPhone 12/13 Pro Max) */
@media (min-height: 800px) and (max-width: 430px) {
    .hero-content {
        bottom: 45%;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-text {
        font-size: 1.3rem;
    }
    
    .designs-gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* iPad Pro и другие большие планшеты */
@media (min-width: 1025px) and (max-width: 1366px) {
    .designs-container {
        max-width: 1000px;
    }
    
    .designs-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

/* Особые стили для iPhone (безопасные зоны) */
@supports (padding: max(0px)) {
    header {
        padding-left: max(25px, env(safe-area-inset-left));
        padding-right: max(25px, env(safe-area-inset-right));
    }
    
    .nav-links {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    @media (max-width: 768px) {
        header {
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
        }
        
        .nav-links {
            padding-left: max(40px, env(safe-area-inset-left));
            padding-right: max(40px, env(safe-area-inset-right));
        }
        
        .designs-container {
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
        }
    }
}

/* Для ретина-дисплеев */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .design-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    .design-card:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }
}

/* Отключение анимаций для пользователей, которые предпочитают их уменьшение */
@media (prefers-reduced-motion: reduce) {
    .design-card,
    .category-btn,
    .cta-button,
    .hero-title,
    .hero-subtitle,
    .hero-text {
        transition: none !important;
        animation: none !important;
    }
}

/* Mobile Social Icons */
.mobile-social-icons {
    display: none;
}

@media (max-width: 768px) {
    .mobile-social-icons {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-social-icons a {
        color: var(--light);
        font-size: 1.8rem;
        transition: all 0.3s ease;
    }
    
    .mobile-social-icons a:hover {
        transform: translateY(-3px);
        opacity: 0.8;
    }
}