/* ========================================
   SERVICE CARDS COMPONENT
   ======================================== */

.icb-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.icb-services-grid::-webkit-scrollbar {
    height: 8px;
}

.icb-services-grid::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 4px;
}

.icb-services-grid::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.icb-services-grid::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

@media (max-width: 1023px) {
    .icb-services-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 12px;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.icb-service-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.icb-service-card[style*="background-image"] {
    background-color: transparent;
}

.icb-service-card[style*="background-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(100%) brightness(0.75);
    z-index: 0;
    transition: filter 0.3s ease;
}

.icb-service-card[style*="background-image"]:hover::before {
    filter: grayscale(0%);
}

.icb-service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.icb-service-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.icb-service-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.icb-service-card.selected {
    border-color: #3b82f6;
    background: #f0f9ff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.icb-service-card h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.icb-service-card[style*="background-image"] h4 {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.icb-service-description-container {
    margin: 8px 0 12px;
}

.icb-service-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 6px;
}

.icb-service-card[style*="background-image"] .icb-service-description {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.icb-service-card[style*="background-image"] .icb-service-details {
    color: white;
}

.icb-service-card[style*="background-image"] .icb-service-duration,
.icb-service-card[style*="background-image"] .icb-service-price-eur {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* Admin Image Upload Styles */
.icb-image-upload-container {
    margin-top: 10px;
}

.icb-image-preview {
    margin-bottom: 10px;
}

.icb-image-preview img {
    border: 1px solid #ddd;
    border-radius: 4px;
}

.icb-remove-image {
    margin-top: 8px;
    color: #dc3545;
    border-color: #dc3545;
}

.icb-remove-image:hover {
    background-color: #dc3545;
    color: white;
}

.icb-upload-image {
    background-color: #007cba;
    color: white;
    border-color: #007cba;
}

.icb-upload-image:hover {
    background-color: #005a87;
    border-color: #005a87;
}

.icb-description-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none !important;
    border: none !important;
    color: #007cba !important;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.icb-description-toggle:hover {
    color: #007cba !important;
}

.icb-service-card[style*="background-image"] .icb-description-toggle {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.icb-service-card[style*="background-image"] .icb-description-toggle:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.icb-toggle-text {
    font-size: 12px;
}

.icb-toggle-icon {
    display: none;
}

.icb-service-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.icb-service-duration {
    color: #666;
    font-size: 14px;
}

.icb-service-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.icb-service-price-eur {
    font-size: 15px;
    font-weight: 700;
    color: #059669;
}

.icb-no-services {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.icb-no-services h4 {
    margin: 0 0 10px 0;
    color: #6b7280;
    font-size: 18px;
}

.icb-no-services p {
    margin: 0;
    color: #9ca3af;
    font-size: 14px;
}

/* Compact service cards below desktop */
@media (max-width: 1023px) {
    .icb-service-card {
        padding: 12px 14px;
        border-radius: 10px;
        border-width: 1px;
        min-height: 0;
    }

    .icb-service-card:hover {
        box-shadow: 0 2px 10px rgba(59, 130, 246, 0.12);
    }

    .icb-service-card.selected {
        box-shadow: 0 2px 10px rgba(59, 130, 246, 0.16);
    }

    .icb-service-card h4 {
        font-size: 15px;
        margin: 0 0 4px;
        line-height: 1.25;
    }

    .icb-service-description-container {
        margin: 0 0 8px;
    }

    .icb-service-description {
        font-size: 12px;
        line-height: 1.35;
        margin: 0 0 4px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        overflow: hidden;
    }

    .icb-service-description--expanded {
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    .icb-description-toggle {
        font-size: 11px;
        margin-top: 2px;
    }

    .icb-service-details {
        margin-top: 0;
    }

    .icb-service-duration,
    .icb-service-price-eur {
        font-size: 13px;
    }
}