/* 
   Services Page Styles
   - Imports & Variables
   - Animations & Backgrounds
   - Hero Section
   - Search & Filters
   - Service Cards
   - Empty States & Pagination
   - Responsive Design
*/

/* =========================================
   1. IMPORTS & BASE SETUP
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================================
   2. CSS VARIABLES
   ========================================= */
:root {
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --secondary: #3b82f6;
    --accent: #22d3ee;
    --success: #10b981;
    --warning: #fbbf24;
    --card-bg: rgba(15, 23, 42, 0.85);
    --card-border: rgba(139, 92, 246, 0.25);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.6);
}

/* =========================================
   3. ANIMATIONS
   ========================================= */
@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(50px, -50px) rotate(120deg); }
    66% { transform: translate(-50px, 50px) rotate(240deg); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================
   4. BACKGROUND & LAYOUT
   ========================================= */
body {
    background: linear-gradient(135deg, #020617 0%, #1e1b4b 40%, #1e293b 70%, #020617 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
}

.bg-animated {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-animated::before,
.bg-animated::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 20s ease-in-out infinite;
}

.bg-animated::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
    top: -10%;
    left: -10%;
}

.bg-animated::after {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    bottom: -15%;
    right: -15%;
    animation-delay: -10s;
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    z-index: 10;
    padding: 100px 0 40px;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.hero-subtitle-muted {
    color: rgba(255, 255, 255, 0.5);
}

.hero-subtitle-bright {
    color: #ffffff;
}

.gradient-text {
    background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 40%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 8s ease infinite;
}

.hero-description {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero-description-highlight {
    color: #ffffff;
    font-weight: 700;
}

/* =========================================
   6. SEARCH SECTION - ENHANCED
   ========================================= */
.search-section {
    max-width: 750px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 10;
}

.search-wrapper {
    position: relative;
    margin-bottom: 28px;
}

.search-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6, #06b6d4);
    border-radius: 24px;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.4s;
}

.search-wrapper:hover .search-glow,
.search-wrapper:focus-within .search-glow {
    opacity: 0.4;
}

.search-input {
    width: 100%;
    padding: 18px 64px 18px 56px !important;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 2px solid rgba(139, 92, 246, 0.35) !important;
    border-radius: 20px;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: rgba(139, 92, 246, 0.8) !important;
    background: rgba(15, 23, 42, 0.95) !important;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25) !important;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    pointer-events: none;
    transition: color 0.3s;
}

.search-wrapper:focus-within .search-icon {
    color: #a78bfa;
}

/* Clear Button */
.search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    color: #a78bfa;
    cursor: pointer;
    transition: all 0.3s;
}

.search-clear:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.search-input:not(:placeholder-shown) ~ .search-clear {
    display: flex;
}

/* =========================================
   7. CATEGORY FILTERS
   ========================================= */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.category-pill {
    position: relative;
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
}

.category-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #8b5cf6, #60a5fa);
    opacity: 0;
    transition: opacity 0.3s;
}

.category-pill:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.8);
    color: #ffffff;
    box-shadow: 0 10px 35px rgba(139, 92, 246, 0.5);
}

.category-pill:hover::before {
    opacity: 0.15;
}

.category-pill.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 12px 45px rgba(139, 92, 246, 0.7), 0 0 0 3px rgba(139, 92, 246, 0.2);
    transform: translateY(-4px);
}

.category-pill.active::before {
    opacity: 0;
}

.category-pill-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-info {
    text-align: center;
    margin: 32px 0;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

/* =========================================
   8. SERVICE CARDS - ENHANCED
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin: 48px 0;
}

.service-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

.service-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #a78bfa, #60a5fa, #22d3ee);
    border-radius: 24px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.5s;
}

.service-card:hover {
    transform: translateY(-12px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 35px 70px rgba(139, 92, 246, 0.65);
}

.service-card:hover::before {
    opacity: 0.4;
}

/* Card Image */
.service-image-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s;
}

.service-card:hover .service-image {
    transform: scale(1.15);
}

.service-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.6) 50%, rgba(15, 23, 42, 0.98) 100%);
}

/* Card Badges */
.service-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.badge {
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-category {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: 1px solid rgba(167, 139, 250, 0.5);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.badge-premium {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #ea580c);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #0f172a;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.7);
}

/* Card Content */
.service-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.3;
    transition: all 0.3s;
}

.service-card:hover .service-title {
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-description {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 20px;
    flex: 1;
}

.service-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.meta-item .material-symbols-outlined {
    font-size: 18px;
    color: #a78bfa;
}

/* Card Footer */
.service-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.service-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.price-value {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, #34d399, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-contact {
    font-size: 14px;
    font-weight: 700;
    color: #a78bfa;
}

.btn-view {
    padding: 14px 28px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1, #3b82f6);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.7);
}

/* =========================================
   9. EMPTY STATE - ENHANCED
   ========================================= */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 32px;
    max-width: 600px;
    margin: 48px auto;
    display: none;
}

.empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.25));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-title {
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 12px;
}

.empty-description {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 32px;
}

.empty-description strong {
    color: #a78bfa;
    font-weight: 700;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 40px;
}

.loader {
    width: 64px;
    height: 64px;
    border: 5px solid rgba(139, 92, 246, 0.25);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

/* =========================================
   10. PAGINATION
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 64px 0 32px;
}

.page-btn {
    min-width: 48px;
    height: 48px;
    padding: 0 20px;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(139, 92, 246, 0.35);
    border-radius: 16px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #8b5cf6, #6366f1, #3b82f6);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.7);
}

.page-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #6366f1, #3b82f6);
    border-color: transparent;
    box-shadow: 0 10px 35px rgba(139, 92, 246, 0.8);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* =========================================
   11. SCROLL REVEAL
   ========================================= */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-delay-1 { transition-delay: 0.1s; }
.scroll-delay-2 { transition-delay: 0.2s; }

/* =========================================
   12. UTILITY CLASSES
   ========================================= */
.relative { position: relative; }
.z-10 { z-index: 10; }
.grid-full-width { grid-column: 1 / -1; }

/* =========================================
   13. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
    .hero-section { padding: 80px 0 30px; }
    .services-grid { grid-template-columns: 1fr; gap: 20px; }
    .category-pills { gap: 8px; }
    .category-pill { padding: 9px 18px; font-size: 12px; }
}

/* =========================================
   14. FOCUS & SELECTION
   ========================================= */
*:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

::selection {
    background: rgba(139, 92, 246, 0.3);
    color: #ffffff;
}