/* ========================================
   ЖКС №3 Адмиралтейского района
   ОСНОВНЫЕ СТИЛИ
   ======================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: #1a1a2e;
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --primary-bg: rgba(37, 99, 235, 0.08);
    --dark: #0f172a;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --gray-bg: #f8fafc;
    --border: #e2e8f0;
}

/* ========================================
   ШАПКА
   ======================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 0 0;
}

.logo {
    margin-bottom: 18px;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding-bottom: 18px;
}

.nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    text-decoration: none;
    background: transparent;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #007AFF;
}

.nav a.active {
    background: #007AFF;
    color: #ffffff;
    font-weight: 600;
}

.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #007AFF;
    color: #ffffff;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.header-phone svg {
    color: #ffffff;
}

.header-phone:hover {
    background: #0056CC;
    color: #ffffff;
}

/* Бургер */
.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* Оверлей */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
}

/* Мобильная панель */
.nav-mobile-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 999;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    padding: 24px 20px;
}

.nav-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f5f5f7;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    margin-bottom: 20px;
    color: #1d1d1f;
}

.nav-mobile-panel a {
    display: block;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 500;
    color: #1d1d1f;
    text-decoration: none;
    margin-bottom: 4px;
    transition: background 0.2s ease;
}

.nav-mobile-panel a:hover {
    background: #f0f0f0;
}

.nav-mobile-contacts {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8e8ed;
}

.nav-mobile-phone {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #007AFF;
    text-decoration: none;
    padding: 8px 0;
}

.nav-mobile-email {
    display: block;
    font-size: 14px;
    color: #6e6e73;
    text-decoration: none;
    padding: 8px 0;
}

/* Активное мобильное меню */
.nav.active .nav-overlay {
    display: block;
}

.nav.active .nav-mobile-panel {
    right: 0;
}

/* ===== HERO ===== */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--gray-bg) 0%, #ffffff 100%);
}

.hero-grid {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--dark);
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ===== КНОПКИ ===== */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ===== НАШИ СЕРВИСЫ ===== */
.services {
    padding: 80px 0;
    background: #ffffff;
}

.services-header {
    text-align: center;
    margin-bottom: 48px;
}

.services-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.services-header p {
    color: var(--gray);
    margin-top: 12px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: white;
    border-radius: 24px;
    padding: 32px 24px;
    transition: all 0.3s;
    border: 1px solid var(--border);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.service-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-bg);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.service-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary);
}

.service-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.service-desc {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.service-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.service-link:hover {
    gap: 12px;
}

/* ===== НОВОСТИ ===== */
.news {
    padding: 80px 0;
    background: var(--gray-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.section-header p {
    color: var(--gray);
    margin-top: 12px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border);
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.news-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 24px;
}

.news-date {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.news-excerpt {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== СТАТИСТИКА ===== */
.stats {
    background: var(--gray-bg);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== БАННЕР ===== */
.banner {
    padding: 60px 0;
    background: white;
}

.banner-link {
    display: block;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.3s;
}

.banner-link:hover {
    transform: translateY(-4px);
}

.banner-link img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== ПОДВАЛ ===== */
.site-footer {
    background: rgba(245, 245, 247, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    padding: 48px 0 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 32px;
}

.footer-col h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #86868b;
    margin-bottom: 16px;
}

.footer-tagline {
    font-size: 15px;
    line-height: 1.5;
    color: #6e6e73;
    margin: 0;
}

.footer-badge {
    display: inline-block;
    margin-top: 16px;
    padding: 6px 14px;
    background: rgba(0, 122, 255, 0.08);
    color: #007AFF;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #424245;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #007AFF;
    transform: translateX(3px);
}

.footer-contact {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #424245;
    line-height: 1.4;
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #86868b;
    transition: color 0.2s ease;
}

.footer-contact:hover svg {
    color: #007AFF;
}

.footer-contact a {
    color: #424245;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-contact a:hover {
    color: #007AFF;
}

.footer-phones a {
    display: block;
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 12px;
    color: #86868b;
}

.footer-bottom p {
    margin: 0;
}

.developer a {
    color: #86868b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.developer a:hover {
    color: #007AFF;
}

/* ========================================
   АДАПТИВ
   ======================================== */
@media (max-width: 1100px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-grid {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   МОБИЛЬНАЯ ВЕРСИЯ (ДО 850px)
   ======================================== */
@media (max-width: 850px) {
    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
    }
    
    .logo {
        margin-bottom: 0;
    }
    
    .logo img {
        height: 36px;
    }
    
    /* Скрываем только ссылки, а не весь nav */
    .nav > a {
        display: none;
    }
    
    /* nav оставляем видимым */
    .nav {
        display: block;
        padding-bottom: 0;
    }
    
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .service-card {
        padding: 28px 20px;
    }
}

@media (max-width: 480px) {
    .header-phone span {
        display: none;
    }
    
    .header-phone {
        padding: 8px 10px;
    }
}