:root {
    --primary-color: #0c2d4d;
    --secondary-color: #f19e7f;
    --accent-color: #6f42c1;
    --light-bg: #f8f9fa;
    --text-dark: #333333;
    --text-light: #6c757d;
}

body {
    color: var(--text-dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    font-size: 1.1rem;
}

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-light-custom { background-color: var(--light-bg) !important; }

.btn-primary { 
    background-color: var(--primary-color); 
    border-color: var(--primary-color); 
    font-size: 1.1rem;
    padding: 12px 30px;
}
.btn-primary:hover {
    background-color: #0a243d;
    border-color: #0a243d;
}

.btn-secondary { 
    background-color: var(--secondary-color); 
    border-color: var(--secondary-color);
    color: #333;
    font-size: 1.1rem;
    padding: 12px 30px;
}
.btn-secondary:hover {
    background-color: #e88c67;
    border-color: #e88c67;
    color: #333;
}

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }

.hero-section {
    background: linear-gradient(rgba(12, 45, 77, 0.85), rgba(12, 45, 77, 0.9)), url('images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    padding: 150px 0 100px;
    color: white;
    position: relative;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom right, transparent 49%, var(--secondary-color) 50%);
}

.service-card {
    transition: transform 0.3s;
    height: 100%;
    border: none;
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-top-color: var(--secondary-color);
}

.section-padding {
    padding: 80px 0;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
}

.contact-info a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.navbar {
    padding: 12px 0;
    transition: all 0.3s;
}

.navbar.scrolled {
    background-color: white !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

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

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    position: relative;
    font-size: 1.1rem;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-contact a {
    color: var(--primary-color);
    font-size: 1.3rem;
    transition: all 0.3s;
}

.header-contact a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a243d 100%);
    color: white;
    padding: 60px 0;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.stat-text {
    font-size: 1.2rem;
}

.footer-accent {
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.social-icon {
    transition: all 0.3s;
    text-decoration: none !important;
}

.social-icon:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-3px);
    text-decoration: none !important;
}

.advantage-item {
    margin-bottom: 25px;
    padding: 25px 20px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    display: flex;
    align-items: flex-start;
    height: 100%;
}

.advantage-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.advantage-icon {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-right: 20px;
    flex-shrink: 0;
    margin-top: 5px;
}

.advantage-content {
    flex: 1;
}

.advantage-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.advantage-text {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.6;
}

.service-list {
    padding-left: 0;
    margin-bottom: 0;
}

.service-list li {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 1.05rem;
    padding-left: 0;
    list-style-type: none;
    position: relative;
    padding-left: 1.5rem;
}

.service-list li:before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.display-6 {
    font-size: 2.5rem;
}

.form-control {
    font-size: 1.1rem;
    padding: 12px 15px;
}

.form-label {
    font-size: 1.1rem;
    font-weight: 500;
}

.services-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.services-row::-webkit-scrollbar {
    display: none;
}

.is-invalid {
    border-color: #dc3545 !important;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.custom-alert {
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Стили для кнопки при загрузке */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ========== МОБИЛЬНАЯ ОПТИМИЗАЦИЯ ========== */

/* Базовые мобильные стили */
@media (max-width: 768px) {
    body {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Герой-секция для мобильных */
@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0 60px;
        background-attachment: scroll;
    }
    
    .hero-section::after {
        height: 60px;
    }
    
    .hero-section h1 {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
        line-height: 1.4;
    }
}

/* Навигация для мобильных */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .header-contact {
        justify-content: flex-start;
        margin-top: 15px;
        gap: 10px;
    }
    
    .header-contact a {
        font-size: 1.1rem;
    }
    
    .navbar-toggler {
        padding: 4px 8px;
        font-size: 1rem;
    }
}

/* Карточки услуг для мобильных */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 20px;
        min-width: 280px;
        flex: 0 0 auto;
        width: 85%;
    }
    
    .services-row .col-lg-3 {
        flex: 0 0 85%;
        max-width: 85%;
        padding: 0 8px;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .service-list li {
        font-size: 1rem;
        margin-bottom: 8px;
    }
}

/* Преимущества для мобильных */
@media (max-width: 768px) {
    .advantage-item {
        padding: 20px 15px;
        margin-bottom: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .advantage-icon {
        font-size: 2rem;
        margin-right: 0;
        margin-bottom: 15px;
        margin-top: 0;
    }
    
    .advantage-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .advantage-text {
        font-size: 1rem;
    }
}

/* Статистика для мобильных */
@media (max-width: 768px) {
    .stats-section {
        padding: 40px 0;
    }
    
    .stat-item {
        padding: 15px 10px;
        margin-bottom: 20px;
    }
    
    .stat-number {
        font-size: 2.2rem;
        margin-bottom: 5px;
    }
    
    .stat-text {
        font-size: 1rem;
    }
}

/* Кнопки для мобильных */
@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary {
        font-size: 1rem;
        padding: 10px 20px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-group .btn {
        width: auto;
    }
}

/* Формы для мобильных */
@media (max-width: 768px) {
    .form-control {
        font-size: 1rem;
        padding: 10px 12px;
    }
    
    .form-label {
        font-size: 1rem;
    }
}

/* Заголовки для мобильных */
@media (max-width: 768px) {
    .display-6 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.8rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    h4 {
        font-size: 1.3rem !important;
    }
}

/* Отступы для мобильных */
@media (max-width: 768px) {
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .pt-5 {
        padding-top: 2rem !important;
    }
    
    .pb-5 {
        padding-bottom: 2rem !important;
    }
    
    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
}

/* Плавная прокрутка для мобильных */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }
    
    .services-row {
        padding-bottom: 10px;
    }
}

/* Оптимизация тач-событий */
@media (max-width: 768px) {
    .service-card,
    .advantage-item,
    .btn {
        -webkit-tap-highlight-color: transparent;
    }
    
    .service-card:active,
    .btn:active {
        transform: scale(0.98);
    }
}

/* Планшетная версия */
@media (min-width: 769px) and (max-width: 1200px) {
    .services-row .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .hero-section {
        padding: 120px 0 80px;
    }
    
    .advantage-item {
        padding: 20px 15px;
    }
}

/* Десктопная версия */
@media (min-width: 1200px) {
    .services-row {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}
