:root {
    --primary: #194a61; /* Dark Teal extracted for medical theme */
    --primary-light: #eaf1f5;
    --secondary: #c9a050; /* Golden extracted for the brand */
    --text-dark: #2d3748;
    --text-muted: #718096;
    --bg-color: #f7fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    text-decoration: none !important;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(255, 94, 98, 0.3);
}

.btn-primary:hover {
    background-color: #e0484c;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Header */
.app-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
}

.logo span {
    color: var(--secondary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

nav a:hover, nav a.active {
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    margin-top: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, #1a6b9c 100%);
    border-radius: 20px;
    padding: 60px 40px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.search-box {
    background-color: var(--white);
    padding: 25px;
    border-radius: 16px;
    display: flex;
    gap: 20px;
    box-shadow: var(--shadow);
    align-items: flex-end;
}

.search-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.search-group label {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.search-group select,
.search-group input {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
    background-color: var(--bg-color);
}

.search-group select:focus,
.search-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 75, 120, 0.1);
}

#search-btn {
    padding: 14px 40px;
    height: 52px;
}

/* Doctors List */
.doctors-list {
    margin-top: 60px;
    margin-bottom: 60px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.list-header h3 {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

.sort-box {
    display: flex;
    align-items: center;
}

.sort-box select {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-inline-start: 10px;
    background: var(--white);
    outline: none;
    font-weight: 500;
    color: var(--text-dark);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
}

/* Card Design */
.doctor-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    opacity: 0;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-header {
    display: flex;
    padding: 20px;
    gap: 15px;
    border-bottom: 1px solid var(--bg-color);
}

.doctor-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
}

.doctor-info {
    flex: 1;
}

.doctor-name {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 5px;
    font-weight: 700;
}

.doctor-specialty {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.doctor-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.9rem;
}

.rating-count {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8rem;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.icon {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.appointments {
    background-color: var(--primary-light);
    border-radius: 12px;
    padding: 15px;
    margin-top: auto;
}

.appointments-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.slots {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.slot {
    background: var(--white);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.slot:hover {
    background: var(--primary);
    color: var(--white);
}

.card-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafbfc;
}

.price {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-book {
    background-color: var(--secondary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.btn-book:hover {
    background-color: #e0484c;
    box-shadow: 0 4px 14px rgba(255, 94, 98, 0.3);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.doctor-card.animate {
    animation: fadeIn 0.4s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .app-header .container {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        font-size: 0.9rem;
    }
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-content h2 {
        font-size: 2rem;
    }
    .card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .cards-container {
        grid-template-columns: 1fr;
    }
}
