* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #2a7de1;
    --secondary-color: #34c759;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* الهيدر */
header {
    background: linear-gradient(135deg, var(--primary-color), #1a5bb5);
    color: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 32px;
    margin-bottom: 5px;
}

.logo p {
    font-size: 16px;
    opacity: 0.9;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.doctor-signup-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
}
.doctor-signup-btn:hover{ background: rgba(255,255,255,0.06); }

.patient-signup-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
}
.patient-signup-btn:hover{ background: rgba(255,255,255,0.06); }

.doctor-greeting, .patient-greeting {
    color: white;
    font-weight: bold;
    display: inline-block;
}
.doctor-logout, .patient-logout {
    color: white;
    text-decoration: underline;
    cursor: pointer;
}

/* auth page styles */
.auth-shell { background: #fff; padding: 24px; border-radius: 8px; box-shadow: var(--shadow); margin: 40px auto; max-width: 720px; }
.auth-tabs { display:flex; gap:8px; justify-content:flex-start; margin-bottom:16px; }
.auth-tabs .tab { padding:8px 12px; border-radius:6px; background:var(--light-bg); border:1px solid var(--border-color); cursor:pointer; }
.auth-tabs .tab.active { background: var(--primary-color); color: #fff; border-color: transparent; }
.auth-area .auth-form { display:flex; flex-direction:column; gap:12px; }
.auth-row { display:flex; flex-direction:column; }
.auth-row label { margin-bottom:6px; color:#333; }
.auth-row input, .auth-row select, .auth-row textarea { padding:10px; border:1px solid var(--border-color); border-radius:6px; }
.auth-actions { display:flex; gap:10px; margin-top:8px; }
.btn-primary { background:var(--primary-color); color:#fff; border:none; padding:10px 14px; border-radius:6px; cursor:pointer; }
.btn-ghost { background:transparent; border:1px solid var(--border-color); padding:10px 14px; border-radius:6px; cursor:pointer; }
.form-error { color: var(--accent-color); padding:8px; border-radius:6px; background: rgba(255,107,107,0.06); }

/* language UI removed: Arabic-only site */

/* قسم البطل */
.hero {
    padding: 50px 0;
    text-align: center;
    background: var(--white);
}

.search-section {
    max-width: 900px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    margin-bottom: 25px;
}

.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

.search-box input {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px 0 0 8px;
    font-size: 16px;
}

.search-box button {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0 30px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.search-box button:hover {
    background: #2a9d46;
}

.filters {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.filters select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background: var(--white);
    min-width: 200px;
}

/* قسم الأطباء */
.doctors-section {
    padding: 50px 0;
    background: var(--light-bg);
}

.doctors-section h3 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.doctor-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.doctor-image {
    height: 200px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.doctor-info {
    padding: 20px;
}

.doctor-info h4 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.specialty {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

/* .location removed — location display was removed from templates */

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.stars {
    color: #ffc107;
    margin-left: 5px;
    font-size: 18px;
}

.rating-text {
    color: #666;
    font-size: 14px;
}

.doctor-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
}

.detail-item {
    color: #666;
}

.detail-value {
    color: var(--text-color);
    font-weight: bold;
}

.view-profile-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.view-profile-btn:hover {
    background: #1a5bb5;
}

/* الفوتر */
footer {
    background: #2c3e50;
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.footer-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box input {
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .search-box button {
        border-radius: 8px;
        padding: 15px;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filters select {
        width: 100%;
    }
    
    .doctors-grid {
        grid-template-columns: 1fr;
    }
    
    .doctor-card {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .logo p {
        font-size: 14px;
    }
    
    .doctors-section h3 {
        font-size: 28px;
    }
}

/* Main navigation styles */
.main-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
}
.nav-container { display:flex; align-items:center; justify-content:space-between; }
.nav-list { list-style:none; display:flex; gap:18px; align-items:center; }
.nav-link { color: var(--text-color); text-decoration:none; padding:14px 8px; display:inline-block; }
.nav-link:hover { background: var(--light-bg); border-radius:6px; }
.nav-toggle { display:none; background:transparent; border:none; font-size:22px; padding:8px 12px; cursor:pointer; }

@media (max-width: 768px) {
    .nav-list { display:none; flex-direction:column; gap:8px; padding:12px 0; }
    .nav-list.active { display:flex; }
    .nav-toggle { display:inline-block; }
    .nav-container { align-items:flex-start; }
}

/* Header title card user greeting */
.hero-card { background: linear-gradient(135deg, #2a7de1, #1a5bb5); color: #fff; padding: 28px 0; }
.hero-card .container { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.hero-card h1 { margin:0; font-size:28px; }
.hero-card p { margin:0; opacity:0.95; }
.user-greeting { text-align:left; min-width:200px; }
.user-greeting .name { font-weight:700; display:block; }
.signout-btn { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; padding:6px 10px; border-radius:6px; cursor:pointer; text-decoration:none; margin-top:6px; display:inline-block; }
.signout-btn:hover { background: rgba(255,255,255,0.06); }

/* About / Contact specific styles */
.info-section { background: var(--white); padding: 28px; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 20px; }
.two-col { display:grid; grid-template-columns: 1fr 320px; gap:20px; align-items:start; }
.services-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap:16px; }

/* Control panel / profile styles */
.panel { background: var(--white); padding:18px; border-radius:10px; box-shadow: var(--shadow); margin-bottom:20px; }
.profile-card .profile-grid { display:grid; grid-template-columns:140px 1fr; gap:18px; align-items:center; }
.profile-pic { width:140px; height:140px; border-radius:10px; overflow:hidden; background:linear-gradient(135deg,#f0f0f0,#e9eefc); display:flex; align-items:center; justify-content:center; font-size:48px; }
.profile-pic img { width:100%; height:100%; object-fit:cover; display:block; }
.pfp-empty { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:36px; color:#fff; background:var(--primary-color); }
.pfp-fallback { padding:8px; font-size:28px; }
.profile-info h2 { margin:0 0 8px 0; color:var(--primary-color); }
.profile-info p { margin:6px 0; color:var(--text-color); }
.auth-prompt .actions { display:flex; gap:10px; margin-top:12px; }
.auth-prompt .btn { display:inline-block; padding:10px 14px; border-radius:8px; text-decoration:none; color:#fff; background:var(--primary-color); }
.auth-prompt .btn + .btn { background:var(--secondary-color); }

@media (max-width: 720px){
    .profile-card .profile-grid { grid-template-columns: 1fr; text-align:center; }
    .user-greeting { text-align:center; }
}

/* Edit form & action buttons */
.profile-actions .btn { margin-right:8px; }
.btn { background:var(--primary-color); color:#fff; border:none; padding:8px 12px; border-radius:6px; cursor:pointer; }
.btn-ghost { background:transparent; border:1px solid var(--border-color); padding:8px 12px; border-radius:6px; }
.btn-danger { background:#ff4d4f; }
.edit-form label { display:block; margin:8px 0; }
.edit-form input, .edit-form textarea, .edit-form select { width:100%; padding:8px; border:1px solid var(--border-color); border-radius:6px; }
.edit-form textarea { min-height:80px; }
.service-card { background: var(--light-bg); padding:16px; border-radius:10px; border:1px solid var(--border-color); }
.service-card h4 { color: var(--primary-color); margin-bottom:8px; }
.team-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap:16px; }
.team-member { background:var(--white); text-align:center; padding:12px; border-radius:10px; box-shadow: var(--shadow); }
.team-member .avatar { font-size:40px; margin-bottom:8px; }
.contact-card { background: linear-gradient(135deg,#fff,#f7fbff); padding:16px; border-radius:10px; border:1px solid #e6f0ff; }
.contact-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.contact-list li { display:flex; gap:12px; align-items:center; }
.contact-form { display:flex; flex-direction:column; gap:10px; }
.contact-form input, .contact-form textarea { padding:10px; border:1px solid var(--border-color); border-radius:8px; }
.contact-form button { align-self:flex-start; }

@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* Appointments list */
.appt-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    padding: 14px;
    margin-bottom: 12px;
}
.appt-card .appt-date { font-weight:700; color:var(--primary-color); margin-bottom:6px }
.appt-card .appt-meta { color:var(--text-color); }

/* status colors (transparent) */
.appt-card.scheduled { background: rgba(42,125,225,0.06); border-color: rgba(42,125,225,0.14); }
.appt-card.completed { background: rgba(52,199,89,0.06); border-color: rgba(52,199,89,0.14); }
.appt-card.cancelled { background: rgba(255,77,79,0.06); border-color: rgba(255,77,79,0.14); }

/* appointment card hover pop effect (only on hover-capable devices) */
@media (hover: hover) and (pointer: fine) {
    .appt-link { display:block; text-decoration:none; }
    .appt-card {
        transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
        will-change: transform, box-shadow;
    }
    .appt-card:hover {
        transform: translateY(-8px) scale(1.01);
        box-shadow: 0 14px 30px rgba(22,40,80,0.12);
        border-color: rgba(42,125,225,0.18);
    }
}