/* ===== VARIABLES ===== */
:root {
    --primary-color: #2d5f4f;
    --primary-hover: #3a7a63;
    --secondary-color: #ffffff;
    --accent-color: #3a7a63;
    --text-color: #2c2c2c;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.3);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition);
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
    white-space: nowrap;
}

.logo img {
    height: 40px;
    width: auto;
}

.main-nav {
    flex: 1;
}

.menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.menu-link {
    font-weight: 500;
    color: var(--text-color);
    padding: 8px 0;
    position: relative;
}

.menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.menu-link:hover::after,
.menu-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary-color);
    padding: 10px 16px;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
}

.header-phone:hover {
    border-color: var(--primary-color);
    background: rgba(45, 95, 79, 0.05);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 95, 79, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-login,
.btn-cabinet {
    padding: 10px 20px;
    font-weight: 600;
    border-radius: var(--border-radius);
}

.btn-login {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-login:hover {
    background: var(--primary-color);
    color: white;
}

.btn-cabinet {
    background: var(--primary-color);
    color: white;
}

.btn-cabinet:hover {
    background: var(--primary-hover);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 95, 79, 0.85) 0%, rgba(58, 122, 99, 0.75) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    color: white;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-buttons .btn {
    padding: 16px 32px;
    font-size: 17px;
}

.hero-buttons .btn-primary {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.hero-buttons .btn-primary:hover {
    background: var(--primary-color);
    color: white;
}

.hero-buttons .btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.hero-buttons .btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 700px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== SECTION COMMON ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.catalog-section,
.calculator-section,
.application-section {
    padding: 100px 0;
}

.catalog-section {
    background: var(--bg-light);
}

/* ===== CATALOG FILTERS ===== */
.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 30px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
    border: 2px solid var(--border-color);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
    flex: 1;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select,
.filter-input {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 15px;
    background: white;
    transition: var(--transition);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 95, 79, 0.1);
}

.filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%232c2c2c' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.filter-input::placeholder {
    color: #999;
}

/* ===== APARTMENTS GRID ===== */
.apartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.apartment-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.apartment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.apartment-image {
    position: relative;
    padding-top: 66.67%;
    overflow: hidden;
    background: var(--bg-light);
}

.apartment-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.apartment-card:hover .apartment-image img {
    transform: scale(1.05);
}

.apartment-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.badge-class {
    background: rgba(255, 215, 0, 0.9);
    color: #333;
}

.badge-status {
    background: rgba(45, 95, 79, 0.95);
    color: white;
}

.btn-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid white;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    z-index: 2;
}

.btn-favorite:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-favorite:hover svg {
    stroke: white;
    fill: white;
}

.btn-favorite.active svg {
    fill: #dc3545;
    stroke: #dc3545;
}

.apartment-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.apartment-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    line-height: 1.3;
}

.apartment-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.apartment-location svg {
    flex-shrink: 0;
}

.apartment-params {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.param {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.param-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
}

.apartment-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.apartment-price {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 12px;
    color: var(--text-light);
}

.price-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.apartment-actions {
    display: flex;
    gap: 8px;
}

.catalog-footer {
    text-align: center;
    padding-top: 40px;
}

/* ===== INTERACTIVE APPLICATION ===== */
.application-section {
    background: white;
}

.application-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    overflow: hidden;
}

.application-sidebar {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px 30px;
    border-right: 2px solid var(--border-color);
}

.expert-card {
    text-align: center;
}

.expert-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid white;
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}

.expert-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.expert-title {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.expert-text {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.application-content {
    padding: 40px;
}

.application-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 32px;
    text-align: center;
}

.application-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
}

.type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.type-option input[type="radio"] {
    display: none;
}

.type-card {
    position: relative;
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.type-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.type-name {
    display: block;
    padding: 16px;
    font-weight: 600;
    text-align: center;
    background: white;
    color: var(--text-color);
}

.type-option input[type="radio"]:checked + .type-card {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 95, 79, 0.1);
}

.type-option input[type="radio"]:checked + .type-card .type-name {
    background: var(--primary-color);
    color: white;
}

.type-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.type-card:hover img {
    transform: scale(1.05);
}

.rooms-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.room-option input[type="radio"] {
    display: none;
}

.room-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    font-size: 32px;
    font-weight: 700;
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.room-option input[type="radio"]:checked + span {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.room-option span:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 95, 79, 0.1);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%232c2c2c' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

.progress-bar {
    margin: 40px 0;
    padding: 24px 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.progress-step {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    font-weight: 700;
    transition: var(--transition);
}

.progress-step.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.progress-step.completed {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.progress-step.completed::after {
    content: '✓';
    color: white;
}

.progress-step.completed span {
    display: none;
}

.progress-text {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.form-navigation {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ===== CALCULATOR ===== */
.calculator-section {
    background: white;
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

.calc-group {
    margin-bottom: 32px;
}

.calc-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
}

.calc-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.calc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.calc-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(45, 95, 79, 0.1);
}

.calc-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.calc-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

.calc-programs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.program-option input[type="radio"] {
    display: none;
}

.program-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.program-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
}

.program-rate {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
}

.program-option input[type="radio"]:checked + .program-card,
.program-option.active .program-card {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.program-option input[type="radio"]:checked + .program-card .program-name,
.program-option.active .program-card .program-name,
.program-option input[type="radio"]:checked + .program-card .program-rate,
.program-option.active .program-card .program-rate {
    color: white;
}

.program-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.calculator-results {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    color: white;
}

.calc-result-main {
    text-align: center;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.result-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.result-value {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.calc-result-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.result-item-label {
    font-size: 14px;
    opacity: 0.9;
}

.result-item-value {
    font-size: 20px;
    font-weight: 700;
}

.calc-result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-result-actions .btn {
    background: white;
    color: var(--primary-color);
}

.calc-result-actions .btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.calc-result-actions .btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.calc-result-actions .btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    z-index: 2;
    background: white;
    border-radius: var(--border-radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.modal-close:hover svg {
    stroke: white;
}

.modal-apartment {
    padding: 40px;
}

.modal-header {
    margin-bottom: 32px;
}

.modal-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.modal-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 16px;
}

.modal-gallery {
    margin-bottom: 32px;
}

.modal-gallery-main {
    position: relative;
    padding-top: 60%;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--bg-light);
}

.modal-gallery-main img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.gallery-thumb {
    position: relative;
    padding-top: 75%;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.gallery-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--primary-color);
}

.modal-info {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.info-section {
    margin-bottom: 24px;
}

.info-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.info-text {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item-label {
    color: var(--text-light);
    font-size: 14px;
}

.info-item-value {
    font-weight: 600;
    color: var(--text-color);
}

.modal-sidebar {
    position: sticky;
    top: 20px;
}

.price-card {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 16px;
}

.price-main {
    text-align: center;
    margin-bottom: 20px;
}

.price-main-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.price-main-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.price-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.price-detail {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-contact {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
}

.modal-contact-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-contact-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.modal-contact-time {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== COMPARE PANEL ===== */
.compare-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: white;
    border-top: 2px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 16px 0;
    animation: slideUpBottom 0.3s ease;
}

@keyframes slideUpBottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.compare-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.compare-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.compare-count {
    font-size: 16px;
    color: var(--text-light);
}

.compare-count strong {
    color: var(--primary-color);
    font-size: 20px;
}

.compare-text {
    color: var(--text-light);
}

.compare-actions {
    display: flex;
    gap: 12px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background: white;
    transform: translateY(-3px);
}

.social-link:hover svg {
    fill: var(--primary-color);
}

.footer-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-menu,
.footer-contacts {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-menu a,
.footer-contacts a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-menu a:hover,
.footer-contacts a:hover {
    color: white;
    padding-left: 4px;
}

.footer-contacts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contacts svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-schedule {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer-dev a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.footer-dev a:hover {
    color: white;
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 16px;
    }

    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 2px solid var(--border-color);
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .menu {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    .menu-item {
        border-bottom: 1px solid var(--border-color);
    }

    .menu-link {
        display: block;
        padding: 16px 0;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .application-wrapper {
        grid-template-columns: 1fr;
    }

    .application-sidebar {
        border-right: none;
        border-bottom: 2px solid var(--border-color);
    }

    .modal-info {
        grid-template-columns: 1fr;
    }

    .modal-sidebar {
        position: static;
    }

    .catalog-filters {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section-title {
        font-size: 32px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .apartments-grid {
        grid-template-columns: 1fr;
    }

    .type-selector {
        grid-template-columns: 1fr;
    }

    .rooms-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .calc-programs {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 36px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .modal-apartment {
        padding: 20px;
    }

    .modal-title {
        font-size: 24px;
    }

    .compare-content {
        flex-direction: column;
        gap: 16px;
    }

    .compare-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .compare-actions {
        width: 100%;
    }

    .compare-actions .btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 24px;
    }

    .apartment-params {
        grid-template-columns: 1fr;
    }

    .apartment-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .apartment-actions {
        width: 100%;
    }

    .apartment-actions .btn {
        flex: 1;
    }

    .form-navigation {
        flex-direction: column;
    }

    .form-navigation .btn {
        width: 100%;
    }

    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* ===== LOADING ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn .loading {
    margin-left: 8px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in-up {
    animation: slideInUp 0.5s ease;
}

/* ===== PRINT ===== */
@media print {
    .header,
    .footer,
    .btn,
    .modal-close,
    .compare-panel {
        display: none;
    }

    .modal-content {
        max-height: none;
        box-shadow: none;
    }
}

/* ===== MOBILE OPTIMIZATIONS ===== */

/* Плавная адаптация контейнера */
@media (max-width: 1440px) {
    .container {
        max-width: 100%;
        padding: 0 32px;
    }
}

@media (max-width: 1200px) {
    .container {
        padding: 0 24px;
    }

    .hero-title {
        font-size: 52px;
    }

    .section-title {
        font-size: 40px;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }

    /* Header Mobile */
    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 8px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 28px;
        height: 3px;
        background: var(--primary-color);
        border-radius: 2px;
        transition: all 0.3s;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 2px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .menu {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    .menu-item {
        border-bottom: 1px solid var(--border-color);
    }

    .menu-item:last-child {
        border-bottom: none;
    }

    .menu-link {
        display: block;
        padding: 16px 12px;
        font-size: 16px;
    }

    /* Hero Mobile */
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 36px;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-number {
        font-size: 40px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Sections Mobile */
    .catalog-section,
    .calculator-section,
    .application-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 32px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    /* Catalog Mobile */
    .catalog-filters {
        flex-direction: column;
        padding: 20px;
    }

    .filter-group {
        min-width: 100%;
    }

    .apartments-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .apartment-card {
        max-width: 100%;
    }

    /* Application Mobile */
    .application-wrapper {
        grid-template-columns: 1fr;
    }

    .application-sidebar {
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        padding: 30px 20px;
    }

    .expert-photo {
        width: 120px;
        height: 120px;
    }

    .application-content {
        padding: 30px 20px;
    }

    .application-title {
        font-size: 24px;
    }

    .type-selector {
        grid-template-columns: 1fr;
    }

    .rooms-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Calculator Mobile */
    .calculator-wrapper {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .calc-programs {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 36px;
    }

    /* Modal Mobile */
    .modal-content {
        max-height: 95vh;
        margin: 10px;
    }

    .modal-apartment {
        padding: 24px;
    }

    .modal-title {
        font-size: 24px;
    }

    .modal-info {
        grid-template-columns: 1fr;
    }

    .modal-sidebar {
        position: static;
    }

    .modal-gallery-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    /* Compare Panel Mobile */
    .compare-panel {
        padding: 12px 0;
    }

    .compare-content {
        flex-direction: column;
        gap: 12px;
    }

    .compare-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .compare-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .compare-actions .btn {
        flex: 1;
    }

    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    /* Cabinet Mobile */
    .admin-sidebar {
        width: 100%;
        position: static;
    }

    .admin-main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    /* Typography Mobile */
    .hero-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 28px;
    }

    /* Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Forms Mobile */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Apartment Params Mobile */
    .apartment-params {
        grid-template-columns: 1fr;
    }

    .apartment-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .apartment-actions {
        width: 100%;
        justify-content: stretch;
    }

    .apartment-actions .btn {
        flex: 1;
    }

    /* Progress Bar Mobile */
    .progress-steps {
        justify-content: space-between;
        gap: 8px;
    }

    .progress-step {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    /* Form Navigation Mobile */
    .form-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .form-navigation .btn {
        width: 100%;
        justify-content: center;
    }

    /* Reviews Mobile */
    .auth-box {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 480px) {
    /* Extra Small Mobile */
    .hero-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 24px;
    }

    .stat-number {
        font-size: 32px;
    }

    .hero-buttons .btn,
    .btn-primary,
    .btn-secondary {
        font-size: 14px;
        padding: 12px 20px;
    }

    .apartment-title {
        font-size: 18px;
    }

    .price-value {
        font-size: 20px;
    }

    .result-value {
        font-size: 28px;
    }

    /* Touch Targets */
    .btn,
    .menu-link,
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ===== TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Улучшения для тач-устройств */
    .btn,
    .menu-link,
    .nav-link,
    input,
    select,
    textarea {
        -webkit-tap-highlight-color: transparent;
    }

    .btn:active {
        transform: scale(0.98);
    }

    /* Увеличенные области клика */
    .btn-favorite,
    .modal-close,
    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ===== LANDSCAPE MODE (Горизонтальная ориентация) ===== */
@media (max-width: 992px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .modal-content {
        max-height: 90vh;
    }
}

/* ===== PWA OPTIMIZATIONS ===== */
@media (display-mode: standalone) {
    /* Стили для PWA режима */
    .header {
        padding-top: env(safe-area-inset-top);
    }

    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .footer,
    .btn,
    .mobile-menu-toggle,
    .compare-panel,
    .modal {
        display: none !important;
    }

    .modal-content {
        max-height: none;
        box-shadow: none;
        border: 1px solid #000;
    }

    body {
        background: white;
    }

    .apartment-card,
    .card {
        break-inside: avoid;
    }
}

/* ===== HEADER STYLES ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 24px;
}

/* Logo */
.logo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e8e8e8;
}

.logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5f4f 0%, #3a7a63 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #e8e8e8;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    color: #2c2c2c;
    letter-spacing: -0.3px;
    line-height: 1.2;
    max-width: 200px;
}

/* Navigation */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.menu {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.menu-link {
    display: block;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    color: #2c2c2c;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.menu-link:hover {
    background: #f5f5f5;
    color: #2d5f4f;
}

.menu-link.active {
    background: #2d5f4f;
    color: white;
}

/* Header Buttons */
.header-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Reviews Button (Yellow) */
.header-btn-reviews {
    background: #ffc107;
    color: #2c2c2c;
    border: 1px solid #ffc107;
}

.header-btn-reviews:hover {
    background: #ffb300;
    border-color: #ffb300;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.review-badge {
    background: white;
    color: #2c2c2c;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

/* Phone Button */
.header-btn-phone {
    background: transparent;
    color: #2c2c2c;
    border: 1px solid #e0e0e0;
}

.header-btn-phone:hover {
    background: #f8f8f8;
    border-color: #2d5f4f;
    color: #2d5f4f;
}

/* Cabinet Button (Green) */
.header-btn-cabinet {
    background: #2d5f4f;
    color: white;
    border: 1px solid #2d5f4f;
}

.header-btn-cabinet:hover {
    background: #3a7a63;
    border-color: #3a7a63;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(45, 95, 79, 0.3);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: #2c2c2c;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* Mobile Menu */
@media (max-width: 1100px) {
    .header-wrapper {
        gap: 16px;
    }

    .brand-name {
        font-size: 13px;
        max-width: 160px;
    }

    .menu {
        gap: 4px;
    }

    .menu-link {
        padding: 8px 14px;
        font-size: 14px;
    }

    .header-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid #e8e8e8;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .menu {
        flex-direction: column;
        gap: 0;
        padding: 16px;
    }

    .menu-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .menu-item:last-child {
        border-bottom: none;
    }

    .menu-link {
        width: 100%;
        padding: 14px 16px;
        border-radius: 0;
    }

    .header-btns {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .brand-name {
        font-size: 12px;
        max-width: 140px;
    }

    .logo-img,
    .logo-circle {
        width: 40px;
        height: 40px;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(9px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-9px);
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 2px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .menu {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    .menu-item {
        border-bottom: 1px solid var(--border-color);
    }

    .menu-item:last-child {
        border-bottom: none;
    }

    .menu-link {
        display: flex;
        padding: 16px 12px;
        font-size: 16px;
    }

    .menu-link-reviews {
        justify-content: space-between;
        width: 100%;
    }

    .header-phone-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 14px;
    }

    .logo img {
        height: 35px;
    }
}

/* ===== HEADER STYLES (НОВЫЕ) ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    gap: 20px;
}

/* Logo */
.logo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.logo-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5f4f 0%, #3a7a63 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    border: 2px solid #f0f0f0;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    color: #2c2c2c;
    letter-spacing: -0.3px;
    line-height: 1.3;
    max-width: 220px;
}

/* Main Nav */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.menu {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #2c2c2c;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.menu-link:hover {
    background: #f5f5f5;
    color: #2d5f4f;
}

.menu-link.active {
    background: #2d5f4f;
    color: white;
}

/* Header Buttons */
.header-btns {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* Reviews Button */
.header-btn-reviews {
    background: #ffc107;
    color: #2c2c2c;
    border-color: #ffc107;
}

.header-btn-reviews:hover {
    background: #ffb300;
    border-color: #ffb300;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.25);
}

.review-badge {
    background: white;
    color: #2c2c2c;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

/* Phone Button */
.header-btn-phone {
    background: white;
    color: #2c2c2c;
    border-color: #e0e0e0;
}

.header-btn-phone:hover {
    background: #f8f8f8;
    border-color: #2d5f4f;
    color: #2d5f4f;
}

/* Cabinet Button */
.header-btn-cabinet {
    background: #2d5f4f;
    color: white;
    border-color: #2d5f4f;
}

.header-btn-cabinet:hover {
    background: #3a7a63;
    border-color: #3a7a63;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(45, 95, 79, 0.25);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: #2c2c2c;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* Cabinet Nav Links */
.cabinet-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.cabinet-nav-link:hover {
    background: #f5f5f5;
    color: #2d5f4f;
}

.cabinet-nav-link.active {
    background: #2d5f4f;
    color: white;
}

.nav-badge {
    margin-left: auto;
    background: #ffc107;
    color: #2c2c2c;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.cabinet-nav-link.active .nav-badge {
    background: white;
    color: #2d5f4f;
}

/* Responsive */
@media (max-width: 1200px) {
    .brand-name {
        font-size: 14px;
        max-width: 180px;
    }

    .header-btn {
        padding: 9px 14px;
        font-size: 13px;
    }

    .menu-link {
        padding: 9px 14px;
        font-size: 14px;
    }
}

@media (max-width: 992px) {
    .header-btns {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 66px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid #e8e8e8;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        max-height: calc(100vh - 66px);
        overflow-y: auto;
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .menu {
        flex-direction: column;
        gap: 0;
        padding: 12px;
    }

    .menu-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .menu-item:last-child {
        border-bottom: none;
    }

    .menu-link {
        width: 100%;
        padding: 14px 16px;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .brand-name {
        font-size: 13px;
        max-width: 150px;
    }

    .logo-img,
    .logo-circle {
        width: 42px;
        height: 42px;
    }
}

/* ============================================================
   БАЗОВЫЕ СТИЛИ — assets/style.css
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #2c2c2c;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Контейнер */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* Скрыть на мобиле */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Скрыть на десктопе */
@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* Лоадер */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2d5f4f;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Алерты */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Кнопки базовые */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: #2d5f4f;
    color: #ffffff;
}

.btn-primary:hover {
    background: #3a7a63;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 95, 79, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #2c2c2c;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-outline {
    background: transparent;
    color: #2d5f4f;
    border: 2px solid #2d5f4f;
}

.btn-outline:hover {
    background: #2d5f4f;
    color: #ffffff;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Карточки */
.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Бейджи */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Модальные окна базовые */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
}

.modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #2d5f4f;
    box-shadow: 0 0 0 3px rgba(45, 95, 79, 0.1);
}

.form-control.error {
    border-color: #dc3545;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Чекбоксы и радио */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #2d5f4f;
    cursor: pointer;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

table tr:hover {
    background: #f8f9fa;
}

/* Пагинация */
.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #2d5f4f;
    color: #ffffff;
    border-color: #2d5f4f;
}

.pagination .active {
    background: #2d5f4f;
    color: #ffffff;
    border-color: #2d5f4f;
}

/* Хлебные крошки */
.breadcrumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.breadcrumbs a {
    color: #2d5f4f;
    transition: opacity 0.2s;
}

.breadcrumbs a:hover {
    opacity: 0.7;
}

.breadcrumbs svg {
    width: 12px;
    height: 12px;
}

/* Спиннер загрузки */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2d5f4f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Тултипы */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Скелетоны загрузки */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Адаптивность */
@media (max-width: 991px) {
    .container {
        padding: 0 16px;
    }

    .btn {
        font-size: 13px;
        padding: 10px 20px;
    }

    .card-body {
        padding: 20px 16px;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 14px;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 14px;
    }

    table {
        font-size: 13px;
    }

    table th,
    table td {
        padding: 8px 12px;
    }
}