/* Specific styles for the multi-step form */
.multi-step-form {
    padding: 80px 0;
    background: var(--light-beige);
}

.step-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden; /* Ensures rounded corners apply to inner content */
}

.step-header {
    padding: 25px 30px;
    background: var(--light-beige);
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.step-header:hover {
    background: #f0ede8;
}

.step-header.active {
    background: var(--orange);
    color: #ffffff;
}

.step-header.active .step-title,
.step-header.active .step-icon,
.step-header.active .step-edit-icon {
    color: #ffffff !important;
}

.step-header.completed {
    background: #e3f2e7; /* subtle green ensuring readability */
    color: var(--dark);
    border-left: 4px solid #2f8f46; /* richer green */
}

.step-header.completed .step-title {
    color: var(--dark);
}

.step-header.completed .step-completed-icon {
    color: #2f8f46;
}

.step-header.completed:hover {
    background: #d9ecdf;
}

.step-header.locked {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.step-header.locked .step-title {
    color: #6c757d;
}

.step-header.locked .step-locked-icon {
    color: #6c757d;
}

/* Step Status */
.step-status {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 20px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--gray);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.step-header.completed .step-number {
    background: #28a745;
    animation: stepCompleted 0.6s ease-out;
}

.step-header.locked .step-number {
    background: var(--gray);
    opacity: 0.5;
}

.step-completion-status {
    display: flex;
    align-items: center;
}

.step-completed-icon {
    font-size: 1.5rem;
    color: #28a745;
}

.step-incomplete-icon {
    font-size: 1.5rem;
    color: #dc3545;
}

.step-locked-icon {
    font-size: 1.5rem;
    color: #6c757d;
}

.step-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.step-title {
    flex: 1;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.step-title i {
    font-size: 1.2rem;
    color: var(--orange);
    transition: all 0.3s ease;
}

.step-header.active .step-title i {
    color: white;
}

.step-icon,
.step-edit-icon {
    font-size: 1.1rem;
    color: var(--gray);
    transition: all 0.3s ease;
}

.step-header.active .step-icon,
.step-header.active .step-edit-icon {
    color: white;
}

.step-header.completed .step-edit-icon {
    color: var(--success);
}

.step-header[aria-expanded="true"] .step-icon {
    transform: rotate(180deg);
}

.step-body {
    padding: 30px;
    border-top: none;
}

/* Step completion animations */
.step-header.completed {
    animation: stepCompleted 0.5s ease-out;
}

@keyframes stepCompleted {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.step-completed-icon {
    animation: iconPop 0.3s ease-out;
}

@keyframes iconPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Step validation states */
.step-header.validation-error {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
}

.step-header.validation-error .step-title {
    color: #721c24;
}

.step-header.validation-error .step-incomplete-icon {
    color: #dc3545;
}

/* Step progress indicator */
.step-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--orange);
    transition: width 0.3s ease;
}

.step-header.completed .step-progress {
    background: #28a745;
}

/* Responsive adjustments for step status */
@media (max-width: 768px) {
    .step-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .step-status {
        order: 1;
    }
    
    .step-title {
        order: 2;
        margin-left: 0;
        justify-content: center;
    }
    
    .step-controls {
        order: 3;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .step-title {
        font-size: 1.2rem;
    }
    
    .step-title i {
        font-size: 1.5rem;
        margin-right: 10px;
    }
}

@media (max-width: 576px) {
    .step-header {
        padding: 15px;
        gap: 10px;
    }
    
    .step-status {
        gap: 10px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .step-title {
        font-size: 1.1rem;
    }
    
    .step-title i {
        font-size: 1.3rem;
        margin-right: 8px;
    }
    
    .step-completed-icon,
    .step-incomplete-icon,
    .step-locked-icon {
        font-size: 1.3rem;
    }
}

.form-label {
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
    display: block;
}

.form-control,
.form-select {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 0.2rem rgba(234, 139, 44, 0.25);
}

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

/* Circuit selection card sizing and visuals */
.circuit-card-selectable {
    border: 2px solid #eee;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
}
.circuit-card-selectable img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.circuit-card-selectable .circuit-card-content {
    padding: 16px;
}
.circuit-card-selectable .circuit-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.circuit-card-selectable .price {
    color: var(--orange);
    font-weight: 700;
}
.circuit-card-selectable.selected {
    border-color: var(--orange);
    box-shadow: 0 10px 30px rgba(234,139,44,0.2);
}

/* Accommodation cards carousel and cards */
.night-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 16px;
}
.night-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    background: var(--light-beige);
}
.night-title { margin: 0; font-weight: 600; }
.accommodation-carousel-container { position: relative; }
.accommodation-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 16px;
    scroll-behavior: smooth;
}
.accommodation-card {
    min-width: 240px;
    max-width: 240px;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}
.accommodation-card:hover { transform: translateY(-3px); border-color: var(--orange); }
.accommodation-card.selected { border-color: var(--orange); box-shadow: 0 10px 30px rgba(234,139,44,0.2); }
.accommodation-card img { width: 100%; height: 140px; object-fit: cover; }
.accommodation-info { padding: 12px; }
.accommodation-info h6 { margin: 0 0 6px; font-weight: 600; }
.accommodation-info .stars { color: #ffc107; margin-bottom: 6px; }
.accommodation-info .price { color: var(--orange); font-weight: 700; }
.feature-tag { display: inline-block; background: var(--light-beige); border-radius: 12px; padding: 3px 8px; font-size: 0.8rem; margin: 2px 4px 0 0; }

/* Mobile adjustments for step 2 cards */
@media (max-width: 576px) {
    .accommodation-card { min-width: 220px; max-width: 220px; }
    .accommodation-card img { height: 120px; }
    .circuit-card-selectable img { height: 160px; }
    .night-header { padding: 10px 12px; }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #eee;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }

.selected-hotel-info { display: flex; align-items: center; gap: 8px; }
.selected-hotel-image { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.selected-hotel-name { font-weight: 600; }
.selected-hotel-price { color: var(--orange); font-weight: 700; }

.activity-option {
    position: relative;
}

.activity-checkbox {
    display: none;
}

.activity-label-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.activity-label-modern:hover {
    border-color: var(--orange);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(234, 139, 44, 0.1);
}

.activity-checkbox:checked + .activity-label-modern {
    border-color: var(--orange);
    background: rgba(234, 139, 44, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(234, 139, 44, 0.2);
}

.activity-label-modern i {
    font-size: 1.8rem;
    color: var(--orange);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.activity-checkbox:checked + .activity-label-modern i {
    transform: scale(1.1);
}

.activity-label-modern span {
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.circuit-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.circuit-card-selectable {
    border: 2px solid #eee;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.circuit-card-selectable:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.circuit-card-selectable.selected {
    border-color: var(--orange);
    box-shadow: 0 10px 30px rgba(234, 139, 44, 0.2);
    background-color: rgba(234, 139, 44, 0.05);
}

.circuit-card-selectable img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.circuit-card-content {
    padding: 20px;
}

.circuit-card-content h5 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.circuit-card-content p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 15px;
}

.circuit-card-content .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--orange);
}

.accommodation-per-night {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #eee;
}

.accommodation-per-night h6 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 15px;
}

.accommodation-option {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.accommodation-option:hover {
    border-color: var(--orange);
}

.accommodation-option.selected {
    border-color: var(--orange);
    background-color: rgba(234, 139, 44, 0.1);
}

.accommodation-option input[type="radio"] {
    margin-right: 10px;
}

.payment-options .payment-option {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-options .payment-option:hover,
.payment-options .payment-option.selected {
    border-color: var(--orange);
    background: rgba(234, 139, 44, 0.1);
}

.payment-options .payment-option input[type="radio"] {
    margin-right: 10px;
}

/* Custom Modal Styles */
.custom-modal-header {
    background-color: var(--orange);
    color: white;
    border-bottom: none;
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
}

.custom-modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.custom-modal-body {
    padding: 2rem;
    text-align: center;
}

.custom-modal-body .fas {
    font-size: 3rem;
    color: var(--orange);
    margin-bottom: 1rem;
}

.custom-modal-footer {
    border-top: none;
    padding: 1rem 2rem 2rem;
    justify-content: center;
}

/* Booking Summary Styles */
.booking-summary {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #eee;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.summary-item.summary-total {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--orange);
    border-top: 2px solid var(--orange);
    margin-top: 15px;
    padding-top: 15px;
}

/* User Pages Styles */
.user-page {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.account-card {
    background: white;
    border: 1px solid #eee;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .step-header {
        padding: 20px;
    }
    
    .step-title {
        font-size: 1.2rem;
    }
    
    .step-title i {
        font-size: 1.5rem;
        margin-right: 10px;
    }
    
    .step-body {
        padding: 20px;
    }
    
    .circuit-selection-grid {
        grid-template-columns: 1fr;
    }
    
    .multi-step-form {
        padding: 60px 0;
    }
    
    .step-card {
        margin-bottom: 20px;
    }
    
    .circuit-card-selectable img {
        height: 150px;
    }
    
    .circuit-card-content {
        padding: 15px;
    }
    
    .circuit-card-content h5 {
        font-size: 1.1rem;
    }
    
    .accommodation-per-night {
        padding: 15px;
    }
    
    .booking-summary {
        padding: 20px;
    }
    
    .custom-modal-body {
        padding: 1.5rem;
    }
    
    .custom-modal-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .step-header {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .step-title {
        font-size: 1.1rem;
        justify-content: center;
    }
    
    .step-body {
        padding: 15px;
    }
    
    .circuit-selection-grid {
        gap: 20px;
    }
    
    .circuit-card-selectable img {
        height: 120px;
    }
    
    .circuit-card-content {
        padding: 12px;
    }
    
    .circuit-card-content h5 {
        font-size: 1rem;
    }
    
    .accommodation-per-night {
        padding: 12px;
    }
    
    .accommodation-option {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .payment-options .payment-option {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .booking-summary {
        padding: 15px;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .custom-modal-body {
        padding: 1rem;
    }
    
    .custom-modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .custom-modal-footer .btn {
        width: 100%;
    }
}

/* RTL Support */
[dir="rtl"] .step-title i {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .step-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .accommodation-option input[type="radio"] {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .payment-options .payment-option input[type="radio"] {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .summary-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .custom-modal-footer {
    flex-direction: row-reverse;
}

/* Animation Enhancements */
.step-card {
    animation: slideInUp 0.5s ease-out;
}

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

.circuit-card-selectable {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading States */
.step-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.step-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--orange);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility Improvements */
.step-header:focus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.circuit-card-selectable:focus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.accommodation-option:focus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.payment-option:focus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .step-header {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc;
    }
    
    .step-header.active {
        background: #f0f0f0 !important;
        color: black !important;
    }
    
    .step-body {
        display: block !important;
    }
    
    .btn {
        display: none !important;
    }
    
    .modal {
        display: none !important;
    }
}
