/* ==========================================
   Useful Services - Public Frontend Styles
   public/assets/css/useful-services.css
   ========================================== */

/* Page Header */
.useful-services-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.75rem;
}

.useful-services-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.25rem;
}

/* Sticky Sidebar */
.sticky-sidebar {
    position: sticky;
    top: 80px;
}

/* Search / Filter Card */
.svc-search-card {
    border-radius: 0.75rem;
    background: #fff;
}

/* Results count */
.svc-results-count {
    font-size: 0.85rem;
}

/* ---- Service Card ---- */
.useful-service-card {
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.useful-service-card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
    transform: translateY(-1px);
}

.svc-card-body {
    padding: 0;
}

/* Card image wrapper – fixed dimensions so the box never resizes with content */
.svc-card-img-wrap {
    width: 112px;
    min-width: 112px;
    height: 98px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
}

.svc-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder when no image */
.svc-card-placeholder {
    width: 112px;
    min-width: 112px;
    height: 98px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: #f0f4ff;
}

.svc-placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.65;
}

/* Card info section */
.svc-card-info {
    flex: 1;
    padding: 0.9rem 1rem;
}

.svc-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.3rem;
}

.svc-type-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    padding: 0.2em 0.6em;
    border-radius: 50rem;
    white-space: nowrap;
}

.svc-card-location {
    font-size: 0.82rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.svc-card-location i {
    width: 14px;
    text-align: center;
}

.svc-card-description {
    font-size: 0.82rem;
    color: #495057;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Contact links row */
.svc-contact-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.svc-contact-link {
    font-size: 0.82rem;
    color: #495057;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.15s;
}

.svc-contact-link:hover {
    color: #0d6efd;
}

.svc-contact-link.svc-phone:hover { color: #198754; }
.svc-contact-link.svc-email:hover { color: #dc3545; }
.svc-contact-link.svc-website { color: #0d6efd; }
.svc-contact-link.svc-website:hover { color: #0a58ca; }

.svc-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: #a0aab4;
    border: 1px solid #dde1e7;
    border-radius: 50rem;
    padding: 0.08rem 0.45rem;
    line-height: 1.55;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.svc-nav-btn:hover {
    color: #4b8fe8;
    border-color: #4b8fe8;
}
@media (max-width: 575px) {
    .svc-nav-btn { padding: 0.1rem 0.4rem; font-size: 0.7rem; }
}

/* Empty state */
.svc-empty-state i {
    display: block;
    margin: 0 auto;
}

/* ----- Sidebar ---- */
.useful-service-sidebar .list-group-item {
    border-left: 0;
    border-right: 0;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
}

.useful-service-sidebar .list-group-item a {
    color: #495057;
}

.useful-service-sidebar .list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.useful-service-sidebar .list-group-item.active a,
.useful-service-sidebar .list-group-item.active a i {
    color: #fff !important;
}

.useful-service-sidebar .list-group-item:first-child {
    border-top: 0;
}

.useful-service-sidebar .badge {
    font-size: 0.72rem;
}

/* ---- Responsive breakpoints ---- */
@media (max-width: 575px) {
    .svc-card-img-wrap,
    .svc-card-placeholder {
        width: 80px;
        min-width: 80px;
        height: 80px;
    }

    .svc-card-info {
        padding: 0.6rem 0.75rem;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .svc-card-img-wrap,
    .svc-card-placeholder {
        width: 90px;
        min-width: 90px;
        height: 98px;
    }
}

/* =====================================================
   Mobile / Tablet Categories Bottom-Slide Modal
   ===================================================== */
.svc-categories-bottom-modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    pointer-events: none;
    visibility: hidden;
}

.svc-categories-bottom-modal.show {
    pointer-events: auto;
    visibility: visible;
}

.svc-categories-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.svc-categories-bottom-modal.show .svc-categories-modal-overlay {
    opacity: 1;
}

.svc-categories-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 1rem 1rem 0 0;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.svc-categories-bottom-modal.show .svc-categories-modal-content {
    transform: translateY(0);
}

.svc-categories-modal-header {
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.svc-categories-modal-body .list-group-item {
    padding: 0.65rem 0.5rem;
    font-size: 0.95rem;
}

.svc-categories-modal-body .list-group-item a {
    color: #212529;
}

.svc-categories-modal-body .badge {
    font-size: 0.72rem;
}
