/* Enhanced Custom Package Builder Styles */

/* Hero CTA Section */
.custom-package-cta-section {
    background: linear-gradient(135deg, #1ca8cb 0%, #178ba8 100%);
    position: relative;
    overflow: hidden;
}

.custom-package-cta-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,0 1000,0 1000,100 0,50"/></svg>');
    background-size: cover;
    background-position: bottom;
}

.custom-cta-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.cta-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1ca8cb, #178ba8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(28, 168, 203, 0.3);
}

.cta-icon i {
    font-size: 2rem;
    color: white;
}

.custom-cta-btn {
    background: linear-gradient(135deg, #1ca8cb, #178ba8);
    border: none;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(28, 168, 203, 0.3);
    transition: all 0.3s ease;
}

.custom-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(28, 168, 203, 0.4);
    color: white;
}

/* Modal Enhancements */
.modal-xl {
    max-width: 1200px;
}

.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #1ca8cb, #178ba8);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem 2rem;
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
}

.btn-close {
    filter: brightness(0) invert(1);
}

/* Enhanced Step Indicator */
.wizard-steps {
    padding: 0 1rem;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 2rem;
}

.step-indicator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #e9ecef;
    transform: translateY(-50%);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: white;
    padding: 0.5rem;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.step-title {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #1ca8cb, #178ba8);
    color: white;
    box-shadow: 0 5px 15px rgba(28, 168, 203, 0.4);
}

.step.active .step-title {
    color: #1ca8cb;
    font-weight: 600;
}

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

.step.completed .step-title {
    color: #28a745;
}

/* Travel Details Form */
.travel-details-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #1ca8cb;
    box-shadow: 0 0 0 0.2rem rgba(28, 168, 203, 0.25);
}

/* Countries Grid */
.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.country-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.country-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(28, 168, 203, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.country-card:hover::before {
    left: 100%;
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: #1ca8cb;
}

.country-card.selected {
    border-color: #1ca8cb;
    background: linear-gradient(135deg, #1ca8cb, #178ba8);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(28, 168, 203, 0.3);
}

.country-flag-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    min-height: 80px;
}

.country-flag-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.country-flag-emoji {
    font-size: 3rem;
    display: block;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
        "Android Emoji", "EmojiSymbols", "EmojiOne Color", "Twemoji Mozilla",
        sans-serif;
    line-height: 1;
    text-align: center;
}

/* Legacy support for old country-flag class */
.country-flag {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
        "Android Emoji", "EmojiSymbols", "EmojiOne Color", "Twemoji Mozilla",
        sans-serif;
    line-height: 1;
    text-align: center;
}

/* CSS-based flag styles for fallback */
.css-flag {
    width: 60px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: 0 auto 1rem auto;
    display: flex;
    flex-direction: column;
}

.lebanon-css-flag,
.syria-css-flag {
    display: flex;
    flex-direction: column;
}

.default-flag {
    border-radius: 5px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.country-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* Regions Grid */
.regions-grid {
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* When regions are displayed in country groups */
.regions-grid.regions-grouped {
    display: block;
    gap: 0;
}

/* Country Group Styles */
.country-group {
    margin-bottom: 2.5rem;
}

.country-group:last-child {
    margin-bottom: 0;
}

.country-group-header {
    padding: 1rem 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.country-group-header .country-flag-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.country-group-header .country-flag-img {
    width: 40px;
    height: 30px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.country-group-header .country-flag-emoji {
    font-size: 2rem;
    display: block;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
        "Android Emoji", "EmojiSymbols", "EmojiOne Color", "Twemoji Mozilla",
        sans-serif;
    line-height: 1;
}

.country-group-title {
    font-weight: 600;
    color: #495057;
    font-size: 1.25rem;
}

.regions-grid-grouped {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.region-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.region-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #1ca8cb;
}

.region-card.selected {
    border-color: #1ca8cb;
    background: linear-gradient(
        135deg,
        rgba(28, 168, 203, 0.1),
        rgba(23, 139, 168, 0.1)
    );
}

.region-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.region-brief {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.info-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.3s ease;
}

.info-icon:hover {
    color: #1ca8cb;
}

/* Region Country Flag */
.region-flag-container {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.region-country-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.region-country-flag-emoji {
    font-size: 1.5rem;
    display: inline-block;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
        "Android Emoji", "EmojiSymbols", "EmojiOne Color", "Twemoji Mozilla",
        sans-serif;
}

/* Categories Filter */
.categories-filter {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.category-filter-btn {
    border: 2px solid #e9ecef;
    background: white;
    color: #495057;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.category-filter-btn:hover {
    border-color: #1ca8cb;
    color: #1ca8cb;
}

.category-filter-btn.active {
    background: linear-gradient(135deg, #1ca8cb, #178ba8);
    border-color: transparent;
    color: white;
}

/* Activities Grid */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-height: 450px;
    overflow-y: auto;
    padding: 1rem;
}

.activity-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: #1ca8cb;
}

.activity-card.selected {
    border-color: #1ca8cb;
    box-shadow: 0 15px 40px rgba(28, 168, 203, 0.2);
}

.activity-image {
    height: 150px;
    background: linear-gradient(135deg, #1ca8cb, #178ba8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    overflow: hidden;
    position: relative;
}

.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.activity-content {
    padding: 1.5rem;
}

.activity-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.activity-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.activity-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
}

.activity-duration,
.activity-difficulty {
    background: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
}

/* Hotels Grid */
.hotels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.hotel-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.hotel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #1ca8cb;
}

.hotel-card.selected {
    border-color: #1ca8cb;
    background: #f0f7ff;
    box-shadow: 0 8px 25px rgba(28, 168, 203, 0.2);
}

.hotel-card.selected:hover {
    border-color: #178ba8;
    box-shadow: 0 10px 30px rgba(28, 168, 203, 0.3);
}

.hotel-image {
    height: 120px;
    background: linear-gradient(135deg, #1ca8cb, #178ba8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.hotel-image-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hotel-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1ca8cb, #178ba8);
    color: white;
    font-size: 1.5rem;
}

.images-count-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.hotel-content {
    padding: 1.5rem;
}

.hotel-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.hotel-stars {
    color: #ffc107;
    margin-bottom: 0.5rem;
}

.hotel-details {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
}

.hotel-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Hotel Preferences */
.hotel-preferences {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

/* Contact Form */
.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

/* Package Summary */
.package-summary {
    border: 2px solid #e9ecef;
    background: white !important;
}

.package-summary h6 {
    color: #495057;
    font-weight: 600;
}

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

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

.summary-label {
    font-weight: 500;
    color: #495057;
}

.summary-value {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Animations */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInFromRight 0.5s ease-out;
}

.slide-in-left {
    animation: slideInFromLeft 0.5s ease-out;
}

/* Loading States */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #1ca8cb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .custom-cta-card {
        padding: 2rem 1.5rem;
    }

    .modal-xl {
        max-width: 95%;
        margin: 1rem;
    }

    .countries-grid,
    .regions-grid,
    .activities-grid,
    .hotels-grid {
        grid-template-columns: 1fr;
        max-height: 300px;
    }

    .step-indicator {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .step-title {
        font-size: 0.75rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Tooltips */
.tooltip {
    background: #495057;
    color: white;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    max-width: 250px;
}

.tooltip-arrow {
    border-top-color: #495057 !important;
}

/* Success States */
.success-checkmark {
    color: #28a745;
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

/* Error States */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-control.error,
.form-select.error {
    border-color: #dc3545;
}

/* Custom Scrollbar */
.countries-grid::-webkit-scrollbar,
.regions-grid::-webkit-scrollbar,
.activities-grid::-webkit-scrollbar,
.hotels-grid::-webkit-scrollbar {
    width: 6px;
}

.countries-grid::-webkit-scrollbar-track,
.regions-grid::-webkit-scrollbar-track,
.activities-grid::-webkit-scrollbar-track,
.hotels-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.countries-grid::-webkit-scrollbar-thumb,
.regions-grid::-webkit-scrollbar-thumb,
.activities-grid::-webkit-scrollbar-thumb,
.hotels-grid::-webkit-scrollbar-thumb {
    background: #1ca8cb;
    border-radius: 3px;
}

.countries-grid::-webkit-scrollbar-thumb:hover,
.regions-grid::-webkit-scrollbar-thumb:hover,
.activities-grid::-webkit-scrollbar-thumb:hover,
.hotels-grid::-webkit-scrollbar-thumb:hover {
    background: #178ba8;
}
