/* Hero Section with Background */
.trips-hero {
    background: url('/images/trips/trips-hero-bg.jpg') center/cover;
    min-height: 546px;
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 80px;
}

.hero-wave {
    z-index: 1 !important;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    min-height: 67px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    border-radius: 15px;
    box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, .37);
    margin-top: -200px;
    margin-bottom: 0;
    padding: 0;
    z-index: 1;
    position: relative;
    background: white;
    justify-self: center;
    min-width: 70%;
}

.filter-select-wrapper {
    flex: 1;
    position: relative;
    border-right: 1px solid #e5e5e5;
}

.filter-select-wrapper:last-of-type {
    border-right: none;
}

.filter-select {
    width: 100%;
    padding: 20px 40px 20px 20px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
}

.filter-select:focus {
    outline: none;
}

.filter-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.8rem;
    color: #666;
}

.filter-button {
    color: #fff;
    background-color: #6ec1e4;
    border-style: none;
    border-radius: 10px;
    padding: 20px 40px;
    margin: 0;
    align-self: stretch;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.filter-button:hover {
    background-color: #5db3d6;
}

/* Search Container */
.search-container {
    margin-top: 106px;
}

.sort-controls select {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 1rem;
}

/* Trip Cards Grid */
.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.no-results h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
}

.no-results p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.trip-page-item {
    color: #6ec1e4;
}

.trip-page-active {
    background-color: #6ec1e4;
    color: white;
    z-index: 1;
}

.trip-page-link {
    color: #6ec1e4;
}

.trip-page-link:hover {
    color: #6ec1e4;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .filter-bar {
        flex-wrap: wrap;
        margin-top: -40px;
    }

    .filter-select-wrapper {
        flex: 1 0 100%;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
    }

    .filter-select-wrapper:last-of-type {
        border-bottom: none;
    }

    .filter-button {
        width: 100%;
        border-radius: 10px;
    }

    .trips-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

@media (max-width: 768px) {
    .trips-hero {
        min-height: 0;
        padding-top: 60px;
        padding-bottom: 115px;
    }
}

@media (max-width: 575px) {
    .trips-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {

    .search-container {
        padding: 40px 0 !important;
    }

    .filter-bar {
        min-width: 90%;
    }

    .filter-select {
        padding: 20px 30px 20px 15px;
        font-size: 0.825rem;
    }

    .filter-select-wrapper::after {
        right: 15px;

        font-size: 0.6rem;
    }

    .filter-button {
        padding: 20px 30px;
        font-size: 0.825rem;
    }

    .sort-controls select {
        padding: 10px 15px;
        font-size: 0.75rem;
    }

    /* Trip Cards Grid */
    .trips-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
        gap: 20px !important;
    }

    /* No Results */
    .no-results {
        padding: 80px 15px;
    }

    .no-results h3 {
        font-size: 1.35rem;
    }

    .no-results p {
        font-size: 0.825rem;
    }
}

/* Trip Card Styling Begin */

.trip-card {
    position: relative;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border-radius: 20px;
}

.trip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 240px;
    border-radius: 20px 20px 0 0;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trip-tag {
    position: absolute;
    display: inline-flex;
    align-items: center;
    line-height: 19px;
    top: 16px;
    right: 16px;
    background-color: #fff;
    color: #222;
    padding: 6px 16px;
    border-radius: 20px;
    font-family: "Inter", Sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 24px;
}

.trip-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #666666;
    font-size: 0.875rem;
}

.trip-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.divider {
    width: 1px;
    height: 16px;
    background-color: #e0e0e0;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    text-align: left;
}

.card-title a {
    color: #333333;
}

.card-title a:hover {
    color: #6ec1e4;
}

.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

@media (min-width: 992px) {

    /* Trip Tag */
    .trip-tag {
        right: 12px;
        padding: 6px 12px;
        font-size: 9px;
        letter-spacing: 0.375px;
    }

    /* Card Body */
    .card-body {
        padding: 24px 18px;
    }

    /* Trip Meta */
    .trip-meta {
        gap: 9px;
        font-size: 0.65625rem;
    }

    .trip-meta-item {
        gap: 4.5px;
    }

    /* SVG Icons - scale both dimensions to maintain aspect ratio */
    .trip-meta-item svg {
        width: 13.5px;
        height: 13.5px;
    }

    /* Divider */
    .divider {
        width: 0.75px;
    }

    /* Card Title */
    .card-title {
        font-size: 0.84375rem;
    }
}

/* Filter Bar */
.filter-bar {
    display: flex;
    min-height: 67px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    border-radius: 5px;
    box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, .37);
    margin-top: -150px;
    margin-bottom: 0;
    padding: 0;
    z-index: 1;
    position: relative;
    background: white;
    justify-self: center;
    min-width: 70%;
}

.filter-select-wrapper {
    flex: 1;
    position: relative;
    border-right: 1px solid #e5e5e5;
}

.filter-select-wrapper:last-of-type {
    border-right: none;
}

.filter-select {
    width: 100%;
    padding: 20px 40px 20px 20px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
}

.filter-select:focus {
    outline: none;
}

.filter-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.8rem;
    color: #666;
}

.filter-button {
    color: #fff;
    background-color: #6ec1e4;
    border-style: none;
    border-radius: 0 5px 5px 0;
    padding: 20px 40px;
    margin: 0;
    align-self: stretch;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.filter-button:hover {
    background-color: #5db3d6;
}

/* Search Container */
.search-container {
    margin-top: 106px;
}

#listView .trip-list-details {
    text-align: left;
}

/* View Tabs - Minimalistic Design */
.view-tabs-container {
    margin-bottom: 50px;
}

.view-tabs {
    display: flex;
    align-items: center;
    gap: 50px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 0;
    margin-bottom: 40px;
}

.view-tab {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #999;
    font-size: 18px;
    padding: 0 0 15px 0;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-tab:hover {
    color: #666;
}

.view-tab.active {
    color: #6ec1e4;
    font-weight: 600;
}

.view-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #6ec1e4;
}

.view-tab.active:first-child {
    color: #5db3d6;
    font-weight: 600;
}

.view-tab.active:first-child::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #5db3d6;
}

.view-tab-icon {
    display: block;
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.view-tab.active .view-tab-icon {
    background: #6ec1e4;
    color: white;
}

.view-tab.active:first-child .view-tab-icon {
    background: #5db3d6;
    color: white;
}


.view-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 400;
}

.view-tab.active .view-tab-count {
    color: #6ec1e4;
    font-weight: 600;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s;
    padding: 0;
}

.tab-content.active {
    display: block;
}

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

/* Grid View - Existing tile layout */
.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.trips-list {
    background: white;
}

.list-header {
    display: none; /* Hidden for cleaner look */
}

.trip-list-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    background: white;
}

.trip-list-item:hover {
    background-color: #fafafa;
}

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

.trip-list-info {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 20px;
}

.trip-list-image {
    width: 100px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.trip-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trip-list-details {
    flex: 1;
}

.trip-list-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s;
}

.trip-list-title:hover {
    color: #155176;
}

.trip-list-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
    font-size: 14px;
}

.trip-list-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.trip-list-meta-item svg {
    width: 16px;
    height: 16px;
}

/* Container for dates */
.trip-list-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;          /* Consistent spacing */
    align-items: center;
    margin: 10px 0;
}

.date-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    background: #4CAF50;
    color: white;
    padding: 6px 10px;
    min-width: 70px;     /* Prevents too small */
    max-width: 85px;     /* Prevents too large */
    height: 32px;        /* Fixed height */
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap; /* CRITICAL: Prevents text wrapping */
    cursor: pointer;
    text-align: center;
}

.date-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(110, 193, 228, 0.3);
}

.date-badge.confirmed {
    background: #4CAF50;
}

.date-badge.available {
    background: #4CAF50;
}

.date-badge.limited {
    background: #ff9800;
}

.more-dates {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    height: 32px;        /* Same height as date badges */
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 13px;
    white-space: nowrap;
}

/* French specific - slightly smaller to fit */
html[lang="fr"] .date-badge {
    min-width: 65px;
    padding: 6px 8px;
    font-size: 12.5px;
}

.more-dates:hover {
    background: #6ec1e4;
    color: white;
}

.trip-list-action {
    flex: 0.5;
    text-align: right;
}

.view-trip-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #6ec1e4;
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

.view-trip-btn:hover {
    background: #5db3d6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(110, 193, 228, 0.3);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.no-results h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
}

.no-results p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.trip-page-item {
    color: #6ec1e4;
}

.trip-page-active {
    background-color: #6ec1e4;
    color: white;
    z-index: 1;
}

.trip-page-link {
    color: #6ec1e4;
}

.trip-page-link:hover {
    color: #6ec1e4;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .trip-list-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px 15px;
    }

    .trip-list-info {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .trip-list-dates {
        justify-content: center;
        width: 100%;
    }

    .trip-list-action {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 991px) {
    .filter-bar {
        flex-wrap: wrap;
        margin-top: -40px;
    }

    .filter-select-wrapper {
        flex: 1 0 100%;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
    }

    .filter-select-wrapper:last-of-type {
        border-bottom: none;
    }

    .filter-button {
        width: 100%;
        border-radius: 0 0 5px 5px;
    }

    .trips-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }

    .view-tabs {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .trips-hero {
        min-height: 0;
        padding-top: 60px;
        padding-bottom: 115px;
    }

    .trip-list-image {
        width: 80px;
        height: 60px;
    }

    .trip-list-title {
        font-size: 16px;
    }

    .view-tabs {
        gap: 20px;
        font-size: 16px;
    }

    .view-tab-icon {
        display: none;
    }
}

@media (max-width: 575px) {
    .trips-grid {
        grid-template-columns: 1fr;
    }

    .view-tabs {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .view-tab {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid #e5e5e5;
    }

    .view-tab.active::after {
        display: none;
    }

    .view-tab.active {
        border-bottom: 2px solid #4CAF50;
    }
}

.trip-list-item {
    display: grid !important;
    grid-template-columns: 120px 1fr auto 140px !important;
    gap: 20px !important;
    align-items: center !important;
}

.trip-list-info {
    display: contents !important;
}

/* Right-align date badges container */
.trip-list-dates {
    justify-content: flex-end !important;
    max-width: 400px !important;
}

/* Change date badges to white with colored border */
.date-badge {
    background: white !important;
    border: 2px solid #4CAF50 !important;
    color: #4CAF50 !important;
}

.date-badge:hover {
    background: #4CAF50 !important;
    color: white !important;
}

.date-badge.available {
    border-color: #4CAF50 !important;
    color: #4CAF50 !important;
}

.date-badge.available:hover {
    background: #4CAF50 !important;
    color: white !important;
}

.date-badge.limited {
    border-color: #ff9800 !important;
    color: #ff9800 !important;
}

.date-badge.limited:hover {
    background: #ff9800 !important;
    color: white !important;
}

/* Style the "more dates" differently */
.more-dates {
    background: #f5f5f5 !important;
    border: 1px dashed #ccc !important;
    color: #666 !important;
}

.more-dates:hover {
    background: #eeeeee !important;
    border-color: #999 !important;
    color: #666 !important;
}

/* Right-align action button */
.trip-list-action {
    justify-content: flex-end !important;
    display: flex !important;
}

/* Responsive - stack on mobile */
@media (max-width: 992px) {
    .trip-list-item {
        grid-template-columns: 100px 1fr !important;
        grid-template-rows: auto auto auto !important;
    }

    .trip-list-dates {
        grid-column: 1 / -1 !important;
        justify-content: flex-start !important;
    }

    .trip-list-action {
        grid-column: 1 / -1 !important;
    }
}


/* Date type filters */
.date-type-filters {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
    align-items: center;
}

.date-type-filter-btn {
    padding: 8px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-type-filter-btn i {
    font-size: 16px;
}

.date-type-filter-btn.active {
    color: white;
    border-color: var(--color);
    background: var(--color);
}

.date-type-filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* List view controls */
.list-view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-dropdown {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

/* Updated trip list item for date-focused view */
.trip-date-item {
    display: grid;
    grid-template-columns: 140px 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    margin-bottom: 25px;
}

.trip-date-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.trip-date-image {
    width: 140px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.trip-date-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trip-date-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
}

.trip-date-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    text-align: left;
    line-height: 1.3;
    margin-bottom: 8px;
}

.trip-date-title:hover {
    color: #6ec1e4;
}

.trip-date-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    color: #666;
    font-size: 14px;
}

.trip-date-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.trip-date-meta-item svg {
    width: 16px;
    height: 16px;
}

/* Date range display */
.trip-date-range {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 500;
    min-width: 140px;
}

.trip-date-start {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trip-date-day {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.trip-date-month {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

.trip-date-year {
    font-size: 12px;
    color: #999;
}

.trip-date-type-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

/* Status badge above trip title */
.trip-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: white;
    white-space: nowrap;
    margin-bottom: 6px;
    align-self: flex-start;
}

.trip-status-badge i {
    font-size: 0.7rem;
}

.trip-status-badge span {
    line-height: 1;
}

.trip-date-action {
    text-align: right;
}

.view-date-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.view-date-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(110, 193, 228, 0.3);
}

/* Mobile responsive */
@media (max-width: 1200px) {
    .trip-date-item {
        grid-template-columns: 120px 1fr;
        gap: 15px;
    }

    .trip-date-range {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .trip-date-action {
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .trip-date-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .trip-date-image {
        width: 100%;
        height: 180px;
    }

    .trip-date-meta {
        justify-content: center;
    }

    .trip-date-range {
        justify-content: center;
        justify-self: center;
    }

    .trip-date-title {
        text-align: center;
    }

    .trip-date-details {
        align-items: center;
    }

    .trip-status-badge {
        align-self: center;
    }

    .date-type-filters {
        justify-content: center;
    }

    .list-view-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-dropdown-wrapper {
        width: 100%;
    }

    .sort-dropdown {
        width: 100%;
    }
}
