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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f9f9f9 0%, #e6f0ff 100%);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ========== НАВИГАЦИЯ ========== */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: nowrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    white-space: nowrap;
    text-decoration: none;
    color: white;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-size: 0.95rem;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* ========== HERO SECTION ========== */
.section {
    padding: 30px 20px;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero {
    background: url('images/hero-bg.jpg') no-repeat center center/cover;
    color: white;
    text-align: center;
    min-height: 100dvh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: calc(env(safe-area-inset-top) + 20px);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
    margin-top: 20px;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* ========== КНОПКИ ========== */
.btn {
    display: inline-block;
    background: #007BFF;
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px 5px;
    transition: all 0.3s;
    font-size: 1rem;
    touch-action: manipulation;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.contact-links-spacer {
    height: 20px;
}

.contact-links {
    position: relative;
    z-index: 10;
    margin-top: 20px;
    margin-bottom: 20px;
}

.contact-links a {
    color: white;
    font-size: 1.1rem;
    margin: 0 12px;
    text-decoration: none;
    display: inline-block;
}

/* ========== КОНТЕЙНЕР ========== */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
}

h1, h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2rem;
}

/* ========== УСЛУГИ ========== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.service-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #007BFF;
    transition: transform 0.2s;
}

.service-card h3 {
    color: #007BFF;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.service-card p {
    font-size: 1rem;
    color: #555;
}

/* ========== ОТЗЫВЫ ========== */
.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.review {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #28a745;
}

.review h3 {
    color: #28a745;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* ========== ФОРМА ========== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* ========== ФУТЕР ========== */
.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    z-index: 10;
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
}

.footer .container {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 20px;
}
.footer a {
    color: #4da3ff;
    text-decoration: none;
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #8899a6;
}

/* ========== ФОН СЕКЦИЙ ========== */
.section-bg-1 { background-image: url('images/section-bg-1.jpg'); }
.section-bg-2 { background-image: url('images/section-bg-2.jpg'); }
.section-bg-3 { background-image: url('images/section-bg-3.jpg'); }

/* ========== СТРАНИЦЫ (services, about, contacts и т.д.) ========== */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 0;
}

.page-header h1 {
    color: white;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.page-header .container {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 20px;
}

.back-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 2rem;
    transition: transform 0.3s;
}

.back-button:hover {
    transform: translateY(-2px);
}

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

/* ========== КЕЙСЫ (otzivi.html) ========== */
.case-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 5px solid #667eea;
}

.case-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.case-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 1rem;
}

.case-title {
    color: #667eea;
    font-size: 1.5rem;
}

.case-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.meta-item {
    font-size: 0.95rem;
}

.meta-item strong {
    color: #667eea;
}

.result-box {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.result-box h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.case-section {
    margin: 1.5rem 0;
}

.case-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.toggle-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.3s;
}

.toggle-btn:hover {
    background: #764ba2;
}

.detailed-content {
    display: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.detailed-content.show {
    display: block;
}

/* ========== КОНТАКТЫ ========== */
.contacts-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

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

.contact-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.contact-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-card p, .contact-card a {
    color: #555;
    text-decoration: none;
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-card a:hover {
    color: #764ba2;
}

.contact-info {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.contact-info h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.social-links a {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: scale(1.1);
}

/* ========== ПОЛИТИКА КОНФИДЕНЦИАЛЬНОСТИ ========== */
.privacy-content {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.privacy-content h2 {
    color: #667eea;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
    text-align: left;
}

.privacy-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.privacy-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

/* ========== О НАС ========== */
.about-content {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.about-content h2 {
    color: #667eea;
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
    text-align: left;
}

.about-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.advantages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.advantage-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.advantage-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.advantage-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* ========== СПАСИБО ========== */
.thank-you-card {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.thank-you-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 20px;
}

.thank-you-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.thank-you-text {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.countdown {
    margin-top: 20px;
    font-size: 13px;
    color: #999;
}

/* ========== КАРТА САЙТА ========== */
.sitemap-list {
    list-style: none;
    padding: 0;
}

.sitemap-list li {
    margin: 10px 0;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sitemap-list a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.sitemap-list a:hover {
    text-decoration: underline;
}

.priority {
    font-size: 12px;
    color: #999;
    float: right;
}

/* ========== МЕДИА-ЗАПРОСЫ ========== */

/* Только на десктопе (больше 768px) - 2 колонки */
@media (min-width: 769px) {
    .services-grid,
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* Стандартные мобильные (до 768px) */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }

    .contact-links a {
        display: block;
        margin: 10px 0;
        font-size: 1.2rem;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        display: block;
        margin: 10px auto;
    }

    h1, h2 {
        font-size: 1.6rem;
    }

    .container {
        padding: 20px;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    
    .container {
         background: rgba(255, 255, 255, 0.98);
         border-radius: 15px;
         box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    }
    
    .hero {
        padding-top: calc(env(safe-area-inset-top) + 30px);
        min-height: 100dvh;
        height: auto;
    }
    
    .hero-content {
        padding: 30px 15px;
        margin-top: 10px;
    }

    /* Навигация на мобильных - горизонтальная прокрутка */
    nav {
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .logo {
        font-size: 1.3rem;
        flex-shrink: 0;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }

    .case-card,
    .about-content,
    .privacy-content,
    .contact-info {
        padding: 1.5rem 1rem;
    }

    .case-title {
        font-size: 1.2rem;
    }

    .case-header {
        flex-wrap: wrap;
    }

    /* Page-header на мобильных */
    .page-header {
        padding: 2rem 0;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    .page-header p {
        font-size: 1rem;
    }
}

/* Очень узкие экраны */
@media (max-width: 399px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .service-card, .review {
        padding: 15px;
    }
    
    .hero-content {
        padding: 20px 10px;
    }
}

/* Очень высокие экраны */
@media (min-height: 850px) {
    .hero {
        min-height: 90vh;
        padding-top: calc(env(safe-area-inset-top) + 40px);
    }
    
    .section {
        min-height: auto;
        padding: 60px 20px;
    }
}

/* Для устройств с вырезом (чёлкой) */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    .hero {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}