﻿
:root {
    --primary: #14b8a6;
    --primary-light: #5eead4;
    --primary-soft: #99f6e4;
    --primary-dark: #0f766e;
    --primary-darker: #134e4a;
    --accent-teal: #2dd4bf;
    --accent-emerald: #10b981;
    --accent-cyan: #06b6d4;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #0f172a;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
    --gradient-soft: linear-gradient(135deg, #d1fae5 0%, #ccfbf1 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 0 30px rgba(20, 184, 166, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Almarai', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

    .animated-bg::before,
    .animated-bg::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        filter: blur(80px);
        opacity: 0.3;
        animation: float 15s infinite ease-in-out;
    }

    .animated-bg::before {
        width: 600px;
        height: 600px;
        background: var(--gradient-primary);
        top: -200px;
        right: -200px;
        animation-delay: 0s;
    }

    .animated-bg::after {
        width: 500px;
        height: 500px;
        background: var(--accent-cyan);
        bottom: -150px;
        left: -150px;
        animation-delay: 7s;
    }

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* Header Styles */
.header-section {
    padding: 100px 0 60px;
    position: relative;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: slideInDown 0.8s ease-out;
    padding:10px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search and Filter Section */
.search-filter-section {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

    .search-filter-section::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 4px;
        background: var(--gradient-primary);
        animation: shimmer 2s infinite;
    }

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.search-box {
    position: relative;
}

.search-input {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem 3rem 1rem 1.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

    .search-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
        background: white;
        outline: none;
    }

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 1.3rem;
    pointer-events: none;
}

.filter-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

    .filter-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-xl), var(--shadow-glow);
    }

.dropdown-select {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    background: var(--bg-light);
    transition: all 0.3s ease;
}

    .dropdown-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
        outline: none;
    }

/* Doctor Card Styles */
.doctor-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    height: 100%;
}

    .doctor-card::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: var(--gradient-soft);
        opacity: 0;
        transition: opacity 0.4s ease;
        z-index: 0;
    }

    .doctor-card:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: var(--shadow-xl), var(--shadow-glow);
        border-color: var(--primary-light);
    }

        .doctor-card:hover::before {
            opacity: 1;
        }

    .doctor-card > * {
        position: relative;
        z-index: 1;
    }

.doctor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.doctor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
    position: relative;
}

    .doctor-avatar::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        border: 3px solid var(--primary-light);
        animation: ripple 1.5s infinite;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.doctor-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.specialty-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.doctor-info {
    margin: 1.5rem 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    color: var(--text-gray);
    font-size: 1rem;
}

.info-icon {
    color: var(--primary);
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gradient-soft);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.price-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.availability-badge {
    background: var(--accent-emerald);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.availability-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.btn-view-profile {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn-view-profile:hover {
        background: var(--primary);
        color: white;
        transform: translateX(-5px);
    }

.btn-book {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

    .btn-book::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .btn-book:hover::before {
        width: 300px;
        height: 300px;
    }

    .btn-book:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-xl), var(--shadow-glow);
    }

    .btn-book span {
        position: relative;
        z-index: 1;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .search-filter-section {
        padding: 1.5rem;
    }

    .doctor-card {
        padding: 1.5rem;
    }

    .filter-btn {
        width: 100%;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.8rem;
    }

    .doctor-name {
        font-size: 1.2rem;
    }

    .price {
        font-size: 1.5rem;
    }
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

    .loading-overlay.hidden {
        opacity: 0;
        pointer-events: none;
    }

.loader {
    width: 80px;
    height: 80px;
    border: 8px solid var(--primary-soft);
    border-top: 8px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.modern-pagination {
    background: var(--bg-white);
    padding: 12px 18px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
}

.modern-pagination .page-item {
    margin: 0 6px;
}

    .modern-pagination .page-link {
        border: none;
        background: transparent;
        color: var(--text-dark);
        font-weight: 600;
        padding: 10px 18px;
        border-radius: 14px;
        position: relative;
        overflow: hidden;
        transition: transform 0.35s cubic-bezier(.4,2,.6,1), box-shadow 0.35s ease, background 0.35s ease, color 0.35s ease;
    }

        .modern-pagination .page-link:hover {
            background: var(--gradient-soft);
            color: var(--primary-dark);
            transform: translateY(-6px) scale(1.08);
            box-shadow: 0 12px 30px rgba(20, 184, 166, 0.35);
        }

        .modern-pagination .page-link:active {
            transform: scale(0.92);
        }

    .modern-pagination .active .page-link {
        background: var(--gradient-primary);
        color: white !important;
        box-shadow: 0 15px 40px rgba(20, 184, 166, 0.45);
        transform: scale(1.1);
    }

    .modern-pagination .active .page-link {
        animation: glowPulse 2s infinite ease-in-out;
    }

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 15px rgba(20, 184, 166, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(20, 184, 166, 0.6);
    }

    100% {
        box-shadow: 0 0 15px rgba(20, 184, 166, 0.3);
    }
}
/* ===== Grid Smooth Transition ===== */

/*.doctors-grid-wrapper {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.4,2,.6,1);
}*/

    /* عند الخروج */
    /*.doctors-grid-wrapper.fade-out {
        opacity: 0;
        transform: translateY(20px);
    }*/

    /* عند الدخول */
    /*.doctors-grid-wrapper.fade-in {
        opacity: 0;
        transform: translateY(20px);
        animation: gridFadeIn 0.6s forwards ease;
    }

@keyframes gridFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}*/
/* Fade animation for grid */
/*#doctorsGrid {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    #doctorsGrid.fade-in {
        opacity: 1;
        transform: translateY(0);
    }

    #doctorsGrid.fade-out {
        opacity: 0;
        transform: translateY(10px);
    }*/
