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

/* Loading Message */
.loading-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

a {
    text-decoration: none !important;
}

/* Grid Container */
.offers-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 350px));
    gap: 20px;
    justify-content: center;
    padding: 20px 0;
}

/* Offer Tile Styles */
.offer {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #01095C;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 600px;
}

/* Event Logo Styles */
.event-logo {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 999;
    max-width: 100px;
    max-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
}

.event-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.callout-bar {
    background: #0064cd;
    color: #fff;
    text-align: center;
    padding: 8px 15px;
    font-weight: 700;
    font-size: 16px;
    display: none;
}

.callout-bar.visible {
    display: block;
}

/* Vehicle Title */
.vehicle-title {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    margin: 15px;
    color: #FFF;
    text-align: center;
    flex-shrink: 0;
}

/* Image Section */
.offer-image-section {
    background: rgba(255, 255, 255, 0.95);
    margin: 0 15px 15px 15px;
    border-radius: 8px;
    flex-shrink: 0;
}

.offer-image-section img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Offers Grid - 2x2 layout */
.offers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 15px 15px 15px;
    flex-grow: 1;
}

.offer-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
}

.offer-item.full-width {
    grid-column: 1 / -1;
}

.offer-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.offer-amount {
    color: #0064cd;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    margin: 2px 0;
}

.offer-amount.savings {
    color: #28a745;
}

.offer-amount.buy-for {
    color: #333;
}

.offer-period {
    color: #0064cd;
    font-size: 14px;
    font-weight: 500;
}

.offer-details {
    color: #666;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.2;
}

/* MSRP and Model Info */
.msrp-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    margin: 0 15px 15px 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}

/* Button Styles */
.offer-actions {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.button {
    display: inline-block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.claim-special {
    background: #ff6b35;
    color: #fff;
    font-size: 16px;
    padding: 12px 16px;
}

.claim-special:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

.view-inventory,
.apply-financing {
    background: #454545;
    color: #fff;
}

.view-inventory:hover,
.apply-financing:hover {
    background: #333;
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* Disclaimer */
.disclosure-link {
    display: block;
    text-align: center;
    color: #F4F4F4;
    margin: 0 15px 15px 15px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    flex-shrink: 0;
}

.offer-disclaimer {
    display: none;
    font-size: 11px;
    line-height: 1.4;
    color: #666;
    padding: 15px;
    background: rgba(245, 245, 245, 0.95);
    margin: 0 15px 15px 15px;
    border-radius: 8px;
}

.disclaimer-item {
    margin-bottom: 10px;
}

.disclaimer-item:last-child {
    margin-bottom: 0;
}

/* Event Logo Position Modifiers */
.event-logo.top-left {
    top: 15px;
    left: 15px;
}

.event-logo.top-right {
    top: 15px;
    right: 15px;
    left: auto;
}

.event-logo.bottom-left {
    top: auto;
    bottom: 15px;
    left: 15px;
}

.event-logo.bottom-right {
    top: auto;
    bottom: 15px;
    right: 15px;
    left: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .offers-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 0;
    }
    
    .offer {
        min-height: 550px;
    }
    
    .callout-bar {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .vehicle-title {
        font-size: 16px;
        margin: 10px;
    }
    
    .event-logo {
        max-width: 80px;
        max-height: 50px;
        top: 10px;
        left: 10px;
    }
    
    .offers-grid {
        gap: 10px;
        padding: 0 10px 10px 10px;
    }
    
    .offer-amount {
        font-size: 20px;
    }
    
    .button {
        font-size: 13px;
        padding: 9px 14px;
    }
    
    .claim-special {
        font-size: 14px;
        padding: 10px 14px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .offers-container {
        grid-template-columns: repeat(2, minmax(300px, 350px));
    }
}

@media (min-width: 1025px) {
    .offers-container {
        grid-template-columns: repeat(3, minmax(300px, 350px));
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    position: relative;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
    color: white;
    padding: 25px 30px;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    padding-right: 40px;
}

.close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.modal-body {
    padding: 30px;
}

.thank-you-message {
    text-align: center;
    padding: 20px;
}

.thank-you-message h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 600;
}

.thank-you-message p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group textarea {
    height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

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

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

.form-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.form-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.form-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 20px 25px;
    }
    
    .modal-header h2 {
        font-size: 20px;
        padding-right: 35px;
    }
    
    .modal-body {
        padding: 25px 20px;
    }
    
    .close {
        width: 28px;
        height: 28px;
        font-size: 16px;
        right: 15px;
    }
    
    .thank-you-message h2 {
        font-size: 24px;
    }
    
    .thank-you-message p {
        font-size: 15px;
    }
}

/* Lazy Loading */
.lazy {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Print Styles */
@media print {
    .offer-actions,
    .disclosure-link,
    .modal {
        display: none;
    }
    
    .offer-disclaimer {
        display: block;
        border: 1px solid #ddd;
    }
    
    .offer {
        break-inside: avoid;
    }
}