* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    background: #f7f9fc;
    color: #222;
    font-family: 'Cairo', sans-serif;
}

a { text-decoration: none; }

.doctor-section {
    margin: 30px 70px 0 70px;
}

.top-banner {
    height: 180px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(rgba(18, 141, 207, 0.712), rgba(18, 201, 207, 0.705));
    position: relative;
    overflow: hidden;
}

.top-banner::before,
.top-banner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 60px solid rgba(255,255,255,0.06);
}
.top-banner::before {
    width: 400px; height: 400px;
    top: -160px; left: -120px;
}
.top-banner::after {
    width: 300px;
    height: 300px;
    bottom: -130px;
    right: -80px;
}

.doctor-card {
    background: #fff;
    box-shadow: 0 4px 24px rgba(18,140,207,0.10);
    padding: 0 30px 35px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.right-side {
    flex: 1;
}

.doctor-header {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 25px;
    position: absolute;
}

.doctor-image {
    position: relative;
    top: -150px;
    right: 5px;
    width: 150px;
    height: 150px;
    border-radius: 5px;
    border: 4px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.doctor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.doctor-info {
    padding-top: 16px;
}

.doctor-info h2 {
    font-size: 20px;
    font-weight: 800;
    color: #128CCF;
    margin-bottom: 6px;
}

.specialty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f4fd;
    color: #128CCF;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.doctor-info p {
    font-size: 14px;
    color: #666;
    line-height: 1.9;
    max-width: 600px;
    margin-top: 10px;
}

.left-side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-width: 200px;
    padding-top: 24px;
    flex-shrink: 0;

}

.price-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
}

.price-box .icon {
    width: 42px;
    height: 42px;
    background: #128CCF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}

.price-box .label {
    font-size: 12px;
    color: #888;
    margin-bottom: 2px;
}

.price-box .price {
    font-size: 16px;
    font-weight: 700;
    color: #128CCF;
}

.btn {
    padding: 8px 20px;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn.primary {
    background: #128CCF;
    color: #fff;
    border: none;
}

.btn.primary:hover {
    background: #0f76b3;
}

.btn.outline {
    background: transparent;
    color: #128CCF;
    border: 1.5px solid #128CCF;
}

.btn.outline:hover {
    background: #e8f4fd;
}



.doctor-stats {
    display: flex;
    gap: 0;
    margin: 0 70px;
    background: #fff;
    overflow: hidden;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 22px 16px;
    border-left: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    border-top: 1px solid #eef2f7;
    transition: 0.3s;
}

.stat-item:last-child { 
    border-left: none; 
}

.stat-item:hover {
    background: #f7fbff;
}

.stat-item i {
    font-size: 20px;
    color: #128CCF;
    display: block;
    margin-bottom: 8px;
}

.stat-item strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1a2a3a;
}

.stat-item span {
    font-size: 12px;
    color: #999;
}


.ratings {
    margin: 0px 70px;
    background: #fff;
    padding: 30px 35px;
}

.ratings h3 {
    font-size: 18px;
    font-weight: 700;
    color: #128CCF;
    margin-bottom: 6px;
}

.ratings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 12px;
}

.rate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff8e1;
    color: #e6a817;
    font-size: 16px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1.5px solid #fde08a;
}

.rate i { 
    font-size: 12px;
 }

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.review-card {
    background: #f7f9fc;
    border-radius: 5px;
    padding: 16px 18px;
    border: 1px solid #eef2f7;
    transition: 0.3s;
}

.review-card:hover {
    border-color: #cce4f7;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.review-header img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.review-header span {
    font-size: 14px;
    font-weight: 600;
    color: #1a2a3a;
    flex: 1;
}

.star {
    display: flex;
    gap: 2px;
}

.star i {
    font-size: 10px;
    color: #ffd166;
}

.star i.gray {
    color: #ddd;
}

.review-card p {
    font-size: 12px;
    color: #666;
    line-height: 1.7;
    margin: 0;
}



.rating-box-section {
    margin: 0px 70px;
}

.rating-box {
    background: #fff;
    border-radius: 0 0 5px 5px;
    padding: 30px 35px;
}

.rating-box h3 {
    font-size: 18px;
    font-weight: 700;
    color: #128CCF;
    margin-bottom: 20px;
}

.stars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stars-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stars-row i {
    font-size: 18px;
    color: #ddd;
    cursor: pointer;
    transition: 0.2s;
}

.stars-row i:hover,
.stars-row i.selected {
    color: #ffd166;
    transform: scale(1.15);
}

.stars > i {
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    transition: 0.2s;
    display: inline-block;
}

.stars > i:hover,
.stars > i.selected {
    color: #ffd166;
    transform: scale(1.15);
}

#review {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1.5px solid #e0e0e0;
    outline: none;
    font-size: 14px;
    resize: none;
    height: 100px;
    transition: 0.3s;
    background: #fafafa;
}

#review:focus {
    border-color: #128CCF;
    box-shadow: 0 0 0 3px rgba(18,140,207,0.1);
    background: #fff;
}

.rating-box button {
    margin-top: 4px;
    padding: 8px 25px;
    border-radius: 28px;
    border: none;
    background: #128CCF;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rating-box button:hover {
    background: #0f76b3;
}

.stars-row i.selected {
    color: #ffd166 !important;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.overlay.open {
    display: flex;
}

.booking-modal {
    background: #fff;
    border-radius: 5px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.25s ease;
    scrollbar-width: thin;
    scrollbar-color: #128CCF transparent;
}

@keyframes modalIn {
    from { transform: scale(0.95) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0);       opacity: 1; }
}

.booking-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    border-bottom: 1px solid #eef2f7;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.booking-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #128CCF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-close-btn {
    width: 30px; 
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #f0f4f8;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.booking-close-btn:hover {
    background: #fde8e8;
    color: #e53838;
}

.booking-provider-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid #eef2f7;
    

}

.booking-provider-img {
    width: 70px; 
    height: 70px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e8f4fd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.booking-provider-img img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
}

.booking-provider-name {
    font-size: 14px;
    font-weight: 700;
    color: #128CCF;
}

.booking-provider-spec,.booking-provider-price {
    font-size: 12px;
    color: #aaa;
    font-weight: 600;
    margin-top: 2px;
}

#bookingForm {
    padding: 20px 24px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 7px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    outline: none;
    font-size: 14px;
    transition: 0.3s;
    background: #fafafa;
}

.input-group input[type="datetime-local"] {
    direction: ltr;
    text-align: right;
}

.input-group textarea {
    resize: none;
    height: 90px;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #128CCF;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(18,140,207,0.1);
}

.double-input {
    display: flex;
    gap: 16px;
}

.double-input .input-group {
    flex: 1;
}

.file-upload {
    display: block;
    align-self: center;
    text-align: center;
    padding: 7px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    transition: 0.3s;
    background: #fafafa;
}

.file-upload:hover {
    border-color: #128CCF;
    color: #128CCF;
    background: #f0f8ff;
}

.file-upload label {
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.booking-form-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.submit-btn {
    flex: 1;
    padding: 8px 20px;
    border: none;
    border-radius: 28px;
    background: #128CCF;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:hover {
    background: #0f76b3;
    box-shadow: 0 5px 15px rgba(18,140,207,0.3);
}

.register-link {
    padding: 10px 20px;
    color: #128CCF;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
    white-space: nowrap;
}

.register-link:hover {
    text-decoration: underline;
}

.success-modal {
    background: #fff;
    border-radius: 5px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.3s ease;
}

.success-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 10px;
}

.success-modal h2 {
    font-size: 18px;
    color: #128CCF;
    margin-bottom: 10px;
}

.success-modal p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}


body.dark-mode {
    background: #0e0e10;
    color: #e0e0e0;
}

body.dark-mode .top-banner {
    background: linear-gradient(135deg, #0f3460 0%, #0a2540 100%);
}

body.dark-mode .doctor-card {
    background: #16213e;
}

body.dark-mode .doctor-image {
    border-color: #16213e;
    box-shadow: 0 4px 18px rgba(0,0,0,0.4);
}

body.dark-mode .doctor-info h2 {
    color: #e0e0e0;
}

body.dark-mode .specialty {
    background: #0f3460;
    color: #84ccf3;
}

body.dark-mode .doctor-info p {
    color: #aaa;
}

body.dark-mode .price-box {
    background: #0f3460;
    border-color: #1a4a8a;
}

body.dark-mode .price-box .label {
    color: #888;
}

body.dark-mode .price-box .price {
    color: #84ccf3;
}

body.dark-mode .btn.outline {
    color: #84ccf3;
    border-color: #84ccf3;
}

body.dark-mode .btn.outline:hover {
    background: #0f3460;
}

body.dark-mode .doctor-stats {
    background: #16213e;
}

body.dark-mode .stat-item {
    border-color: #1a3a5c;
}

body.dark-mode .stat-item:hover {
    background: #0f3460;
}

body.dark-mode .stat-item strong {
    color: #e0e0e0;
}

body.dark-mode .stat-item span {
    color: #888;
}

body.dark-mode .ratings,
body.dark-mode .rating-box {
    background: #16213e;
}

body.dark-mode .ratings h3,
body.dark-mode .rating-box h3 {
    color: #84ccf3;
}

body.dark-mode .review-card {
    background: #0f3460;
    border-color: #1a4a8a;
}

body.dark-mode .review-card:hover {
    border-color: #2a5a9a;
}

body.dark-mode .review-header span {
    color: #e0e0e0;
}

body.dark-mode .review-card p {
    color: #aaa;
}



body.dark-mode #review {
    background: #0f3460;
    border-color: #1a4a8a;
    color: #e0e0e0;
}

body.dark-mode #review:focus {
    border-color: #84ccf3;
    box-shadow: 0 0 0 3px rgba(132,204,243,0.1);
    background: #0a2a50;
}

body.dark-mode #review::placeholder {
    color: #555;
}

body.dark-mode .stars-row i {
    color: #444;
}

body.dark-mode .stars-row i.selected {
    color: #ffd166 !important;
}

body.dark-mode .booking-modal {
    background: #16213e;
}
 
body.dark-mode .booking-modal-header {
    background: #16213e;
    border-color: #1a4a8a;
}
 
body.dark-mode .booking-modal-title {
    color: #84ccf3;
}
 
body.dark-mode .booking-close-btn {
    background: #0f3460;
    color: #aaa;
}
 
body.dark-mode .booking-close-btn:hover {
    background: #3d1515;
    color: #ff6b6b;
}
 
body.dark-mode .booking-provider-info {
    border-color: #1a4a8a;
}
 
body.dark-mode .booking-provider-name {
    color: #84ccf3;
}
 
body.dark-mode .booking-provider-spec {
    color: #aaa;
}
 
body.dark-mode .input-group label {
    color: #aaa;
}
body.dark-mode .input-group input,
body.dark-mode .input-group textarea {
    background: #0f3460;
    border-color: #1a4a8a;
    color: #e0e0e0;
}
 
body.dark-mode .input-group input::placeholder,
body.dark-mode .input-group textarea::placeholder {
    color: #555;
}
 
body.dark-mode .input-group input:focus,
body.dark-mode .input-group textarea:focus {
    border-color: #84ccf3;
    background: #0a2a50;
    box-shadow: 0 0 0 4px rgba(132,204,243,0.1);
}
 
body.dark-mode .file-upload {
    background: #0f3460;
    border-color: #1a4a8a;
    color: #888;
}
 
body.dark-mode .file-upload:hover {
    border-color: #84ccf3;
    color: #84ccf3;
    background: #0a2a50;
}
 
body.dark-mode .register-link {
    color: #84ccf3;
}
 
body.dark-mode .success-modal {
    background: #16213e;
}
 
body.dark-mode .success-modal h2 {
    color: #84ccf3;
}
 
body.dark-mode .success-modal p {
    color: #aaa;
}
 

@media (max-width: 1024px) {
    .doctor-section {
        margin: 20px 30px 0;
    }
 
    .doctor-stats,
    .ratings,
    .rating-box-section {
        margin-left: 30px;
        margin-right: 30px;
    }
 
    .doctor-card {
        flex-direction: column;
        gap: 20px;
        padding: 0 24px 28px;
    }
 
    .left-side {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        padding-top: 0;
        width: 100%;
    }
 
    .price-box { flex: 1; min-width: 160px; }
    .btn { flex: 1; min-width: 130px; }
}
 
@media (max-width: 768px) {
    .doctor-section {
        margin: 15px 16px 0;
    }
 
    .top-banner {
        height: 140px;
    }
 
    .doctor-stats,
    .ratings,
    .rating-box-section {
        margin-left: 16px;
        margin-right: 16px;
    }
 
    .doctor-header {
        position: static;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
 
    .doctor-image {
        position: static;
        width: 100px;
        height: 100px;
        margin-top: -50px;
        border-radius: 5px;
    }
 
    .doctor-card {
        padding: 12px 18px 24px;
        gap: 16px;
    }
 
    .right-side {
        width: 100%;
    }
 
    .doctor-info h2 { font-size: 16px; }
    .doctor-info p  { font-size: 13px; }
 
    .left-side {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 0;
        width: 100%;
    }
 
    .price-box  { flex: 1; min-width: 140px; }
    .btn        { flex: 1; min-width: 120px; padding: 8px 14px; font-size: 13px; }
 
    .doctor-stats { flex-wrap: wrap; }
    .stat-item {
        flex: 1 1 calc(50% - 1px);
        min-width: 0;
    }
    .stat-item:nth-child(2) { border-left: none; }
 
    .reviews-grid {
        grid-template-columns: 1fr;
    }
 
    .ratings { padding: 20px 20px; }
    .rating-box { padding: 20px 20px; }

    .booking-modal {
        max-width: 95vw;
        max-height: 95vh;
    }
 
    .double-input {
        flex-direction: column;
        gap: 0;
    }
 
    .booking-form-footer {
        flex-direction: column;
        gap: 10px;
    }
}
 
@media (max-width: 480px) {
    .doctor-section {
        margin: 10px 10px 0;
    }
 
    .top-banner { height: 110px; }
 
    .doctor-stats,
    .ratings,
    .rating-box-section {
        margin-left: 10px;
        margin-right: 10px;
    }
 
    .doctor-image {
        width: 80px;
        height: 80px;
        margin-top: -40px;
    }
 
    .doctor-info h2 { 
        font-size: 18px !important; 
    }
 
    .left-side {
        flex-direction: column;
        gap: 8px;
    }
 
    .price-box { 
        width: 100%; 
    }
    .btn { 
        width: 100%; 
    }
 
    .stat-item { 
        flex: 1 1 calc(50% - 1px);
     }
 
    .reviews-grid { 
        grid-template-columns: 1fr; 
    }
 
    .rating-box button { 
        width: 100%; justify-content: center; 
    }
 
    .booking-modal {
        max-width: 100vw;
        border-radius: 5px 5px 0 0;
        max-height: 95vh;
    }
 
    .booking-modal-header {
        padding: 12px 16px;
    }
 
    .booking-modal-title {
        font-size: 14px;
    }
 
    .booking-doctor-info {
        padding: 12px 16px;
        gap: 10px;
    }
 
    .booking-doc-img {
        width: 55px;
        height: 55px;
    }
 
    .booking-doc-name {
        font-size: 13px;
    }
 
    .booking-doc-spec {
        font-size: 11px;
    }
 
    #bookingForm {
        padding: 14px 16px;
    }
 
    .input-group label {
        font-size: 12px;
    }
 
    .input-group input,
    .input-group textarea {
        font-size: 13px;
        padding: 8px 10px;
    }
 
    .submit-btn {
        font-size: 13px;
        padding: 10px 16px;
    }
 
    .success-modal {
        max-width: 90vw;
        padding: 25px 16px;
    }
 
    .success-icon {
        font-size: 48px;
    }
 
    .success-modal h2 {
        font-size: 16px;
    }
 
    .success-modal p {
        font-size: 13px;
    }
}
 
