/* Rides Page Styles */

.container.mt-4 p {
  font-size: 1.125rem;
  color: #333;
  line-height: 1.6;
}

.container.mt-4 h2 {
  font-size: 2rem;
  color: #333;
}

.ride-card {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 30px;
  margin: 25px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.ride-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3498db, #2ecc71, #f39c12, #e74c3c);
  border-radius: 16px 16px 0 0;
}

.ride-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.ride-card h4 {
  color: white;
  margin-bottom: 10px;
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.ride-card h4 a {
  color: white;
  text-decoration: none;
}

.ride-card h4 a:hover {
  color: #3498db;
  text-decoration: none;
}

.ride-card .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

.ride-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ride-stat {
  text-align: center;
  min-width: 60px;
  flex: 1;
  box-sizing: border-box;
}

.ride-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #3498db;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  margin-bottom: 5px;
  word-wrap: break-word;
}

.ride-stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  word-wrap: break-word;
}

.ride-map {
  width: 100%;
  max-width: 100%;
  height: 400px;
  margin-top: 20px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  box-sizing: border-box;
}

.view-ride-btn {
  background: linear-gradient(45deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  width: 100%;
  max-width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.view-ride-btn:hover {
  background: linear-gradient(45deg, #2980b9, #1e73a3);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.ride-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
  max-width: 100%;
}

.ride-title-section {
  flex: 1;
  min-width: 200px;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.ride-actions {
  margin-left: 15px;
  max-width: 100%;
}

/* Tablet - Keep 3 columns */
@media (max-width: 992px) and (min-width: 769px) {
  .ride-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    justify-items: center;
  }
  
  .ride-stat {
    margin: 0;
    min-width: auto;
  }
  
  .ride-stat-value {
    font-size: 1.75rem;
  }
}

/* Mobile optimized - fit more stats */
@media (max-width: 768px) {
  .ride-card {
    padding: 15px;
    margin: 15px 0;
    border-radius: 12px;
  }
  
  .ride-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .ride-actions {
    margin-left: 0;
    margin-top: 5px;
    width: 100%;
  }
  
  .view-ride-btn {
    padding: 12px 20px;
    font-size: 0.85rem;
    width: 100%;
  }
  
  /* 3 columns for mobile to fit more stats */
  .ride-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
  }
  
  .ride-stat {
    margin: 0;
    padding: 8px 4px;
    min-width: 0;
  }
  
  .ride-stat-value {
    font-size: 1.2rem;
    margin-bottom: 2px;
  }
  
  .ride-stat-label {
    font-size: 0.65rem;
    line-height: 1.1;
  }
  
  .ride-map {
    height: 250px;
  }
  
  .ride-title-section h4 {
    font-size: 1.1rem;
    line-height: 1.2;
  }
  
  .ride-title-section .text-muted {
    font-size: 0.8rem;
  }
}

/* iPhone specific optimizations */
@media (max-width: 430px) {
  .ride-card {
    padding: 12px;
    margin: 10px 0;
  }
  
  .ride-stats {
    padding: 10px;
    gap: 6px;
  }
  
  .ride-stat {
    padding: 6px 2px;
  }
  
  .ride-stat-value {
    font-size: 1.1rem;
  }
  
  .ride-stat-label {
    font-size: 0.6rem;
  }
  
  .ride-map {
    height: 200px;
  }
  
  .view-ride-btn {
    padding: 10px 15px;
    font-size: 0.8rem;
  }
}

/* iPhone SE and smaller */
@media (max-width: 375px) {
  .ride-card {
    padding: 10px;
    margin: 8px 0;
  }
  
  .ride-stats {
    padding: 8px;
    gap: 4px;
  }
  
  .ride-stat {
    padding: 4px 1px;
  }
  
  .ride-stat-value {
    font-size: 1rem;
  }
  
  .ride-stat-label {
    font-size: 0.55rem;
  }
  
  .ride-title-section h4 {
    font-size: 1rem;
  }
}

/* Landscape orientation for phones */
@media (max-width: 768px) and (orientation: landscape) {
  .ride-stats {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }
  
  .ride-stat-value {
    font-size: 1.1rem;
  }
  
  .ride-stat-label {
    font-size: 0.6rem;
  }
  
  .ride-map {
    height: 180px;
  }
}