/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Шапка */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: var(--transition);
}

.logo a:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ad-block-header {
    flex: 1;
    text-align: center;
    min-height: 90px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

/* Навигация */
.main-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0;
    flex-wrap: wrap;
    align-items: center;
}

.nav-list > li {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: white;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    border-bottom-color: white;
}

.nav-icon {
    font-size: 1.2rem;
}

/* Выпадающее меню */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-arrow {
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 280px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.category-name {
    font-weight: 500;
}

.category-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.dropdown-menu a:hover .category-count,
.dropdown-menu a.active .category-count {
    background: var(--primary-color);
    color: white;
}

/* Основной контент */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

.ad-block {
    margin: 1.5rem 0;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero секция */
.hero-section {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Сетка категорий */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.category-card h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.category-card h2 a {
    color: var(--text-color);
    text-decoration: none;
}

.category-card h2 a:hover {
    color: var(--primary-color);
}

.category-services {
    margin: 1.5rem 0;
}

.category-services h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.category-services ul {
    list-style: none;
    margin-left: 1rem;
}

.category-services li {
    margin-bottom: 0.5rem;
}

.category-services a {
    color: var(--primary-color);
    text-decoration: none;
}

.category-services a:hover {
    text-decoration: underline;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

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

.btn-secondary:hover {
    background: #475569;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Популярные сервисы */
.popular-services-section {
    margin: 4rem 0;
    padding: 3rem 0;
}

.popular-services-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

.popular-services-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.popular-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.popular-service-card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.popular-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.popular-service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.badge-icon {
    font-size: 1.2rem;
}

.badge-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.popular-service-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.popular-service-card h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.popular-service-card h3 a:hover {
    color: var(--primary-color);
}

.popular-service-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Features */
.features-section {
    margin-top: 4rem;
    padding: 3rem 0;
    background: var(--bg-color);
    border-radius: var(--border-radius);
}

.features-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

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

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Страницы */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.service-card h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card h2 a {
    color: var(--text-color);
    text-decoration: none;
}

.service-card h2 a:hover {
    color: var(--primary-color);
}

.content-page {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.content-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.content-page h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

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

.content-page li {
    margin-bottom: 0.5rem;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
}

/* 404 */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-page h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

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

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

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

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

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

/* Адаптивность */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        box-shadow: var(--shadow-lg);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-list li a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .categories-grid,
    .services-grid,
    .popular-services-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .ad-block-header {
        display: none;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .category-card,
    .service-card {
        padding: 1.5rem;
    }
}