/**
 * Prime ENT Services Display - Main Stylesheet
 * Version: 1.0.0
 * Author: Dr. Prateek Porwal
 */

/* ==========================================================================
   Container & Wrapper
   ========================================================================== */

.pent-services-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* ==========================================================================
   Category Filter
   ========================================================================== */

.pent-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
}

.pent-filter-btn {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    color: #333;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pent-filter-btn:hover {
    background: #f8f8f8;
    border-color: #0066cc;
    color: #0066cc;
    transform: translateY(-2px);
}

.pent-filter-btn.active {
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    border-color: #0066cc;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

/* ==========================================================================
   Services Grid Layout
   ========================================================================== */

.pent-services-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

/* Grid Columns */
.pent-columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
}

.pent-columns-3 {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.pent-columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .pent-services-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .pent-services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ==========================================================================
   Service Card
   ========================================================================== */

.pent-service-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.pent-service-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Service Image */
.pent-service-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.pent-service-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.pent-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pent-service-card:hover .pent-service-image img {
    transform: scale(1.08);
}

/* Category Badge */
.pent-service-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 102, 204, 0.95);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Service Content */
.pent-service-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Service Title */
.pent-service-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
    color: #1a1a1a;
}

.pent-service-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.pent-service-title a:hover {
    color: #0066cc;
}

/* Service Excerpt */
.pent-service-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Service Meta */
.pent-service-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.pent-service-categories {
    font-size: 13px;
    color: #0066cc;
    font-weight: 600;
}

/* Service Footer */
.pent-service-footer {
    margin-top: auto;
}

.pent-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.pent-read-more-btn:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003875 100%);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.pent-read-more-btn svg {
    transition: transform 0.3s ease;
}

.pent-read-more-btn:hover svg {
    transform: translateX(3px);
}

/* ==========================================================================
   Load More Button
   ========================================================================== */

.pent-load-more-wrapper {
    text-align: center;
    margin: 40px 0;
}

.pent-load-more-btn {
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
    color: #ffffff;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.pent-load-more-btn:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003875 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.pent-load-more-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pent-load-more-btn.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: pent-spinner 0.8s linear infinite;
}

@keyframes pent-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   No Services Found
   ========================================================================== */

.pent-no-services {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.pent-no-services p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   List Layout (Alternative)
   ========================================================================== */

.pent-layout-list .pent-services-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pent-layout-list .pent-service-card {
    flex-direction: row;
    max-width: 100%;
}

.pent-layout-list .pent-service-image {
    width: 300px;
    height: auto;
    min-height: 200px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .pent-layout-list .pent-service-card {
        flex-direction: column;
    }
    
    .pent-layout-list .pent-service-image {
        width: 100%;
        height: 200px;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.pent-filter-btn:focus,
.pent-read-more-btn:focus,
.pent-load-more-btn:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* Screen reader only text */
.pent-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .pent-category-filter,
    .pent-load-more-wrapper {
        display: none;
    }
    
    .pent-service-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .pent-services-grid {
        display: block;
    }
    
    .pent-service-card {
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.pent-services-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.pent-service-card.loading {
    animation: pent-pulse 1.5s ease-in-out infinite;
}

@keyframes pent-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ==========================================================================
   Responsive Typography
   ========================================================================== */

@media (max-width: 576px) {
    .pent-service-title {
        font-size: 18px;
    }
    
    .pent-service-excerpt {
        font-size: 14px;
    }
    
    .pent-filter-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* ==========================================================================
   High DPI / Retina Display Optimization
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .pent-service-card {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}

/* ==========================================================================
   Dark Mode Support (Optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .pent-service-card {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .pent-service-title,
    .pent-service-title a {
        color: #ffffff;
    }
    
    .pent-service-excerpt {
        color: #b0b0b0;
    }
    
    .pent-filter-btn {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .pent-filter-btn:hover {
        background: #333;
    }
}
