/* Enhanced Enroll Form and Offers Styles */

/* Search Form Styles */
.enroll-form-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.search-hero {
    padding: 0;
}

.search-form-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.search-form-card h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.search-form-card .lead {
    color: #6c757d;
    margin-bottom: 30px;
}

.enhanced-search-form .form-group {
    margin-bottom: 25px;
}

.enhanced-search-form label {
    color: #495057;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.enhanced-search-form label i {
    color: #667eea;
    margin-right: 8px;
}

.enhanced-search-form .form-control {
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    padding: 12px 15px !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: white !important;
    color: #495057 !important;
    height: 48px !important; /* Override Bootstrap's fixed height */
    min-height: 48px !important; /* Ensure adequate height for text display */
    line-height: 1.4 !important; /* Better line height for readability */
    box-sizing: border-box !important;
}

/* Ultra-specific override to beat Bootstrap's specificity */
.search-form-card .enhanced-search-form .form-group .form-control,
.search-form-card .enhanced-search-form .form-group input.form-control,
.search-form-card .enhanced-search-form .form-group select.form-control,
.search-form-card .enhanced-search-form .custom-select-wrapper select.form-control {
    height: 48px !important;
    min-height: 48px !important;
    line-height: 1.4 !important;
    padding: 12px 15px !important;
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    background-color: white !important;
}

/* Nuclear option - target by exact element IDs */
#zip.form-control,
#address.form-control,
#city.form-control,
#state.form-control {
    height: 48px !important;
    min-height: 48px !important;
    line-height: 1.4 !important;
    padding: 12px 15px !important;
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    background-color: white !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Specific select styling for all selects */
#state.form-control {
    padding-right: 40px !important;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23999" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    cursor: pointer !important;
    color: #999 !important;
}

#state.form-control.has-value {
    color: #495057 !important;
}

/* Enhanced select dropdown styling */
.custom-select-wrapper {
    position: relative;
}

/* Specific styling for select elements in the enhanced search form */
.enhanced-search-form select.form-control,
.enhanced-search-form .custom-select-wrapper select.form-control {
    height: 48px !important; /* Override Bootstrap's fixed 34px height */
    min-height: 48px !important; /* Ensure adequate height */
    line-height: 1.4 !important; /* Better text positioning */
    padding: 12px 15px !important; /* Consistent padding */
    box-sizing: border-box !important; /* Include padding in height calculation */
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23999" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    padding-right: 40px !important;
    cursor: pointer !important;
    background-color: white !important;
    color: #999 !important; /* Default to placeholder color */
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.enhanced-search-form select.form-control.has-value,
.enhanced-search-form .custom-select-wrapper select.form-control.has-value {
    color: #495057 !important; /* Force selected value color */
}

/* Select option styling */
.enhanced-search-form select.form-control option {
    background-color: white !important;
    color: #333 !important; /* Option color */
    padding: 8px 12px !important;
}

.enhanced-search-form select.form-control option[value=""] {
    color: #999 !important; /* Placeholder option color */
    font-style: italic !important;
}

.enhanced-search-form select.form-control option:checked {
    background-color: #667eea !important;
    color: white !important;
}

.enhanced-search-form select.form-control:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    outline: none !important;
    color: #495057 !important;
}

/* Specific targeting for state dropdown */
body .enhanced-search-form #state.form-control,
html body .enhanced-search-form #state.form-control {
    height: 48px !important;
    min-height: 48px !important;
    line-height: 1.4 !important;
    padding: 12px 15px !important;
    color: #999 !important;
    background-color: white !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23999" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    padding-right: 40px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

body .enhanced-search-form #state.form-control.has-value,
html body .enhanced-search-form #state.form-control.has-value {
    color: #495057 !important;
}

/* Even more specific override to beat Bootstrap */
.container .enhanced-search-form #state.form-control,
.container-fluid .enhanced-search-form #state.form-control {
    height: 48px !important;
    min-height: 48px !important;
}

.enhanced-search-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.enhanced-search-form .form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.category-selection {
    margin: 30px 0;
}

.category-selection label {
    font-size: 18px;
    margin-bottom: 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.category-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.category-option:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-2px);
}

.category-option.selected {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.category-option i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.category-option .category-title {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.category-option small {
    opacity: 0.8;
}

.btn-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.message-area {
    margin-top: 20px;
}

/* Results Container */
.results-container {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Loading Overlay */
.loading-content {
    text-align: center;
    color: #6c757d;
}

.loading-content i {
    color: #667eea;
    margin-bottom: 15px;
}

/* Offers Page Styles */
.category-tabs-section {
    background-color: #f8f9fa;
    padding: 20px 0;
    border-bottom: 1px solid #dee2e6;
}

.category-tabs {
    border: none;
    margin-bottom: 0;
}

.category-tabs > li > a {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin: 0 5px;
    background-color: white;
    color: #495057;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.category-tabs > li > a:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.category-tabs > li.active > a,
.category-tabs > li.active > a:hover,
.category-tabs > li.active > a:focus {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.category-tabs .badge {
    background-color: rgba(255,255,255,0.2);
    margin-left: 5px;
}

.category-tabs > li.active .badge {
    background-color: rgba(255,255,255,0.3);
}

.offers-section {
    padding: 40px 0;
    background: #f8f9fa;
}

.offers-controls {
    margin-bottom: 30px;
    padding: 15px;
    background-color: white;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.no-offers-message .alert {
    padding: 40px;
    border-radius: 10px;
}

.no-offers-message ul {
    margin: 20px 0;
}

.no-offers-message ul li {
    margin: 10px 0;
    color: #6c757d;
}

.offers-info-section {
    background-color: #f8f9fa;
    padding: 20px 0;
}

.partner-offers-section {
    padding: 60px 0;
    background-color: white;
}

.partner-card {
    background: white;
    border-radius: 10px;
    padding: 30px 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: 1px solid #e9ecef;
}

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

.partner-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.partner-logo {
    margin-bottom: 20px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo img {
    max-height: 60px;
    width: auto;
}

.partner-card h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.partner-card p {
    color: #6c757d;
    margin-bottom: 20px;
}

.btn-outline {
    border: 2px solid #007bff;
    color: #007bff;
    background: transparent;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
    text-decoration: none;
}

.spinner {
    padding: 40px;
}

/* Enhanced tour-package styling for offer cards */
.rates .tour-package {
    border: 1px solid #e5e5e5;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rates .tour-package:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.tour-package .tp-thumb {
    background: #f8f9fa;
    text-align: center;
    padding: 20px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e5e5e5;
}

.tour-package .tp-thumb img {
    max-height: 80px;
    max-width: 150px;
    object-fit: contain;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #6c757d;
    text-align: center;
}

.logo-placeholder i {
    font-size: 24px;
    margin-bottom: 5px;
}

.logo-placeholder span {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

/* Price column styling */
.tp-price {
    background: linear-gradient(135deg, #00aeef 0%, #0080c7 100%);
    color: white;
    position: relative;
}

.tp-price span {
    color: white !important;
    font-weight: bold;
}

.tp-price p {
    color: rgba(255,255,255,0.9) !important;
    font-size: 12px;
    margin: 10px 0;
}

.tp-price .btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-weight: bold;
    padding: 8px 16px;
}

.tp-price .btn:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    border-color: rgba(255,255,255,0.5);
}

/* Improve price section readability - High specificity */
.tour-package .tp-price.white {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 5px !important;
    padding: 15px !important;
    text-align: center !important;
    color: #333 !important;
}

.tour-package .tp-price.white span {
    font-size: 20px !important;
    font-weight: bold !important;
    color: #F9690E !important;
    display: block !important;
    margin-bottom: 8px !important;
}

.tour-package .tp-price.white p {
    font-size: 11px !important;
    color: #666 !important;
    margin: 8px 0 !important;
    line-height: 1.4 !important;
}

.tour-package .tp-price.white .btn {
    width: 100% !important;
    margin-top: 10px !important;
    font-weight: bold !important;
    padding: 8px !important;
    font-size: 12px !important;
    background-color: #F9690E !important;
    border-color: #F9690E !important;
    color: #FFFFFF !important;
}

/* More specific targeting for nested price elements */
.tour-package .tp-price.white .d1,
.tour-package .tp-price.white .d2 {
    background: transparent !important;
    color: inherit !important;
}

.tour-package .tp-price.white .d1 .d2 span {
    font-size: 20px !important;
    font-weight: bold !important;
    color: #F9690E !important;
    display: block !important;
    margin-bottom: 8px !important;
}

.tour-package .tp-price.white .d1 .d2 p {
    font-size: 11px !important;
    color: #666 !important;
    margin: 8px 0 !important;
    line-height: 1.4 !important;
}

.tour-package .tp-price.white .d1 .d2 .btn {
    width: 100% !important;
    margin-top: 10px !important;
    font-weight: bold !important;
    padding: 8px !important;
    font-size: 12px !important;
    background-color: #F9690E !important;
    border-color: #F9690E !important;
    color: #FFFFFF !important;
}

/* Ensure green border shows with higher specificity */
.tour-package.green-energy-offer {
    border-left: 5px solid #28a745 !important;
    border-bottom: 5px solid #28a745 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fff9 100%) !important;
}

/* Force override of blue background in price section */
.tour-package .col-md-2 .tp-price.white,
.tour-package .col-md-2 .tp-price.white .d1,
.tour-package .col-md-2 .tp-price.white .d2 {
    background: #f8f9fa !important;
    background-image: none !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 5px !important;
    padding: 15px !important;
    text-align: center !important;
    color: #333 !important;
}

/* Enhanced badge styling */
.rate-type-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.rate-type-badge.fixed {
    background: #d4edda;
    color: #155724;
}

.rate-type-badge.variable {
    background: #fff3cd;
    color: #856404;
}

.savings-badge {
    background: #d1ecf1;
    color: #0c5460;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 10px;
    display: inline-block;
}

.green-indicator {
    color: #28a745 !important;
}

.primary-indicator {
    color: #ffc107 !important;
}

/* Ensure uniform content height */
.tour-package .tp-content {
    min-height: 180px;
    border-bottom: 1px solid #e5e5e5;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Responsive adjustments for new elements */
.document-links-prominent {
    margin: 20px 0 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.document-links-prominent h6 {
    color: #2c3e50;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.doc-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.doc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid;
    min-width: 100px;
    text-align: center;
}

.facts-btn {
    background: #17a2b8;
    color: white;
    border-color: #17a2b8;
}

.facts-btn:hover {
    background: #138496;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.terms-btn {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.terms-btn:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.doc-btn i {
    margin-right: 6px;
    font-size: 12px;
}

/* Responsive adjustments for document buttons */
@media (max-width: 480px) {
    .doc-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .doc-btn {
        width: 100%;
        min-width: auto;
    }
}

/* Responsive adjustments for new elements */

/* Mobile responsiveness for tour-package */
@media (max-width: 991px) {
    .tour-package .tp-thumb {
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .tour-package .tp-content {
        min-height: auto;
    }
}

@media (max-width: 767px) {
    .search-form-card {
        margin: 10px;
        padding: 20px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .category-option {
        padding: 15px;
    }
    
    .category-tabs > li {
        margin-bottom: 10px;
    }
    
    .category-tabs > li > a {
        margin: 0;
        text-align: center;
        display: block;
    }
    
    .offers-controls .text-right {
        text-align: left !important;
        margin-top: 15px;
    }
    
    .partner-card {
        margin-bottom: 20px;
    }
    
    .btn-search {
        padding: 12px 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .enroll-form-container {
        padding: 30px 0;
    }
    
    .search-form-card {
        padding: 15px;
    }
    
    .search-form-card h2 {
        font-size: 24px;
    }
    
    .category-option {
        padding: 12px;
    }
    
    .category-option i {
        font-size: 20px;
    }
}

/* ===== SIMPLE RELIABLE OFFER CARDS ===== */

.simple-offer-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.simple-offer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.simple-offer-card.green-energy {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #ffffff 0%, #f8fff9 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
}

.simple-offer-card.green-energy:hover {
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

.card-logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    position: relative;
}

.provider-img {
    max-height: 50px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.provider-placeholder {
    color: #666;
    font-size: 12px;
}

.provider-placeholder i {
    font-size: 24px;
    margin-bottom: 5px;
    display: block;
}

.green-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 15px;
    font-weight: 600;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.price-display {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.price {
    font-size: 24px;
    font-weight: 800;
    color: #F9690E;
    display: block;
}

.savings {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
    margin-top: 5px;
}

.plan-info p {
    margin-bottom: 8px;
    font-size: 14px;
}

.usage-info {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

.rates-header {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.usage-rates-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.usage-rates-table th {
    background: #e9ecef;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    border: 1px solid #dee2e6;
    text-align: center;
}

.usage-rates-table td {
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #F9690E;
    border: 1px solid #dee2e6;
    text-align: center;
    background: white;
}

.select-btn {
    display: block;
    width: 100%;
    background: #F9690E;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    text-align: center;
    margin: 20px 0 15px;
    border: none;
    transition: all 0.3s ease;
}

.select-btn:hover {
    background: #e55a0c;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.select-btn.disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.document-links {
    text-align: center;
    margin-bottom: 15px;
}

.document-links a {
    color: #007bff;
    text-decoration: none;
    font-size: 12px;
    margin: 0 10px;
}

.document-links a:hover {
    text-decoration: underline;
}

.provider-name {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 0;
}

/* ===== EQUAL HEIGHT ROW STYLES ===== */

.offers-container .equal-height {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-flex-wrap: wrap !important;
    -ms-flex-wrap: wrap !important;
    flex-wrap: wrap !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
}

.offers-container .equal-height > [class*="col-"] {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important;
    margin-bottom: 30px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Ensure cards within flex columns stretch to full height */
.offers-container .equal-height .simple-offer-card {
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Clear floats every 3rd item on large screens */
@media (min-width: 992px) {
    .offers-container .equal-height > .col-lg-4:nth-child(3n+1) {
        clear: left !important;
    }
}

/* Clear floats every 2nd item on medium screens */
@media (min-width: 769px) and (max-width: 991px) {
    .offers-container .equal-height > .col-md-6:nth-child(2n+1) {
        clear: left !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .offers-container .equal-height > .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .offers-container .equal-height > .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .offers-container .equal-height > .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .offers-container .equal-height > .col-lg-4 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (min-width: 992px) {
    .offers-container .equal-height > .col-lg-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
    
    .offers-container .equal-height > .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* ===== FIREWHEEL CARD GRID STYLES ===== */

.offers-container .firewheel-card-grid {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-flex-wrap: wrap !important;
    -ms-flex-wrap: wrap !important;
    flex-wrap: wrap !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
}

.offers-container .firewheel-card-grid > [class*="col-"] {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important;
    margin-bottom: 30px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Ensure cards within flex columns stretch to full height */
.offers-container .firewheel-card-grid .simple-offer-card {
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Clear floats every 3rd item on large screens */
@media (min-width: 992px) {
    .offers-container .firewheel-card-grid > .col-lg-4:nth-child(3n+1) {
        clear: left !important;
    }
    
    .offers-container .firewheel-card-grid > .col-lg-4 {
        -webkit-box-flex: 0 !important;
        -webkit-flex: 0 0 33.333333% !important;
        -ms-flex: 0 0 33.333333% !important;
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

/* Clear floats every 2nd item on medium screens */
@media (min-width: 769px) and (max-width: 991px) {
    .offers-container .firewheel-card-grid > .col-md-6:nth-child(2n+1) {
        clear: left !important;
    }
    
    .offers-container .firewheel-card-grid > .col-md-6 {
        -webkit-box-flex: 0 !important;
        -webkit-flex: 0 0 50% !important;
        -ms-flex: 0 0 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .offers-container .firewheel-card-grid > .col-lg-4 {
        -webkit-box-flex: 0 !important;
        -webkit-flex: 0 0 50% !important;
        -ms-flex: 0 0 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .offers-container .firewheel-card-grid > .col-md-6 {
        -webkit-box-flex: 0 !important;
        -webkit-flex: 0 0 100% !important;
        -ms-flex: 0 0 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .offers-container .firewheel-card-grid > .col-lg-4 {
        -webkit-box-flex: 0 !important;
        -webkit-flex: 0 0 100% !important;
        -ms-flex: 0 0 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}
