/* ========= RESET & BASE ========= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

/* ===== GLOBAL FONT RESET ===== */
html, body, *, *::before, *::after {
    font-family: "Cairo", sans-serif !important;
}

body {
    font-family: "Cairo", sans-serif;
    direction: rtl;
    background: #f7fbfc;
    color: #053b50;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========== HEADER ========== */

.main-header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    position: sticky;
    top: 0;
    z-index: 200;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* ===== LOGO ===== */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 16px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-title {
    font-weight: 700;
    font-size: 18px;
    color: #0284c7;
}

.logo-subtitle {
    font-size: 12px;
    color: #64748b;
}

/* ===== NAV LINKS ===== */

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 22px;
}

.main-nav a {
    text-decoration: none;
    font-size: 14px;
    color: #036672;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: 0.2s ease;
}

.main-nav a:hover {
    color: #0284c7;
    border-color: #0ea5e9;
}

/* ===== AUTH BUTTON ===== */

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #0f9bcc);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(14,165,233,0.35);
}

.btn-primary:hover {
    box-shadow: 0 8px 16px rgba(14,165,233,0.45);
}

/* ===== MOBILE MENU BTN ===== */

.nav-toggle {
    display: none;
    border: none;
    background: #0ea5e9;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

/* ========== HERO SECTION ========== */

.hero {
    background: linear-gradient(to bottom, #ecfeff, #f7fbfc);
    padding: 32px 0 24px;
}

.hero-content {
    text-align: center;
}

.hero h1 {
    font-size: 28px;
    font-weight: 700;
    color: #036672;
    margin-bottom: 8px;
}

.hero p {
    font-size: 14px;
    color: #64748b;
}

/* ========== SEARCH BAR SECTION ========== */

.search-bar {
    margin-top: -16px;
    padding-bottom: 32px;
}

.doctor-search-form {
    background: #0597b680;
    border-radius: 999px;
    padding: 10px 14px;
    display: grid;
    grid-template-columns: 2.2fr 1.3fr 1.3fr 1.3fr auto;
    gap: 8px;
    align-items: center;
    box-shadow: 0 8px 28px rgba(13,148,136,0.25);
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-field label {
    font-size: 11px;
    color: #e0f2fe;
    padding-inline: 4px;
}

.search-field input,
.search-field select {
    width: 100%;
    border-radius: 999px;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    color: #0f172a;
    background: #f9fafb;
}

.search-field input::placeholder {
    color: #94a3b8;
}

/* زر البحث */

.search-submit {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-search {
    height: 100%;
    padding-inline: 18px;
    white-space: nowrap;
}

/* ========== SPECIALTIES GRID (with counts) ========== */

.specialties-grid-section {
    padding: 40px 0 30px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #036672;
    text-align: center;
}

.section-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 18px;
    text-align: center;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.specialty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 18px 10px;
    border-radius: 18px;
    background: #e0f2fe;               /* 💙 الخلفية الأزرق الفاتح القديمة */
    color: #036672;
    box-shadow: 0 4px 16px rgba(15,118,110,0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.specialty-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15,118,110,0.18);
    background: #ccfbf1;
}

.specialty-icon {
    width: 60px;
    height: 60px;
    border-radius: 999px;
    background: #f0f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 26px;
}


.specialty-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.specialty-count {
    font-size: 12px;
    color: #64748b;
}

/* ========== FEATURED DOCTORS SECTION ========== */

.featured-doctors-section {
    padding: 40px 0 20px;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.doctor-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.doctor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.18);
}

.doctor-card-img {
    position: relative;
    padding-top: 60%; /* ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
}

.doctor-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-avatar-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.doctor-card-body {
    padding: 10px 12px 12px;
}

.doctor-name {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px;
}

.doctor-title {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

.doctor-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: #0f172a;
    margin-bottom: 6px;
}

.doctor-specialty {
    font-weight: 600;
}

.doctor-location {
    color: #64748b;
}

.doctor-price {
    font-size: 13px;
    font-weight: 600;
    color: #0f766e;
}

/* ========== CTA DOCTOR BANNER ========== */

.cta-doctor-banner {
    background: #e0faff;
    padding: 28px 0;
    margin: 10px 0 30px;
}

.cta-doctor-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
}

.cta-doctor-text h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: #0f766e;
}

.cta-doctor-text p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #0f172a;
    max-width: 480px;
}

.cta-doctor-btn {
    font-size: 13px;
    padding-inline: 18px;
}

.cta-doctor-illustration {
    display: flex;
    justify-content: center;
    flex: 0 0 180px;
}

.cta-logo-circle {
    width: 150px;
    height: 150px;
    border-radius: 40px;
    background: linear-gradient(135deg, #0ea5e9, #0f766e);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 45px rgba(15, 118, 110, 0.35);
}

.cta-logo-circle img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

/* ========== ARTICLES SECTION ========== */

.articles-section {
    padding: 40px 0 60px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.article-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15,23,42,0.08);
    display: flex;
    flex-direction: column;
}

.article-img {
    position: relative;
    padding-top: 55%;
    overflow: hidden;
}

.article-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    padding: 12px 14px 14px;
}

.article-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
}

.article-excerpt {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 8px;
}

.article-link {
    font-size: 12px;
    color: #0ea5e9;
    text-decoration: none;
}

.article-link:hover {
    text-decoration: underline;
}

/* ========== LOGIN PAGE STYLES ========== */

.auth-wrapper {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.12);
    padding: 24px 24px 28px;
}

.auth-card h1 {
    font-size: 22px;
    margin-bottom: 8px;
    color: #036672;
    text-align: center;
}

.auth-card p {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin-bottom: 18px;
}

.auth-card label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #0f172a;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f9fafb;
}

.auth-card input[type="text"]:focus,
.auth-card input[type="password"]:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 1px rgba(14,165,233,0.25);
    background: #ffffff;
}

.auth-card .form-group {
    margin-bottom: 14px;
}

.auth-card .btn-submit {
    width: 100%;
    margin-top: 8px;
}

.auth-error {
    background: #fee2e2;
    color: #b91c1c;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    text-align: center;
}

.auth-note {
    margin-top: 12px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

/* ========== RESPONSIVE ========== */

/* تابلت */
@media (max-width: 992px) {
    .doctor-search-form {
        grid-template-columns: 1.7fr 1.2fr 1.2fr;
        grid-template-rows: auto auto;
        border-radius: 26px;
    }

    .search-text {
        grid-column: span 3;
    }

    .search-submit {
        grid-column: span 3;
    }
}

/* موبايل */
@media (max-width: 768px) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: 70px;
        right: 0;
        left: 0;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
        display: none;
        z-index: 199;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 18px;
        gap: 14px;
    }

    .auth-buttons {
        display: none;
    }

    .logo-img {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .logo-title {
        font-size: 16px;
    }

    .hero {
        padding-top: 24px;
        padding-bottom: 18px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .doctor-search-form {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        border-radius: 22px;
    }

    .search-text,
    .search-submit {
        grid-column: span 1;
    }
}

/* ريسبونسف للبنر */
@media (max-width: 900px) {
    .cta-doctor-inner {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .cta-doctor-illustration {
        align-self: center;
    }
}
/* ===== FEATURED DOCTORS GRID ===== */
.featured-doctors-section {
    padding: 40px 0 30px;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 في الصف على الديسكتوب */
    gap: 18px;
}

.doctor-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.doctor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.18);
}

.doctor-card-img {
    position: relative;
    padding-top: 60%; /* ratio للصورة */
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
}

.doctor-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-avatar-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.doctor-card-body {
    padding: 10px 12px 12px;
}

.doctor-name {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px;
}

.doctor-title {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

.doctor-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: #0f172a;
    margin-bottom: 6px;
}

.doctor-specialty {
    font-weight: 600;
}

.doctor-location {
    color: #64748b;
}

.doctor-price {
    font-size: 13px;
    font-weight: 600;
    color: #0f766e;
}

/* GRID RESPONSIVE: 2 في الصف على التابلت، 1 على الموبايل */
@media (max-width: 992px) {
    .doctors-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .doctors-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Doctor Reviews ===== */
.doctor-rating-summary {
    margin-bottom: 16px;
}

.doctor-rating-number {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #0f172a;
}

.doctor-rating-number .stars {
    color: #f59e0b;
    font-size: 18px;
}

.doctor-rating-number .rating-count {
    color: #64748b;
}

.doctor-review-form {
    margin-bottom: 24px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #e2e8f0;
}

.doctor-review-form-title {
    font-size: 15px;
    margin-bottom: 8px;
    color: #036672;
}

.doctor-review-form .form-row {
    margin-bottom: 10px;
}

.doctor-review-form input[type="text"],
.doctor-review-form textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
}

.doctor-review-form input[type="text"]:focus,
.doctor-review-form textarea:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 1px rgba(14,165,233,0.25);
}

.rating-stars-input {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
}

.rating-stars-input input {
    display: none;
}

.rating-stars-input label {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.rating-stars-input label:hover {
    background: #e0f2fe;
}

.doctor-reviews-list-title {
    font-size: 15px;
    margin-bottom: 10px;
    color: #036672;
}

.doctor-review-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 8px 20px rgba(15,23,42,0.06);
    margin-bottom: 10px;
}

.doctor-review-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.doctor-review-user {
    display: flex;
    gap: 8px;
    align-items: center;
}

.review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-user-name {
    font-size: 13px;
    font-weight: 600;
}

.review-date {
    font-size: 11px;
    color: #94a3b8;
}

.doctor-review-rating .stars {
    color: #f59e0b;
    font-size: 16px;
}

.doctor-review-comment {
    font-size: 13px;
    color: #0f172a;
    margin: 0;
}
/* ========== FOOTER ========== */
.site-footer {
    background: #02454F;    /* ← لون موقعك */
    color: #ffffff;
    padding: 26px 0 18px;
    margin-top: 40px;
    font-size: 13px;
}


.site-footer a {
    color: #ffffff;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* الجزء العلوي */
.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* سوشيال ميديا */
.footer-social {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-circle {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.35);
    transition: transform 0.2s, background 0.2s;
}

.social-circle.fb { background:#1877f2; }
.social-circle.ig { background:#e1306c; }
.social-circle.yt { background:#ff0000; }
.social-circle.x  { background:#111827; }

.social-circle:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.85);
    color: #0f172a;
}

/* روابط */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.footer-links a {
    font-size: 13px;
    font-weight: 500;
}

/* خط فاصل */
.footer-divider {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.4);
    margin: 16px 0 10px;
}

/* الجزء السفلي */
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 30px;
    text-align: center;
}

.footer-copy,
.footer-webos {
    margin: 0;
    font-size: 12px;
}

.footer-webos a {
    font-weight: 600;
}

/* موبايل */
@media (max-width: 600px) {
    .site-footer {
        padding-top: 20px;
    }
    .footer-links {
        flex-direction: column;
        gap: 6px;
    }
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.social-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    color: #fff;
}

/* Facebook */
.social-circle.fb {
    background-color: #1877f2;
}

/* WhatsApp */
.social-circle.wa {
    background-color: #25D366;
}

/* نص الروابط في الفوتر */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
}

/* Divider */
.footer-divider {
    border: none;
    border-top: 1px solid #cccccc40;
    margin: 20px 0;
}

/* الأسفل */
.footer-bottom {
    text-align: center;
    color: #ffffff;
    font-size: 14px;
}

.footer-bottom a {
    color: #fff;
    text-decoration: underline;
}
/* إخفاء زر تسجيل الدخول على الديسكتوب */
.mobile-only {
    display: none;
}

/* إظهاره على الموبايل فقط */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .login-btn-mobile {
        display: block;
        padding: 10px 15px;
        background: #007bff;
        color: #fff !important;
        border-radius: 8px;
        text-align: center;
        margin-top: 10px;
        font-weight: bold;
    }
}

/* زر تسجيل الدخول للموبايل فقط */
.mobile-only {
    display: none;
}

/* استايل زر تسجيل الدخول داخل القائمة في الموبايل */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .login-btn-mobile {
        display: block;
        padding: 12px 0;
        background: #0ea5e9;
        color: #fff !important;
        text-align: center;
        border-radius: 8px;
        margin-top: 10px;
        font-size: 16px;
        font-weight: bold;
    }
}

/* 🔥 المهم جداً: عدم التأثير على زر تسجيل الدخول الأصلي في نسخة الكمبيوتر */
.navbar .desktop-login,
.desktop-login {
    display: inline-block;
    padding: 10px 22px;
    background: #0ea5e9;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
}
/* الزر اللي جوه المينيو – افتراضيًا مخفي على الشاشات الكبيرة */
.mobile-only {
    display: none;
}

/* شكل زر تسجيل الدخول في الموبايل */
@media (max-width: 768px) {

    /* نعرض عنصر اللستة فقط على الموبايل */
    .mobile-only {
        display: block;
        margin-top: 12px;
    }

    /* الزر نفسه */
    .login-btn-mobile {
        display: block;
        width: 100%;
        padding: 11px 0;
        border-radius: 999px;
        background: linear-gradient(135deg, #0ea5e9, #38bdf8);
        color: #ffffff !important;
        text-align: center;
        font-weight: 700;
        font-size: 15px;
        text-decoration: none;
        box-shadow: 0 6px 14px rgba(14, 165, 233, 0.35);
    }

    .login-btn-mobile:active {
        transform: translateY(1px);
        box-shadow: 0 3px 8px rgba(14, 165, 233, 0.4);
    }

    /* علشان اللينكات في الموبايل تبقى سطر كامل */
    .main-nav ul li {
        width: 100%;
    }
}
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
        margin-top: 15px;
    }

    .login-btn-mobile {
        display: block;
        width: 100%;
        padding: 12px 0;
        text-align: center;
        background: #0ea5e9;
        color: #fff;
        border-radius: 30px;
        font-weight: 700;
        text-decoration: none;
    }
}

/* زر تسجيل الدخول للكمبيوتر */
.login-btn-desktop {
    background: #0ea5e9;
    padding: 10px 20px;
    border-radius: 30px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    margin-right: auto; /* يخليه على اليسار */
    display: inline-block;
}

/* إخفاء زر الديسكتوب على الموبايل */
@media (max-width: 768px) {
    .login-btn-desktop {
        display: none;
    }
}
