/**
 * Travelio - Visa Module Custom Styling
 */

/* Variables override */
:root {
    --visa-primary: #0b5ed7;
    --visa-dark: #082b5c;
    --visa-light: #f3f8ff;
    --visa-text: #16213a;
    --visa-border: #e4eaf2;
    --visa-success: #16a765;
    --visa-orange: #ffb020;
}

/* Base Styles */
body {
    background-color: #f8faff;
    color: var(--visa-text);
}

.fs-7 {
    font-size: 0.85rem !important;
}

.fs-8 {
    font-size: 0.75rem !important;
}

.fw-extrabold {
    font-weight: 800 !important;
}

/* Animations */
.hover-translate-y {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-translate-y:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(8, 43, 92, 0.08) !important;
}

.zoom-on-hover {
    transition: transform 0.5s ease;
}

.zoom-on-hover:hover {
    transform: scale(1.08);
}

.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 4px 10px rgba(11, 94, 215, 0.25);
    background-color: var(--visa-primary);
    color: #fff !important;
}

/* Background Gradients */
.bg-gradient-to-bottom-trans {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.6) 100%);
}

.bg-gradient-blue {
    background: linear-gradient(135deg, var(--visa-dark) 0%, var(--visa-primary) 100%);
}

/* Hero Section */
.visa-hero {
    position: relative;
    padding: 100px 0 140px 0;
    color: #fff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.visa-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(8, 43, 92, 0.45) 0%, rgba(8, 43, 92, 0.9) 100%);
    z-index: 1;
}

.visa-hero-content {
    position: relative;
    z-index: 2;
}

.visa-hero-content h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.visa-hero-content .subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
}

/* Floating Search Bar */
.search-container {
    position: relative;
    z-index: 10;
    margin-top: -65px;
    margin-bottom: 40px;
}

.search-panel {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(8, 43, 92, 0.1);
    padding: 16px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.search-field-group {
    position: relative;
    padding: 8px 12px;
    border-right: 1px solid var(--visa-border);
}

.search-field-group:last-child {
    border-right: none;
}

.search-field-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--visa-dark);
    margin-bottom: 4px;
}

.search-field-group label i {
    color: var(--visa-primary);
    margin-right: 4px;
}

.search-field-group input,
.search-field-group select {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--visa-text);
    background: transparent;
    padding: 2px 0;
}

.search-field-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.btn-search-submit {
    background: var(--visa-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(11, 94, 215, 0.3);
}

.btn-search-submit:hover {
    background: var(--visa-dark);
    box-shadow: 0 4px 20px rgba(8, 43, 92, 0.4);
    transform: translateY(-1px);
}

/* Autocomplete Suggestion Dropdown */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--visa-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.autocomplete-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
}

.autocomplete-suggestion:hover {
    background: var(--visa-light);
}

.autocomplete-suggestion img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* Filter Sidebar Card */
.filter-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(8, 43, 92, 0.03);
    border: 1px solid var(--visa-border);
}

.filter-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--visa-dark);
    margin-bottom: 12px;
}

/* Dual Range Price Slider */
.price-slider-container {
    padding: 10px 5px;
}

.range-slider {
    height: 6px;
    position: relative;
    background: #e9ecef;
    border-radius: 5px;
}

.range-selected {
    height: 100%;
    left: 0%;
    right: 0%;
    position: absolute;
    background: var(--visa-primary);
    border-radius: 5px;
}

.range-input {
    position: relative;
}

.range-input input {
    position: absolute;
    width: 100%;
    height: 6px;
    top: -6px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-input input::-webkit-slider-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--visa-primary);
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.range-price {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--visa-text);
    margin-top: 15px;
}

/* Visa Results Header and Icons */
.btn-layout-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid var(--visa-border);
    background: #fff;
    border-radius: 8px;
    color: var(--visa-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-layout-toggle.active {
    background: var(--visa-primary);
    color: #fff;
    border-color: var(--visa-primary);
}

/* Visa Detail Page Styling */
.visa-details-hero {
    position: relative;
    padding: 80px 0;
    color: #fff;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    overflow: hidden;
}

.visa-details-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(8, 43, 92, 0.95) 0%, rgba(11, 94, 215, 0.3) 100%);
    z-index: 1;
}

.visa-details-hero-content {
    position: relative;
    z-index: 2;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--visa-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Skeleton Loading styles */
.skeleton {
    animation: skeleton-loading 1.2s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% {
        background-color: rgba(228, 234, 242, 0.6);
    }
    100% {
        background-color: rgba(228, 234, 242, 1);
    }
}

.skeleton-text {
    height: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-image {
    height: 180px;
    border-radius: 12px;
}

/* Responsive grid layout */
@media (max-width: 1200px) {
    .search-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .search-field-group {
        border-right: none;
        border-bottom: 1px solid var(--visa-border);
    }
    .search-field-group:nth-child(3n) {
        border-bottom: none;
    }
    .btn-search-submit {
        grid-column: span 3;
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .visa-details-hero {
        padding: 50px 0;
    }
    
    .visa-details-hero-content {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    .visa-details-hero h1 {
        font-size: 2rem;
    }
    
    .sticky-top {
        position: static !important;
        margin-bottom: 30px;
    }
    
    /* Make the 3 columns in main listing stack */
    .visa-body-wrapper .row {
        flex-direction: column;
    }
    
    .visa-body-wrapper .col-xl-3,
    .visa-body-wrapper .col-lg-4,
    .visa-body-wrapper .col-xl-6,
    .visa-body-wrapper .col-lg-8,
    .visa-body-wrapper .col-xl-3,
    .visa-body-wrapper .col-lg-12 {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .search-grid {
        grid-template-columns: 1fr;
    }
    .search-field-group {
        border-right: none;
        border-bottom: 1px solid var(--visa-border);
    }
    .btn-search-submit {
        grid-column: span 1;
    }
    .visa-hero {
        padding: 60px 0 100px 0;
    }
    .visa-hero-content h1 {
        font-size: 2rem;
    }
    .search-container {
        margin-top: -45px;
    }
}

@media (max-width: 576px) {
    .visa-details-hero h1 {
        font-size: 1.6rem;
    }
    
    .visa-details-hero-content .row.g-3 > div {
        width: 50%;
    }
    
    .visa-card-horizontal {
        flex-direction: column;
    }
}
