/* === css/style.css (VERSION: FULL MASTER BUNDLE) === */

/* =========================================
   1. GLOBAL SETTINGS & VARIABLES
   ========================================= */
:root {
    --primary: #1e3c72;
    --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --accent: #ff6b6b;
    --accent-hover: #ff4757;
    --bg-color: #e4e7eb; /* CHANGED: Darker background for more density */
    --text-dark: #2d3436;
    --text-light: #636e72;
    --shadow-card: 0 10px 25px rgba(0,0,0,0.08); /* CHANGED: Stronger shadow for contrast */
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.12);
}

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

html { scroll-behavior: smooth; }

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    
    /* Тонкая сетка на фоне всего сайта */
    background-image: radial-gradient(#cbd5e0 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Красивый скроллбар */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Цвет выделения текста */
::selection { background: var(--accent); color: white; }

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px; 
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-menu { display: flex; gap: 30px; }

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    position: relative;
}

.nav-link.active { color: var(--accent); } /* Активная вкладка */

.nav-link::after {
    content: ''; display: block; width: 0; height: 2px;
    background: var(--accent); transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: var(--accent); }

/* Гамбургер */
.hamburger { display: none; cursor: pointer; }
.bar {
    display: block; width: 25px; height: 3px; margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-dark); border-radius: 3px;
}

/* =========================================
   3. HERO SECTION (Main Slider)
   ========================================= */
.hero {
    height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 6s ease;
    transform: scale(1);
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1.05);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.7), rgba(42, 82, 152, 0.4));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 0 20px;
    max-width: 900px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.hero p { 
    font-size: 1.3rem; 
    margin-bottom: 2.5rem; 
    opacity: 0.95; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); 
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
    transition: all 0.3s;
    font-size: 1.1rem;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.6);
}

/* =========================================
   4. LISTINGS GRID (Home Page)
   ========================================= */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

main#listings {
    position: relative;
    background-color: #f8f9fa;
    background-image: 
        linear-gradient(#e5e5f7 1px, transparent 1px), 
        linear-gradient(90deg, #e5e5f7 1px, transparent 1px);
    background-size: 40px 40px;
    overflow: hidden;
    padding-top: 6rem;
    padding-bottom: 6rem;
}

/* Декорации (Пятна) */
main#listings::before {
    content: ''; position: absolute;
    top: 10%; left: -200px; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(30,60,114,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%; z-index: 0; pointer-events: none;
}

main#listings::after {
    content: ''; position: absolute;
    bottom: 10%; right: -200px; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%; z-index: 0; pointer-events: none;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

/* СЕТКА (Мобилка по умолчанию) */
.grid-listings {
    display: grid;
    gap: 2.5rem;
    position: relative;
    z-index: 1;
    grid-template-columns: 1fr;
}

/* Карточка квартиры */
.card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 20px; left: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.card-body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.price {
    color: var(--accent);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.card-btn {
    margin-top: auto;
    display: block;
    width: 100%;
    text-align: center;
    background: #eef2f7;
    color: var(--primary);
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    transition: 0.3s;
}

.card-btn:hover {
    background: var(--primary);
    color: white;
}

/* =========================================
   5. HOME SECTIONS (Features & Reviews)
   ========================================= */
.features-section {
    background: #fff;
    padding: 6rem 0;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.03);
    position: relative;
    z-index: 2;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
    text-align: center;
}

.feature-box { padding: 1rem; }

.icon-wrapper {
    width: 100px; height: 100px;
    background: rgba(255, 107, 107, 0.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem auto;
    transition: 0.4s;
}

.feature-box:hover .icon-wrapper {
    transform: scale(1.15) rotate(10deg);
    background: var(--accent);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.4);
}

.feature-box i { font-size: 3rem; color: var(--accent); transition: color 0.3s; }
.feature-box:hover i { color: white; }
.feature-box h3 { margin-bottom: 1rem; font-size: 1.3rem; color: var(--primary); font-weight: 700; }

.reviews-section {
    background: var(--primary-gradient);
    padding: 6rem 0;
    color: white;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.review-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.reviewer img { width: 60px; height: 60px; border: 3px solid var(--accent); }

/* Footer */
footer {
    background: #1a252f;
    color: #bdc3c7;
    text-align: center;
    padding: 4rem 1rem;
    margin-top: auto;
}

/* =========================================
   6. GLOBAL MEDIA QUERIES (PC & Large)
   ========================================= */

/* Для ПК (от 1024px) - СТРОГО 3 КОЛОНКИ */
@media (min-width: 1024px) {
    .grid-listings {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Для огромных экранов (от 1600px) */
@media (min-width: 1600px) {
    .container { max-width: 1600px; }
    .hero h1 { font-size: 5rem; }
    
    body::before {
        content: ''; position: fixed; top: 20%; left: 2%;
        width: 100px; height: 100px;
        border: 10px solid rgba(30, 60, 114, 0.05);
        border-radius: 20px; transform: rotate(15deg); z-index: -1;
    }
    body::after {
        content: ''; position: fixed; bottom: 20%; right: 2%;
        width: 150px; height: 150px;
        background: rgba(255, 107, 107, 0.05);
        border-radius: 50%; z-index: -1;
    }
}

/* =========================================
   7. MOBILE MENU (Business Class Animation)
   ========================================= */
@media (max-width: 768px) {
    .hamburger { display: block; z-index: 2001; }

    .nav-menu {
        position: fixed; left: 0; top: 0;
        width: 100%; height: 100vh;
        background: rgba(30, 60, 114, 0.98);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; align-items: center;
        gap: 2.5rem; z-index: 2000;
        opacity: 0; visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.4s ease-in-out;
        padding-top: 0; box-shadow: none;
    }

    .nav-menu.active {
        opacity: 1; visibility: visible;
        transform: translateY(0);
    }

    .nav-item {
        margin: 0; opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .nav-menu.active .nav-item {
        opacity: 1; transform: translateY(0);
    }

    .nav-link {
        font-size: 1.8rem; font-weight: 800;
        color: white !important;
        text-transform: uppercase; letter-spacing: 1px;
    }

    /* Каскадная анимация */
    .nav-menu.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active .nav-item:nth-child(2) { transition-delay: 0.2s; }
    .nav-menu.active .nav-item:nth-child(3) { transition-delay: 0.3s; }
    .nav-menu.active .nav-item:nth-child(4) { transition-delay: 0.4s; }
    .nav-menu.active .nav-item:nth-child(5) { transition-delay: 0.5s; }

    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); background: white; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background: white; }
    .hamburger.active .bar { background: white; }

    .hero h1 { font-size: 2.2rem; }
    .hero { height: 60vh; }
    .container { padding: 3rem 1.5rem; }
    .grid-listings { grid-template-columns: 1fr; max-width: 450px; margin: 0 auto; }
}

/* =========================================
   8. PAGE: APARTMENTS.HTML (Filters & Small Hero)
   ========================================= */
.hero-small {
    height: 45vh;
    background-image: url('../img/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-small h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.hero-small p { font-size: 1.1rem; margin-bottom: 0; }

.filter-bar {
    background: white; padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: -80px; margin-bottom: 3rem;
    position: relative; z-index: 10;
    display: flex; flex-wrap: wrap; gap: 1.5rem;
    align-items: center; justify-content: space-between;
}

.filter-group {
    flex: 1; min-width: 200px; position: relative; display: flex; align-items: center;
    background: #f8f9fa; border-radius: 50px; padding: 0.5rem 1.5rem;
    border: 1px solid #eee; transition: 0.3s;
}

.filter-group:hover, .filter-group:focus-within { border-color: var(--primary); background: white; box-shadow: 0 5px 15px rgba(30, 60, 114, 0.1); }
.filter-group i { color: var(--accent); margin-right: 10px; font-size: 1.1rem; }
.filter-group select { width: 100%; border: none; background: transparent; font-family: 'Montserrat', sans-serif; font-weight: 600; color: var(--text-dark); font-size: 0.95rem; cursor: pointer; outline: none; appearance: none; }
.filter-btn { padding: 0.8rem 2.5rem; border-radius: 50px; font-size: 1rem; }

@media (max-width: 768px) {
    .filter-bar { flex-direction: column; margin-top: 0; gap: 1rem; }
    .filter-group, .filter-btn { width: 100%; }
    .hero-small { height: 30vh; margin-bottom: 2rem; }
}

/* =========================================
   9. PAGE: CONTACTS.HTML
   ========================================= */
main#contacts-page {
    position: relative; background-color: #f8f9fa; min-height: 60vh;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
main#contacts-page::before { content: ''; position: absolute; top: -100px; left: -100px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(30,60,114,0.08) 0%, rgba(255,255,255,0) 70%); border-radius: 50%; pointer-events: none; }
main#contacts-page::after { content: ''; position: absolute; bottom: -100px; right: -100px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255, 107, 107, 0.08) 0%, rgba(255,255,255,0) 70%); border-radius: 50%; pointer-events: none; }

.contact-wrapper { width: 100%; max-width: 800px; position: relative; z-index: 2; }
.contact-card-glass { background: white; border-radius: 24px; padding: 3rem; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.02); }
.contact-header h2 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--primary); }
.contact-header p { font-size: 1.1rem; line-height: 1.6; color: var(--text-light); margin-bottom: 3rem; }

.company-details { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 3rem; text-align: left; }
.detail-item { display: flex; align-items: center; gap: 1.5rem; background: #f8f9fa; padding: 1.5rem; border-radius: 16px; transition: 0.3s; }
.detail-item:hover { background: white; box-shadow: 0 10px 25px rgba(0,0,0,0.05); transform: translateY(-5px); }
.icon-circle { width: 60px; height: 60px; background: rgba(30, 60, 114, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--primary); flex-shrink: 0; }
.label { display: block; font-size: 0.85rem; text-transform: uppercase; color: #999; font-weight: 700; margin-bottom: 0.3rem; }
.detail-item h3 { margin: 0; font-size: 1.2rem; color: var(--text-dark); }

.whatsapp-big-btn { background: #25D366; font-size: 1.3rem; padding: 1.2rem 4rem; box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4); display: inline-flex; align-items: center; gap: 10px; }
.whatsapp-big-btn:hover { background: #20bd5a; box-shadow: 0 15px 35px rgba(37, 211, 102, 0.6); transform: translateY(-3px); }

@media (max-width: 768px) {
    .contact-card-glass { padding: 2rem 1.5rem; }
    .company-details { grid-template-columns: 1fr; gap: 1rem; }
    .contact-header h2 { font-size: 1.8rem; }
    .whatsapp-big-btn { width: 100%; justify-content: center; }
}

/* =========================================
   10. PAGE: VIDEO-TOURS.HTML (Custom Player)
   ========================================= */
main#video-page { position: relative; background-color: #f8f9fa; background-image: linear-gradient(#e5e5f7 1px, transparent 1px), linear-gradient(90deg, #e5e5f7 1px, transparent 1px); background-size: 40px 40px; overflow: hidden; padding-top: 5rem; padding-bottom: 5rem; }
main#video-page::before { content: ''; position: absolute; top: -100px; left: -100px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(30,60,114,0.08) 0%, rgba(255,255,255,0) 70%); border-radius: 50%; z-index: 0; pointer-events: none; }
main#video-page::after { content: ''; position: absolute; bottom: -100px; right: -100px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255, 107, 107, 0.08) 0%, rgba(255,255,255,0) 70%); border-radius: 50%; z-index: 0; pointer-events: none; }

.custom-video-wrapper { position: relative; width: 100%; height: 240px; background: #000; overflow: hidden; cursor: pointer; }
.custom-video-wrapper video { width: 100%; height: 100%; object-fit: cover; }

.play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background: rgba(255, 255, 255, 0.9); border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; z-index: 2; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); animation: pulse-white 2s infinite; }
.play-overlay i { color: var(--primary); font-size: 1.5rem; margin-left: 4px; }
.custom-video-wrapper:hover .play-overlay { transform: translate(-50%, -50%) scale(1.15); background: white; color: var(--accent); }
.custom-video-wrapper:hover .play-overlay i { color: var(--accent); }
.custom-video-wrapper.playing .play-overlay { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.5); }

@keyframes pulse-white { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }

.video-meta { display: flex; gap: 15px; margin-bottom: 0.8rem; font-size: 0.85rem; color: #888; font-weight: 600; }
.video-meta span { display: flex; align-items: center; gap: 5px; }
.video-meta i { color: var(--accent); }

/* =========================================
   11. PAGE: RULES.HTML
   ========================================= */
main#rules-page { position: relative; background-color: #FAFAFC; background-image: none; overflow: hidden; padding-top: 5rem; padding-bottom: 5rem; }
main#rules-page::before { content: ''; position: absolute; top: -100px; left: -100px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(30,60,114,0.05) 0%, rgba(255,255,255,0) 70%); border-radius: 50%; z-index: 0; pointer-events: none; }
main#rules-page::after { content: ''; position: absolute; bottom: -100px; right: -100px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255, 107, 107, 0.05) 0%, rgba(255,255,255,0) 70%); border-radius: 50%; z-index: 0; pointer-events: none; }

.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; position: relative; z-index: 2; margin-bottom: 4rem; }
.rule-card { background: white; padding: 2.5rem 2rem; border-radius: 24px; box-shadow: 0 15px 35px rgba(0,0,0,0.04); border: none; position: relative; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); overflow: hidden; }
.rule-card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px rgba(0,0,0,0.08); }
.rule-number { position: absolute; top: -15px; right: -10px; font-size: 6rem; font-weight: 800; color: rgba(0,0,0,0.02); z-index: 0; line-height: 1; user-select: none; }
.rule-icon { width: 60px; height: 60px; background: rgba(255, 107, 107, 0.1); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--accent); margin-bottom: 1.5rem; position: relative; z-index: 1; transition: 0.4s; }
.rule-card:hover .rule-icon { background: var(--accent); color: white; transform: scale(1.1) rotate(5deg); box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3); }
.rule-card h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; color: var(--primary); position: relative; z-index: 1; }
.rule-card p { color: var(--text-light); line-height: 1.6; font-size: 0.95rem; position: relative; z-index: 1; }

/* НОВЫЙ БЛОК БЕЗОПАСНОСТИ И ДОВЕРИЯ (Data Privacy & Security) */
.security-section { background: linear-gradient(135deg, #ffffff 0%, #f4f7f9 100%); border-radius: 24px; padding: 3rem; margin-bottom: 4rem; box-shadow: 0 20px 40px rgba(0,0,0,0.05); position: relative; z-index: 2; border: 1px solid rgba(255,255,255,0.8); }
.security-section h2 { font-size: 1.8rem; color: var(--primary); margin-bottom: 2rem; display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 800; text-align: center; border: none; }
.security-section h2 i { color: var(--accent) !important; }
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.security-item h4 { color: var(--text-dark); font-size: 1.2rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.security-item h4 i { color: var(--accent) !important; font-size: 1.3rem; }
.security-item p { color: var(--text-light); line-height: 1.6; font-size: 0.95rem; }
.legal-notice { background: rgba(30, 60, 114, 0.04); padding: 1.5rem 2rem; border-radius: 16px; font-size: 0.95rem; color: var(--text-dark); display: flex; align-items: center; gap: 15px; border: none; }
.legal-notice i { color: var(--accent) !important; font-size: 1.5rem; flex-shrink: 0; }
.legal-notice strong { color: var(--primary); font-weight: 700; }

.download-section { margin-top: 4rem; position: relative; z-index: 2; }
.download-box { background: var(--primary-gradient); color: white; padding: 3rem; border-radius: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; box-shadow: 0 15px 40px rgba(30, 60, 114, 0.25); }
.download-text h3 { color: white; font-size: 1.8rem; margin-bottom: 0.5rem; font-weight: 800; }
.download-text p { color: rgba(255,255,255,0.8); font-size: 1rem; }
.download-btn { background: white; color: var(--primary); border: none; font-size: 1rem; padding: 1.2rem 2.5rem; border-radius: 50px; font-weight: 700; cursor: pointer; transition: all 0.3s; }
.download-btn:hover { background: #f1f1f1; color: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

@media (max-width: 768px) { 
    .rules-grid { grid-template-columns: 1fr; } 
    .security-section { padding: 2rem 1.5rem; }
    .security-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .legal-notice { flex-direction: column; text-align: center; padding: 1.5rem; }
    .download-box { flex-direction: column; text-align: center; padding: 2.5rem 1.5rem; } 
    .download-btn { width: 100%; } 
}

/* === НОВЫЕ СТИЛИ ДЛЯ FAQ, CTA И АНИМАЦИЙ === */
.contract-btn {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 15px; padding: 10px 18px;
    background: rgba(231, 76, 60, 0.1); color: #e74c3c;
    border-radius: 8px; font-size: 0.9rem; font-weight: 700;
    transition: 0.3s; text-decoration: none; position: relative; z-index: 2;
}
.contract-btn:hover {
    background: #e74c3c; color: white; transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.2);
}

.faq-accordion {
    max-width: 900px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 15px;
}
.faq-item {
    background: white; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.02);
    overflow: hidden; transition: 0.3s;
}
.faq-item:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.faq-item summary {
    padding: 20px 25px; font-weight: 700; color: #2c3e50; font-size: 1.05rem;
    cursor: pointer; list-style: none; position: relative;
    display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '\f078'; font-family: "Font Awesome 6 Free"; font-weight: 900;
    color: #e74c3c; transition: transform 0.3s ease;
}
.faq-item[open] summary::after { transform: rotate(180deg); color: #2ecc71; }
.faq-answer {
    padding: 0 25px 20px 25px; color: #666; line-height: 1.7; font-size: 0.95rem;
    animation: fadeInFaq 0.4s ease-out; border-top: 1px solid #f1f1f1; margin-top: 10px; padding-top: 15px;
}
@keyframes fadeInFaq { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Каскадная анимация карточек правил */
@keyframes fadeInUpRule {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.rule-card { opacity: 0; animation: fadeInUpRule 0.6s ease-out forwards; }
.rule-card:nth-child(1) { animation-delay: 0.1s; }
.rule-card:nth-child(2) { animation-delay: 0.2s; }
.rule-card:nth-child(3) { animation-delay: 0.3s; }
.rule-card:nth-child(4) { animation-delay: 0.4s; }
.rule-card:nth-child(5) { animation-delay: 0.5s; }
.rule-card:nth-child(6) { animation-delay: 0.6s; }

/* =========================================
   12. PAGE: APARTMENT DETAILS (Gallery & Sidebar)
   ========================================= */
.prop-header-section { padding-top: 2rem; padding-bottom: 1.5rem; }
.prop-badge { background: var(--accent); color: white; font-size: 0.8rem; padding: 4px 12px; border-radius: 20px; font-weight: 700; text-transform: uppercase; display: inline-block; margin-bottom: 0.5rem; }
.prop-top-info h1 { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.5rem; line-height: 1.2; }
.prop-address { font-size: 1.1rem; color: var(--text-light); }

.gallery-section { padding-bottom: 2rem; }
.gallery-wrapper { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; height: 450px; border-radius: 20px; overflow: hidden; cursor: pointer; }
.gallery-main { height: 100%; position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-side { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; }
.gallery-item { position: relative; overflow: hidden; height: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-wrapper img:hover { transform: scale(1.03); }
.view-all-overlay { position: absolute; bottom: 10px; right: 10px; background: white; color: var(--text-dark); padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 0.9rem; box-shadow: 0 5px 15px rgba(0,0,0,0.2); pointer-events: none; }
.mobile-photo-indicator { display: none; }

.property-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; padding-top: 1rem; }
.property-sidebar { position: sticky; top: 100px; z-index: 10; }
.sidebar-card { background: white; padding: 2rem; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.03); }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.price-label { font-size: 0.9rem; color: #888; }
.price-value { font-size: 2rem; font-weight: 800; color: var(--primary); }
.divider { border: 0; border-top: 1px solid #eee; margin: 1.5rem 0; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.info-item { display: flex; align-items: center; gap: 12px; }
.info-item i { font-size: 1.2rem; color: var(--accent); }
.info-item div { display: flex; flex-direction: column; }
.info-item span { font-size: 0.75rem; color: #999; text-transform: uppercase; }
.info-item strong { font-size: 0.95rem; color: var(--text-dark); }

.action-buttons { display: flex; flex-direction: column; gap: 1rem; }
.btn-full { width: 100%; text-align: center; justify-content: center; display: flex; align-items: center; gap: 10px; }
.btn-book { background: var(--primary-gradient); box-shadow: 0 10px 20px rgba(30, 60, 114, 0.3); padding: 1rem; }
.btn-contact { background: #25D366; box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3); padding: 1rem; }
.btn-video-link { background: transparent; color: var(--text-dark); border: 2px solid #eee; box-shadow: none; padding: 0.8rem; }
.sidebar-footer { margin-top: 1.5rem; text-align: center; font-size: 0.85rem; color: #2ecc71; font-weight: 600; }

.content-block { margin-bottom: 3rem; background: white; padding: 2rem; border-radius: 16px; box-shadow: 0 5px 20px rgba(0,0,0,0.02); }
.content-block h2 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--primary); border-left: 4px solid var(--accent); padding-left: 15px; }
.content-block p { color: var(--text-light); line-height: 1.7; margin-bottom: 1rem; }
.amenities-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.amenities-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-dark); }
.amenities-list i { color: var(--primary); background: rgba(30, 60, 114, 0.1); width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.9rem; }

/* =========================================
   13. PREMIUM LIGHTBOX STYLES (New)
   ========================================= */
.lightbox {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(10, 20, 40, 0.95); /* Глубокий темный фон */
    backdrop-filter: blur(15px); /* Сильное размытие фона */
    -webkit-backdrop-filter: blur(15px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show { opacity: 1; }

/* Верхняя панель */
.lightbox-header {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 20px 30px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 10001;
}

.lightbox-counter { color: rgba(255, 255, 255, 0.8); font-size: 1rem; font-weight: 600; letter-spacing: 1px; }
.lightbox-close { background: rgba(255, 255, 255, 0.1); border: none; color: white; width: 45px; height: 45px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: rgba(255, 255, 255, 0.3); transform: rotate(90deg); }

/* Контент */
.lightbox-content { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 20px; }
.lightbox-content img { max-width: 90%; max-height: 85vh; border-radius: 4px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); transform: scale(0.95); transition: transform 0.3s ease; user-select: none; }
.lightbox.show img { transform: scale(1); }

/* Стрелки */
.lightbox-nav { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: white; width: 60px; height: 60px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; position: absolute; top: 50%; transform: translateY(-50%); z-index: 10000; }
.lightbox-nav:hover { background: white; color: var(--primary); transform: translateY(-50%) scale(1.1); }
.lightbox-nav.prev { left: 30px; }
.lightbox-nav.next { right: 30px; }

/* Адаптация Lightbox под мобилки */
@media (max-width: 768px) {
    .lightbox-nav { display: none; } /* Свайпы вместо стрелок */
    .lightbox-content img { max-width: 100%; max-height: 70vh; border-radius: 0; }
    .lightbox-header { padding: 15px 20px; }
}

/* =========================================
   14. APARTMENT DETAILS MOBILE ADAPTATION
   ========================================= */
@media (max-width: 900px) {
    .property-layout { grid-template-columns: 1fr; display: flex; flex-direction: column; }
    .property-sidebar { position: static; margin-bottom: 2rem; width: 100%; } /* CHANGED: Removed order: -1 so it stays at the bottom */
    .gallery-wrapper { display: block; height: 250px; }
    .gallery-side { display: none; }
    .gallery-main { position: relative; }
    .mobile-photo-indicator { display: block; position: absolute; bottom: 15px; right: 15px; background: rgba(0,0,0,0.7); color: white; padding: 5px 12px; border-radius: 15px; font-size: 0.8rem; }
    .prop-top-info h1 { font-size: 1.8rem; }
}

/* === BREADCRUMBS === */
.breadcrumb-nav {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

/* Разделитель (слэш) */
.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: #ccc;
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.breadcrumb li.active {
    color: var(--text-dark);
    font-weight: 600;
    pointer-events: none; /* Неактивная ссылка */
}
/* === STATUS INDICATORS === */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f0f2f5;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: block;
}

/* Зеленый статус */
.status-indicator.available { color: #27ae60; background: rgba(39, 174, 96, 0.1); }
.status-indicator.available .dot { background: #27ae60; animation: pulse-green 2s infinite; }

/* Красный статус */
.status-indicator.rented { color: #95a5a6; background: rgba(149, 165, 166, 0.1); }
.status-indicator.rented .dot { background: #95a5a6; }

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(39, 174, 96, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}
/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    border: 2px dashed #e0e0e0;
    margin-top: 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}
/* === TRUST BOX (ГАРАНТИИ БЕЗОПАСНОСТИ) === */
.trust-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(46, 204, 113, 0.04); /* Легчайший успокаивающий зеленый */
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.trust-item {
    display: flex;
    align-items: flex-start; /* Иконка по верхнему краю текста */
    gap: 15px;
}

.trust-item i {
    color: #2ecc71; /* Психологический зеленый цвет доверия */
    font-size: 1.2rem;
    background: white;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.15);
    flex-shrink: 0;
}

.trust-item div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trust-item strong {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 700;
}

.trust-item span {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}
/* === BOOKING PAGE STYLES === */
.bg-light { background-color: #f8fcf9; }

.booking-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
    padding-top: 1rem;
    padding-bottom: 5rem;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.form-section {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
}

.form-section h2 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    text-align: left;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select {
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: 0.3s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.1);
}

/* Radio buttons */
.radio-group {
    display: flex; gap: 20px; margin-top: 5px;
}
.radio-group label {
    font-weight: 500; display: flex; align-items: center; gap: 8px; cursor: pointer;
}

/* Addon Checkboxes (Красивые плашки) */
.addon-checkbox {
    display: block;
    margin-bottom: 1rem;
    cursor: pointer;
}

.addon-checkbox input {
    display: none; /* Прячем стандартный чекбокс */
}

.addon-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1.2rem;
    border: 2px solid #eee;
    border-radius: 12px;
    transition: 0.3s;
}

.addon-content i {
    font-size: 1.5rem;
    color: #ccc;
    transition: 0.3s;
}

.addon-content div { display: flex; flex-direction: column; }
.addon-content strong { color: var(--text-dark); font-size: 1rem; }
.addon-content span { color: var(--text-light); font-size: 0.85rem; }

/* Когда чекбокс нажат */
.addon-checkbox input:checked + .addon-content {
    border-color: var(--primary);
    background: rgba(30, 60, 114, 0.03);
}
.addon-checkbox input:checked + .addon-content i {
    color: var(--primary);
}

/* Правая часть (Summary) */
.booking-sidebar {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.02);
}

.summary-apt-info {
    display: flex; gap: 15px; align-items: center;
}
.summary-apt-info img {
    width: 80px; height: 80px; border-radius: 10px; object-fit: cover;
}
.summary-apt-info h3 { font-size: 1.1rem; margin-bottom: 4px; }
.summary-apt-info p { font-size: 0.85rem; color: var(--text-light); margin: 0; }

.summary-details {
    display: flex; flex-direction: column; gap: 12px;
}
.summary-row {
    display: flex; justify-content: space-between; font-size: 0.95rem; color: var(--text-dark);
}

.summary-total {
    display: flex; justify-content: space-between; align-items: center; margin-top: 1rem;
}
.summary-total span { font-weight: 700; color: var(--text-dark); }
.summary-total strong { font-size: 1.8rem; color: var(--primary); }

.summary-notice {
    margin-top: 1.5rem;
    background: #eef2f7;
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--primary);
    line-height: 1.4;
    display: flex; gap: 10px; align-items: flex-start;
}

@media (max-width: 900px) {
    .booking-layout { grid-template-columns: 1fr; }
    .booking-sidebar { order: -1; position: static; } /* Итог показываем сверху на мобилке */
    .form-grid { grid-template-columns: 1fr; }
}

/* =========================================
   15. FACEBOOK REVIEWS SECTION
   ========================================= */
.fb-reviews-section {
    padding: 5rem 5%;
    background-color: #f0f2f5;
}

.fb-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.fb-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.fb-card:hover {
    transform: translateY(-5px);
}

.fb-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.fb-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    cursor: pointer;
}

.fb-user-info {
    flex-grow: 1;
}

.fb-name {
    font-weight: 600;
    color: #050505;
    font-size: 15px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.fb-name:hover {
    text-decoration: underline;
}

.fb-meta {
    font-size: 13px;
    color: #65676b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.fb-icon {
    color: #1877f2;
    font-size: 24px;
}

.fb-content {
    font-size: 15px;
    color: #050505;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.fb-rating {
    color: #f5c332;
    margin-bottom: 15px;
    font-size: 14px;
}

.review-disclaimer {
    text-align: center; 
    margin-top: 3rem; 
    color: #65676b; 
    font-size: 0.95rem; 
    max-width: 800px; 
    margin-left: auto; 
    margin-right: auto;
    line-height: 1.6;
}
/* =========================================
   16. FAT FOOTER (NEW)
   ========================================= */
.fat-footer {
    background: #1a252f;
    color: #bdc3c7;
    padding: 4rem 0 0 0;
    margin-top: auto;
    font-family: 'Montserrat', sans-serif;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 0 2rem 3rem 2rem;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    display: block;
    margin-bottom: 1rem;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.footer-links a i {
    font-size: 0.8rem;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: white;
}

.footer-contact li i {
    color: var(--accent);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.payment-icons {
    display: flex;
	justify-content: center;
    gap: 15px;
    font-size: 2.5rem;
    color: #bdc3c7;
    margin-top: 1rem;
}

.payment-icons i {
    transition: color 0.3s ease;
}

.payment-icons i:hover {
    color: white;
}

.footer-bottom {
    background: #111921;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}
/* ==========================================================================
   Анимация плавного появления карточек (Fade-in Cascade)
   ========================================================================== */

/* 1. Создаем саму анимацию */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 2. Применяем её к карточкам внутри сетки */
.grid-listings .card {
    opacity: 0; /* Скрываем карточки до начала анимации */
    /* 0.6s - длительность, ease-out - плавное замедление в конце, forwards - оставить в конечнм состоянии */
    animation: fadeInUp 0.6s ease-out forwards; 
}

/* 3. Создаем тот самый каскад (задержку для каждой следующей карточки) */
.grid-listings .card:nth-child(1)  { animation-delay: 0.1s; }
.grid-listings .card:nth-child(2)  { animation-delay: 0.2s; }
.grid-listings .card:nth-child(3)  { animation-delay: 0.3s; }
.grid-listings .card:nth-child(4)  { animation-delay: 0.4s; }
.grid-listings .card:nth-child(5)  { animation-delay: 0.5s; }
.grid-listings .card:nth-child(6)  { animation-delay: 0.6s; }
.grid-listings .card:nth-child(7)  { animation-delay: 0.7s; }
.grid-listings .card:nth-child(8)  { animation-delay: 0.8s; }
.grid-listings .card:nth-child(9)  { animation-delay: 0.9s; }
.grid-listings .card:nth-child(10) { animation-delay: 1.0s; }
.grid-listings .card:nth-child(11) { animation-delay: 1.1s; }
.grid-listings .card:nth-child(12) { animation-delay: 1.2s; }
.grid-listings .card:nth-child(13) { animation-delay: 1.3s; }
.grid-listings .card:nth-child(14) { animation-delay: 1.4s; }
.grid-listings .card:nth-child(15) { animation-delay: 1.5s; }

/* Для остальных карточек (если их больше 15) ставим одинаковую максимальную задержку, 
   чтобы они не появлялись слишком долго */
.grid-listings .card:nth-child(n+16) { animation-delay: 1.5s; }

/* === НОВЫЕ СТИЛИ ДЛЯ FAQ, CTA И АНИМАЦИЙ ПРАВИЛ === */
.contract-btn {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 15px; padding: 10px 18px;
    background: rgba(231, 76, 60, 0.1); color: #e74c3c;
    border-radius: 8px; font-size: 0.9rem; font-weight: 700;
    transition: 0.3s; text-decoration: none; position: relative; z-index: 2;
}
.contract-btn:hover {
    background: #e74c3c; color: white; transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.2);
}

.faq-accordion {
    max-width: 900px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 15px;
}
.faq-item {
    background: white; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.02);
    overflow: hidden; transition: 0.3s;
}
.faq-item:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.faq-item summary {
    padding: 20px 25px; font-weight: 700; color: #2c3e50; font-size: 1.05rem;
    cursor: pointer; list-style: none; position: relative;
    display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '\f078'; font-family: "Font Awesome 6 Free"; font-weight: 900;
    color: #e74c3c; transition: transform 0.3s ease;
}
.faq-item[open] summary::after { transform: rotate(180deg); color: #2ecc71; }
.faq-answer {
    padding: 0 25px 20px 25px; color: #666; line-height: 1.7; font-size: 0.95rem;
    animation: fadeInFaq 0.4s ease-out; border-top: 1px solid #f1f1f1; margin-top: 10px; padding-top: 15px;
}
@keyframes fadeInFaq { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Каскадная анимация карточек правил */
@keyframes fadeInUpRule {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.rule-card { opacity: 0; animation: fadeInUpRule 0.6s ease-out forwards; }
.rule-card:nth-child(1) { animation-delay: 0.1s; }
.rule-card:nth-child(2) { animation-delay: 0.2s; }
.rule-card:nth-child(3) { animation-delay: 0.3s; }
.rule-card:nth-child(4) { animation-delay: 0.4s; }
.rule-card:nth-child(5) { animation-delay: 0.5s; }
.rule-card:nth-child(6) { animation-delay: 0.6s; }

/* НОВЫЙ БЛОК БЕЗОПАСНОСТИ И ДОВЕРИЯ (Data Privacy & Security) */
.security-section { background: linear-gradient(135deg, #ffffff 0%, #f4f7f9 100%); border-radius: 24px; padding: 3rem; margin-bottom: 4rem; box-shadow: 0 20px 40px rgba(0,0,0,0.05); position: relative; z-index: 2; border: 1px solid rgba(255,255,255,0.8); }
.security-section h2 { font-size: 1.8rem; color: var(--primary); margin-bottom: 2rem; display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 800; text-align: center; border: none; }
.security-section h2 i { color: var(--accent) !important; }
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.security-item h4 { color: var(--text-dark); font-size: 1.2rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.security-item h4 i { color: var(--accent) !important; font-size: 1.3rem; }
.security-item p { color: var(--text-light); line-height: 1.6; font-size: 0.95rem; }
.legal-notice { background: rgba(30, 60, 114, 0.04); padding: 1.5rem 2rem; border-radius: 16px; font-size: 0.95rem; color: var(--text-dark); display: flex; align-items: center; gap: 15px; border: none; }
.legal-notice i { color: var(--accent) !important; font-size: 1.5rem; flex-shrink: 0; }
.legal-notice strong { color: var(--primary); font-weight: 700; }

.download-section { margin-top: 4rem; position: relative; z-index: 2; }
.download-box { background: var(--primary-gradient); color: white; padding: 3rem; border-radius: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; box-shadow: 0 15px 40px rgba(30, 60, 114, 0.25); }
.download-text h3 { color: white; font-size: 1.8rem; margin-bottom: 0.5rem; font-weight: 800; }
.download-text p { color: rgba(255,255,255,0.8); font-size: 1rem; }
.download-btn { background: white; color: var(--primary); border: none; font-size: 1rem; padding: 1.2rem 2.5rem; border-radius: 50px; font-weight: 700; cursor: pointer; transition: all 0.3s; }
.download-btn:hover { background: #f1f1f1; color: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

@media (max-width: 768px) { 
    .security-section { padding: 2rem 1.5rem; }
    .security-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .legal-notice { flex-direction: column; text-align: center; padding: 1.5rem; }
    .download-box { flex-direction: column; text-align: center; padding: 2.5rem 1.5rem; } 
    .download-btn { width: 100%; } 
}