/**
 * Service Card Styles
 *
 * @package Modex
 */

/* Services Grid Layout */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* Column-specific grid layouts */
.services-grid-1 {
    grid-template-columns: 1fr;
    max-width: 592px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.services-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.services-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Admin Info for Services */
.service-admin-info {
    position: relative;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 12px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    z-index: 10;
}

.service-id {
    font-weight: bold;
    color: #495057;
}

.service-permalink,
.service-edit-link {
    color: #152FBF;
    text-decoration: none;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
}

.service-permalink i,
.service-edit-link i {
    margin-right: 4px;
}

.service-permalink:hover,
.service-edit-link:hover {
    color: #FFCD11;
    text-decoration: underline;
}

/* Home Service Card */
.home-service-card {
    width: 100%;
    max-width: 592px;
    border-radius: 8px;
    background-color: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    box-sizing: border-box;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
}

.home-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.home-card-description {
    width: 100%;
    max-width: 544px;
    padding: 12px 16px 0;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 22px;
    color: #4B5563;
    margin-bottom: 0;
}

.home-image-container {
    width: 100%;
    height: 256px;
    overflow: hidden;
    position: relative;
}

.home-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.home-image-overlay {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0));
    z-index: 1;
}

.home-icon {
    width: 48px;
    height: 48px;
    position: absolute;
    top: 16px;
    left: 16px;
    border-radius: 8px;
    z-index: 2;
}

.home-card-title-container {
    width: calc(100% - 32px);
    position: absolute;
    right: 16px;
    bottom: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0 0 8px;
    box-sizing: border-box;
    z-index: 3;
}

.home-card-title {
    width: 100%;
    line-height: 32px;
    font-weight: 900;
    font-size: 24px;
    color: #fff;
    margin: 0;
}

.home-features-container {
    width: 100%;
    max-width: 544px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    font-size: 15px;
    color: #374151;
    padding: 12px 16px 0;
    box-sizing: border-box;
    flex: 1 0 auto;
    margin-bottom: 16px;
}

.home-feature-item {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

.home-feature-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.home-feature-text {
    padding: 0 0 0 8px;
    line-height: 20px;
    font-weight: 500;
}

.home-learn-more-btn {
    display: inline-block;
    background-color: #FFCD11;
    color: #152FBF;
    font-weight: 700;
    text-align: center;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    width: calc(100% - 32px);
    max-width: 544px;
    box-sizing: border-box;
    margin: auto 16px 16px;
    align-self: flex-end;
    margin-top: auto;
    font-size: 15px;
}

.home-learn-more-btn:hover {
    background-color: #F2CE16;
    color: #0F2299;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.home-check-icon {
    color: #FFCD11;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .home-service-card {
        max-width: 100%;
    }
    
    .home-image-container {
        height: 200px;
    }
    
    .home-card-title {
        font-size: 20px;
        line-height: 28px;
    }
    
    .home-features-container {
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .home-image-container {
        height: 180px;
    }
    
    .home-icon {
        width: 40px;
        height: 40px;
    }
    
    .home-features-container {
        gap: 8px;
    }
    
    .home-feature-text {
        font-size: 14px;
    }
    
    .home-card-description {
        font-size: 14px;
        line-height: 20px;
    }
    
    .home-learn-more-btn {
        padding: 10px 20px;
    }
}
