/**
 * Morocco Travel Circuits - Additional CSS
 * 
 * These styles extend the base destination.css to support the new circuit functionality
 */

/* Circuit Hero Section */
.circuit-hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('/assets/img/hero/circuits-hero.jpg');
    height: 60vh;
  }
  
  /* Circuit Planner */
  .circuit-planner {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-xl);
    overflow: hidden;
  }
  
  .planner-header {
    background-color: var(--secondary);
    color: var(--white);
    padding: var(--space-lg);
  }
  
  .planner-header h3 {
    color: var(--white);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }
  
  .planner-header p {
    margin: 0;
    opacity: 0.9;
  }
  
  .planner-form {
    padding: var(--space-lg);
  }
  
  .planner-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
  }
  
  .planner-form .form-group {
    flex: 1;
    min-width: 220px;
  }
  
  .planner-select {
    width: 100%;
    padding: 0.75rem var(--space-md);
    border: 1px solid var(--neutral-lighter);
    border-radius: var(--radius-md);
    background-color: var(--white);
    font-size: 0.9375rem;
    color: var(--neutral-dark);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238492a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all var(--transition-fast);
  }
  
  .planner-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(247, 183, 49, 0.2);
    outline: none;
  }
  
  .planner-actions {
    display: flex;
    gap: var(--space-md);
  }
  
  /* Circuits Grid & Cards */
  .circuits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
  }
  
  .circuits-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
  }
  
  .circuit-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    height: 100%;
  }
  
  .circuit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }
  
  .featured-tag {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background-color: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
  }
  
  .card-route {
    background-color: var(--neutral-lightest);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  .route-title {
    font-weight: 600;
    color: var(--secondary);
    margin-right: var(--space-xs);
  }
  
  .route-cities {
    color: var(--neutral);
  }
  
  /* Circuits List View */
  .circuits-list .circuit-card {
    display: flex;
    height: auto;
    min-height: 200px;
  }
  
  .circuits-list .card-image-container {
    width: 35%;
    min-width: 250px;
    max-width: 300px;
  }
  
  .circuits-list .card-content {
    flex: 1;
  }
  
  /* Circuit Types Section */
  .circuit-types-section {
    padding: var(--space-xxl) 0;
    background-color: var(--neutral-lightest);
  }
  
  .circuit-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: var(--space-xl);
  }
  
  .circuit-type-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
  }
  
  .circuit-type-card:hover {
    transform: translateY(-5px);
  }
  
  .circuit-type-image {
    height: 160px;
    overflow: hidden;
  }
  
  .circuit-type-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
  }
  
  .circuit-type-card:hover .circuit-type-image img {
    transform: scale(1.05);
  }
  
  .circuit-type-content {
    padding: var(--space-lg);
  }
  
  .circuit-type-content h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
  }
  
  .circuit-type-content p {
    color: var(--neutral);
    margin-bottom: var(--space-md);
    font-size: 0.9375rem;
    line-height: 1.5;
  }
  
  .btn-circuit-type {
    display: inline-block;
    color: var(--primary);
    font-weight: 500;
    transition: color var(--transition-fast);
  }
  
  .btn-circuit-type:hover {
    color: var(--primary-dark);
  }
  
  /* How It Works Section */
  .how-it-works {
    padding: var(--space-xxl) 0;
    background-color: var(--white);
  }
  
  .steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
  }
  
  .step-card {
    background-color: var(--neutral-lightest);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    position: relative;
  }
  
  .step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: var(--white);
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
  }
  
  .step-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(247, 183, 49, 0.1);
    color: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto var(--space-md);
  }
  
  .step-card h3 {
    margin-bottom: var(--space-sm);
  }
  
  .step-card p {
    color: var(--neutral);
    margin-bottom: 0;
    font-size: 0.9375rem;
  }
  
  /* Featured Itinerary Section */
  .featured-itinerary {
    padding: var(--space-xxl) 0;
    background-color: var(--neutral-lightest);
  }
  
  .itinerary-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
  }
  
  .itinerary-map {
    width: 100%;
    height: 300px;
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  
  .itinerary-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .itinerary-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .timeline-day {
    display: flex;
    gap: var(--space-md);
    position: relative;
  }
  
  .timeline-day:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 42px;
    left: 20px;
    width: 2px;
    height: calc(100% + var(--space-md));
    background-color: var(--neutral-lighter);
  }
  
  .day-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: var(--white);
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
  }
  
  .day-content {
    flex: 1;
  }
  
  .day-content h3 {
    margin-bottom: var(--space-xs);
    font-size: 1.125rem;
  }
  
  .day-content p {
    color: var(--neutral);
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
  }
  
  .itinerary-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--neutral-lighter);
  }
  
  /* Circuit Modal Styles */
  .modal-content.planner-modal {
    max-width: 800px;
  }
  
  .custom-badge {
    display: inline-block;
    background-color: var(--accent);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    margin-left: var(--space-md);
  }
  
  /* Modal Route Map */
  .route-map {
    background-color: var(--neutral-lightest);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }
  
  .route-cities {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
  }
  
  .route-city {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }
  
  .city-marker {
    width: 30px;
    height: 30px;
    background-color: var(--secondary);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 5px;
  }
  
  .starting-city .city-marker {
    background-color: var(--primary);
    transform: scale(1.2);
  }
  
  .city-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--neutral-dark);
    text-align: center;
  }
  
  .route-line {
    flex-grow: 1;
    height: 2px;
    background-color: var(--neutral-light);
    margin: 0 5px;
    position: relative;
    top: -8px;
  }
  
  .route-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
  }
  
  .route-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .detail-label {
    font-size: 0.75rem;
    color: var(--neutral);
  }
  
  .detail-value {
    font-weight: 600;
    color: var(--secondary);
  }
  
  .detail-value.price {
    color: var(--primary);
    font-size: 1.125rem;
  }
  
  /* Custom Planner Modal */
  .planner-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    position: relative;
  }
  
  .planner-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 25px;
    right: 25px;
    height: 2px;
    background-color: var(--neutral-lighter);
    z-index: 0;
  }
  
  .planner-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
  }
  
  .step-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--neutral-lighter);
    color: var(--neutral);
    border-radius: var(--radius-full);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    transition: background-color var(--transition-fast), color var(--transition-fast);
  }
  
  .planner-step.active .step-number {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
  }
  
  .step-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--neutral);
    transition: color var(--transition-fast);
  }
  
  .planner-step.active .step-name {
    color: var(--primary);
  }
  
  .planner-content {
    margin-bottom: var(--space-xl);
    min-height: 300px;
  }
  
  .planner-screen {
    display: none;
  }
  
  .planner-screen.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
  }
  
  /* Starting City Selection */
  .starting-cities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
  }
  
  .city-option {
    position: relative;
  }
  
  .city-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .city-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform var(--transition-fast);
  }
  
  .city-option label:hover {
    transform: translateY(-5px);
  }
  
  .city-option img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xs);
    border: 3px solid transparent;
    transition: border-color var(--transition-fast);
  }
  
  .city-option input:checked + label img {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
  }
  
  .city-option span {
    font-weight: 500;
    color: var(--neutral-dark);
  }
  
  /* Planner Actions */
  .planner-actions {
    display: flex;
    justify-content: space-between;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--neutral-lighter);
  }
  
  .btn-back {
    padding: 0.75rem 1.5rem;
  }
  
  .btn-back:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  /* Custom Circuit Summary */
  .custom-circuit-summary {
    padding: var(--space-lg);
    background-color: var(--neutral-lightest);
    border-radius: var(--radius-md);
  }
  
  .custom-circuit-summary h3 {
    margin-bottom: var(--space-md);
    color: var(--secondary);
  }
  
  .circuit-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
  }
  
  .custom-circuit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-lg);
  }
  
  /* Responsive Styles */
  @media (max-width: 992px) {
    .planner-row {
      flex-direction: column;
    }
    
    .itinerary-container {
      padding: var(--space-md);
    }
  }
  
  @media (max-width: 768px) {
    .circuit-hero {
      height: 40vh;
    }
    
    .steps-container {
      grid-template-columns: 1fr;
    }
    
    .timeline-day {
      flex-direction: column;
    }
    
    .timeline-day:not(:last-child)::after {
      left: 20px;
      top: 42px;
      height: calc(100% - 42px);
    }
    
    .day-number {
      margin-bottom: var(--space-sm);
    }
    
    .planner-steps {
      overflow-x: auto;
      padding-bottom: var(--space-sm);
    }
    
    .planner-step {
      min-width: 80px;
    }
    
    .starting-cities {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  /* Animation for circuit planner */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }