/* ... existing imports ... */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif !important;
}

/* Headings and Links */
h1,
h2,
h3,
h4,
h5,
h6,
a,
p,
span,
li,
button,
input,
select,
textarea {
    font-family: 'Cairo', sans-serif !important;
}

/* Float and Text Align fixes */
.float-left {
    float: right !important;
}

.float-right {
    float: left !important;
}

.text-left {
    text-align: right !important;
}

.text-right {
    text-align: left !important;
}

/* Header Info */
.header-contact-info .item .item-inner {
    flex-direction: row;
}

.header-contact-info .item .item-inner .item-thumb {
    margin-right: 0;
    margin-left: 15px;
}

.header-contact-info .item-content {
    text-align: right;
}

/* Navigation */
.main-menu li {
    float: right;
}

.nav-widget {
    float: left;
}

/* Icons */
.icofont-rounded-double-right:before,
.icofont-double-right:before {
    content: "\ea99";
    transform: rotate(180deg);
    display: inline-block;
}

/* Mobile Menu */
.mobile-menu .mobile-menu-wrapper .logo {
    float: right;
}

.mobile-menu .mobile-menu-wrapper .open-menu {
    float: left;
}

/* Utils */
.ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Banner & Footer */
.banner-section .banner-content {
    text-align: right;
}

/* Footer Logo Adjustment */
.footer-section .footer-about .top .footer-logo {
    float: none;
    display: block;
    clear: both;
    margin-bottom: 15px;
    max-width: 200px;
}

.footer-section .footer-about .top .footer-logo img {
    width: 100%;
    height: auto;
}

.footer-section .footer-about p {
    text-align: right;
}

/* Service / Feature Items */
.feature-item .lab-inner {
    text-align: right;
}

/* Appointment Form */
.appointment-section .appointment-right form input,
.appointment-section .appointment-right form select {
    text-align: right;
}

/* Sidebar / Widgets */
.widget-title h3:before,
.widget-title h3:after {
    right: 0;
    left: auto;
}

/* About Page Specific Fixes */
.about-description,
.about-description p,
.post-content,
.post-content p {
    text-align: justify !important;
    text-justify: inter-word;
}

.main-content .post-content ul {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.main-content .post-content ul li {
    float: none !important;
    width: 100%;
    position: relative;
    padding: 10px 0;
    padding-right: 35px !important;
    padding-left: 0 !important;
    text-align: justify !important;
    list-style: none;
}

.main-content .post-content ul li i {
    position: absolute;
    right: 0;
    top: 15px;
    margin: 0 !important;
    color: #0071ef;
}

@media (min-width: 768px) {
    .main-content .post-content ul li {
        width: 50%;
    }

    .main-content .post-content ul li:nth-child(odd) {
        margin-left: 0 !important;
        padding-left: 15px !important;
    }

    .main-content .post-content ul li:nth-child(even) {
        margin-right: 0 !important;
        padding-right: 35px !important;
    }
}

.department-widget .widget-wrapper ul li {
    padding-right: 0 !important;
    padding-left: 0 !important;
    text-align: right;
    position: relative;
    list-style: none;
}

.department-widget .widget-wrapper ul li a {
    display: block;
    padding-right: 30px !important;
    position: relative;
}

.department-widget .widget-wrapper ul li a::after {
    right: 0 !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) rotate(180deg) !important;
    position: absolute !important;
}

.service-single .main-content .post-content {
    text-align: right;
}

.appointment-section .appointment-right form select,
.appointment-widget .widget-wrapper form select,
.outline-select select {
    padding-left: 60px !important;
    padding-right: 20px !important;
    text-align: right;
}

.outline-select .select-icon {
    left: 0 !important;
    right: auto !important;
    border-radius: 3px 0 0 3px;
}

/* Doctor Card */
.doctor-list-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -15px;
    justify-content: center;
}

.doctor-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 35px 20px;
    margin: 15px;
    width: 100%;
    text-align: center;
    border: 1px solid #f0f4f8;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .doctor-card {
        width: calc(50% - 30px);
    }
}

.doctor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 113, 239, 0.1);
    border-color: #0071ef;
}

.doctor-card .doctor-thumb {
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.doctor-card .doctor-thumb img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #f6faff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.doctor-card:hover .doctor-thumb img {
    border-color: #0071ef;
    transform: scale(1.05);
}

.doctor-card .doctor-content .name {
    margin-bottom: 5px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0e2258;
}

.doctor-card .doctor-content .specialty {
    display: block;
    color: #0071ef;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.doctor-card .doctor-content .description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 25px;
    padding: 0 5px;
}

.doctor-card .contact-info {
    border-top: 1px solid #ecf0f3;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.doctor-card .contact-info .contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 0.9rem;
}

.doctor-card .contact-info .contact-row i {
    color: #0071ef;
    font-size: 1.1rem;
}

.doctor-card .contact-info .contact-row a {
    color: #555;
    transition: color 0.3s;
    font-weight: 500;
}

/* Header Search */
.nav-widget .nav-search .search {
    right: auto;
    left: 0;
}

.nav-widget .nav-search input {
    padding-left: 50px;
    padding-right: 20px;
    text-align: right;
}

/* Logo */
.logo {
    width: 271px;
    height: auto;
    display: inline-block;
}

@media (max-width: 480px) {
    .logo {
        width: 180px;
    }
}

.logo img {
    width: 100%;
    height: auto;
    display: block;
}

/* === FIXES for Footer === */

/* Fix Footer Subscription Input for RTL */
.footer-section.style-1 .footer-top .footer-about .bottom .news-input {
    position: relative;
    display: flex;
}

.footer-section.style-1 .footer-top .footer-about .bottom .news-input::after {
    left: 15px !important;
    right: auto !important;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
    /* content is inherited */
}

.footer-section.style-1 .footer-top .footer-about .bottom .news-input input[type=text] {
    padding-left: 40px !important;
    padding-right: 15px !important;
    text-align: right;
    width: 100%;
}

/* Fix Footer Contact Info Alignment (Address next to Icon) */
.footer-section.style-1 .contact-info .lab-ul li {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5px 0;
}

.footer-section.style-1 .contact-info .lab-ul li i {
    margin-left: 10px;
    margin-top: 5px;
    /* Visual baseline adjustment */
    flex-shrink: 0;
}

.footer-section.style-1 .contact-info .lab-ul li a {
    display: inline-block;
    text-align: right;
}

/* Fix Newsletter Section Spacing */
.newsletter-section .news-title {
    margin-left: 30px;
}

@media (max-width: 767px) {
    .newsletter-section .news-title {
        margin-left: 0;
        margin-bottom: 20px;
    }
}