/* Tours Callout Section */
.tours-callout {
    padding: 80px 0 60px 0;
    background: linear-gradient(135deg, #00853d 0%, #007f7b 100%);
    margin-top: 80px; /* Account for header */
    color: white;
}

.tours-callout-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.tours-callout-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 25px;
    color: white;
    line-height: 1.2;
}

.tours-callout-text {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin: 0;
}

/* Tours Page Styles */
.tours-page {
    background: #f8f9fa;
    min-height: 100vh;
}

/* Hero Map Section */
.hero-map-section {
    position: relative;
    height: 60vh;
    background: var(--tscyan);
}

.tours-map {
    width: 100%;
    height: 100%;
}

.map-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.open-map-btn {
    background: var(--tsgreen);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: none; /* Hidden by default on desktop */
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.open-map-btn:hover {
    background: var(--tsgreen);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Main Content */
.tours-content {
    padding: 40px 0 80px;
    background: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Tours Header */
.tours-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.sort-and-search-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    max-width: 600px;
    min-width: 320px;
}

.sort-container {
    min-width: 160px;
    display: flex;
    align-items: center;
}

.sort-container select {
    padding: 16px 38px 16px 18px; /* slightly more vertical padding */
    border: 2px solid var(--border);
    border-radius: 30px;
    font-size: 16px;
    background: var(--llbg);
    color: var(--t-primary);
    transition: all 0.3s ease;
    outline: none;
    font-weight: 500;
    box-shadow: none;
    margin-right: 0;
    appearance: none;
    cursor: pointer;
    height: 55px;
    line-height: 20px;
    vertical-align: middle;
}

.sort-container select:focus {
    border-color: var(--tsgreen);
    box-shadow: 0 0 0 3px rgba(0, 133, 61, 0.1);
}

/* Add a dropdown arrow icon for select */
.sort-container select {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%2300853d" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px 20px;
}

.tours-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--t-primary);
    margin: 0;
}

.search-container {
    flex: 1;
    max-width: 400px;
    min-width: 300px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid var(--border);
    border-radius: 30px;
    font-size: 16px;
    background: var(--llbg);
    color: var(--t-primary);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--tsgreen);
    box-shadow: 0 0 0 3px rgba(0, 133, 61, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--t-medium);
    pointer-events: none;
}

/* Tours Grid */
.tours-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.tour-card {
    background: var(--llbg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #333;
    /* Ensure no gaps or lines */
    display: flex;
    flex-direction: column;
    position: relative; /* Add relative positioning for absolute header */
}

.tour-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Beta tour card styles */
.beta-tour {
    cursor: not-allowed;
}

.beta-tour:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}


.tour-card-image {
    width: 100%;
    aspect-ratio: 32 / 15;
    height: auto;
    position: relative;
    background: none;
    margin: 0;
    padding: 0;
    border: none;
    flex-shrink: 0;
    overflow: hidden;
}

.tour-card-image img.tour-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* Lazy loading styles */
.lazy-image {
    position: relative;
    overflow: hidden;
}

.lazy-image .image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ilbg);
    color: var(--t-medium);
    font-size: 48px;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded .image-placeholder {
    opacity: 0;
    pointer-events: none;
}

.lazy-image.error .image-placeholder {
    color: var(--t-light);
}

/* Loading animation */
.lazy-image:not(.loaded) .image-placeholder {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.tour-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tour-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--t-primary);
    margin: 0;
    line-height: 1.3;
}

.tour-description {
    color: var(--t-secondary);
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.tour-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.tour-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--t-medium);
    font-size: 14px;
}

.tour-type {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-type-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Info Window Type Icons */
.info-window-type {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.info-window-type .tour-type-icon {
    width: 20px;
    height: 20px;
}

/* Load More Button */
.load-more-container {
    text-align: center;
}

.load-more-btn {
    padding: 15px 40px;
    font-size: 16px;
    border-radius: 30px;
}

/* Full Screen Map Modal */
.map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--llbg);
    z-index: 3000;
    display: none;
}

.map-modal.active {
    display: block;
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--tsgreen);
    color: white;
}

.map-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
}

.full-map {
    width: 100%;
    height: calc(100vh - 80px);
}

/* Loading States */
.tours-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.tour-card.skeleton {
    background: var(--ilbg);
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Map Markers Custom Styles */
.custom-marker {
    background: var(--tsgreen);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-marker:hover {
    transform: scale(1.2);
    z-index: 1000;
}

/* Info Window Styles */
.info-window {
    max-width: 300px;
    padding: 0;
}

.info-window-content {
    padding: 15px;
}

.info-window-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--t-primary);
    margin: 0 0 8px 0;
}

.info-window-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--t-medium);
    font-size: 12px;
    margin-bottom: 10px;
}

.info-window-btn {
    background: var(--tsgreen);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.info-window-btn:hover {
    background: var(--tsgreen50);
}

/* button, [tabindex]:not([tabindex='-1']), input, .tour-card:focus {
    outline: 2px solid  !important;
    outline-offset: 2px;
} */

.tour-card:focus {
    box-shadow: 0 0 0 4px rgba(0,133,61,0.5);
    z-index: 2;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Force mobile styles on all mobile devices */
@media only screen and (max-width: 768px) {
    .tours-map {
        filter: blur(8px) !important;
        opacity: 0.7 !important;
        pointer-events: none !important;
    }
    
    .map-overlay {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        right: auto !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 20px !important;
        padding: 20px !important;
        text-align: center !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    }
    
    .tours-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Show Open Map button on mobile and tablet */
    .open-map-btn {
        display: flex !important;
    }
}

/* Tablet styles */
@media (max-width: 1024px) {
    .tours-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .tours-header h1 {
        font-size: 2.2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    .sort-and-search-row {
        max-width: 100%;
        min-width: 0;
        gap: 12px;
    }
    .sort-container select {
        font-size: 15px;
        padding: 11px 14px;
    }
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .tours-page {
        margin-top: 70px !important;
    }
    
    /* Tours Callout Section */
    .tours-callout {
        padding: 60px 0 40px 0;
        margin-top: 70px;
    }
    
    .tours-callout-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .tours-callout-text {
        font-size: 16px;
    }
    
    /* Hero Map Section - Blurred with overlay */
    .hero-map-section {
        height: 40vh !important;
        min-height: 250px !important;
    }
    
    .tours-map {
        filter: blur(8px) !important;
        opacity: 0.7 !important;
        pointer-events: none !important;
    }
    
    .map-overlay {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        right: auto !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 20px !important;
        padding: 20px !important;
        text-align: center !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    }
    
    .open-map-btn {
        padding: 15px 25px !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        border-radius: 30px !important;
        box-shadow: 0 6px 20px rgba(0, 133, 61, 0.3) !important;
    }
    
    /* Main Content */
    .tours-content {
        padding: 30px 0 60px !important;
    }
    
    .container {
        padding: 0 15px !important;
    }
    
    /* Tours Header */
    .tours-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 20px !important;
        margin-bottom: 30px !important;
    }
    
    .tours-header h1 {
        font-size: 2rem !important;
        text-align: center !important;
    }
    
    .search-container {
        max-width: none !important;
        min-width: auto !important;
    }
    
    .search-box input {
        padding: 12px 15px 12px 45px !important;
        font-size: 16px !important;
        border-radius: 25px !important;
    }
    
    .search-icon {
        left: 15px !important;
    }
    
    /* Tours Grid - Single Column */
    .tours-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-bottom: 40px !important;
    }
    
    .tour-card {
        border-radius: 12px !important;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1) !important;
    }
    
    .tour-card:hover {
        transform: translateY(-4px) !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    }
    
    .beta-tour:hover {
        transform: none !important;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1) !important;
    }
    
    .tour-card-image {
        height: 180px !important; /* Maintain original aspect ratio */
    }
    
    .tour-card-content {
        padding: 18px !important;
    }
    
    .tour-title {
        font-size: 1.3rem !important;
        line-height: 1.2 !important;
    }
    
    .tour-description {
        font-size: 15px !important;
        line-height: 1.4 !important;
        -webkit-line-clamp: 3 !important;
    }
    
    .tour-meta {
        gap: 8px !important;
        margin-top: 15px !important;
    }
    
    .tour-location {
        font-size: 13px !important;
    }
    
    .tour-type-icon {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Mobile flag header adjustments */
    .tour-card-header {
        top: 6px !important;
        right: 6px !important;
        padding: 2px !important;
    }
    
    /* Mobile Coming Soon overlay adjustments */
    .coming-soon-content {
        padding: 10px 16px !important;
        font-size: 14px !important;
        gap: 6px !important;
    }
    
    .coming-soon-content i {
        font-size: 18px !important;
    }
    
    .language-flags {
        gap: 2px !important;
    }
    
    .language-flag {
        width: 28px !important;
        height: 18px !important;
    }
    
    .language-code-overlay {
        font-size: 7px !important;
        padding: 1px 2px !important;
    }
    
    /* Full Screen Map Modal */
    .map-modal-header {
        padding: 15px 20px !important;
    }
    
    .map-modal-header h2 {
        font-size: 1.3rem !important;
    }
    
    .close-modal {
        font-size: 24px !important;
    }
    
    .full-map {
        height: calc(100vh - 70px) !important;
    }
    
    /* Load More Button */
    .load-more-btn {
        padding: 12px 30px !important;
        font-size: 15px !important;
    }
    .sort-and-search-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        max-width: none;
    }
    .sort-container {
        min-width: 0;
    }
    .sort-container select {
        width: 100%;
        font-size: 15px;
        padding: 12px 12px;
    }
}

/* Small mobile styles */
@media screen and (max-width: 480px) {
    .tours-page {
        margin-top: 60px !important;
    }
    
    /* Tours Callout Section */
    .tours-callout {
        padding: 40px 0 25px 0;
        margin-top: 60px;
    }
    
    .tours-callout-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .tours-callout-text {
        font-size: 14px;
    }
    
    .hero-map-section {
        height: 35vh !important;
        min-height: 220px !important;
    }
    
    .map-overlay {
        padding: 15px !important;
        border-radius: 15px !important;
    }
    
    .open-map-btn {
        padding: 12px 20px !important;
        font-size: 16px !important;
        gap: 6px !important;
    }
    
    .tours-content {
        padding: 25px 0 50px !important;
    }
    
    .container {
        padding: 0 12px !important;
    }
    
    .tours-header h1 {
        font-size: 1.8rem !important;
    }
    
    .search-box input {
        padding: 10px 12px 10px 40px !important;
        font-size: 15px !important;
    }
    
    .search-icon {
        left: 12px !important;
        font-size: 20px !important;
    }
    
    .tours-grid {
        gap: 15px !important;
    }
    
    /* Smaller flags for very small screens */
    .tour-card-header {
        top: 5px !important;
        right: 5px !important;
        padding: 1.5px !important;
    }
    
    .language-flags {
        gap: 1.5px !important;
    }
    
    .language-flag {
        width: 25px !important;
        height: 16px !important;
    }
    
    .language-code-overlay {
        font-size: 6px !important;
        padding: 0.5px 1.5px !important;
    }
    
    .tour-card-content {
        padding: 15px !important;
    }
    
    .tour-title {
        font-size: 1.2rem !important;
    }
    
    .tour-description {
        font-size: 14px !important;
    }
    
    .tour-location {
        font-size: 12px !important;
    }
    
    .tour-type-icon {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Small mobile Coming Soon overlay adjustments */
    .coming-soon-content {
        padding: 8px 12px !important;
        font-size: 12px !important;
        gap: 4px !important;
    }
    
    .coming-soon-content i {
        font-size: 16px !important;
    }
    
    .map-modal-header {
        padding: 12px 15px !important;
    }
    
    .map-modal-header h2 {
        font-size: 1.2rem !important;
    }
    
    .full-map {
        height: calc(100vh - 60px) !important;
    }
}

/* Landscape phone orientation */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero-map-section {
        height: 60vh !important;
    }
    
    .tours-content {
        padding: 20px 0 40px !important;
    }
}

/* Tour Card Header with Language Flags */
.tour-card-header {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    background: rgba(128, 128, 128, 0.9);
    border-radius: 4px;
    padding: 2px;
    pointer-events: none; /* Allow clicks to pass through to the card */
}

/* Coming Soon Overlay */
.coming-soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none; /* Allow clicks to pass through to the card */
}

.coming-soon-content {
    background: var(--tsgreen);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    transform: rotate(-5deg);
    animation: coming-soon-pulse 2s ease-in-out infinite;
    z-index: 100;
}

.coming-soon-content i {
    font-size: 20px;
}

@keyframes coming-soon-pulse {
    0%, 100% { 
        transform: rotate(-5deg) scale(1);
    }
    50% { 
        transform: rotate(-5deg) scale(1.05);
    }
}



.language-flags {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.language-flag-container {
    position: relative;
    display: block;
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.language-flag-container:hover {
    transform: scale(1.05);
}

.language-flag {
    width: 30px;
    height: 20px;
    object-fit: cover;
    display: block;
    border: none;
}

.language-code-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--tsteal);
    color: white;
    font-size: 8px;
    font-weight: 700;
    text-align: center;
    line-height: 1;
    padding: 1px 2px;
    letter-spacing: 0.3px;
    pointer-events: none;
    border-radius: 2px 0 2px 0;
    min-width: 12px;
}

.tour-paid-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--tsgreen);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 16px;
    padding: 4px 12px 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 30;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    pointer-events: none;
    border: 2.5px solid #fff;
}
.tour-paid-badge i {
    font-size: 18px;
    margin-right: 2px;
}


