/* ============================================
   SERVICES PAGE - DEDICATED STYLES
   ============================================ */

/* Page Hero Section */
.page-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 50px 0 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb svg {
    opacity: 0.6;
}

.breadcrumb span {
    color: white;
    font-weight: 500;
}

.page-title {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
}

/* Services Content Layout */
.services-page-content {
    padding: 30px 0;
    background: var(--bg-light);
    min-height: 60vh;
}

.services-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    align-items: start;
}

/* Filter Toggle Button (Mobile/Tablet) */
.filter-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-toggle-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-toggle-btn svg {
    flex-shrink: 0;
}

/* Filters Sidebar (Desktop) */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
}

.filters-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-clear-filters {
    padding: 6px 12px;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear-filters:hover {
    background: #e5e7eb;
    color: #111827;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-search {
    position: relative;
    margin-bottom: 20px;
}

.filter-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.filter-search input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-select {
    width: 100%;
    padding: 10px 32px 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="%239ca3af" stroke-width="2" stroke-linecap="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Services Main Content */
.services-main {
    min-width: 0;
}

.services-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.results-info p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.results-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-wrapper label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.sort-wrapper select {
    padding: 8px 32px 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="%239ca3af" stroke-width="2" stroke-linecap="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.sort-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Service Card - Compact & Square */
.service-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Square Service Image */
.service-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f3f4f6;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.08);
}

.service-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    z-index: 5;
}

.service-badge.featured {
    background: var(--accent-color);
}

/* Compact Service Content */
.service-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-description {
    color: var(--text-light);
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.feature {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-light);
    background: var(--bg-gray);
    padding: 3px 8px;
    border-radius: 4px;
}

.service-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

.service-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-service {
    background: var(--primary-color);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-service:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Load More */
.load-more-container {
    text-align: center;
    padding: 20px 0;
}

.btn-large {
    padding: 12px 28px;
    font-size: 15px;
    min-width: 200px;
}

/* Loading State */
.loading-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    color: #666;
    font-size: 15px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-results svg {
    color: #d1d5db;
    margin-bottom: 15px;
}

.no-results h3 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.no-results p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 15px;
}

/* Filter Bottom Sheet (Mobile/Tablet) */
.filter-bottom-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.filter-bottom-sheet.active {
    transform: translateY(0);
}

.filter-sheet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-sheet-overlay.active {
    opacity: 1;
}

.filter-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 2px solid #f3f4f6;
}

.filter-sheet-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.filter-sheet-close {
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-sheet-close:hover {
    background: #e5e7eb;
}

.filter-sheet-content {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 140px);
}

.filter-sheet-footer {
    padding: 15px 20px;
    border-top: 2px solid #f3f4f6;
    display: flex;
    gap: 10px;
}

.filter-sheet-footer button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-apply-filters {
    background: var(--primary-color);
    color: white;
}

.btn-apply-filters:hover {
    background: var(--primary-dark);
}

.btn-reset-filters {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-reset-filters:hover {
    background: #e5e7eb;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .services-layout {
        grid-template-columns: 260px 1fr;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 992px) {
    .page-title {
        font-size: 32px;
    }
    
    /* Switch to mobile filter view */
    .services-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        display: none;
    }
    
    .filter-toggle-btn {
        display: flex;
    }
    
    .filter-bottom-sheet,
    .filter-sheet-overlay {
        display: block;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 40px 0 30px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .page-subtitle {
        font-size: 15px;
    }
    
    .services-page-content {
        padding: 20px 0;
    }
    
    .services-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 15px;
    }
    
    .sort-wrapper {
        justify-content: space-between;
    }
    
    .sort-wrapper select {
        flex: 1;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }
    
    .service-content {
        padding: 10px;
    }
    
    .service-title {
        font-size: 15px;
    }
    
    .service-description {
        font-size: 12px;
    }
    
    .service-price {
        font-size: 18px;
    }
    
    .btn-service {
        padding: 7px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 35px 0 25px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .breadcrumb {
        font-size: 13px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .service-card {
        border-radius: 8px;
    }
    
    .service-content {
        padding: 8px;
    }
    
    .service-badge {
        top: 6px;
        right: 6px;
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .service-title {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .service-description {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .service-features {
        gap: 4px;
        margin-bottom: 8px;
    }
    
    .feature {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .service-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .service-price {
        font-size: 16px;
    }
    
    .btn-service {
        justify-content: center;
        padding: 8px;
    }
    
    .filter-sheet-content {
        padding: 15px;
    }
    
    #load-more-btn {
        min-width: 100%;
    }
}

/* Landscape Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .page-hero {
        padding: 40px 0 30px;
    }
}