/* ===========================
   CSS VARIABLES & RESET
=========================== */

:root {
    /* Page-specific Colors */
    --top-section-color: #ffffff;
    --list-trips-color: #cdcdcd;
    
    /* Colors - Primary Green Palette */
    --primary-green: #059669;
    --primary-green-dark: #047857;
    --primary-green-darker: #065f46;
    --accent-green: #10b981;
    --light-green: #bbf7d0;
    
    /* Colors - Background & UI */
    --bg-green: #f0f9f4;
    --border-green: #d1fae5;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-accent: #c6ffc7;
    
    /* Colors - Text */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    /* Colors - Borders */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-heavy: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

/* ===========================
   PAGE LAYOUT
=========================== */

.trips-list-page {
    padding: 0;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.overview-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    min-height: 500px;
}

.heading-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* ===========================
   TYPOGRAPHY
=========================== */

.list-title {
    position: relative;
}

.list-title h2 {
    color: #1f2937;
    margin: 0 0 2.2rem 0;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
}

.list-title h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 70px;
    height: 6px;
    border-radius: 99px;
    background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}

.heading-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.02em;
}

.heading-title .highlight {
    color: #bbf7d0;
    position: relative;
}

.heading-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 0.05em;
    left: 5px;
    right: -5px;
    height: 0.3em;
    background: rgba(187, 247, 208, 0.3);
    border-radius: 0.15em;
    z-index: -1;
}

.heading-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0 0 2.5rem 0;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

.trip-count {
    color: #6b7280;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.375rem 1rem;
    background: #f0f9f4;
    border-radius: 20px;
    border: 1px solid #d1fae5;
}

/* ===========================
   BUTTON COMPONENTS
=========================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.btn-outline {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-scroll {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-scroll:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-scroll i {
    font-size: 0.9rem;
    animation: bounce 2s infinite;
}

/* ===========================
   HEADING SECTION
=========================== */

.trips-heading-section {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
    color: white;
    padding: 7rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.trips-heading-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.heading-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.heading-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.heading-breadcrumb a:hover {
    color: white;
}

.heading-breadcrumb i {
    font-size: 0.7rem;
    opacity: 0.6;
}

.heading-breadcrumb span {
    color: white;
    font-weight: 500;
}

.heading-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat-highlight {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
    transition: all 0.3s ease;
}

.stat-highlight:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-highlight .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #bbf7d0;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-highlight .stat-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.heading-actions {
    margin-top: 1rem;
}

.heading-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.heading-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ===========================
   COMPASS DECORATION
=========================== */

.heading-visual {
    position: relative;
    width: 300px;
    height: 300px;
    flex-shrink: 0;
    user-select: none;
}

.visual-element {
    position: relative;
    width: 100%;
    height: 100%;
}

.compass-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.compass-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.compass-body {
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow:
        0 0 30px rgba(255, 255, 255, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.1),
        inset 0 0 60px rgba(0, 0, 0, 0.1);
    position: relative;
}

.compass-directions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.direction {
    position: absolute;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.direction.north {
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: #bbf7d0;
    font-size: 1.4rem;
}

.direction.south {
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.direction.east {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.direction.west {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-rose {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border-radius: 50%;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(255, 255, 255, 0.1) 0deg 30deg,
        transparent 30deg 60deg
    );
    animation: rotate 40s linear infinite;
}

.compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 90px;
    background: linear-gradient(
        to bottom,
        #ef4444 0%,
        #dc2626 35%,
        #f3f4f6 36%,
        #9ca3af 65%,
        #6b7280 100%
    );
    border-radius: 2px;
    box-shadow:
        0 0 15px rgba(239, 68, 68, 0.6),
        0 0 30px rgba(239, 68, 68, 0.3);
    animation: needle-sway 6s ease-in-out infinite;
    z-index: 10;
}

.compass-needle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: radial-gradient(
        circle,
        #f8fafc 0%,
        #e2e8f0 50%,
        #94a3b8 100%
    );
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 0 10px rgba(0, 0, 0, 0.3),
        inset 0 0 8px rgba(255, 255, 255, 0.6);
}

.trail-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(187, 247, 208, 0.6);
    border-radius: 50%;
    animation: fade-pulse 2s ease-in-out infinite;
}

.dot-1 { top: 20%; left: 30%; animation-delay: 0s; }
.dot-2 { top: 40%; right: 20%; animation-delay: 0.4s; }
.dot-3 { bottom: 30%; left: 20%; animation-delay: 0.8s; }
.dot-4 { top: 60%; left: 60%; animation-delay: 1.2s; }
.dot-5 { bottom: 20%; right: 30%; animation-delay: 1.6s; }

/* ===========================
   OVERVIEW SECTION
=========================== */

.trips-overview-section {
    padding: 2rem 0;
    margin-bottom: 3rem;
    background: white;
}

.info-panel {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.info-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #ffffff;
    border-radius: 8px;
    border: 2px solid #cdcdcd;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.info-description {
    margin-bottom: 2rem;
}

.info-description p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.difficulty-legend h4 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-icon.easy {
    background: #10b981;
}

.legend-icon.medium {
    background: #f59e0b;
}

.legend-icon.difficult {
    background: #ef4444;
}

.legend-item span {
    color: #6b7280;
    font-size: 0.9rem;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

.trips-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
    z-index: 0;
}

.custom-marker {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===========================
   TRIP INFO PANEL
=========================== */

.trip-info {
    animation: fadeIn 0.4s ease-out;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.trip-info-image {
    width: calc(100% + 4rem);
    height: 200px;
    margin: -2rem -2rem 0 -2rem;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    position: relative;
}

.trip-info-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

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

.trip-info-title {
    color: #1f2937;
    margin: 1.8rem 0 1rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.trip-info-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 1rem;
    margin-bottom: 0rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
    background: none;
    border-radius: 0;
    gap: 0.5rem;
}

.meta-item i {
    color: #059669;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.meta-item-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.meta-item-value {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 600;
}

.trip-info-description {
    color: #6b7280;
    line-height: 1.7;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.trip-info-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
}

.trip-info-actions .btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.info-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #059669;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* ===========================
   TRIPS LIST SECTION
=========================== */

.trips-list-section {
    padding: 3rem 1rem;
    min-height: 60vh;
    background: var(--bg-accent);
    scroll-margin-top: 2rem;
}

.list-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem 2.5rem;
    background-color: #ffffffd1;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
}

.sort-controls label {
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
}

.sort-select {
    padding: 0.75rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
}

.sort-select:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.sort-select:hover {
    border-color: #9ca3af;
}

/* ===========================
   SEARCH FUNCTIONALITY
=========================== */

.search-container {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    overflow: hidden;
}

.search-box:focus-within {
    background: white;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    transform: translateY(-1px);
}

.search-icon {
    color: #6b7280;
    font-size: 1.1rem;
    margin-right: 0.75rem;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.search-box:focus-within .search-icon {
    color: #059669;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: #374151;
    outline: none;
    width: 100%;
    min-width: 0;
    user-select: none;
  }


.search-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.clear-search {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.clear-search:hover {
    background: #f3f4f6;
    color: #374151;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: #f0f9f4;
}

.suggestion-icon {
    color: #059669;
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.suggestion-text {
    flex: 1;
    font-size: 0.9rem;
    color: #374151;
}

.suggestion-type {
    font-size: 0.8rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.search-suggestions-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.search-suggestions-list li {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
    color: #6b7280;
}

.search-suggestions-list li:hover {
    background: #f0f9f4;
    color: #374151;
}

.search-loading {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.search-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #059669;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.search-active .trip-count::before {
    content: "Výsledky hledání: ";
    color: #059669;
    font-weight: 600;
}

.search-active .list-title h2 {
    color: #059669;
}

.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.no-results h3 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-results p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ===========================
   TRIPS GRID
=========================== */

.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    padding: 2.5rem;
    border-radius: 16px;
    background-color: #ffffff55;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.trips-grid .trip-card:nth-child(n+3) {
    display: block !important;
}

.trip-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 400px;
}

.trip-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: #e5e7eb;
}

.trip-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    flex-shrink: 0;
}

.trip-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.trip-card:hover .trip-card-image img {
    transform: scale(1.08);
}

.trip-difficulty {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.trip-difficulty.easy {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
}

.trip-difficulty.medium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.95) 100%);
}

.trip-difficulty.difficult {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
}

.trip-card-content {
    padding: 1.4rem;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.trip-card-content h3 {
    color: #1f2937;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    line-height: 1.3;
    flex-shrink: 0;
}

.trip-card-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.3rem;
    margin-bottom: 1.5rem;
    padding: 0;
    flex-shrink: 0;
}

.trip-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.trip-detail i {
    color: #059669;
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}

.trip-card-content p {
    color: #6b7280;
    line-height: 1.7;
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trip-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #059669;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #bbf7d0;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    margin-top: auto;
    align-self: flex-start;
}

.trip-card-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s ease;
}

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

.trip-card-link:hover {
    color: #047857;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.trip-card-link::after {
    content: '→';
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.trip-card-link:hover::after {
    transform: translateX(3px);
}

.trip-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.trip-card.loading .trip-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: shimmer 1.5s infinite;
}

/* ===========================
   PAGINATION
=========================== */

.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: #059669;
    border-color: #059669;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 1rem;
}

.pagination-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.pagination-page:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.pagination-page.current {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    border-color: #059669;
}

.pagination-ellipsis {
    color: #9ca3af;
    padding: 0 0.5rem;
    font-weight: 600;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* ===========================
   ANIMATIONS
=========================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes needle-sway {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(2deg);
        filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.5));
    }
    33% {
        transform: translate(-50%, -50%) rotate(-1deg);
        filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.7));
    }
    66% {
        transform: translate(-50%, -50%) rotate(3deg);
        filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.6));
    }
}

@keyframes fade-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}



/* ===========================
MOBILE RESPONSIVE STYLES - TRIPS LIST
=========================== */
@media (max-width: 650px) {
  .heading-title .highlight::after {
    display: none;
  }
}
/* Tablet and below (768px) */
@media (max-width: 768px) {

  .list-title h2::after {
    width: auto;
    left: 40%;
    right: 40%;
}
  
  /* ===========================
  HEADING SECTION MOBILE
  =========================== */
  
  .trips-heading-section {
    padding: 5rem 0 2rem;
  }
  
  .heading-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
    text-align: center;
  }
  
  .heading-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .heading-description {
    font-size: 1.1rem;
    max-width: none;
  }
  
  .heading-stats {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .stat-highlight {
    min-width: 100px;
    padding: 1rem 0.75rem;
  }
  
  .stat-highlight .stat-number {
    font-size: 2rem;
  }
  
  .stat-highlight .stat-text {
    font-size: 0.8rem;
  }
  
  /* Hide compass decoration on mobile */
  .heading-visual {
    display: none;
  }
  
  .heading-breadcrumb {
    justify-content: center;
    margin-bottom: 1rem;
  }
  
  .heading-actions {
    display: flex;
    justify-content: center;
  }
  
  .btn-scroll {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
  
  /* ===========================
  OVERVIEW SECTION MOBILE
  =========================== */
  
  .trips-overview-section {
    padding: 1.5rem 0;
  }
  
  .overview-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .trip-info {
    gap: 0.5rem;
  }
  
  .info-panel {
    padding: 1.5rem;
    min-height: auto;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  .stat-item {
    padding: 0.75rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  .difficulty-legend h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .legend-items {
    gap: 0.5rem;
  }
  
  .legend-item {
    gap: 0.5rem;
  }
  
  .legend-item span {
    font-size: 0.85rem;
  }
  
  .trips-map {
    min-height: 300px;
  }
  
  /* ===========================
  TRIP INFO PANEL MOBILE
  =========================== */
  
  .trip-info-image {
    height: 150px;
    width: calc(100% + 3rem);
    margin: -1.5rem -1.5rem 0 -1.5rem;
  }
  
  .trip-info-title {
    font-size: 1.4rem;
    margin: 1rem 0 0.5rem 0;
  }
  
  .trip-info-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .meta-item i {
    font-size: 1rem;
  }
  
  .meta-item-label {
    font-size: 0.7rem;
  }
  
  .meta-item-value {
    font-size: 0.85rem;
  }
  
  .trip-info-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
  }
  
  .trip-info-actions {
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0;
  }
  
  .trip-info-actions .btn {
    padding: 0.75rem 1.2rem;
    font-size: 0.85rem;
  }

  .btn-primary {
    max-width: none !important;
  }
  
  /* ===========================
  TRIPS LIST SECTION MOBILE
  =========================== */
  
  .trips-list-section {
    padding: 2rem 0.5rem;
  }
  
  .list-header {
    grid-template-columns: 1fr;
    gap: 0rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .list-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .list-title h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .trip-count {
    text-align: center;
    justify-self: center;
  }
  
  /* ===========================
  SEARCH & FILTERS MOBILE
  =========================== */
  
  .search-container {
    max-width: none;
    width: 100%;
  }
  
  .search-box {
    padding: 1rem;
  }
  
  .search-input {
    font-size: 1rem;
  }
  
  .sort-controls {
    justify-content: center;
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .sort-select {
    min-width: 140px;
    padding: 0.875rem;
    font-size: 0.9rem;
  }
  
  .search-suggestions {
    border-radius: 8px;
  }
  
  .suggestion-item {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .suggestion-text {
    font-size: 0.95rem;
  }
  
  /* ===========================
  TRIPS GRID MOBILE
  =========================== */
  
  .trips-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .trip-card {
    max-width: none;
  }
  
  .trip-card-image {
    height: 200px;
  }
  
  .trip-card-content {
    padding: 1.2rem;
  }
  
  .trip-card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .trip-card-details {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .trip-detail {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .trip-detail i {
    font-size: 0.8rem;
  }
  
  .trip-card-content p {
    font-size: 0.9rem;
    -webkit-line-clamp: 3;
  }
  
  .trip-card-link {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }
  
  .trip-difficulty {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.7rem;
  }
  
  /* ===========================
  PAGINATION MOBILE
  =========================== */
  
  .pagination-container {
    padding: 1.5rem;
    margin-top: 2rem;
  }
  
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem;
  }
  
  .pagination-btn {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }
  
  .pagination-pages {
    margin: 0 0.5rem;
    gap: 0.125rem;
  }
  
  .pagination-page {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
  
  .pagination-info {
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }
  
  /* ===========================
  NO RESULTS STATE MOBILE
  =========================== */
  
  .no-results {
    padding: 2rem 1rem;
  }
  
  .no-results h3 {
    font-size: 1.25rem;
  }
  
  .no-results p {
    font-size: 0.9rem;
  }
}

/* Mobile phones (480px) */
@media (max-width: 480px) {
  .section-container {
    padding: 0 !important;
  }
  /* Even more compact heading */
  .heading-title {
    font-size: 2rem;
    line-height: 1.1;
  }
  
  .heading-description {
    font-size: 1rem;
  }
  
  .heading-stats {
    gap: 0.75rem;
  }
  
  .stat-highlight {
    min-width: 80px;
    padding: 0.75rem 0.5rem;
  }
  
  .stat-highlight .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-highlight .stat-text {
    font-size: 0.75rem;
  }
  
  /* Compact overview */
  .info-panel {
    padding: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .trips-map {
    min-height: 250px;
  }
  
  /* Single column trip details */
  .trip-info-meta {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  /* Compact list header */
  .list-header {
    padding: 1rem;
  }
  
  .list-title h2 {
    font-size: 1.75rem;
  }
  
  /* Stack search and sort */
  .search-container {
    order: 2;
  }
  
  .sort-controls {
    order: 1;
    margin-bottom: 1rem;
  }
  
  /* Tighter trip cards */
  .trips-grid {
    padding: 0.5rem;
    gap: 1rem;
  }
  
  .trip-card-image {
    height: 180px;
  }
  
  .trip-card-content {
    padding: 1rem;
  }
  
  .trip-card-content h3 {
    font-size: 1.1rem;
  }
  
  .trip-card-content p {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
  }
  
  .trip-card-link {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }
  
  /* Compact pagination */
  .pagination-container {
    padding: 1rem;
  }
  
  .pagination-btn {
    padding: 0.625rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .pagination-page {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
  
  /* Hide some pagination pages on very small screens */
  .pagination-page:not(.current):nth-child(n+6) {
    display: none;
  }
}

/* Landscape phone orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .trips-heading-section {
    padding: 3rem 0 1.5rem;
  }
  
  .heading-title {
    font-size: 2.2rem;
  }
  
  .heading-stats {
    gap: 1.5rem;
  }
  
  .trips-map {
    min-height: 250px;
  }
  
  .overview-container {
    gap: 1rem;
  }
}

/* Large tablets (1024px) - Minor adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  
  .heading-container {
    gap: 2rem;
  }
  
  .heading-title {
    font-size: 3rem;
  }
  
  .trips-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .overview-container {
    gap: 1.5rem;
  }
  
  .trips-map {
    min-height: 400px;
  }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  
  /* Larger touch targets */
  .search-box {
    padding: 1rem 1.25rem;
  }
  
  .sort-select {
    padding: 1rem;
    min-height: 44px;
  }
  
  .trip-card-link {
    min-height: 44px;
    padding: 0.875rem 1.5rem;
  }
  
  .pagination-page,
  .pagination-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .clear-search {
    width: 32px;
    height: 32px;
  }
  
  /* Remove hover effects */
  .trip-card:hover {
    transform: none;
  }
  
  .trip-card:active {
    transform: translateY(-4px);
  }
  
  .suggestion-item:hover {
    background: none;
  }
  
  .suggestion-item:active {
    background: #f0f9f4;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .compass-decoration {
    image-rendering: -webkit-optimize-contrast;
  }
  
  .trip-card-image img {
    image-rendering: -webkit-optimize-contrast;
  }
}
