/**
 * TravelX Card Enhancement Styles
 * Consistent card design across the application
 */

/* Service Card Base Styles */
.service-card {
    border: none;
    transition: all 0.3s ease;
    height: 100%;
    background: #fff;
    border-radius: 15px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
}

/* Image Container Styles */
.image-carousel-container {
    height: 280px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.service-card-image {
    height: 280px;
    width: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.service-card:hover .service-card-image {
    transform: scale(1.08);
}

/* Price Badge Styles */
.price-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.price-badge .badge {
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    border: 3px solid rgba(255,255,255,0.9);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Card Body Styles */
.card-body {
    border: none;
    padding: 1.5rem !important;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

/* Rating Stars */
.rating-stars {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.rating-stars .fa-star {
    color: #ffc107;
    text-shadow: 0 1px 2px rgba(255,193,7,0.3);
}

/* Specifications */
.bike-specs {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #ffc107;
    color: white;
}

.bike-specs .spec-item {
    font-size: 0.95rem;
    color: white;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.bike-specs .spec-item strong {
    color: white;
}

.bike-specs .spec-item span {
    color: #f8f9fa;
}

.bike-specs .spec-item i {
    color: #ffc107;
}

.bike-specs .spec-item:last-child {
    margin-bottom: 0;
}

.bike-specs .spec-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.bike-specs .spec-item .text-muted {
    min-width: 70px;
    font-weight: 600;
}

/* Card Description */
.card-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #6c757d;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 1.5rem;
}

/* Action Buttons */
.card-actions {
    margin-top: auto;
}

.card-actions .btn {
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-width: 2px;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

.card-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-actions .btn-outline-primary:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
}

.card-actions .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-color: #28a745;
}

.card-actions .btn-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #28a745 100%);
}

/* Expandable Sections */
.expandable-section {
    display: none;
    animation: slideDown 0.4s ease;
    overflow: hidden;
    margin-top: 1rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        max-height: 600px;
        transform: translateY(0);
    }
}

.expandable-section .alert {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #007bff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Booking Form Container */
.booking-form-container {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.booking-form-container h6 {
    color: #28a745;
    font-weight: 700;
    margin-bottom: 1rem;
}

.booking-form-container .btn {
    font-size: 1rem;
    padding: 0.75rem;
    border-radius: 10px;
}

/* Carousel Customizations */
.carousel {
    border-radius: 15px 15px 0 0;
}

.carousel-indicators {
    bottom: 15px;
    margin-bottom: 0;
    z-index: 15;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: rgba(255,255,255,0.6);
    border: 2px solid rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: #fff;
    border-color: #007bff;
    transform: scale(1.2);
}

.carousel-control-prev,
.carousel-control-next {
    width: 45px;
    height: 45px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev {
    left: 15px;
}

.carousel-control-next {
    right: 15px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .service-card {
        margin-bottom: 2rem;
    }
    
    .image-carousel-container {
        height: 250px;
    }
    
    .service-card-image {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .image-carousel-container {
        height: 220px;
    }
    
    .service-card-image {
        height: 220px;
    }
    
    .card-actions .d-flex {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .card-actions .btn {
        width: 100% !important;
        padding: 0.75rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .bike-specs {
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .price-badge {
        top: 12px;
        right: 12px;
    }
    
    .price-badge .badge {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1.25rem !important;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .bike-specs .spec-item {
        font-size: 0.9rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .carousel-control-prev {
        left: 10px;
    }
    
    .carousel-control-next {
        right: 10px;
    }
}

/* Loading States */
.service-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.service-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Accessibility Improvements */
.service-card:focus-within {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
}

/* Print Styles */
@media print {
    .service-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators {
        display: none;
    }
    
    .expandable-section {
        display: block !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .service-card {
        background: #343a40;
        color: #f8f9fa;
    }
    
    .card-title {
        color: #f8f9fa;
    }
    
    .bike-specs {
        background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    }
    
    .booking-form-container {
        background: linear-gradient(135deg, #495057 0%, #343a40 100%);
        border-color: #6c757d;
    }
}