/* ========================================
   SERVICES PAGE - PREMIUM ENHANCEMENTS
   ======================================== */

/* Page Hero */
.services-page .page-hero {
    margin-bottom: 40px;
}

.services-page .page-hero .title {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
}

.services-page .page-hero .desc {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Testimonials Section */
.services-testimonials {
    margin-bottom: 32px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.testimonial-item {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.3s ease;
}

.testimonial-item:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.testimonial-title {
    color: var(--accent-blue);
    font-size: 1rem;
    margin-bottom: 8px;
}

.testimonial-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Filters Section */
.services-filters {
    margin-bottom: 32px;
}

.services-filters .card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.services-filters .dropdown-toggle {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.services-filters .dropdown-toggle:hover,
.services-filters .dropdown-toggle:focus {
    background: var(--bg-card);
    border-color: var(--border-accent);
}

.services-filters .dropdown {
    position: relative !important;
}

.services-filters .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 0.125rem !important;
    z-index: 1000 !important;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    transform: none !important;
    will-change: transform;
}

[dir="rtl"] .services-filters .dropdown-menu {
    left: auto !important;
    right: 0 !important;
}

.services-filters .dropdown-menu.show {
    display: block !important;
}

.services-filters .dropdown-item {
    color: var(--text-secondary);
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.services-filters .dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

/* Search Input Group */
.services-filters .input-group {
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.services-filters .form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-right: none;
    color: var(--text-main);
    padding: 12px 20px;
}

.services-filters .form-control:focus {
    background: var(--bg-card);
    border-color: var(--btn-primary);
    box-shadow: none;
}

.services-filters .input-group-append .btn {
    padding: 12px 24px;
    border: 1px solid var(--btn-primary);
}

/* Services Table */
.services-page .table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow: hidden;
}

.services-page #service-table {
    width: 100%;
    margin-bottom: 0;
}

.services-page #service-table thead {
    background: rgba(37, 99, 235, 0.05);
}

.services-page #service-table thead th {
    padding: 16px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-subtle);
    text-align: left;
}

.services-page #service-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.services-page #service-table tbody tr:hover {
    background: var(--bg-hover);
}

.services-page #service-table tbody td {
    padding: 16px 12px;
    color: var(--text-main);
    font-size: 0.9rem;
    vertical-align: middle;
}

/* Category Headers */
.services-list-category-title {
    background: rgba(37, 99, 235, 0.05) !important;
}

.category-header {
    background: transparent;
    color: var(--accent-blue);
    font-size: 1.05rem;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px;
}

/* Service Name */
.service-name {
    max-width: 400px;
    color: var(--text-main);
    font-weight: 600;
}

/* Price Badge - Subtle Dark Mode */
.services-page .badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

/* View Button */
.services-page .btn-outline-primary {
    padding: 6px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.services-page .btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* Modal Styling */
.services-page .modal {
    z-index: 1055 !important;
    overflow-y: auto;
}

.services-page .modal-backdrop {
    z-index: 1050 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.services-page .modal-dialog {
    margin: 1.75rem auto;
    max-height: calc(100vh - 3.5rem);
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

.services-page .modal-dialog-scrollable {
    max-height: calc(100vh - 3.5rem);
}

.services-page .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    max-height: calc(100vh - 3.5rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.services-page .modal-header {
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.services-page .modal-body {
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}

.services-page .modal-footer {
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

@media (max-width: 768px) {
    .services-page .modal-dialog {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
    
    .services-page .modal-content {
        max-height: calc(100vh - 1rem);
    }
    
    .services-page .modal-body {
        max-height: calc(100vh - 150px);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .services-page .page-hero .title {
        font-size: 2.25rem;
    }

    .services-page .page-hero .desc {
        font-size: 1rem;
    }

    /* Stack filter controls vertically on tablet */
    .services-filters .row>div {
        margin-bottom: 12px;
    }

    .services-filters .row>div:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .services-page .page-hero .title {
        font-size: 1.85rem;
    }

    .services-page .page-hero .desc {
        font-size: 0.95rem;
    }

    .services-page .page-hero .actions {
        flex-direction: column;
        width: 100%;
    }

    .services-page .page-hero .actions .btn {
        width: 100%;
    }

    /* Fix Search Input on Mobile */
    .services-filters .input-group {
        display: flex !important;
        flex-direction: row !important;
    }

    .services-filters .form-control {
        padding: 10px 14px;
        flex: 1;
    }

    .services-filters .input-group-append {
        display: flex;
    }

    .services-filters .input-group-append .btn {
        padding: 10px 18px;
        white-space: nowrap;
    }

    /* Make table scrollable on mobile */
    .services-page .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .services-page #service-table {
        min-width: 700px;
    }

    .services-page #service-table thead th,
    .services-page #service-table tbody td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }

    .service-name {
        max-width: 250px;
        font-size: 0.9rem;
    }

    .category-header {
        font-size: 0.95rem;
        padding: 12px;
    }

    .testimonial-item {
        padding: 16px;
    }

    .testimonial-title {
        font-size: 0.95rem;
    }

    .testimonial-text {
        font-size: 0.85rem;
    }
}

/* Loading State */
.services-page #service-table.loading {
    opacity: 0.6;
    pointer-events: none;
}

.services-page #service-table.loading tbody tr {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Copy Icon Hover */
.hover-white {
    transition: color 0.2s ease;
}

.hover-white:hover {
    color: white !important;
}

/* Alert Styling */
.services-page .alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
}

/* Platform Filter Buttons */
.platform-filters {
    margin-bottom: 24px;
}

.platform-filters .card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.platform-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.platform-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.platform-filter-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-accent);
    color: var(--text-main);
    transform: translateY(-2px);
}

.platform-filter-btn.active {
    background: var(--btn-primary);
    border-color: var(--btn-primary);
    color: white;
    box-shadow: var(--shadow-blue);
}

.platform-filter-btn i {
    font-size: 1.1rem;
}

@media (max-width: 576px) {
    .platform-filter-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .platform-filter-btn i {
        font-size: 1rem;
    }
}