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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.manager-contact {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.manager-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.manager-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.manager-phone {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    transition: opacity 0.3s;
}

.manager-phone:hover {
    opacity: 0.8;
}

.telegram-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.telegram-link a {
    color: white;
    text-decoration: none;
    font-size: 0.95em;
    transition: opacity 0.3s;
}

.telegram-link a:hover {
    opacity: 0.8;
}

.telegram-icon {
    width: 20px;
    height: 20px;
    fill: white;
}

.logo {
    text-align: center;
}

.logo h1 {
    font-size: 1.5em;
    margin: 0;
}

.logo-subtitle {
    font-size: 0.9em;
    margin: 5px 0 0 0;
    opacity: 0.9;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav a:hover, .admin-link {
    background-color: rgba(255,255,255,0.2);
}

/* Main */
.main {
    padding: 40px 0;
}

.page-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #1e3c72;
}

/* Booking Form */
.route-title {
    text-align: center;
    margin-bottom: 20px;
    color: #1e3c72;
    font-size: 1.8em;
}

.booking-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: calc((1200px - 100px) / 2); /* В два раза уже карточки класса */
    box-sizing: border-box;
}


.form-two-columns {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    align-items: start;
}

.form-labels-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 5px;
}

.form-label-item {
    display: flex;
    align-items: center;
    min-height: 40px;
}

.form-label-item label {
    font-weight: bold;
    color: #555;
    margin: 0;
}

.form-inputs-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.form-group input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input[type="date"] {
    padding-left: 40px;
    position: relative;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    left: 12px;
    cursor: pointer;
    z-index: 1;
    width: 20px;
    height: 20px;
}

.form-group input:focus {
    outline: none;
    border-color: #2a5298;
}

/* Route Distance */
.route-distance {
    display: flex;
    align-items: flex-start;
    padding: 0;
    min-height: 40px;
    margin-top: 0;
}

#distanceText {
    display: inline-block;
    line-height: 1.5;
    padding-top: 0;
}

.route-not-found {
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    margin-top: 0;
    min-height: 40px;
}

.route-not-found p {
    margin: 0;
    color: #856404;
    line-height: 1.6;
    font-size: 0.95em;
}

.route-not-found a {
    color: #1e3c72;
    text-decoration: none;
    font-weight: 600;
}

.route-not-found a:hover {
    text-decoration: underline;
}

.distance-text {
    font-size: 1.1em;
    font-weight: bold;
    color: #2a5298;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .form-two-columns {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-labels-column {
        display: none;
    }
    
    .form-inputs-column .form-group {
        position: relative;
    }
    
    .form-inputs-column .form-group::before {
        content: attr(data-label);
        font-weight: bold;
        color: #555;
        margin-bottom: 5px;
        display: block;
    }
    
    .route-distance {
        margin: 0;
    }
    
    .distance-text {
        font-size: 1em;
    }
}

/* Autocomplete */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #2a5298;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.autocomplete-list.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #f0f7ff;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* Prices Section */
.prices-section {
    margin-bottom: 40px;
}

.prices-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #1e3c72;
}

.price-info {
    text-align: center;
    margin-bottom: 10px;
}

.price-note {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.price-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.price-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.price-card h3 {
    color: #2a5298;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.price-card .description {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.price-card .specs {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
}

.price-card .price {
    font-size: 2em;
    font-weight: bold;
    color: #1e3c72;
    margin: 20px 0;
}

.price-card .order-btn {
    background: #2a5298;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.price-card .order-btn:hover {
    background: #1e3c72;
}

/* Classes Gallery Section */
.classes-gallery-section {
    margin-bottom: 40px;
}

.classes-gallery-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e3c72;
    font-size: 1.8em;
}

.gallery-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.gallery-card {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.gallery-card-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.gallery-card-header {
    padding: 20px 30px;
    background: #1e3c72;
    border-bottom: 2px solid #2a5298;
}

.gallery-card-class-title {
    color: white;
    font-size: 1.8em;
    font-weight: bold;
    margin: 0;
    text-align: center;
}

.gallery-card-top-wrapper {
    display: flex;
    flex: 1;
}

.gallery-card-left {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.gallery-card-models {
    flex: 0 0 auto;
}

.models-title {
    color: #1e3c72;
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 15px 0;
}

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

.models-list li {
    color: #333;
    font-size: 1em;
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
}

.models-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2a5298;
    font-weight: bold;
}

.gallery-card-benefits {
    flex: 1;
}

.benefits-title {
    color: #1e3c72;
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 15px 0;
}

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

.benefit-item {
    color: #333;
    font-size: 1em;
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
    line-height: 1.5;
}

.benefit-item:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2a5298;
    font-weight: bold;
}

.gallery-card-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.gallery-card-rate-container {
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.gallery-card-rate-overlay {
    font-size: 1.5em;
    font-weight: bold;
    color: #1e3c72;
}

.gallery-card-image-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
}

.gallery-card-car-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: center;
}

.gallery-card-bottom-section {
    width: 100%;
    padding: 25px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-sizing: border-box;
}



.gallery-card-total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #1e3c72;
    border-radius: 8px;
}

.total-price-label {
    color: white;
    font-size: 1.1em;
    font-weight: 600;
}

.total-price-value {
    color: white;
    font-size: 1.8em;
    font-weight: bold;
}

.gallery-card-total-price--hint-only {
    justify-content: center;
}

.total-price-value--hint {
    font-size: 1.1em;
    font-weight: 600;
}

.gallery-order-btn {
    background: #2a5298;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.gallery-order-btn:hover {
    background: #1e3c72;
}

.gallery-order-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.gallery-nav-btn {
    background: #2a5298;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    z-index: 10;
}

.gallery-nav-btn:hover:not(:disabled) {
    background: #1e3c72;
    transform: scale(1.1);
}

.gallery-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gallery-nav-btn svg {
    width: 24px;
    height: 24px;
}

/* Адаптивность для галереи */
@media (max-width: 768px) {
    .gallery-container {
        gap: 10px;
    }

    .gallery-nav-btn {
        width: 40px;
        height: 40px;
    }

    .gallery-nav-btn svg {
        width: 20px;
        height: 20px;
    }

    .gallery-card {
        padding: 0 5px;
    }

    .gallery-card-content {
        min-height: auto;
    }

    .gallery-card-top-wrapper {
        flex-direction: column;
    }

    .gallery-card-left {
        padding: 20px;
        gap: 20px;
    }

    .gallery-card-right {
        order: -1;
    }

    .gallery-card-image-wrapper {
        padding: 15px;
    }

    .gallery-card-car-image {
        max-height: 250px;
    }

    .gallery-card-rate-container {
        padding: 12px 15px;
    }

    .gallery-card-rate-overlay {
        font-size: 1.2em;
    }

    .gallery-card-bottom-section {
        padding: 20px;
    }
    
    .gallery-card-total-price .total-price-value {
        font-size: 1.3em;
    }

    .models-title,
    .benefits-title {
        font-size: 1.1em;
    }

    .benefit-item {
        font-size: 0.9em;
    }
}

/* Info Section */
.info-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.info-section h2 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

.info-section h3 {
    color: #2a5298;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.info-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.info-section ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.info-section ul li {
    color: #333;
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.info-section ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2a5298;
    font-weight: bold;
    font-size: 1.2em;
}

/* Contact Section */
.contact-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    max-width: calc((1200px - 100px) / 2); /* В два раза уже карточки класса */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.contact-section h2 {
    text-align: center;
    color: #1e3c72;
    margin-bottom: 30px;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto 30px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.contact-form button {
    width: 100%;
    padding: 12px;
    background: #2a5298;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background: #1e3c72;
}

.contact-phone {
    text-align: center;
}

.phone-link {
    font-size: 1.5em;
    color: #2a5298;
    text-decoration: none;
    font-weight: bold;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    color: #1e3c72;
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.order-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.order-extras {
    margin-bottom: 5px;
}

.order-extra-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.95em;
    line-height: 1.4;
    color: #333;
}

.order-extra-item input[type="checkbox"] {
    width: auto;
    margin: 3px 0 0;
    flex-shrink: 0;
    cursor: pointer;
}

.order-extra-detail {
    margin-top: -4px;
    margin-bottom: 12px;
    margin-left: 26px;
}

.order-info p {
    margin-bottom: 10px;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    background: #2a5298;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-content button:hover {
    background: #1e3c72;
}

/* Footer */
.footer {
    background: #1e3c72;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }

    .manager-contact {
        text-align: center;
        margin-top: 10px;
        align-items: center;
    }

    .logo h1 {
        font-size: 1.2em;
    }

    .page-title {
        font-size: 1.8em;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .price-cards {
        grid-template-columns: 1fr;
    }

    .class-tabs {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .tab-btn {
        white-space: nowrap;
    }

    .nav {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .nav a {
        font-size: 0.9em;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .booking-form,
    .price-card,
    .class-content,
    .info-section,
    .contact-section {
        padding: 20px;
    }

    .page-title {
        font-size: 1.5em;
    }

    .price-card .price {
        font-size: 1.5em;
    }
}

