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

:root {
    /* 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: #caffcb;
    --white: #ffffff;
    
    /* Colors - Text */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    /* Colors - Borders */
    --border-color: #eee;
    --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-strong: 0 12px 32px rgba(0, 0, 0, 0.15);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --border-radius: 12px;
    --border-radius-small: 4px;
    
    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    background: var(--bg-accent);
}


.navbar-link {
    color: var(--text-primary) !important;
}

.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: var(--shadow-lg) !important;
    
}

.navbar-logo svg {
    fill: var(--primary-green) !important;
}

.navbar-logo span {
    color: var(--primary-green) !important;
}


/* ===========================
   MAIN LAYOUT
=========================== */

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
    margin-top: 80px;
}

.trip-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    margin-bottom: 3rem;
}

.trip-main {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* ===========================
   TRIP HEADER SECTION
=========================== */

.trip-header {
    position: relative;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
}

.trip-header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trip-header:hover .trip-header-image {
    transform: scale(1.02);
}

.trip-header-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem 2.5rem 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    color: white;
}

.trip-header-title h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 0;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* ===========================
   MAP SECTION
=========================== */

.trip-map-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

#trip-map {
    height: 450px;
    width: 100%;
    z-index: 0;
}

.map-markers {
    display: flex;
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
    gap: 1rem;
}

.map-marker {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.map-marker:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.map-marker-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    background: var(--bg-green);
    border-radius: 50%;
    color: var(--primary-green);
    font-size: 1.1rem;
}

.map-marker-text {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}

.map-marker-text strong {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.map-marker-text span {
    color: var(--text-secondary);
}

/* ===========================
   DESCRIPTION SECTION
=========================== */

.trip-description {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.trip-description h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 1rem;
    font-weight: 700;
}

.trip-description h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--accent-green) 100%);
    border-radius: 2px;
}

.trip-description p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.trip-description ul,
.trip-description ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.trip-description li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===========================
   SIDEBAR COMPONENTS
=========================== */

.trip-sidebar {
    align-self: start;
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.sidebar-widget h3 {
    font-size: 1.375rem;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 1rem;
    font-weight: 700;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--accent-green) 100%);
    border-radius: 2px;
}

/* ===========================
   TRIP DETAILS WIDGET
=========================== */

.trip-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trip-details-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.trip-details-list li:hover {
    background: var(--bg-green);
    transform: translateX(4px);
}

.trip-details-list i {
    color: var(--primary-green);
    font-size: 1.25rem;
    width: 39px;
    aspect-ratio: 1 / 1;
    text-align: center;
    background: var(--light-green);
    padding: 0.5rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.trip-details-list div {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.trip-details-list strong {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.trip-details-list span,
.trip-details-list a {
    font-size: 1rem;
    color: var(--text-secondary);
}

.trip-details-list a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.trip-details-list a:hover {
    color: var(--primary-green-dark);
    text-decoration: underline;
}

/* ===========================
   RELATED TRIPS WIDGET
=========================== */

.related-trips {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-trip {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}

.related-trip:hover {
    transform: translateY(-2px);
    background: var(--bg-green);
    box-shadow: var(--shadow-md);
}

.related-trip img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.related-trip-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.related-trip-info span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.all-trips-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
    padding: 1rem;
    background: var(--bg-green);
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-green);
}

.all-trips-link:hover {
    color: white;
    background: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===========================
   ELEVATION PROFILE SECTION
=========================== */

.elevation-profile-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.profile-title {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 1rem;
}

.profile-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--accent-green) 100%);
    border-radius: 2px;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.elevation-summary {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.elevation-summary-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.elevation-summary-item.uphill {
    border-left: 4px solid var(--accent-green);
}

.elevation-summary-item.downhill {
    border-left: 4px solid #f59e0b;
}

.elevation-summary-item span:first-child {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    font-weight: 700;
}

.profile-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-wrapper {
    flex: 1;
    min-width: 300px;
    height: 300px;
    position: relative;
}

.profile-chart {
    display: block;
    width: 100% !important;
    height: 100% !important;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.profile-map {
    flex: 1;
    min-width: 300px;
    height: 300px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    z-index: 0;
}

.profile-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.info-item {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.info-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    display: block;
}

.info-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
}

/* ===========================
   ELEVATION CHART INDICATORS
=========================== */

.elevation-indicator {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.elevation-crosshair {
    position: absolute;
    width: 1px;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    top: 0;
    pointer-events: none;
    display: none;
    z-index: 9;
}

.elevation-label {
    position: absolute;
    background-color: white;
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 11px;
    line-height: 1;
    transform: translate(-50%, -100%);
    white-space: nowrap;
    margin-top: -5px;
    height: auto;
    z-index: 15;
    display: none;
}

.distance-label {
    position: absolute;
    background-color: white;
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 11px;
    line-height: 1;
    transform: translateX(-50%);
    height: auto;
    white-space: nowrap;
    z-index: 15;
    display: none;
}

.elevation-point {
    position: absolute;
    background-color: white;
    border: 2px solid #333;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: none;
    pointer-events: none;
}

/* ===========================
   GALLERY SECTION
=========================== */

.gallery-section {
    margin: 4rem 0 var(--spacing-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.gallery-container {
    padding: var(--spacing-xl);
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: var(--spacing-xl);
}

.gallery-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
    letter-spacing: -0.025em;
}

.gallery-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* ===========================
   PINTEREST GALLERY LAYOUT
=========================== */

.pinterest-gallery {
    column-count: 3;
    column-gap: 24px;
    column-fill: balance;
    width: 100%;
    margin: 0;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 24px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    width: 100%;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.gallery-item-inner {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #f8f9fa;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item-inner {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    background: #f0f0f0;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

/* ===========================
   MEDIA OVERLAYS & BADGES
=========================== */

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.4);
}

.gallery-item:hover .media-overlay {
    opacity: 1;
}

.video-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.play-button {
    background: var(--white);
    border: none;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: scale(0.8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover .play-button {
    transform: scale(1);
}

.play-button svg {
    width: 28px;
    height: 28px;
    margin-left: 3px;
    color: var(--text-primary);
}

.panorama-overlay {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(139, 92, 246, 0.85));
}

.panorama-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-weight: 600;
    text-align: center;
}

.panorama-icon svg {
    margin-bottom: var(--spacing-sm);
    width: 36px;
    height: 36px;
}

.panorama-icon span {
    font-size: 18px;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 700;
}

.media-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: system-ui, -apple-system, sans-serif;
}

.media-type-badge svg {
    width: 14px;
    height: 14px;
}

.media-type-badge.video {
    background: rgba(239, 68, 68, 0.9);
}

.media-type-badge.panorama {
    background: rgba(59, 130, 246, 0.9);
}

.gallery-item:hover .media-type-badge {
    transform: scale(1.05);
}

.media-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
    padding: 32px 16px 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .media-caption {
    transform: translateY(0);
}

.media-caption p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 400;
}

/* ===========================
   LOADING STATES
=========================== */

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-left-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.panorama-loading {
    color: white;
    text-align: center;
}

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

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

/* ===========================
   ACCESSIBILITY & FOCUS STATES
=========================== */

.gallery-item:focus,
.related-trip:focus,
.all-trips-link:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* ===========================
MOBILE RESPONSIVE STYLES - TRIP DETAIL
=========================== */

/* Large tablets (1024px) - Minor adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  
  .main-content {
    padding: 2rem 1.5rem 3rem;
  }
  
  .trip-content {
    gap: 2rem;
  }
  
  .trip-sidebar {
    top: 90px;
  }
  
  .pinterest-gallery {
    column-count: 2;
    column-gap: 20px;
  }
  
  .profile-container {
    gap: 1.5rem;
  }
}

@media (max-width: 980px) {
  
    .profile-header {
        justify-content: flex-start;
        align-items: flex-start;
        flex-direction: column;
    }


  /* ===========================
  MAIN LAYOUT MOBILE
  =========================== */
  
  .main-content {
    padding: 1rem 1rem 2rem;
    margin-top: 70px;
  }
  
  .trip-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .trip-main {
    gap: 2rem;
  }
  
  /* ===========================
  TRIP HEADER MOBILE
  =========================== */
  
  .trip-header {
    height: 50vh;
    min-height: 300px;
    max-height: 400px;
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
  }
  
  .trip-header-title {
    padding: 2rem 1.5rem 1.5rem;
  }
  
  .trip-header-title h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
  }
  
  /* ===========================
  MAP SECTION MOBILE
  =========================== */
  
  .trip-map-section {
    border-radius: var(--radius-md);
  }
  
  #trip-map {
    height: 300px;
  }
  
  .map-markers {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }
  
  .map-marker {
    padding: 0.75rem;
  }
  
  .map-marker-icon {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
  
  .map-marker-text {
    font-size: 0.85rem;
  }
  
  /* ===========================
  DESCRIPTION SECTION MOBILE  
  =========================== */
  
  .trip-description {
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }
  
  .trip-description h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .trip-description p {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  
  /* ===========================
  GALLERY SECTION MOBILE
  =========================== */
  
  .gallery-section {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }
  
  .gallery-container {
    padding: 1.5rem;
  }
  
  .gallery-header h2 {
    font-size: 1.75rem;
  }
  
  .gallery-subtitle {
    font-size: 0.9rem;
  }
  
  .pinterest-gallery {
    column-count: 2;
    column-gap: 16px;
  }
  
  .gallery-item {
    margin-bottom: 16px;
  }
  
  .play-button {
    width: 48px;
    height: 48px;
  }
  
  .play-button svg {
    width: 20px;
    height: 20px;
  }
  
  .panorama-icon svg {
    width: 28px;
    height: 28px;
  }
  
  .panorama-icon span {
    font-size: 14px;
  }
  
  .media-type-badge {
    padding: 4px 8px;
    font-size: 10px;
  }
  
  .media-caption {
    padding: 20px 12px 12px;
  }
  
  .media-caption p {
    font-size: 12px;
  }
  
  /* ===========================
  SIDEBAR MOBILE
  =========================== */
  
  .trip-sidebar {
    position: static;
    top: auto;
    gap: 1.5rem;
  }
  
  .sidebar-widget {
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }
  
  .sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .trip-details-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }
  
  .trip-details-list li {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .trip-details-list i {
    font-size: 1rem;
    width: 32px;
    padding: 0.375rem;
  }
  
  .trip-details-list strong {
    font-size: 0.85rem;
  }
  
  .trip-details-list span,
  .trip-details-list a {
    font-size: 0.9rem;
  }
  
  .related-trips {
    gap: 0.75rem;
  }
  
  .related-trip {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .related-trip img {
    width: 60px;
    height: 45px;
  }
  
  .related-trip-info h4 {
    font-size: 0.9rem;
  }
  
  .related-trip-info span {
    font-size: 0.8rem;
  }
  
  .all-trips-link {
    padding: 0.875rem;
    font-size: 0.9rem;
    text-align: center;
    justify-content: center;
  }
}

/* Tablet and below (768px) - Keep elevation map visible */
@media (max-width: 768px) {
  
    .profile-header {
        justify-content: flex-start;
        align-items: flex-start;
        flex-direction: column;
    }


  /* ===========================
  MAIN LAYOUT MOBILE
  =========================== */
  
  .main-content {
    padding: 1rem 1rem 2rem;
    margin-top: 70px;
  }
  
  .trip-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .trip-main {
    gap: 2rem;
  }
  
  /* ===========================
  TRIP HEADER MOBILE
  =========================== */
  
  .trip-header {
    height: 50vh;
    min-height: 300px;
    max-height: 400px;
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
  }
  
  .trip-header-title {
    padding: 2rem 1.5rem 1.5rem;
  }
  
  .trip-header-title h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
  }
  
  /* ===========================
  MAP SECTION MOBILE
  =========================== */
  
  .trip-map-section {
    border-radius: var(--radius-md);
  }
  
  #trip-map {
    height: 300px;
  }
  
  .map-markers {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }
  
  .map-marker {
    padding: 0.75rem;
  }
  
  .map-marker-icon {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
  
  .map-marker-text {
    font-size: 0.85rem;
  }
  
  /* ===========================
  DESCRIPTION SECTION MOBILE  
  =========================== */
  
  .trip-description {
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }
  
  .trip-description h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .trip-description p {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  /* ===========================
  ELEVATION PROFILE MOBILE (768px - KEEP BOTH VISIBLE)
  =========================== */
  
  .elevation-profile-section {
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }
  
  .profile-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .elevation-summary {
    flex-direction: row;
    gap: 1rem;
    align-items: center;
  }
  
  .elevation-summary-item {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .elevation-summary-item span:first-child {
    font-size: 1.25rem;
    margin-right: 0.5rem;
  }
  
  /* Stack chart and map vertically at 768px */
  .profile-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .chart-wrapper,
  .profile-map {
    min-width: 100%;
    height: 250px;
  }
  
  .profile-chart {
    height: 250px !important;
  }

  .profile-map {
    flex: none;
  }
  
  .profile-info {
    gap: 1rem;
    padding: 1rem;
  }
  
  .info-item {
    min-width: 120px;
    padding: 0.75rem;
  }
  
  .info-value {
    font-size: 1.25rem;
  }
  
  /* ===========================
  GALLERY SECTION MOBILE
  =========================== */
  
  .gallery-section {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }
  
  .gallery-container {
    padding: 1.5rem;
  }
  
  .gallery-header h2 {
    font-size: 1.75rem;
  }
  
  .gallery-subtitle {
    font-size: 0.9rem;
  }
  
  .pinterest-gallery {
    column-count: 2;
    column-gap: 16px;
  }
  
  .gallery-item {
    margin-bottom: 16px;
  }
  
  .play-button {
    width: 48px;
    height: 48px;
  }
  
  .play-button svg {
    width: 20px;
    height: 20px;
  }
  
  .panorama-icon svg {
    width: 28px;
    height: 28px;
  }
  
  .panorama-icon span {
    font-size: 14px;
  }
  
  .media-type-badge {
    padding: 4px 8px;
    font-size: 10px;
  }
  
  .media-caption {
    padding: 20px 12px 12px;
  }
  
  .media-caption p {
    font-size: 12px;
  }
  
  /* ===========================
  SIDEBAR MOBILE
  =========================== */
  
  .trip-sidebar {
    position: static;
    top: auto;
    gap: 1.5rem;
  }
  
  .sidebar-widget {
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }
  
  .sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .trip-details-list {
    gap: 0.75rem;
  }
  
  .trip-details-list li {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .trip-details-list i {
    font-size: 1rem;
    width: 32px;
    padding: 0.375rem;
  }
  
  .trip-details-list strong {
    font-size: 0.85rem;
  }
  
  .trip-details-list span,
  .trip-details-list a {
    font-size: 0.9rem;
  }
  
  .related-trips {
    gap: 0.75rem;
  }
  
  .related-trip {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .related-trip img {
    width: 60px;
    height: 45px;

  }

  .related-trip-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    width: 70%;
  }
  
  .related-trip-info h4 {
    font-size: 0.9rem;
  }
  
  .related-trip-info span {
    font-size: 0.8rem;
  }
  
  .all-trips-link {
    padding: 0.875rem;
    font-size: 0.9rem;
    text-align: center;
    justify-content: center;
  }
}

/* Mobile phones (480px) - HIDE ELEVATION MAP, SHOW ONLY GRAPH */
@media (max-width: 480px) {
  
  /* ===========================
  TIGHTER MOBILE LAYOUT
  =========================== */
  
  .main-content {
    padding: 0.75rem 0.75rem 1.5rem;
  }
  
  .trip-content {
    gap: 1.5rem;
  }
  
  .trip-main {
    gap: 1.5rem;
  }
  
  /* ===========================
  COMPACT HEADER
  =========================== */
  
  .trip-header {
    height: 40vh;
    min-height: 250px;
    max-height: 300px;
    margin-bottom: 1.5rem;
  }
  
  .trip-header-title {
    padding: 1.5rem 1rem 1rem;
  }
  
  .trip-header-title h1 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
  }
  
  /* ===========================
  COMPACT MAP SECTION
  =========================== */
  
  #trip-map {
    height: 250px;
  }
  
  .map-markers {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .map-marker {
    padding: 0.5rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .map-marker-icon {
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
    margin-right: 0;
  }
  
  .map-marker-text {
    font-size: 0.8rem;
  }
  
  /* ===========================
  COMPACT DESCRIPTION
  =========================== */
  
  .trip-description {
    padding: 1rem;
  }
  
  .trip-description h2 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
  }
  
  .trip-description p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
  
  /* ===========================
  ELEVATION PROFILE MOBILE (480px - HIDE MAP, SHOW ONLY GRAPH)
  =========================== */
  
  .elevation-profile-section {
    padding: 1rem;
  }
  
  .profile-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  /* Keep elevation summary visible */
  .elevation-summary {
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  .elevation-summary-item {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    max-width: 240px;
  }
  
  .elevation-summary-item span:first-child {
    font-size: 1.1rem;
  }
  
  
  
  .profile-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .chart-wrapper {
    min-width: 100%;
    height: 200px;
  }
  
  /* Keep profile info but make it more compact */
  .profile-info {
    gap: 0.5rem;
    padding: 0.75rem;
  }
  
  .info-item {
    min-width: 100px;
    padding: 0.5rem;
  }
  
  .info-label {
    font-size: 0.8rem;
  }
  
  .info-value {
    font-size: 1.1rem;
  }
  
  /* ===========================
  SINGLE COLUMN GALLERY
  =========================== */
  
  .gallery-section {
    margin: 1.5rem 0;
    padding: 1rem;
  }
  
  .gallery-container {
    padding: 0rem;
  }
  
  .gallery-header {
    margin-bottom: 1rem;
    padding-bottom: 0;
  }
  
  .gallery-header h2 {
    font-size: 1.5rem;
  }
  
  .pinterest-gallery {
    column-count: 2;
    column-gap: 0.5rem;
  }
  
  .gallery-item {
    margin-bottom: 0.5rem;
  }
  
  .play-button {
    width: 40px;
    height: 40px;
  }
  
  .play-button svg {
    width: 16px;
    height: 16px;
  }
  
  .panorama-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .panorama-icon span {
    font-size: 12px;
  }
  
  /* ===========================
  COMPACT SIDEBAR
  =========================== */
  
  .sidebar-widget {
    padding: 1rem;
  }
  
  .sidebar-widget h3 {
    font-size: 1.1rem;
  }
  
  .trip-details-list li {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .trip-details-list i {
    width: 28px;
    font-size: 0.9rem;
  }
  
  .trip-details-list strong {
    font-size: 0.8rem;
  }
  
  .trip-details-list span,
  .trip-details-list a {
    font-size: 0.85rem;
  }
  
  .related-trip {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .related-trip img {
    width: 50px;
    height: 38px;
  }
  
  .related-trip-info h4 {
    font-size: 0.85rem;
  }
  
  .related-trip-info span {
    font-size: 0.75rem;
  }
  
  .all-trips-link {
    padding: 0.75rem;
    font-size: 0.85rem;
  }
}

/* Landscape phone orientation */
@media (max-width: 768px) and (orientation: landscape) {
  
  .trip-header {
    height: 60vh;
    min-height: 200px;
    max-height: 300px;
  }
  
  .trip-header-title h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
  }
  
  #trip-map {
    height: 200px;
  }
  
  .chart-wrapper,
  .profile-map {
    height: 180px;
  }
  
  .elevation-summary {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  
  /* Larger touch targets */
  .gallery-item {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  }
  
  .related-trip,
  .all-trips-link {
    min-height: 44px;
  }
  
  .map-marker {
    min-height: 44px;
  }
  
  /* Remove hover effects that don't work on touch */
  .trip-header:hover .trip-header-image,
  .gallery-item:hover img,
  .gallery-item:hover,
  .sidebar-widget:hover,
  .related-trip:hover,
  .map-marker:hover {
    transform: none;
  }
  
  /* But keep active states */
  .gallery-item:active {
    transform: translateY(-2px);
  }
  
  .sidebar-widget:active,
  .related-trip:active {
    transform: translateY(-1px);
  }
}

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

/* Print styles */
@media print {
  .trip-sidebar,
  .gallery-section,
  .profile-map {
    display: none;
  }
  
  .trip-content {
    grid-template-columns: 1fr;
  }
  
  .main-content {
    margin-top: 0;
    padding: 0;
  }
}

