/* ========================================
   ALL TRIPS PAGE - UPDATED CSS
   Date: January 16, 2026, 11:26 AM IST
   Matches trips-DATABASE.php structure
   ======================================== */

:root {
    --primary-green: #03834A;
    --light-green: #16A34A;
    --dark-green: #065F46;
    --orange: #F97316;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.trips-hero {
    position: relative;
    min-height: 400px;
    background: linear-gradient(135deg, #03834A 0%, #16A34A 50%, #065F46 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.trips-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M0 0h32v32H0z" fill="none"/><circle cx="4" cy="4" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 60px 20px 40px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 52px;
    font-weight: 900;
    margin-bottom: 16px;
    line-height: 1.1;
}

.hero-title .highlight {
    background: #F9CC3E;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* ========================================
   FILTERS SECTION
   ======================================== */
.filters-section {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Search Bar */
.search-wrapper {
    margin-bottom: 20px;
}

.search-input-group {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group svg:first-child {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    stroke: var(--gray-400);
    pointer-events: none;
}

.search-input-group input {
    width: 100%;
    padding: 14px 50px 14px 50px;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-input-group input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(3, 131, 74, 0.1);
}

.search-clear-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-100);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear-btn:hover {
    background: var(--gray-200);
}

/* Filter Dropdowns */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-dropdown {
    position: relative;
}

.filter-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

.filter-dropdown-btn:hover {
    border-color: var(--primary-green);
    background: var(--gray-50);
}

.filter-dropdown-btn.active {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
}

.filter-dropdown-btn.active svg {
    stroke: white;
}

.filter-dropdown-btn svg:not(.chevron) {
    stroke: var(--primary-green);
    flex-shrink: 0;
}

.filter-dropdown-btn.active svg:not(.chevron) {
    stroke: white;
}

.chevron {
    transition: transform 0.3s ease;
}

.filter-dropdown.open .chevron {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px;
    display: none;
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
}

.filter-dropdown.open .filter-dropdown-menu {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: 8px;
    text-align: left;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.dropdown-item:hover {
    background: var(--gray-100);
}

.dropdown-item.active {
    background: var(--gray-100);
    color: var(--primary-green);
    font-weight: 600;
}

/* Reset Button */
.reset-all-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--gray-800);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
}

.reset-all-btn:hover {
    background: var(--gray-900);
    transform: scale(1.05);
}

/* Results Bar */
.results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.results-text {
    font-size: 15px;
    color: var(--gray-600);
}

.results-text strong {
    color: var(--primary-green);
    font-weight: 700;
}

#filterInfo {
    color: var(--gray-500);
    font-size: 14px;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    border-color: var(--primary-green);
}

.view-btn.active {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.view-btn.active svg {
    stroke: white;
}

/* ========================================
   TRIPS SECTION
   ======================================== */
.trips-section {
    padding: 40px 0 80px;
}

.trips-container {
    display: grid;
    gap: 30px;
}

.trips-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.trips-container.list-view {
    grid-template-columns: 1fr;
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    margin-top: 20px;
    font-size: 16px;
    color: var(--gray-500);
}

/* ========================================
   TRIP CARD (GRID VIEW)
   Matches trips-DATABASE.php structure
   ======================================== */
.trip-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trip-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* Trip Card Image */
.trip-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.trip-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.trip-card:hover .trip-card-image img {
    transform: scale(1.1);
}

/* Trip Badges */
.trip-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.badge-featured {
    background: rgba(249, 115, 22, 0.95);
    color: white;
}

.badge-category {
    background: rgba(3, 131, 74, 0.95);
    color: white;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

.favorite-btn svg {
    stroke: var(--gray-600);
    transition: all 0.3s ease;
}

.favorite-btn:hover svg {
    stroke: #EF4444;
    fill: #EF4444;
}

/* Trip Card Content */
.trip-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.trip-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Trip Meta Information */
.trip-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-600);
}

.meta-item svg {
    stroke: var(--primary-green);
    flex-shrink: 0;
}

/* Trip Card Footer */
.trip-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    margin-top: auto;
    border-top: 1px solid var(--gray-100);
}

.price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-label {
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-original {
    font-size: 14px;
    color: var(--gray-400);
    text-decoration: line-through;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-green);
    line-height: 1;
}

.price-amount + .price-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    text-transform: none;
}

/* View Details Button */
.view-details-btn {
    padding: 10px 20px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.view-details-btn:hover {
    background: var(--dark-green);
    transform: translateX(4px);
}

.view-details-btn svg {
    transition: transform 0.3s ease;
}

.view-details-btn:hover svg {
    transform: translateX(4px);
}

/* ========================================
   TRIP CARD (LIST VIEW)
   ======================================== */
.list-view .trip-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: auto;
}

.list-view .trip-card-image {
    height: 100%;
    min-height: 280px;
}

.list-view .trip-card-content {
    display: flex;
    flex-direction: column;
    padding: 32px;
}

.list-view .trip-card-title {
    font-size: 24px;
    margin-bottom: 16px;
}

.list-view .trip-meta {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 24px;
}

.list-view .trip-card-footer {
    margin-top: auto;
}

/* No Trips Message */
.no-trips-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    font-size: 16px;
    color: var(--gray-500);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    display: none;
}

.no-results svg {
    stroke: var(--gray-300);
    margin-bottom: 24px;
}

.no-results h3 {
    font-size: 24px;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.no-results p {
    font-size: 16px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */
.newsletter-section {
    background: linear-gradient(135deg, #45C98E 0%, #03834a 100%);
    padding: 60px 0;
    color: white;
}

.newsletter-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.newsletter-text h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.newsletter-text p {
    font-size: 16px;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    min-width: 400px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
}

.newsletter-form button {
    padding: 14px 32px;
    background: white;
    color: var(--primary-green);
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.hero-cta {
    padding: 14px 32px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .list-view .trip-card {
        grid-template-columns: 1fr;
    }

    .list-view .trip-card-image {
        height: 240px;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 28px;
    }

    .filters-container {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .filter-dropdown {
        flex-shrink: 0;
    }

    .results-bar {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .trips-container.grid-view {
        grid-template-columns: 1fr;
    }

    .trip-meta {
        grid-template-columns: 1fr;
    }

    .trip-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .view-details-btn {
        width: 100%;
        justify-content: center;
    }

    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        min-width: auto;
        width: 100%;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .trip-card-image {
        height: 200px;
    }

    .trip-card-title {
        font-size: 18px;
    }

    .price-amount {
        font-size: 20px;
    }
}

@media (min-width: 992px) {
    .trips-hero {
        margin-top: 30px;
    }
}