/* --- شريط عداد الزيارات العلوي --- */
.top-bar-counter {
    background: linear-gradient(90deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    text-align: center;
    padding: 6px 15px;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1001;
}

.counter-number {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    margin: 0 4px;
    color: #fff9db;
    font-family: monospace, sans-serif;
    font-size: 0.95rem;
}

/* --- الإعدادات العامة والخلفية الحديثة --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #f0f7ff;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.65;
    animation: floatGlow 14s infinite alternate ease-in-out;
}

body::before {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, #38bdf8, #818cf8);
    top: -100px;
    right: -100px;
}

body::after {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #ffedd5, #fed7aa);
    bottom: -60px;
    left: -80px;
    animation-delay: -7s;
}

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(-40px, 50px) scale(1.12);
    }
}

/* --- شريط التنقل (Navbar الزجاجي) --- */
.navbar {
    background: rgba(52, 152, 219, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 35px;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.clinic-name {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.doctor-name {
    font-size: 0.85rem;
    color: #e0f2fe;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    background-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.btn-nav {
    background-color: #ff7f50 !important;
    box-shadow: 0 3px 10px rgba(255, 127, 80, 0.35);
}

.btn-nav:hover {
    background-color: #f97316 !important;
    transform: translateY(-2px);
}

/* --- صورة الدكتور --- */
.nav-doctor-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.doctor-profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.doctor-img-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.doctor-main-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #38bdf8;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.2);
    transition: transform 0.3s ease;
}

.doctor-main-img:hover {
    transform: scale(1.05);
}

.doctor-profile-info {
    flex: 1;
}

.doctor-profile-info h2 {
    margin-bottom: 8px;
}

.doctor-profile-info p {
    margin: 4px 0;
    color: #475569;
    font-size: 0.95rem;
}

/* --- الحاويات والبطاقات --- */
.container {
    max-width: 780px;
    margin: 35px auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.booking-card, 
.instructions-card, 
.qr-card, 
.about-card, 
.news-page-card, 
.video-section-header {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px 35px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px -5px rgba(2, 132, 199, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.booking-card:hover,
.about-card:hover,
.qr-card:hover,
.news-page-card:hover {
    box-shadow: 0 14px 35px -5px rgba(2, 132, 199, 0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 18px;
}

.card-header h2, .about-card h2, .news-page-card h2, .video-section-header h2 {
    margin: 0;
    color: #0284c7;
    font-size: 1.45rem;
    font-weight: 800;
}

.price-badge {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #15803d;
    padding: 6px 18px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.15);
}

.working-hours-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-right: 4px solid #0284c7;
    padding: 12px 18px;
    border-radius: 10px;
    margin: 18px 0;
    font-size: 0.95rem;
    color: #1e3a8a;
}

.working-hours-banner p {
    margin: 0;
}

/* --- الأزرار والحقول --- */
.cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 14px 32px;
    font-size: 1.15rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 1rem;
    background-color: #f8fafc;
    transition: all 0.25s ease;
}

input:focus, select:focus {
    border-color: #0284c7;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
    outline: none;
}

.hint-text {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #ea580c;
    font-weight: 600;
}

button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4);
}

/* --- الإرشادات والـ QR Code --- */
.instructions-card h3 {
    color: #0284c7;
    margin-top: 0;
    margin-bottom: 15px;
}

.instructions-list {
    margin: 0;
    padding-right: 20px;
    line-height: 1.9;
    color: #475569;
}

.instructions-list li {
    margin-bottom: 10px;
}

.instructions-list strong {
    color: #dc2626;
}

.qr-card {
    text-align: center;
}

.qr-card h3 {
    margin-top: 0;
    color: #0284c7;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.qr-container img, .qr-container canvas {
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.qr-desc {
    color: #64748b;
    font-size: 0.9rem;
}

/* --- الفيديوهات والتوعية --- */
.video-section-header {
    text-align: center;
}

.social-btn-link.yt-link {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    text-decoration: none;
    padding: 11px 26px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}

.social-btn-link.yt-link:hover {
    transform: translateY(-2px) scale(1.03);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.video-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: #000;
    cursor: pointer;
}

.video-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.video-wrapper:hover .video-thumb {
    transform: scale(1.06);
    filter: brightness(0.9);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
    border: 3px solid #fff;
    border-radius: 50%;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    z-index: 2;
}

.video-wrapper:hover .play-btn {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-info {
    padding: 18px 20px;
}

.video-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    color: #1e293b;
    line-height: 1.4;
}

.video-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
}

/* --- الأخبار --- */
.news-post {
    border-bottom: 1px solid #f1f5f9;
    padding: 18px 0;
}

.news-post:last-child {
    border-bottom: none;
}

.news-post h3 {
    margin: 0 0 6px 0;
    color: #0284c7;
}

.news-date {
    font-size: 12px;
    color: #94a3b8;
    display: block;
    margin-bottom: 10px;
}

.news-post p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

/* --- الفوتر --- */
.footer {
    background-color: #0f172a;
    color: white;
    padding: 35px 20px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info h4, .footer-social h4 {
    margin-top: 0;
    color: #38bdf8;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.social-btn:hover {
    transform: translateY(-4px) scale(1.08);
}

.social-btn.yt { background-color: #ff0000; }
.social-btn.fb { background-color: #1877f2; }
.social-btn.insta { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social-btn.tt { background-color: #000000; border: 1px solid #444; }
.social-btn.wa { background-color: #25d366; }

.footer-bottom {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #1e293b;
    font-size: 0.85rem;
    color: #94a3b8;
}

#confirmationMessage {
    margin-top: 15px;
    padding: 12px;
    background-color: #dcfce7;
    color: #166534;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.hidden {
    display: none;
}

/* --- الهواتف --- */
@media (max-width: 600px) {
    .doctor-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .doctor-img-wrapper {
        margin: 0 auto;
    }
    .navbar {
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}