/* Booking Page Specific Styles */

.booking-step {
    display: none;
}

.booking-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: #2a5298;
    color: white;
    box-shadow: 0 0 0 4px rgba(42, 82, 152, 0.2);
}

.progress-step.completed .step-circle {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

.progress-step.active .step-label {
    color: #2a5298;
    font-weight: 600;
}

/* ============================================ */
/* SESSION SCHEDULING - IMPROVED */
/* ============================================ */

.session-date-picker {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.session-date-picker h3 {
    color: #2a5298;
    margin: 0 0 8px 0;
    font-size: 1.5em;
    font-weight: 700;
}

.session-date-picker > p {
    color: #6c757d;
    margin: 0 0 15px 0;
    font-size: 1.05em;
}


/* Improved Slots Grid */
.slots-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Beautiful Slot Cards */
.slot-card-compact {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.slot-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2a5298, #4a7ac8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.slot-card-compact:hover::before {
    transform: scaleX(1);
}

.slot-card-compact:hover {
    border-color: #2a5298;
    box-shadow: 0 8px 24px rgba(42, 82, 152, 0.15);
    transform: translateY(-4px);
}

.slot-card-compact.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9f4 100%);
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.2);
}

.slot-card-compact.selected::before {
    background: linear-gradient(90deg, #28a745, #48c96b);
    transform: scaleX(1);
}

/* Slot Content */
.slot-card-compact .slot-date {
    font-weight: 700;
    color: #2a5298;
    margin-bottom: 8px;
    font-size: 1.1em;
    letter-spacing: -0.3px;
}

.slot-card-compact .slot-time {
    color: #495057;
    font-size: 1.05em;
    margin-bottom: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.slot-card-compact .slot-time::before {
    content: '🕐';
    font-size: 1.2em;
}

.slot-card-compact .slot-location {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.slot-card-compact .slot-location::before {
    content: '📍';
    font-size: 1.1em;
}

/* Capacity Display */
.slot-capacity {
    margin: 12px 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.95em;
    text-align: center;
}

.slot-capacity.full {
    background: #fee;
    color: #d32f2f;
}

.slot-capacity.available {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Button Styling */
.slot-card-compact .btn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.slot-card-compact .btn-primary {
    background: linear-gradient(135deg, #2a5298 0%, #1e3a6b 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}

.slot-card-compact .btn-primary:hover {
    box-shadow: 0 6px 16px rgba(42, 82, 152, 0.4);
    transform: translateY(-2px);
}

.slot-card-compact .btn-secondary {
    background: #e9ecef;
    border: 2px solid #dee2e6;
    color: #6c757d;
}

/* ============================================ */
/* COURSE SELECTION */
/* ============================================ */

.courses-grid {
    /* Force 3 columns on desktop */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.course-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: #2a5298;
}

.course-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.course-image-header {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.course-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #2a5298 0%, #1e3a6b 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-align: center;
    line-height: 1.3;
    min-width: 100px;
}

.course-badge div:first-child {
    font-size: 1.2em;
    font-weight: 700;
}

.course-badge div:last-child {
    font-size: 0.75em;
    margin-top: 2px;
    opacity: 0.95;
    font-weight: 500;
}

.course-content {
    padding: 25px;
}

.course-content h3 {
    color: #2a5298;
    margin: 0 0 12px 0;
    font-size: 1.4em;
}

.course-description {
    color: #666;
    margin: 12px 0 18px 0;
    line-height: 1.6;
    font-size: 0.95em;
}

.course-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 15px 0 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.course-meta span {
    font-size: 0.9em;
    color: #666;
}

/* ============================================ */
/* CUSTOM DATE REQUEST */
/* ============================================ */

.or-divider {
    text-align: center;
    margin: 35px 0;
    position: relative;
}

.or-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #dee2e6;
}

.or-divider span {
    background: white;
    padding: 0 20px;
    position: relative;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 1px;
}

.custom-date-form {
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.custom-date-form h3 {
    color: #2a5298;
    margin: 0 0 20px 0;
    text-align: center;
}

.custom-date-form .form-group {
    margin-bottom: 20px;
}

.custom-date-form label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 600;
    font-size: 0.95em;
}

.custom-date-form input[type="date"],
.custom-date-form select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

.custom-date-form input[type="date"]:focus,
.custom-date-form select:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.check-availability-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #28a745 0%, #20873a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.check-availability-btn:hover {
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
}

.check-availability-btn svg {
    flex-shrink: 0;
}

.form-help {
    font-size: 0.9em;
    color: #6c757d;
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.contact-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.phone-btn {
    background: linear-gradient(135deg, #2a5298 0%, #1e3a6b 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}

.phone-btn:hover {
    box-shadow: 0 6px 16px rgba(42, 82, 152, 0.4);
    transform: translateY(-2px);
}

.email-btn {
    background: white;
    color: #2a5298;
    border: 2px solid #2a5298;
}

.email-btn:hover {
    background: #2a5298;
    color: white;
}

/* ============================================ */
/* BUTTONS */
/* ============================================ */

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2a5298;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1e3a6b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.3);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-outline {
    background: white;
    color: #2a5298;
    border: 2px solid #2a5298;
}

.btn-outline:hover {
    background: #2a5298;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-block {
    width: 100%;
}

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

/* ============================================ */
/* FORM STYLES */
/* ============================================ */

.booking-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

/* ============================================ */
/* LOADING & MESSAGES */
/* ============================================ */

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 1.05em;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(42, 82, 152, 0.2);
    border-radius: 50%;
    border-top-color: #2a5298;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 50px 20px;
    color: #6c757d;
    font-size: 1.05em;
}

.error-message {
    text-align: center;
    padding: 50px 20px;
    color: #dc3545;
    font-size: 1.05em;
}

/* ============================================ */
/* STEP ACTIONS */
/* ============================================ */

.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.step-actions .btn {
    min-width: 150px;
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */

@media (max-width: 768px) {
    .progress-steps {
        flex-wrap: wrap;
        justify-content: center;
    }

    .progress-steps::before {
        display: none;
    }

    .progress-step {
        margin: 10px;
    }

    .courses-grid {
    /* Force 3 columns on desktop */
        grid-template-columns: 1fr;
    }

    .slots-grid-compact {
        grid-template-columns: 1fr;
    }

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

    .step-actions {
        flex-direction: column;
    }

    .step-actions .btn {
        width: 100%;
    }

    .contact-options {
        grid-template-columns: 1fr;
    }
}

/* Additional utility styles omitted for brevity but still present */


/* ============================================ */
/* DIVE CERTIFICATION FORMAT OPTIONS */
/* ============================================ */

.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.format-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.format-card:hover {
    border-color: #2a5298;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(42, 82, 152, 0.2);
}

.format-card h4 {
    color: #2a5298;
    font-size: 1.5em;
    margin: 0 0 10px 0;
}

.format-price {
    font-size: 2em;
    font-weight: bold;
    color: #28a745;
    margin: 10px 0 20px 0;
}

.format-details {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.format-details li {
    padding: 12px 0;
    line-height: 1.6;
    border-bottom: 1px solid #f0f0f0;
}

.format-details li:last-child {
    border-bottom: none;
}

.format-card .btn {
    margin-top: 15px;
}

/* Featured Card Styling */
.featured-card {
    border: 3px solid #2a5298 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%) !important;
    box-shadow: 0 8px 20px rgba(42, 82, 152, 0.3) !important;
    transform: scale(1.02);
}

.featured-card:hover {
    transform: scale(1.05) translateY(-5px) !important;
    box-shadow: 0 12px 30px rgba(42, 82, 152, 0.4) !important;
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2a5298;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9em;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
    z-index: 10;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
        transform: translateX(-50%) scale(1);
    }
    50% {
        box-shadow: 0 6px 16px rgba(255, 215, 0, 0.8);
        transform: translateX(-50%) scale(1.05);
    }
}

.featured-card h4 {
    color: #2a5298;
    font-size: 1.6em !important;
}

.featured-card .format-price {
    color: #2a5298 !important;
    font-size: 2.2em !important;
}

.featured-card .btn {
    background: linear-gradient(135deg, #2a5298 0%, #1e3a6b 100%);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.4);
}

.featured-card .btn:hover {
    box-shadow: 0 6px 16px rgba(42, 82, 152, 0.6);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .format-options {
        grid-template-columns: 1fr;
    }
    
    .featured-card {
        transform: scale(1);
    }
    
    .featured-card:hover {
        transform: scale(1.02) translateY(-3px) !important;
    }
}

/* ============================================ */
/* MONTH FILTER & PAGINATION */
/* ============================================ */

.form-control {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.form-control:hover {
    border-color: #2a5298;
}

#show-more-btn,
[id^="show-more-"] {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #2a5298;
    color: #2a5298;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#show-more-btn:hover,
[id^="show-more-"]:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3a6b 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}

/* Month filter container */
[id^="month-filter-"] {
    cursor: pointer;
}

/* ============================================ */
/* IMAGE OPTIMIZATION */
/* ============================================ */

/* Optimize image rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Prevent layout shift while images load */
img[loading="lazy"] {
    min-height: 200px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

/* Smooth fade-in when images load */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Course card images - prevent layout shift */
.course-card img,
.format-card img {
    width: 100%;
    height: auto;
    display: block;
    background-color: #f5f5f5;
}


/* Session Order Enforcement Styles */
.session-locked {
    opacity: 0.6;
    pointer-events: none;
}

.session-locked h3 {
    color: #999;
}

.lock-icon {
    font-size: 0.8em;
    margin-left: 10px;
}

.locked-message {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin: 10px 0;
    color: #856404;
}

.locked-message strong {
    display: block;
    margin-bottom: 5px;
}

.hidden {
    display: none !important;
}

.session-date-picker {
    transition: opacity 0.3s ease;
}

.session-date-picker.unlocking {
    animation: unlock-fade 0.5s ease;
}

@keyframes unlock-fade {
    0% {
        opacity: 0.6;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Course Groups and Combinations */
.group-card, .combination-card {
    position: relative;
}

/* Group indicator positioning is now inline in JavaScript for better control */

.course-card.group-card:hover,
.course-card.combination-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Comparison Modal */
#comparison-modal {
    animation: fadeIn 0.2s ease;
}

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


/* Checkbox positioning - checkboxes on the left */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    flex-direction: row; /* Ensure left-to-right */
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    flex: 1;
    line-height: 1.5;
}

/* ================================================
   SWIM TEST UI ENHANCEMENTS
   ================================================ */

#schedule-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4) !important;
}

#skip-swim-test-btn:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    transform: translateY(-2px);
}

.swim-time-btn {
    background: white !important;
    border: 2px solid #0ea5e9 !important;
    color: #0c4a6e !important;
    padding: 14px 20px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-align: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    display: block !important;
    width: 100% !important;
}

.swim-time-btn:hover {
    background: #0ea5e9 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3) !important;
}

/* Responsive swim test buttons */
@media (max-width: 600px) {
    #swim-test-choice {
        flex-direction: column !important;
    }
    
    #schedule-now-btn,
    #skip-swim-test-btn {
        min-width: 100% !important;
    }
}

/* ============================================ */
/* ENHANCED MOBILE OPTIMIZATION */
/* ============================================ */

/* Base mobile improvements */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Prevent zoom on input focus */
    }
    
    /* Progress steps - horizontal scroll on very small screens */
    .progress-steps {
        gap: 5px;
        padding: 0 10px;
        margin-bottom: 30px;
    }
    
    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.9em;
    }
    
    .step-label {
        font-size: 0.7em;
        max-width: 60px;
    }
    
    /* Course cards - full width stack */
    .course-card {
        margin-bottom: 20px;
    }
    
    .course-image,
    .course-image-header {
        height: 160px;
    }
    
    .course-content {
        padding: 18px;
    }
    
    .course-content h3 {
        font-size: 1.2em;
    }
    
    .course-badge {
        padding: 8px 14px;
        font-size: 0.9em;
    }
    
    /* Session cards */
    .session-date-picker {
        padding: 20px;
        border-radius: 12px;
    }
    
    .session-date-picker h3 {
        font-size: 1.2em;
    }
    
    .slot-card-compact {
        padding: 16px;
    }
    
    /* Buttons - larger touch targets */
    .btn {
        padding: 14px 24px;
        font-size: 1em;
        min-height: 48px; /* Minimum touch target */
    }
    
    .btn-lg {
        padding: 16px 28px;
        font-size: 1.1em;
    }
    
    /* Form inputs - prevent zoom */
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px;
        min-height: 48px;
    }
    
    /* Step actions */
    .step-actions {
        padding-top: 20px;
        margin-top: 25px;
        gap: 12px;
    }
    
    /* Format options */
    .format-card {
        padding: 20px;
    }
    
    .format-card h4 {
        font-size: 1.3em;
    }
    
    .format-price {
        font-size: 1.7em;
    }
    
    /* Booking summary */
    .booking-summary {
        padding: 15px;
    }
    
    /* Payment section */
    .payment-section {
        padding: 15px;
    }
    
    /* Success box */
    .success-box {
        padding: 30px 20px;
    }
    
    .success-box h2 {
        font-size: 1.5em;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
    .progress-steps {
        justify-content: space-between;
        padding: 0 5px;
    }
    
    .progress-step {
        margin: 0;
        flex: 0 0 auto;
    }
    
    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.85em;
        margin-bottom: 6px;
    }
    
    .step-label {
        font-size: 0.65em;
        max-width: 50px;
        line-height: 1.2;
    }
    
    /* Headings */
    h2 {
        font-size: 1.4em;
    }
    
    h3 {
        font-size: 1.2em;
    }
    
    /* Course meta info */
    .course-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Swim test buttons */
    #swim-test-option > div {
        padding: 20px !important;
    }
    
    #swim-test-option h3 {
        font-size: 1.2em !important;
    }
    
    /* Custom date form */
    .custom-date-form {
        padding: 18px;
    }
    
    /* Contact options */
    .contact-btn {
        padding: 14px 18px;
        font-size: 0.95em;
    }
    
    /* Price displays */
    .format-price {
        font-size: 1.5em;
    }
    
    /* Feature badges */
    .featured-badge {
        font-size: 0.8em;
        padding: 6px 14px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets */
    .btn, 
    .slot-card-compact,
    .course-card,
    .format-card,
    input[type="checkbox"],
    input[type="radio"] {
        cursor: pointer;
    }
    
    /* Remove hover effects that don't work well on touch */
    .course-card:hover,
    .slot-card-compact:hover,
    .format-card:hover {
        transform: none;
    }
    
    /* Active state for touch feedback */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .course-card:active,
    .slot-card-compact:active,
    .format-card:active {
        transform: scale(0.99);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* Checkbox/radio larger touch area */
    input[type="checkbox"],
    input[type="radio"] {
        width: 24px !important;
        height: 24px !important;
    }
}

/* Landscape phone orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .booking-container {
        padding: 10px;
    }
    
    .booking-header {
        padding: 20px;
    }
    
    .booking-header h1 {
        font-size: 1.5em;
    }
    
    .booking-body {
        padding: 20px;
    }
    
    /* Two column layout for landscape */
    .format-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slots-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Safe area insets for notched phones */
@supports (padding: max(0px)) {
    .booking-container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .course-card,
    .slot-card-compact,
    .format-card {
        border-width: 3px;
    }
}

/* Print styles - hide interactive elements */
@media print {
    .progress-steps,
    .step-actions,
    .btn,
    .powered-by {
        display: none !important;
    }
    
    .booking-summary {
        border: 1px solid #000;
        padding: 20px;
    }
}

/* ============================================ */
/* COURSE GRID - RESPONSIVE COLUMNS */
/* ============================================ */

/* Desktop: 3 columns */
@media (min-width: 992px) {
    .courses-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Tablet: 2 columns */
@media (min-width: 600px) and (max-width: 991px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile: 1 column */
@media (max-width: 599px) {
    .courses-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================ */
/* COURSE CARD IMAGE - FIXED ASPECT RATIO */
/* ============================================ */

/* Override course image to use proper 16:9 aspect ratio */
.course-card .course-image,
.course-card .course-image-header {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Price badge positioning */
.course-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
}

/* Ensure course grid uses full width */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 25px;
}

/* Responsive breakpoints for course grid */
@media (max-width: 1100px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .course-card .course-image,
    .course-card .course-image-header {
        padding-bottom: 50%; /* Slightly shorter on mobile */
    }
}

/* Pricing Summary Styles */
.pricing-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pricing-summary h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #1f2937;
}

.pricing-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.pricing-row:last-child {
    border-bottom: none;
}

.pricing-row.discount {
    color: #10b981;
}

.pricing-row.total {
    border-top: 2px solid #e5e7eb;
    padding-top: 15px;
    margin-top: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.pricing-row span:last-child {
    font-weight: 600;
}
