/**
 * HRM Services Manager - Frontend Styles
 * Professional frontend styling for services display
 *
 * @package HRM_Services_Manager
 * @version 1.0.0
 */

/* ================================================
   BASE CONTAINER
   ================================================ */

.hrm-services-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.hrm-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ================================================
   SERVICE ITEM - Card Styling
   ================================================ */

/* Default styles - can be overridden by shortcode */
.hrm-services-container:not([class*="hrm-services-"]) .hrm-service-item {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hrm-service-item {
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hrm-service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    transition: height 0.3s ease;
}

.hrm-service-item:hover::before {
    height: 4px;
}

/* Featured Service */
.hrm-service-item.featured {
    background: #f6f9fc;
    border-color: #2271b1;
    border-width: 2px;
}

.hrm-service-item.featured::before {
    height: 4px;
}

/* Hover Effects */
.hrm-service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #2271b1;
}

/* ================================================
   SERVICE HEADER - Icon & Title
   ================================================ */

.hrm-service-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-top: 5px;
}

.hrm-service-icon {
    font-size: 36px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.hrm-service-item:hover .hrm-service-icon {
    transform: scale(1.1) rotate(5deg);
}

.hrm-service-title {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.4;
    flex: 1;
}

.hrm-service-item.featured .hrm-service-title {
    color: #135e96;
}

/* ================================================
   SERVICE CONTENT - Description
   ================================================ */

.hrm-service-content {
    margin-top: auto;
    font-size: 15px;
    color: #646970;
    line-height: 1.7;
}

.hrm-service-content p {
    margin: 0.75em 0;
}

.hrm-service-content p:first-child {
    margin-top: 0;
}

.hrm-service-content p:last-child {
    margin-bottom: 0;
}

.hrm-service-content ul,
.hrm-service-content ol {
    margin: 0.75em 0;
    padding-left: 1.5em;
}

.hrm-service-content li {
    margin: 0.5em 0;
}

/* ================================================
   NO SERVICES MESSAGE
   ================================================ */

.hrm-no-services {
    text-align: center;
    padding: 60px 20px;
    color: #646970;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dcdcde;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

/* Tablet - 2 columns */
@media (max-width: 1024px) {
    .hrm-services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .hrm-service-item {
        padding: 18px;
    }

    .hrm-service-icon {
        font-size: 32px;
    }

    .hrm-service-title {
        font-size: 18px;
    }

    .hrm-service-content {
        font-size: 14px;
    }
}

/* Mobile - 1 column */
@media (max-width: 640px) {
    .hrm-services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hrm-service-item {
        padding: 16px;
    }

    .hrm-service-icon {
        font-size: 28px;
    }

    .hrm-service-title {
        font-size: 17px;
    }

    .hrm-service-content {
        font-size: 14px;
    }

    .hrm-service-header {
        gap: 12px;
    }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */

.hrm-service-item:focus-within {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hrm-service-item,
    .hrm-service-icon,
    .hrm-service-item::before {
        transition: none;
    }

    .hrm-service-item:hover {
        transform: none;
    }

    .hrm-service-item:hover .hrm-service-icon {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .hrm-service-item {
        border-width: 2px;
        border-color: #000;
    }

    .hrm-service-item:hover {
        background: #fffbcc;
    }
}

/* Print Styles */
@media print {
    .hrm-services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hrm-service-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }

    .hrm-service-item::before {
        display: none;
    }

    .hrm-service-item:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ================================================
   DARK MODE SUPPORT (Future-proof)
   ================================================ */

@media (prefers-color-scheme: dark) {
    /* Only apply dark mode to services without specific shortcode style */
    .hrm-services-container:not([class*="hrm-services-"]) .hrm-service-item {
        background: #1d2327;
        border-color: #3c434a;
        color: #f0f0f1;
    }

    .hrm-services-container:not([class*="hrm-services-"]) .hrm-service-title {
        color: #f0f0f1;
    }

    .hrm-services-container:not([class*="hrm-services-"]) .hrm-service-content {
        color: #b5b9bd;
    }

    .hrm-services-container:not([class*="hrm-services-"]) .hrm-service-item:hover {
        background: #2c3338;
        border-color: #4f94d4;
    }

    .hrm-services-container:not([class*="hrm-services-"]) .hrm-no-services {
        background: #1d2327;
        border-color: #3c434a;
        color: #b5b9bd;
    }
}
