/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
    color: #2c3e50;
}

h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background-color: #e74c3c;
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #3498db;
    color: white;
}

.btn-secondary:hover {
    background-color: #2980b9;
}

/* Шапка */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 1.8em;
    color: #e74c3c;
}

.logo-img {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.logo p {
    font-size: 0.9em;
    color: #bdc3c7;
}

.contacts {
    text-align: right;
}

.phone {
    display: block;
    color: #e74c3c;
    font-size: 1.3em;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 5px;
}

.phone.secondary {
    display: block;
    color: #bdc3c7;
    font-size: 1.1em;
    font-weight: normal;
    text-decoration: none;
    margin-top: 5px;
}

.phone.secondary:hover {
    color: #e74c3c;
}

.work-time {
    font-size: 0.9em;
    color: #bdc3c7;
}

/* Навигация */
.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nav a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s;
}

.nav a:hover {
    color: #e74c3c;
}

/* Главный баннер */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: white;
}

.hero-subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* Калькулятор */
.calculator {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.calculator-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.calculator-form h3 {
    text-align: center;
    margin-bottom: 30px;
}

.truck-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.truck-option {
    cursor: pointer;
}

.truck-option input[type="radio"] {
    display: none;
}

.option-content {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.truck-option input[type="radio"]:checked + .option-content {
    border-color: #e74c3c;
    background-color: #ffe5e5;
}

.option-content:hover {
    border-color: #e74c3c;
    transform: translateY(-3px);
}

.option-content h4 {
    font-size: 1.3em;
    color: #2c3e50;
}

.option-content p {
    color: #7f8c8d;
}

/* Слайдер расстояния */
.distance-slider {
    margin-bottom: 30px;
}

.distance-slider label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.1em;
}

.distance-slider input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
}

.distance-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e74c3c;
    cursor: pointer;
}

.distance-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e74c3c;
    cursor: pointer;
}

/* Результат калькулятора */
.result-box {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.result-box h3 {
    text-align: center;
    margin-bottom: 20px;
}

.result-box p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.result-box strong {
    color: #e74c3c;
    font-size: 1.2em;
}

.result-box .price {
    font-size: 1.5em;
    text-align: center;
    margin-top: 20px;
}

.price-note {
    text-align: center;
    font-size: 0.9em;
    color: #7f8c8d;
}

/* Как заказать */
.how-to-order {
    padding: 60px 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: transform 0.3s;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    margin: 0 auto 20px;
}

/* Техника */
.fleet {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.fleet-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.fleet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.fleet-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.fleet-card h3 {
    padding: 20px 20px 10px;
    color: #2c3e50;
}

.specs {
    list-style: none;
    padding: 0 20px;
    margin-bottom: 15px;
}

.specs li {
    padding: 5px 0;
    font-size: 0.95em;
    color: #555;
}

.specs li:before {
    content: "✓ ";
    color: #27ae60;
    font-weight: bold;
}

.price-tag {
    padding: 15px 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: #e74c3c;
    text-align: center;
}

.fleet-card .btn {
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    text-align: center;
}

/* Услуги */
.services {
    padding: 60px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.service-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateX(5px);
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Преимущества */
.advantages {
    padding: 60px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.advantages h2 {
    color: white;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.advantage-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.advantage h3 {
    color: white;
    margin-bottom: 10px;
}

/* Контакты */
.contacts {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.contact-info a {
    color: #e74c3c;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.payment-methods {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Форма */
.contact-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: Arial, sans-serif;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

/* Футер */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #e74c3c;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: -200px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    padding: 20px;
    z-index: 9999;
    transition: bottom 0.3s ease-out;
}

.install-prompt.show {
    bottom: 0;
}

.install-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.install-content h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.install-content p {
    margin-bottom: 15px;
    color: #555;
}

.install-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.install-buttons .btn {
    flex: 1;
    max-width: 150px;
}

/* PWA Standalone mode adjustments */
@media all and (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .header {
        padding-top: max(20px, env(safe-area-inset-top));
    }
}

/* iOS Safe Area */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }
    
    .contacts {
        text-align: center;
        margin-top: 20px;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero h2 {
        font-size: 1.8em;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .truck-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .truck-options {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .install-buttons {
        flex-direction: column;
    }
    
    .install-buttons .btn {
        max-width: 100%;
    }
}

/* Loading spinner for PWA */
.pwa-loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

.pwa-loading.active {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Галерея */
.gallery {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
}

.carousel-slide img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.carousel-btn:hover {
    background-color: rgba(0,0,0,0.8);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .carousel-slide img {
        max-height: 300px;
    }
    
    .carousel-btn {
        padding: 10px;
        font-size: 18px;
    }
    
    .logo-img {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        max-width: 120px;
    }
}
