/* ===============================
   Ambulance Services Styles
   =============================== */

.ambulance-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding-bottom: 2rem;
}

/* Header Section */
.ambulance-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.ambulance-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.ambulance-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Search and Filter Section */
.search-filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.filter-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* Ambulance Grid */
.ambulance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Small Ambulance Card */
.ambulance-card-small {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #007bff;
    cursor: pointer;
}

.ambulance-card-small:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ambulance-card-small.free-service {
    border-left-color: #28a745;
}

.ambulance-card-small.paid-service {
    border-left-color: #ffc107;
}

/* Ambulance Image */
.ambulance-image {
    height: 150px;
    overflow: hidden;
    position: relative;
}

.ambulance-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ambulance-card-small:hover .ambulance-image img {
    transform: scale(1.05);
}

/* Card Content */
.ambulance-card-content {
    padding: 1rem;
}

.ambulance-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.driver-info-small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.pickup-areas-small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #28a745;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.service-badge-small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-badge-small.free-badge {
    background: #d4edda;
    color: #155724;
}

.service-badge-small.paid-badge {
    background: #fff3cd;
    color: #856404;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
    color: white;
    text-decoration: none;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    color: #212529;
    text-decoration: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    color: white;
    text-decoration: none;
}

/* Emergency Section */
.emergency-section {
    margin-top: 3rem;
}

.emergency-card {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.emergency-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.emergency-number {
    display: inline-block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.emergency-number:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

/* No Ambulances */
.no-ambulances {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-ambulances i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close, .close-warning {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.close:hover, .close-warning:hover {
    color: #000;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.text-warning {
    color: #856404;
}

/* Detailed Modal Content */
.modal-ambulance-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.modal-ambulance-image {
    border-radius: 8px;
    overflow: hidden;
}

.modal-ambulance-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.modal-ambulance-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.modal-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.modal-info-row i {
    color: #007bff;
    width: 20px;
}

.modal-vehicle-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.modal-vehicle-type {
    background: #e3f2fd;
    color: #1565c0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.modal-location-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.modal-location-tag {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.modal-phone-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.modal-phone-link {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.modal-phone-link:hover {
    background: #1e7e34;
    color: white;
    text-decoration: none;
}

.modal-pricing {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.modal-pricing h4 {
    margin-bottom: 0.75rem;
    color: #495057;
}

.modal-price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.modal-price-row:last-child {
    border-bottom: none;
}

.modal-price {
    font-weight: 600;
    color: #28a745;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ambulance-title {
        font-size: 2rem;
    }
    
    .ambulance-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .card-actions {
        justify-content: center;
    }
    
    .emergency-number {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    .modal-ambulance-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .ambulance-header {
        padding: 2rem 0;
    }
    
    .ambulance-title {
        font-size: 1.5rem;
    }
    
    .search-filter-section {
        padding: 1rem;
    }
    
    .ambulance-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1rem;
    }
    
    .card-actions {
        flex-direction: column;
    }
}