/* ========================================
   SERVICE CARDS - MOBILE FRIENDLY LAYOUT
   ======================================== */

.service-cards-container {
    position: relative;
    width: 100%;
}

.login-required-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
    font-size: 1.1rem;
}

.login-required-message i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
    display: block;
}

/* Search Box */
.service-search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.service-search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.service-search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.service-search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

/* Service Cards Grid */
.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

/* Individual Service Card */
.service-card-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.service-card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.service-card-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.service-card-item:hover::before {
    transform: scaleY(1);
}

.service-card-item.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.service-card-item.selected::before {
    transform: scaleY(1);
}

.service-card-item.hidden {
    display: none;
}

/* Service Card Icon */
.service-card-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.service-card-item:hover .service-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card-item.selected .service-card-icon {
    background: linear-gradient(135deg, #764ba2, #667eea);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Service Card Content */
.service-card-content {
    flex: 1;
    min-width: 0;
}

.service-card-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.service-card-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #7f8c8d;
    line-height: 1.4;
}

.service-card-item.selected .service-card-content h4 {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .service-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .service-card-item {
        padding: 1rem;
    }

    .service-card-icon {
        width: 45px;
        height: 45px;
        min-width: 45px;
        font-size: 1.3rem;
    }

    .service-card-content h4 {
        font-size: 0.95rem;
    }

    .service-card-content p {
        font-size: 0.8rem;
    }

    .service-search-box input {
        padding: 10px 40px 10px 12px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .service-cards-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .service-card-item {
        padding: 0.875rem;
        gap: 0.875rem;
    }

    .service-card-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.2rem;
        border-radius: 10px;
    }

    .service-card-content h4 {
        font-size: 0.9rem;
    }

    .service-card-content p {
        font-size: 0.75rem;
    }

    .service-search-box {
        margin-bottom: 1rem;
    }

    .service-search-box input {
        padding: 9px 38px 9px 10px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .service-search-box i {
        right: 12px;
        font-size: 0.9rem;
    }

    .login-required-message {
        padding: 2rem 1rem;
        font-size: 1rem;
    }

    .login-required-message i {
        font-size: 2.5rem;
    }
}

/* Animation for cards on load */
.service-card-item {
    animation: fadeInUp 0.4s ease-out backwards;
}

.service-card-item:nth-child(1) { animation-delay: 0.05s; }
.service-card-item:nth-child(2) { animation-delay: 0.1s; }
.service-card-item:nth-child(3) { animation-delay: 0.15s; }
.service-card-item:nth-child(4) { animation-delay: 0.2s; }
.service-card-item:nth-child(5) { animation-delay: 0.25s; }
.service-card-item:nth-child(6) { animation-delay: 0.3s; }
.service-card-item:nth-child(7) { animation-delay: 0.35s; }
.service-card-item:nth-child(8) { animation-delay: 0.4s; }
.service-card-item:nth-child(9) { animation-delay: 0.45s; }
.service-card-item:nth-child(10) { animation-delay: 0.5s; }
.service-card-item:nth-child(11) { animation-delay: 0.55s; }
.service-card-item:nth-child(12) { animation-delay: 0.6s; }
.service-card-item:nth-child(13) { animation-delay: 0.65s; }
.service-card-item:nth-child(14) { animation-delay: 0.7s; }
.service-card-item:nth-child(15) { animation-delay: 0.75s; }
.service-card-item:nth-child(16) { animation-delay: 0.8s; }
.service-card-item:nth-child(17) { animation-delay: 0.85s; }
.service-card-item:nth-child(18) { animation-delay: 0.9s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility improvements */
.service-card-item:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.service-card-item:focus:not(:focus-visible) {
    outline: none;
}

/* Smooth scrolling for search results */
.service-cards-grid {
    scroll-behavior: smooth;
}
