/* 🏥 Ytechia Hospital System - Global Public Stylesheet */
/* File Path: assets/css/public-style.css */

:root {
    --yt-primary: #1e5fa8;
    --yt-secondary: #0f172a;
    --yt-accent: #3b82f6;
    --yt-bg: #f8fafc;
    --yt-card-bg: #ffffff;
}

/* 🧱 الهيكل العام والخلفيات */
.yt-main-bg, .yt-clinic-bg, .yt-single-clinic-bg { background: var(--yt-bg); padding: 60px 0; min-height: 80vh; direction: rtl; }
.yt-container, .yt-clinic-container, .yt-content-container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* 🏛️ هيدر الصفحات الرئيسي */
.yt-header-section, .yt-clinic-header { text-align: center; margin-bottom: 40px; }
.yt-header-section h1, .yt-clinic-header h1 { color: var(--yt-secondary); font-size: 38px; font-weight: 900; margin-bottom: 15px; position: relative; display: inline-block; }
.yt-header-section h1::after, .yt-clinic-header h1::after { content: ''; width: 60px; height: 4px; background: var(--yt-primary); position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); border-radius: 2px; }
.yt-header-section p, .yt-clinic-header p { color: #64748b; font-size: 18px; max-width: 600px; margin: 20px auto 0; }

/* 🔍 صناديق البحث الفخمة الموحدة (للأطباء والعيادات والبحث العام) */
.yt-search-wrapper, .yt-doc-search-wrapper {
    max-width: 500px;
    margin: 0 auto 50px;
    position: relative;
    display: block;
}
.yt-search-input, .yt-doc-search-input {
    width: 100% !important;
    padding: 16px 50px 16px 20px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    outline: none !important;
    background: var(--yt-card-bg) !important;
    color: var(--yt-secondary) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02) !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
}
.yt-search-input:focus, .yt-doc-search-input:focus {
    border-color: var(--yt-primary) !important;
    box-shadow: 0 10px 25px rgba(30, 95, 168, 0.1) !important;
}
.yt-search-icon, .yt-doc-search-icon {
    position: absolute !important;
    top: 50% !important;
    right: 20px !important;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    font-size: 18px !important;
    transition: color 0.3s !important;
    pointer-events: none !important;
    z-index: 2 !important;
}
.yt-search-input:focus + .yt-search-icon, .yt-doc-search-input:focus + .yt-doc-search-icon {
    color: var(--yt-primary) !important;
}

/* 🏥 عناوين أقسام العيادات المبوبة (صفحة الأطباء) */
.yt-clinic-section { margin-bottom: 60px; transition: all 0.3s ease; }
.yt-clinic-title-wrapper { 
    display: flex; align-items: center; gap: 15px; margin-bottom: 30px; 
    padding-bottom: 12px; border-bottom: 2px dashed #e2e8f0; 
}
.yt-clinic-title-wrapper i { color: var(--yt-primary); font-size: 26px; }
.yt-clinic-title { font-size: 26px; font-weight: 900; color: var(--yt-secondary); margin: 0; }
.yt-clinic-count { background: #eff6ff; color: var(--yt-primary); padding: 4px 12px; border-radius: 30px; font-size: 14px; font-weight: 700; }

/* 🗂️ شبكات العرض (Grids) */
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 30px; }
.yt-clinic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 30px; }
.yt-doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }

/* 🩺 كروت عرض الأطباء (الأرشيف والعيادة المفردة) */
.yt-card, .yt-doc-card { 
    background: var(--yt-card-bg); border-radius: 24px; overflow: hidden; 
    border: 1px solid rgba(226, 232, 240, 0.8); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; position: relative;
}
.yt-card:hover, .yt-doc-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(30, 95, 168, 0.12); border-color: var(--yt-primary); }

.yt-card-top, .yt-doc-top { padding: 30px; text-align: center; background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%); position: relative; }
.yt-avatar-wrapper { position: relative; width: 130px; height: 130px; margin: 0 auto 20px; }
.yt-img, .yt-doc-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 8px 16px rgba(0,0,0,0.08); }
.yt-doc-img { width: 110px; height: 110px; margin-bottom: 15px; }
.yt-status-dot { width: 15px; height: 15px; background: #22c55e; border: 3px solid #fff; position: absolute; bottom: 8px; right: 8px; border-radius: 50%; }

.yt-name, .yt-doc-name { font-size: 22px; font-weight: 800; color: var(--yt-secondary); margin: 0 0 8px 0; }
.yt-doc-name { font-size: 20px; margin-bottom: 5px; }
.yt-rank-badge, .yt-doc-rank { background: rgba(30, 95, 168, 0.1); color: var(--yt-primary); padding: 5px 15px; border-radius: 50px; font-size: 13px; font-weight: 700; display: inline-block; }
.yt-doc-rank { background: rgba(30,95,168,0.08); padding: 4px 12px; }

.yt-card-content, .yt-doc-body { padding: 0 30px 30px; flex-grow: 1; }
.yt-sched-header, .yt-doc-sched-title { font-size: 14px; font-weight: 800; color: var(--yt-secondary); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.yt-sched-header i, .yt-doc-sched-title { color: var(--yt-primary); }
.yt-doc-sched-title { font-size: 13px; margin-bottom: 10px; }
.yt-doc-sched-title .fa-clock { margin-left: 5px; }

.yt-sched-list { display: flex; flex-direction: column; gap: 8px; }
.yt-sched-item, .yt-doc-sched-row { 
    display: flex; justify-content: space-between; align-items: center; 
    background: #f8fafc; padding: 10px 15px; border-radius: 12px; font-size: 13px; transition: 0.3s;
}
.yt-sched-item:hover { background: #eff6ff; }
.yt-doc-sched-row { color: #475569; padding: 6px 0; border-bottom: 1px dashed #f1f5f9; background: transparent; border-radius: 0; }
.yt-doc-sched-row:last-child { border-bottom: none; }
.yt-day { font-weight: 700; color: var(--yt-secondary); }
.yt-time { color: var(--yt-primary); font-weight: 600; }

.yt-card-footer, .yt-doc-footer { padding: 0 30px 30px; display: flex; gap: 12px; }
.yt-doc-footer { padding: 0 25px 25px; gap: 10px; }
.yt-btn-profile, .yt-doc-btn-view { flex: 1; padding: 12px; border-radius: 14px; border: 2px solid #e2e8f0; color: #64748b; font-weight: 700; font-size: 14px; text-align: center; transition: 0.3s; text-decoration: none !important; }
.yt-doc-btn-view { border-radius: 12px; border: 1px solid #cbd5e1; font-size: 13px; }
.yt-btn-profile:hover, .yt-doc-btn-view:hover { background: #f1f5f9; color: var(--yt-secondary); border-color: var(--yt-secondary); }

/* 🏢 كروت أقسام العيادات (الأرشيف العام) */
.yt-clinic-card { 
    background: var(--yt-card-bg); border-radius: 24px; overflow: hidden; 
    border: 1px solid rgba(226, 232, 240, 0.8); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; position: relative;
}
.yt-clinic-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(30, 95, 168, 0.1); border-color: var(--yt-primary); }
.yt-clinic-cover { height: 200px; position: relative; overflow: hidden; background: #e2e8f0; }
.yt-clinic-cover-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.yt-clinic-card:hover .yt-clinic-cover-img { transform: scale(1.08); }
.yt-clinic-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(360deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0) 100%); }

.yt-clinic-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.yt-clinic-title-area { margin-bottom: 20px; }
.yt-clinic-name { font-size: 24px; font-weight: 800; color: var(--yt-secondary); margin: 0 0 10px 0; display: flex; align-items: center; gap: 10px; }
.yt-clinic-name i { color: var(--yt-primary); font-size: 20px; }
.yt-doc-counter { font-size: 14px; color: #64748b; font-weight: 600; background: #f1f5f9; padding: 4px 12px; border-radius: 50px; display: inline-block; }

.yt-clinic-btn { 
    display: block; width: 100%; padding: 14px; border-radius: 14px; 
    background: var(--yt-primary); color: #fff !important; font-weight: 700; 
    font-size: 15px; text-align: center; transition: 0.3s; 
    text-decoration: none !important; box-shadow: 0 4px 12px rgba(30, 95, 168, 0.15);
}
.yt-clinic-btn:hover { background: var(--yt-secondary); box-shadow: 0 6px 15px rgba(15, 23, 42, 0.2); }

/* 🖼️ البانر البانورامي الكبير للعيادة المفردة */
.yt-clinic-hero { 
    position: relative; height: 320px; background: var(--yt-secondary); 
    display: flex; align-items: center; justify-content: center; text-align: center; 
    overflow: hidden; margin-bottom: 50px;
}
.yt-clinic-hero-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; filter: blur(2px); }
.yt-clinic-hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%); }
.yt-clinic-hero-content { position: relative; z-index: 2; padding: 0 20px; max-width: 800px; }
.yt-clinic-hero-content h1 { font-size: 42px; font-weight: 900; color: #ffffff; margin: 0 0 15px 0; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.yt-clinic-hero-content p { color: #cbd5e1; font-size: 18px; margin: 0; text-shadow: 0 1px 5px rgba(0,0,0,0.2); }

/* 📋 استمارات الحجوزات الفورية المستقلة الفخمة (شورت كود فورم الحجز) */
.yt-booking-container { direction: rtl !important; text-align: right !important; font-family: 'Tajawal', sans-serif; max-width: 950px; margin: 30px auto; background: #ffffff; padding: 30px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-top: 5px solid #1e5fa8; box-sizing: border-box; }
.yt-booking-container h2 { color: #1e5fa8; text-align: center; margin-bottom: 25px; font-weight: 700; font-size: 24px; margin-top: 0; }

.yt-booking-two-columns { display: flex; gap: 25px; flex-wrap: wrap; }
.yt-column-right, .yt-column-left { flex: 1; min-width: 320px; } 

.yt-form-section { background: #f8fafc; padding: 22px; border-radius: 12px; margin-bottom: 20px; border: 1px solid #e2e8f0; height: 100%; box-sizing: border-box; }
.yt-form-section h3 { margin-top: 0; margin-bottom: 18px; color: #334155; font-size: 16px; font-weight: 700; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; }
.yt-form-group { margin-bottom: 18px; position: relative; }
.yt-form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #475569; font-size: 14px; }

.yt-form-group input[type="text"], 
.yt-form-group input[type="tel"], 
.yt-form-group input[type="number"], 
.yt-form-group input[type="file"], 
.yt-form-group select { width: 100%; padding: 11px 14px; border: 1px solid #cbd5e1; border-radius: 8px; font-family: inherit; font-size: 14px; outline: none; transition: all 0.2s ease-in-out; box-sizing: border-box; background-color: #fff; }
.yt-form-group select { padding: 11px 40px !important; }

.yt-form-group input.yt-invalid, .yt-form-group select.yt-invalid { border-color: #ef4444 !important; background-color: #fef2f2 !important; }
.yt-invalid + .select2-container--default .select2-selection--single { border-color: #ef4444 !important; background-color: #fef2f2 !important; }

.yt-error-msg { color: #ef4444; font-size: 12px; font-weight: 500; margin-top: 5px; display: none; align-items: center; gap: 4px; }
.yt-form-group input:focus, .yt-form-group select:focus { border-color: #1e5fa8; box-shadow: 0 0 0 3px rgba(30, 95, 168, 0.15); }

.yt-radio-group { display: flex; gap: 12px; margin-top: 8px; flex-wrap: nowrap; }
.yt-radio-label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 700; color: #334155; font-size: 13px; background: #fff; padding: 12px 10px; border-radius: 8px; border: 1px solid #cbd5e1; transition: all 0.2s ease-in-out; box-sizing: border-box; text-align: center; }
.yt-radio-label:has(input:checked) { border-color: #1e5fa8; background: #f0f7ff; color: #1e5fa8; box-shadow: 0 0 0 3px rgba(30, 95, 168, 0.1); }
.yt-radio-label:hover { border-color: #1e5fa8; background: #f8fafc; }

/* Select2 Custom Styling */
.select2-container--default .select2-selection--single { height: 42px !important; border: 1px solid #cbd5e1 !important; border-radius: 8px !important; display: flex; align-items: center; transition: all 0.2s; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px !important; left: 8px !important; right: auto !important; }
.select2-container .select2-selection--single .select2-selection__rendered { padding-right: 12px !important; padding-left: 20px !important; text-align: right !important; color: #334155; font-size: 14px; }
.select2-dropdown { border: 1px solid #cbd5e1 !important; border-radius: 8px !important; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.select2-results__option { text-align: right !important; padding: 8px 12px !important; font-size: 14px; }

.yt-submit-wrapper { width: 100%; margin-top: 10px; }
.yt-submit-btn { width: 100%; background: #1e5fa8; color: #ffffff; border: none; padding: 14px; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 12px rgba(30, 95, 168, 0.25); font-family: inherit; }
.yt-submit-btn:hover { background: #15467d; }

/* 👤 الصفحة المفردة الكاملة للطبيب الشخصي */
.yt-single-doc-container { max-width: 1000px; margin: 40px auto; padding: 0 20px; font-family: 'Tajawal', sans-serif; direction: rtl; text-align: right; }
.yt-single-doc-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 24px; padding: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); display: flex; gap: 40px; align-items: flex-start; }
.yt-single-doc-right { flex: 0 0 260px; text-align: center; }
.yt-single-doc-img { width: 250px; height: 250px; object-fit: cover; border-radius: 50%; border: 5px solid #eff6ff; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

.yt-single-doc-left { flex: 1; width: 100%; }
.yt-single-doc-left h1 { font-size: 28px; font-weight: 800; color: #1e293b; margin: 0 0 12px 0; }
.yt-clinic-badge { background: #eff6ff; color: #1e5fa8; padding: 6px 16px; border-radius: 50px; font-weight: bold; font-size: 14px; margin-bottom: 20px; display: inline-block; }
.yt-doc-rank-text { font-size: 18px; color: #475569; margin-bottom: 25px; font-weight: 600; }

.yt-single-doc-sched-box { background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 16px; padding: 24px; margin-bottom: 30px; }
.yt-sched-box-title { font-size: 16px; font-weight: bold; color: #1e5fa8; margin: 0 0 15px 0; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; }
.yt-sched-row-item { display: flex; justify-content: space-between; font-size: 15px; color: #334155; padding: 10px 0; border-bottom: 1px dashed #e2e8f0; }
.yt-sched-row-item:last-child { border-bottom: none; padding-bottom: 0; }

/* 🎯 أزرار تريجر المودال الفوري للحجز الموحد */
.yt-trigger-booking-modal { 
    display: inline-block; width: auto; background: #1e5fa8; color: #fff !important; border: none; 
    padding: 14px 40px; border-radius: 12px; font-weight: bold; font-size: 16px; cursor: pointer; 
    box-shadow: 0 4px 12px rgba(30,95,168,0.2); font-family: inherit; transition: all 0.3s ease; text-align: center; 
}
.yt-trigger-booking-modal:hover { background: #0f172a; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(15, 23, 42, 0.25); }

/* 🚫 رسائل حالات الفراغ */
#yt-search-empty-state, #yt-no-results, #yt-doc-no-results { display: none; text-align: center; padding: 50px 0; color: #64748b; font-weight: 600; }

/* 📱 [محرك التجاوب الخارق للموبايل والتابلت] */
@media (max-width: 768px) {
    .yt-grid, .yt-clinic-grid, .yt-doc-grid { grid-template-columns: 1fr; }
    .yt-clinic-hero { height: 260px; }
    .yt-clinic-hero-content h1 { font-size: 32px; }
    .yt-clinic-hero-content p { font-size: 15px; }

    .yt-single-doc-card { flex-direction: column; align-items: center; padding: 25px; gap: 25px; }
    .yt-single-doc-right { flex: 0 0 auto; width: 100%; }
    .yt-single-doc-img { width: 180px; height: 180px; }
    .yt-single-doc-left { text-align: center; }
    .yt-sched-box-title { text-align: right; }
    .yt-trigger-booking-modal { width: 100%; box-sizing: border-box; }
}