/* Основные стили сайта в стиле propertymeasure.ai */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Шапка сайта */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    width: 100%;
    margin: 0;
    left: 0;
    right: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo:hover {
    color: var(--primary-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
    margin: 0 1rem;
    padding: 0;
}

.nav-menu li {
    white-space: nowrap;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
    padding: 0.25rem 0;
    display: block;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.phone-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.phone-link:hover {
    color: var(--primary-color);
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* Гамбургер меню */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s;
}

/* Hero секция */
.hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    width: 100%;
    margin: 0;
    left: 0;
    right: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background-image: url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.4;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Секции */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Карточки */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.card p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* Преимущества */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--text-gray);
}

/* Подвал */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 4rem 0 2rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* Таблицы */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow-md);
    border-radius: 0.5rem;
    overflow: hidden;
}

table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background: var(--bg-light);
}

/* Калькулятор */
.calculator {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 1rem;
    margin: 2rem 0;
}

.calculator-result {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-top: 2rem;
}

.calculator-result .price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
}

/* Слайдер */
.slider-container {
    margin: 2rem 0;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.slider-value {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

/* Процесс работы */
.process-steps {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    position: relative;
    flex-wrap: wrap;
}

.process-steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.process-step {
    flex: 1;
    min-width: 150px;
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-lg);
}

/* Фильтры */
.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Портфолио */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.portfolio-item {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.portfolio-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.portfolio-item-content {
    padding: 1.5rem;
}

/* Адаптивность */
@media (min-width: 1400px) {
    .nav-menu {
        gap: 1.25rem;
    }
    
    .nav-menu a {
        font-size: 0.95rem;
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        gap: 0.75rem;
    }
    
    .nav-menu a {
        font-size: 0.85rem;
    }
    
    .phone-link {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .process-steps {
        flex-direction: column;
    }
    
    .process-steps::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        position: fixed;
        top: 0.75rem;
        right: 1rem;
        z-index: 1002;
        background: var(--bg-white);
        border-radius: 0.25rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .header-content {
        overflow: hidden;
        min-width: 0;
        position: relative;
    }
    
    /* Убираем отступы и фон у nav на мобильных */
    header nav {
        margin: 0;
        padding: 0;
        background: transparent;
        border: none;
        order: 3; /* Перемещаем nav в конец */
    }
    
    /* Логотип и телефон остаются на своих местах */
    .logo {
        order: 1;
    }
    
    .header-actions {
        order: 2;
    }
    
    /* Скрываем nav-menu в обычном состоянии на мобильных */
    .nav-menu {
        display: none !important;
        position: absolute;
        visibility: hidden;
        opacity: 0;
    }
    
    /* Показываем nav-menu только когда оно активно (fixed) */
    .nav-menu.active {
        display: flex !important;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s;
        box-shadow: var(--shadow-lg);
        z-index: 999;
        overflow-y: auto;
        margin: 0;
        gap: 1.5rem;
        visibility: visible;
        opacity: 1;
    }
    
    .header-actions {
        gap: 0.5rem;
        flex-shrink: 1;
        min-width: 0;
        margin-right: 3rem; /* Отступ справа для бургера */
    }
    
    .phone-link {
        display: none; /* Скрываем телефон на мобильных */
    }
    
    .header-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }
    
    .cards-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .feature-item {
        padding: 1.25rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    .feature-item h3 {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .feature-item p {
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Адаптивность для блога */
    .blog-content {
        grid-template-columns: 1fr !important;
    }
    
    /* Адаптивность для контактов */
    .contacts-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .menu-toggle {
        top: 0.5rem;
        right: 0.5rem;
        z-index: 1002;
    }
    
    .header-actions {
        gap: 0.25rem;
        margin-right: 2.5rem; /* Меньший отступ на маленьких экранах */
    }
    
    .section {
        padding: 1.5rem 0;
    }
    
    .features-grid {
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .feature-item {
        padding: 1rem;
    }
    
    .feature-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .header-actions .btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
        min-width: auto;
        white-space: nowrap;
    }
    
    .logo {
        font-size: 0.9rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header-content {
        gap: 0.5rem;
    }
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
