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

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

a {
    text-decoration: none !important;
}

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

/* Carousel Styles */
.carousel {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    background-color: #fff;
    padding: 20px 0;
}

.carousel-container {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.carousel-item {
    flex: 0 0 calc(100% / 6);
    padding: 10px;
    text-align: center;
    color: #333;
}

.carousel-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.carousel-item p {
    font-size: 14px;
    font-weight: bold;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    z-index: 1;
}

.carousel-arrow.prev {
    left: 10px;
}

.carousel-arrow.next {
    right: 10px;
}

/* Offer Styles */
.offer {
    border: 1px solid #ddd;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-size: cover;
    background-position: center;
}

.offer-header {
    position: relative;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    padding: 0;
}

.offer-header .logo {
    max-width: 100px;
    margin-right: 15px;
}

.offer-header .header-text {
    flex-grow: 1;
    padding-top: 0;
}

.offer-header h2 {
    font-size: 24px;
    color: #333;
    margin: 0 0 5px 0;
}

.vehicle-specs {
    font-size: 18px;
    color: #666;
    font-weight: 600;
    margin: 0;
}

.price-container {
    text-align: right;
}

.msrp, .selling-price {
    font-size: 18px;
    font-weight: bold;
    color: #666;
    margin: 0;
}

.selling-price {
    color: #28a745;
}

.offer-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 15px;
}

.callout {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
    margin: 0;
}

.selling-price-mobile {
    display: none;
}

.offer-main-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.offer-image-section {
    flex: 0 0 45%;
    text-align: center;
}

.offer-image-section img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.offer-image-section .view-vehicle {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.offer-image-section .view-vehicle:hover {
    background-color: #000000;
}

.offer-details {
    flex: 0 0 50%;
}

.zero-down-lease-payment-section {
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.payment-section {
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.payment-label {
    background-color: #fff;
    color: #7e1a12;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border: 1px solid #7e1a12;
    display: inline-block;
    margin-right: 15px;
}

.payment-amount {
    font-size: 36px;
    font-weight: bold;
    color: #7e1a12;
    margin-right: 5px;
}

.payment-period {
    font-size: 14px;
    color: #666;
    align-self: flex-end;
    margin-bottom: 5px;
}

.payment-details {
    flex-basis: 100%;
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

.payment-details p {
    margin: 0;
    line-height: 1.4;
}

.offer-actions {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    flex: 1 0 calc(33.33% - 10px);
    max-width: calc(33.33% - 10px);
    transition: background-color 0.3s ease;
}

.button:hover {
    color: white;
}

.button.claim-special,
#leadForm button[type="submit"] {
    display: inline-block;
    padding: 10px 20px;
    background-color: #7e1a12;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button.claim-special:hover,
#leadForm button[type="submit"]:hover {
    background-color: #000000;
}

.button.view-inventory,
.button.value-trade {
    background-color: #333333;
}

.button.view-inventory:hover,
.button.value-trade:hover {
    background-color: #000000;
}

.offer-disclaimer {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

#closeModal {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #7e1a12;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#closeModal:hover {
    background-color: #000000;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

 .thank-you-message {
        padding-top: 40px; /* Add extra padding for the thank you message */
    }

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group textarea {
    height: 100px;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #7e1a12;
}

.error-message {
    color: #7e1a12;
    font-size: 12px;
    margin-top: 5px;
}

.form-message {
    padding: 10px;
    margin-top: 15px;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#leadForm button[type="submit"] {
    display: inline-block;
    padding: 10px 20px;
    background-color: #7e1a12;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#leadForm button[type="submit"]:hover {
    background-color: #000000;
}

/* Lazy loading styles */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 calc(100% / 3);
    }

    .modal-content {
        width: 70%;
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 5px;
    }

    .carousel {
        padding: 0;
        margin-bottom: 15px;
    }

    .carousel-item {
        padding: 5px;
    }

    .carousel-arrow {
        padding: 5px 10px;
    }

    .carousel-arrow.prev {
        left: 5px;
    }

    .carousel-arrow.next {
        right: 5px;
    }

    .offer {
        width: calc(100% - 10px);
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 15px;
        padding: 10px;
    }

    .offer-header {
        flex-wrap: wrap;
    }

    .offer-header .logo {
        order: 1;
        margin-bottom: 10px;
    }

    .offer-header .header-text {
        order: 2;
        width: calc(100% - 120px); /* Adjust based on logo width */
    }

    .price-container {
        order: 3;
        width: 100%;
        text-align: right;
        margin-top: 40px;
    }

    .msrp, .selling-price {
        display: inline-block;
        margin-left: 10px;
    }

    .offer-main-content {
        flex-direction: column;
    }

    .offer-image-section, .offer-details {
        flex: 0 0 100%;
    }

    .offer-details {
        margin-top: 20px;
    }

    .button {
        flex: 1 0 100%;
        max-width: 100%;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
    }

    .offer-subheader {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        margin-top: 5px;
    }

    .callout {
        margin-bottom: 10px;
    }

    .selling-price-mobile {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 5px;
    }

    .carousel {
        padding: 0;
        margin-bottom: 10px;
    }

    .carousel-item {
        padding: 2px;
    }

    .carousel-arrow {
        padding: 3px 8px;
        font-size: 16px;
    }

    .carousel-arrow.prev {
        left: 2px;
    }

    .carousel-arrow.next {
        right: 2px;
    }

    .offer {
        width: calc(100% - 5px);
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 10px;
        padding: 2px;
    }

    .offer-header h2 {
        font-size: 20px;
    }

    .offer-header .header-text {
        width: 100%;
    }

    .price-container {
        position: absolute;
        top: 0;
        right: 0;
        width: auto;
    }

    .msrp, .selling-price {
        font-size: 14px;
        display: block;
        margin-left: 0;
    }

    .callout {
        font-size: 16px;
    }

    .vehicle-specs {
        font-size: 16px;
    }

    .button {
        font-size: 14px;
        padding: 8px 15px;
    }
}

@media screen and (max-height: 600px) {
    .modal-content {
        margin: 2% auto;
        max-height: 96vh;
    }
}