/*
 * Raha Clinic Custom Stylesheet - Enhanced Header
 * Version: 2.0
*/

/* 1. Brand Color Palette & Fonts */
:root {
    --raha-dark-blue: #0C0C5E;
    --raha-turquoise: #4BE0C2;
    --raha-light-violet: #C96EFF;
    --raha-dark-violet: #7A2DCC;
    --raha-text-primary: #343a40;
    --raha-text-secondary: #6c757d;
    --raha-border-light: #e9ecef;
    --raha-bg-light: #f8f9fa;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--raha-text-primary);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--raha-dark-blue);
    font-weight: 700;
}

/* 2. Enhanced Header Styles */
.header-section {
    background-color: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

.header-section .navbar {
    padding: 1rem 0;
    min-height: 80px;
}

/* Logo and Brand */
.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-logo {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
}

.navbar-brand-text {
    color: var(--raha-dark-blue) !important;
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.3s ease;
}

/* Navigation Links - Enhanced */
.header-section .navbar-nav {
    align-items: center;
}

.header-section .navbar-nav .nav-item {
    margin: 0 8px;
}

.header-section .navbar-nav .nav-link {
    font-size: 0.95rem; /* Slightly smaller font */
    font-weight: 500;
    color: var(--raha-text-primary);
    padding: 8px 12px; /* Reduced padding */
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    text-decoration: none;
}

/* Active and Hover States */
.header-section .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--raha-turquoise);
    transition: width 0.3s ease-in-out;
    border-radius: 1px;
}

/* RTL Support for nav links */
[dir="rtl"] .header-section .navbar-nav .nav-link::after {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

.header-section .navbar-nav .nav-link:hover,
.header-section .navbar-nav .nav-link.active {
    color: var(--raha-turquoise);
    background-color: rgba(75, 224, 194, 0.08);
}

.header-section .navbar-nav .nav-link:hover::after,
.header-section .navbar-nav .nav-link.active::after {
    width: 70%;
}

/* Language Switcher - Enhanced */
.language-switcher {
    position: relative;
}

.language-toggle {
    background: none;
    border: 1px solid var(--raha-border-light);
    color: var(--raha-text-primary);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.language-toggle:hover,
.language-toggle:focus {
    border-color: var(--raha-turquoise);
    color: var(--raha-turquoise);
    box-shadow: 0 2px 8px rgba(75, 224, 194, 0.2);
    outline: none;
}

.language-switcher .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--raha-border-light);
    padding: 8px 0;
    min-width: 160px;
    margin-top: 8px;
}

.language-switcher .dropdown-item {
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--raha-text-primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.language-switcher .dropdown-item:hover {
    background-color: rgba(75, 224, 194, 0.1);
    color: var(--raha-turquoise);
}

.language-switcher .dropdown-item.active {
    background-color: rgba(75, 224, 194, 0.15);
    color: var(--raha-turquoise);
    font-weight: 600;
}

/* Enhanced Buttons */
.btn-primary {
    background-color: var(--raha-turquoise);
    border-color: var(--raha-turquoise);
    padding: 10px 25px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #38c9ad;
    border-color: #38c9ad;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 224, 194, 0.4);
}

.btn-outline-primary {
    border-color: var(--raha-turquoise);
    color: var(--raha-turquoise);
    padding: 10px 25px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--raha-turquoise);
    border-color: var(--raha-turquoise);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 224, 194, 0.4);
}

/* Auth Buttons Container */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Navbar End Section */
.navbar-end-section {
    gap: 15px;
}

/* Mobile Styles - Enhanced */
.navbar-toggler {
    border: none;
    padding: 6px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(75, 224, 194, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2812, 12, 94, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Off-canvas Enhanced Styles */
.offcanvas-header {
    background: linear-gradient(135deg, var(--raha-dark-blue) 0%, var(--raha-turquoise) 100%);
    color: white;
    padding: 20px;
}

.offcanvas-title {
    color: white !important;
    font-weight: 600;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.offcanvas-body {
    padding: 0;
    background-color: #ffffff;
}

.offcanvas-body .nav-link {
    padding: 16px 24px;
    font-size: 1.1rem;
    color: var(--raha-text-primary);
    border-bottom: 1px solid #f1f3f4;
    display: block;
    width: 100%;
    text-align: right;
    text-decoration: none;
    transition: all 0.3s ease;
}

.offcanvas-body .nav-link:hover,
.offcanvas-body .nav-link.active {
    background-color: rgba(75, 224, 194, 0.1);
    color: var(--raha-turquoise);
    border-left: 4px solid var(--raha-turquoise);
}

/* RTL Support for mobile menu */
[dir="rtl"] .offcanvas-body .nav-link:hover,
[dir="rtl"] .offcanvas-body .nav-link.active {
    border-left: none;
    border-right: 4px solid var(--raha-turquoise);
}

.mobile-auth-section {
    padding: 20px 24px;
    background-color: var(--raha-bg-light);
}

.mobile-auth-section .btn {
    width: 100%;
    margin-bottom: 10px;
}

/* Responsive Enhancements */
@media (max-width: 991.98px) {
    .header-section .navbar {
        padding: 0.75rem 0;
        min-height: 70px;
    }
    
    .navbar-brand-text {
        font-size: 1.1rem;
    }
    
    .navbar-logo {
        height: 45px;
    }
}

@media (max-width: 768px) {
    .navbar-brand-text {
        font-size: 1rem;
    }
    
    .navbar-logo {
        height: 40px;
    }
}

@media (max-width: 576px) {
    .navbar-brand-text {
        display: none;
    }
    
    .header-section .navbar {
        padding: 0.5rem 0;
        min-height: 60px;
    }
}

/* Helper Classes */
.bg-turquoise {
    background-color: var(--raha-turquoise) !important;
}

.bg-dark-blue {
    background-color: var(--raha-dark-blue) !important;
}

.text-turquoise {
    color: var(--raha-turquoise) !important;
}

/* Animation for sticky header */
.header-section.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-section.scrolled .navbar {
    padding: 0.5rem 0;
    min-height: 70px;
}

.header-section.scrolled .navbar-logo {
    height: 45px;
}

/* Hero Section Styles (Carousel) - (Maintained in case it's used elsewhere) */
.hero-section {
    position: relative;
    height: 90vh;
    width: 100%;
    color: white;
}

#heroCarousel,
.carousel-inner,
.carousel-item {
    height: 100%;
}

.carousel-image-container {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(12, 12, 94, 0.8) 0%, rgba(12, 12, 94, 0.4) 100%);
    z-index: 1;
}

.carousel-caption {
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: 8%;
    z-index: 2;
    width: 100%;
}

[dir="rtl"] .carousel-caption {
    text-align: right !important;
}
[dir="ltr"] .carousel-caption {
    text-align: left !important;
}

.carousel-caption h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

.carousel-caption p {
    font-size: 1.25rem;
    max-width: 80%;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50%;
    background-color: white !important;
    opacity: 0.5;
}

.carousel-indicators button.active {
    opacity: 1;
    background-color: var(--raha-turquoise) !important;
}

@media (max-width: 768px) {
    .hero-section {
        height: 70vh;
    }
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
    .carousel-caption p {
        font-size: 1rem;
        max-width: 100%;
    }
}


/* 3. Hero Section Styles (Hybrid Dynamic/Simple) */
.simple-hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh; /* Adjust height for a balanced look */
    overflow: hidden;
}

.hero-background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.hero-background-slider .carousel-inner, .hero-background-slider .carousel-item {
    height: 100%;
}
.carousel-background-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1.5s ease-in-out;
}
/* Ken Burns Effect */
.carousel-item.active .carousel-background-image {
    transform: scale(1.1);
}

.carousel-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--raha-dark-blue);
    opacity: 0.7;
}

.hero-content-container {
    position: relative;
    z-index: 2;
    color: white;
}

#heroTextCarousel .carousel-item h1, #heroTextCarousel .carousel-item h2, #heroTextCarousel .carousel-item h3 {
    color: white;
    font-weight: 700;
}
#heroTextCarousel .carousel-item p {
    color: rgba(255, 255, 255, 0.9);
}
#heroTextCarousel .carousel-control-prev-icon,
#heroTextCarousel .carousel-control-next-icon {
    background-color: var(--raha-turquoise);
    border-radius: 50%;
    padding: 1.2rem;
}

@media (max-width: 768px) {
    .simple-hero-section {
        min-height: 60vh;
        padding: 2rem 0;
    }
}

/* Services Section Styles */
.services-section {
    background-color: #f8f9fa;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--raha-turquoise);
}

.service-card .card {
    transition: all 0.3s ease-in-out;
}

.service-card:hover .card {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.service-card .icon-container {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background-color: #e9fbf8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.service-card:hover .icon-container {
    background-color: var(--raha-turquoise);
}
.service-card:hover .icon-container img{
    filter: brightness(0) invert(1);
}

/* Adding styles for the "View All" services card */
.card-view-all {
    border: 2px dashed var(--raha-turquoise) !important;
    background-color: #f8f9fa;
}

.card-view-all .icon-container-all i {
    font-size: 4rem; /* Big icon */
    color: var(--raha-turquoise);
    transition: transform 0.3s ease;
}

.card-view-all:hover .icon-container-all i {
    transform: scale(1.1) translateX(-5px); /* Move arrow slightly on hover */
}

/* Make sure RTL works for the arrow */
[dir="rtl"] .card-view-all:hover .icon-container-all i {
    transform: scale(1.1) translateX(5px);
}

/* Features Section Styles */
.features-section {
    background-color: #ffffff; 
}

.feature-card {
    background-color: #fff;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--raha-turquoise);
}

.feature-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto;
    background-color: #e9fbf8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Testimonials Section - Enhanced Rectangular Cards (UPDATED) */
.testimonials-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.testimonial-slider {
    margin: 2rem -15px;
    padding: 0 15px;
}

.testimonial-item {
    padding: 0 10px;
    margin-bottom: 20px;
}

.testimonial-item .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.testimonial-item .card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.testimonial-item .card::before {
    content: "\201C";
    font-family: Georgia, serif;
    font-size: 5rem;
    color: var(--raha-turquoise);
    opacity: 0.2;
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
    z-index: 0;
}

.testimonial-item .card-text {
    position: relative;
    z-index: 1;
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testimonial-item .client-info {
    margin-top: auto;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.testimonial-item .client-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 15px;
    border: 3px solid var(--raha-turquoise);
}

[dir="rtl"] .testimonial-item .client-img {
    margin-left: 0;
    margin-right: 15px;
}

.testimonial-item .client-name {
    font-weight: 700;
    color: var(--raha-dark-blue);
    margin-bottom: 0.2rem;
}

.testimonial-item .client-position {
    color: var(--raha-text-secondary);
    font-size: 0.9rem;
}

/* Hover Effects */
.testimonial-item .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .testimonial-item .card {
        min-height: 300px;
    }
}

@media (max-width: 992px) {
    .testimonial-item .card {
        min-height: 280px;
    }
    
    .testimonial-item .card-text {
        -webkit-line-clamp: 3;
    }
}

@media (max-width: 768px) {
    .testimonials-section {
        padding: 3rem 0;
    }
    
    .testimonial-item .card {
        min-height: 240px;
        margin: 0 auto;
        max-width: 400px;
    }
    
    .testimonial-item .card::before {
        font-size: 4rem;
    }
    
    .testimonial-item .card-body {
        padding: 20px;
    }
    
    .testimonial-item .client-img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .testimonial-item .card {
        min-height: 220px;
    }
    
    .testimonial-item .card-text {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
    }
    
    .testimonial-item .client-name {
        font-size: 0.95rem;
    }
    
    .testimonial-item .client-position {
        font-size: 0.85rem;
    }
}

/* Footer Styles */
.footer-section {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.footer-title {
    color: var(--raha-dark-blue);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--raha-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--raha-turquoise);
}

.social-icon {
    font-size: 1.5rem;
    color: var(--raha-dark-blue);
    margin-right: 15px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--raha-turquoise);
    transform: scale(1.1);
}

.footer-bottom {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .testimonials-section:after {
        content: '← اسحب لعرض البطاقات →';
        display: block;
        text-align: center;
        color: var(--raha-text-secondary);
        font-size: 0.85rem;
        margin-top: 15px;
    }
    
    [dir="rtl"] .testimonials-section:after {
        content: '→ اسحب لعرض البطاقات ←';
    }
}

/* 8. Blog Section Styles */
.blog-section {
    background-color: #ffffff; /* Ensuring it's not transparent */
}

.blog-card {
    transition: all 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12) !important;
}

.blog-card .card-img-top {
    height: 220px;
    object-fit: cover;
}

.blog-card .card-body {
    z-index: 2; /* Ensures content is on top */
    position: relative; /* Needed for z-index to work */
}

.blog-card .card-title .blog-title-link {
    color: var(--raha-dark-blue) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card:hover .card-title .blog-title-link {
    color: var(--raha-turquoise) !important;
}

.blog-card .badge.bg-turquoise {
    background-color: rgba(75, 224, 194, 0.2) !important;
    color: var(--raha-dark-blue) !important; /* Making it more readable */
    font-weight: 500;
}

/*
========================================
10. Global Fixes for Layout Issues
========================================
*/

/* Ensure all top-level sections have a defined position context */
section {
    position: relative;
    z-index: 1; /* Default z-index for all sections */
}

/* Force Slick Slider to stay within its bounds and behind other content */
.slick-slider {
    position: relative;
    z-index: 1; /* Lower z-index for sliders */
}

/* Make sure individual slides do not cause overflow issues */
.slick-slide {
    outline: none; /* Removes focus outline which can cause layout shifts */
}

/* Ensure blog cards are rendered on top */
.blog-card, .testimonial-item, .feature-card {
    background-color: #fff; /* Explicitly set background color */
}

/* Force AOS animated items to behave correctly */
[data-aos] {
    z-index: 2 !important; /* Temporarily give a higher z-index to animating items */
}

/* Give our main page sections a slightly higher stack order to prevent overlaps */
.services-section,
.features-section,
.testimonials-section,
.blog-section,
.cta-section {
    z-index: 5;
    position: relative; /* Make z-index effective */
}

/* 9. Call to Action (CTA) Section Styles */
.cta-section .cta-content {
    background: linear-gradient(135deg, var(--raha-dark-violet) 0%, var(--raha-dark-blue) 100%);
}
.cta-section .btn-light {
    font-weight: bold;
    color: var(--raha-dark-blue);
}

/* 10. About Us Page Styles */
.page-header-section {
    background: linear-gradient(135deg, rgba(12, 12, 94, 0.85) 0%, rgba(75, 224, 194, 0.85) 100%), url('/assets/front/image/breadcrumb-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 60px 0;
}
.page-header-section h1 {
    color: white;
}
.page-header-section .breadcrumb {
    background-color: transparent;
    padding: 0;
}
.page-header-section .breadcrumb-item,
.page-header-section .breadcrumb-item a,
.page-header-section .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}
.page-header-section .breadcrumb-item a:hover {
    color: white;
}
.page-header-section .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.about-raha-section .about-content p {
    line-height: 1.8;
    color: var(--raha-text-secondary);
}

.mission-vision-section .info-card {
    background-color: white;
    border-radius: 15px;
    border: 1px solid var(--raha-border-light);
    transition: all 0.3s ease;
}
.mission-vision-section .info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.mission-vision-section .info-icon {
    font-size: 3rem;
    color: var(--raha-turquoise);
}

/* 11. Blog Grid Page Styles */
.blog-grid-section .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
}

.blog-grid-section .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.sidebar-widget .widget-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--raha-border-light);
}

.sidebar-widget .widget-title {
    font-size: 1.25rem;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--raha-turquoise);
    position: relative;
}

.sidebar-widget .list-group-item {
    border: none;
    padding: 10px 0;
    color: var(--raha-text-secondary);
    transition: all 0.2s ease;
}

.sidebar-widget .list-group-item:hover {
    color: var(--raha-turquoise);
    transform: translateX(-5px);
}
[dir="rtl"] .sidebar-widget .list-group-item:hover {
    transform: translateX(5px);
}

.recent-post-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}
.recent-post-item h6 a {
    font-size: 0.95rem;
    font-weight: bold;
    transition: color 0.3s ease;
}
.recent-post-item h6 a:hover {
    color: var(--raha-turquoise) !important;
}

.pagination .page-item .page-link {
    border-radius: 50%;
    margin: 0 5px;
    border-color: var(--raha-border-light);
    color: var(--raha-dark-blue);
}

.pagination .page-item.active .page-link {
    background-color: var(--raha-turquoise);
    border-color: var(--raha-turquoise);
    color: white;
}

.pagination .page-item:disabled .page-link {
    color: #6c757d;
}

/* 12. Contact Page Styles */
.contact-form-wrapper {
    background-color: var(--raha-bg-light);
    border-radius: 15px;
}
.contact-form-wrapper .form-control {
    padding: 12px 15px;
}
.contact-form-wrapper .form-control:focus {
    border-color: var(--raha-turquoise);
    box-shadow: 0 0 0 0.25rem rgba(75, 224, 194, 0.25);
}

.contact-info-wrapper .contact-icon {
    width: 50px;
    height: 50px;
    background-color: #e9fbf8;
    color: var(--raha-turquoise);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0; /* Prevents icon from shrinking */
}

[dir="rtl"] .contact-icon {
    margin-left: 1rem;
    margin-right: 0;
}

[dir="ltr"] .contact-icon {
    margin-right: 1rem;
    margin-left: 0;
}

/* Enhanced Medical Analysis Page Styles */

/* Carousel styling */
#analysisSlider .carousel-inner img {
    height: 350px;
    object-fit: cover;
}
@media (max-width: 768px) {
    #analysisSlider .carousel-inner img {
        height: 200px;
    }
}

/* Card image styling */
.analysis-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

/* Enhanced Basket Styling */
.basket-widget {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.basket-title {
    background: linear-gradient(77deg, rgba(59, 216, 173, 0.8) 7.19%, rgba(11, 11, 99, 0.8) 129.88%);
    color: white;
}
.basket-title h5 {
    color: white;
}

.basket-item {
    background: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.basket-items-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

/* ================================================
   Enhanced Post Details Page Styles (SEO & UX Optimized)
   ================================================ */

/* CSS Custom Properties for Better Maintainability */
:root {
    --post-primary-color: #4BEBCA;
    --post-secondary-color: #0C0C5E;
    --post-text-primary: #2c3e50;
    --post-text-secondary: #7f8c8d;
    --post-border-light: #e9ecef;
    --post-shadow-light: 0 2px 10px rgba(0,0,0,0.05);
    --post-shadow-medium: 0 5px 20px rgba(0,0,0,0.1);
    --post-shadow-strong: 0 10px 30px rgba(0,0,0,0.15);
    --post-border-radius: 15px;
    --post-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Breadcrumb Navigation */
.breadcrumb-nav {
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--post-border-light);
}

.breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, ">");
    color: var(--post-text-secondary);
}

.breadcrumb-item a {
    color: var(--post-primary-color);
    transition: var(--post-transition);
}

.breadcrumb-item a:hover {
    color: var(--post-secondary-color);
    text-decoration: underline !important;
}

.breadcrumb-item.active {
    color: var(--post-text-primary);
    font-weight: 500;
}

/* Enhanced Post Header */
.post-header-section {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 120px 0 80px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.post-header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(12, 12, 94, 0.8), rgba(75, 235, 202, 0.3));
    z-index: 1;
}

.post-header-section > .container {
    position: relative;
    z-index: 2;
}

.post-header-section h1 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.post-header-section .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    transition: var(--post-transition);
}

.post-header-section .badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--post-shadow-medium);
}

.post-meta {
    font-size: 1rem;
    opacity: 0.95;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    margin: 0 0.5rem;
}

.post-meta i {
    margin-inline-end: 0.5rem;
}

/* Reading Progress Bar - Enhanced for Sticky behavior */
.reading-progress-container {
    position: sticky; /* <-- The most important change */
    top: 80px;      /* Adjust this value to be exactly the height of your sticky header */
    z-index: 1020;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.25rem;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Optional: add a subtle shadow */
    transition: top 0.3s ease; /* Smooth transition for header hide/show */
}

.reading-progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--raha-turquoise), var(--raha-dark-violet)); /* A nice gradient */
    border-radius: 2px;
    width: 0%; /* Initial state */
    transition: width 0.1s linear;
}

.reading-progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--post-primary-color), var(--post-secondary-color));
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(75, 235, 202, 0.3);
}

/* Enhanced Main Content Section */
.post-content-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
    position: relative;
}

.post-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, var(--post-secondary-color) 0%, transparent 100%);
    opacity: 0.03;
    pointer-events: none;
}

/* Enhanced Article Body */
.post-content-body {
    background: #ffffff;
    padding: 3rem;
    border-radius: var(--post-border-radius);
    box-shadow: var(--post-shadow-strong);
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--post-text-primary);
    position: relative;
    margin-bottom: 2rem;
}

.post-content-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--post-primary-color), var(--post-secondary-color));
    border-radius: var(--post-border-radius) var(--post-border-radius) 0 0;
}

@media (max-width: 768px) {
    .post-content-body {
        padding: 2rem 1.5rem;
        font-size: 1rem;
    }
    
    .post-header-section {
        padding: 80px 0 60px;
        background-attachment: scroll;
    }
}

/* Enhanced Typography */
.post-content-body h1,
.post-content-body h2,
.post-content-body h3,
.post-content-body h4,
.post-content-body h5,
.post-content-body h6 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    color: var(--post-secondary-color);
    line-height: 1.3;
    position: relative;
}

.post-content-body h2 {
    font-size: 1.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--post-primary-color);
}

.post-content-body h3 {
    font-size: 1.5rem;
    color: var(--post-primary-color);
}

.post-content-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.post-content-body a {
    color: var(--post-primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--post-transition);
    border-bottom: 1px solid transparent;
}

.post-content-body a:hover {
    color: var(--post-secondary-color);
    border-bottom-color: var(--post-secondary-color);
}

/* Enhanced Image Styling */
.post-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--post-border-radius);
    box-shadow: var(--post-shadow-medium);
    margin: 2rem 0;
    transition: var(--post-transition);
    cursor: zoom-in;
}

.post-content-body img:hover {
    transform: scale(1.02);
    box-shadow: var(--post-shadow-strong);
}

/* Enhanced List Styling */
.post-content-body ul,
.post-content-body ol {
    margin-bottom: 1.5rem;
    padding-inline-start: 2rem;
}

.post-content-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.post-content-body ul li::marker {
    color: var(--post-primary-color);
}

.post-content-body ol li::marker {
    color: var(--post-secondary-color);
    font-weight: 600;
}

/* Enhanced Blockquote Styling */
.post-content-body blockquote {
    background: linear-gradient(135deg, rgba(75, 235, 202, 0.1), rgba(12, 12, 94, 0.05));
    border-left: 4px solid var(--post-primary-color);
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-radius: 0 var(--post-border-radius) var(--post-border-radius) 0;
    font-style: italic;
    font-size: 1.1rem;
    position: relative;
}

.post-content-body blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--post-primary-color);
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-family: Georgia, serif;
    opacity: 0.3;
}

/* Enhanced Table Styling */
.post-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: var(--post-border-radius);
    overflow: hidden;
    box-shadow: var(--post-shadow-light);
}

.post-content-body th,
.post-content-body td {
    padding: 1rem;
    text-align: start;
    border-bottom: 1px solid var(--post-border-light);
}

.post-content-body th {
    background: linear-gradient(135deg, var(--post-primary-color), var(--post-secondary-color));
    color: white;
    font-weight: 600;
}

.post-content-body tr:nth-child(even) {
    background-color: rgba(75, 235, 202, 0.05);
}

/* Enhanced Table of Contents */
.toc-container {
    background: #ffffff;
    border-radius: var(--post-border-radius);
    box-shadow: var(--post-shadow-light);
    border: 1px solid var(--post-border-light);
    overflow: hidden;
}

.toc-container .accordion-button {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 700;
    color: var(--post-secondary-color);
    border: none;
    padding: 1rem 1.5rem;
}

.toc-container .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--post-primary-color), rgba(75, 235, 202, 0.8));
    color: white;
    box-shadow: none;
}

.toc-container .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(75, 235, 202, 0.25);
    border: none;
}

.toc-container .accordion-body {
    padding: 1.5rem;
    background: #ffffff;
}

.toc-list {
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin-bottom: 0.75rem;
    list-style: none;
}

.toc-list a {
    color: var(--post-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--post-transition);
    display: block;
    padding: 0.5rem 0;
    border-radius: 5px;
    position: relative;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--post-primary-color);
    background: rgba(75, 235, 202, 0.1);
    padding-inline-start: 1rem;
    transform: translateX(5px);
}

.toc-list a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 100%;
    background: var(--post-primary-color);
    border-radius: 1px;
}

/* Enhanced FAQ Section */
.faq-section .accordion-item {
    border: 1px solid var(--post-border-light);
    border-radius: var(--post-border-radius) !important;
    margin-bottom: 1rem;
    box-shadow: var(--post-shadow-light);
    overflow: hidden;
    transition: var(--post-transition);
}

.faq-section .accordion-item:hover {
    box-shadow: var(--post-shadow-medium);
    transform: translateY(-2px);
}

.faq-section .accordion-button {
    font-weight: 600;
    color: var(--post-secondary-color);
    background: #ffffff;
    border: none;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
}

.faq-section .accordion-button:not(.collapsed) {
    color: var(--post-primary-color);
    background: linear-gradient(135deg, rgba(75, 235, 202, 0.1), rgba(12, 12, 94, 0.05));
    box-shadow: none;
}

.faq-section .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(75, 235, 202, 0.25);
    border: none;
}

.faq-section .accordion-body {
    padding: 1.5rem;
    background: #ffffff;
    color: var(--post-text-primary);
    line-height: 1.7;
}

/* Enhanced Share Section */
.share-section {
    background: linear-gradient(135deg, rgba(75, 235, 202, 0.1), rgba(12, 12, 94, 0.05));
    border: 1px solid var(--post-border-light);
    position: relative;
    overflow: hidden;
}

.share-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--post-primary-color), var(--post-secondary-color));
}

.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #ffffff;
    color: #666;
    text-decoration: none;
    border-radius: 50%;
    transition: var(--post-transition);
    box-shadow: var(--post-shadow-light);
    border: 2px solid transparent;
    font-size: 1.2rem;
}

.social-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--post-shadow-medium);
}

.social-share-btn.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.social-share-btn.twitter:hover {
    background: #000000;
    color: white;
    border-color: #000000;
}

.social-share-btn.whatsapp:hover {
    background: #25d366;
    color: white;
    border-color: #25d366;
}

.social-share-btn.linkedin:hover {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.social-share-btn.copy-link:hover {
    background: var(--post-primary-color);
    color: white;
    border-color: var(--post-primary-color);
}

/* Enhanced Sidebar Widgets */
.sidebar-widget .widget-item {
    background: #ffffff;
    border-radius: var(--post-border-radius);
    box-shadow: var(--post-shadow-light);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--post-border-light);
    transition: var(--post-transition);
}

.sidebar-widget .widget-item:hover {
    box-shadow: var(--post-shadow-medium);
    transform: translateY(-2px);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--post-secondary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--post-primary-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--post-secondary-color);
}

/* Author Widget */
.author-widget {
    text-align: center;
    background: linear-gradient(135deg, rgba(75, 235, 202, 0.05), rgba(12, 12, 94, 0.02));
}

.author-avatar img {
    border: 3px solid var(--post-primary-color);
    transition: var(--post-transition);
}

.author-avatar img:hover {
    transform: scale(1.1);
    box-shadow: var(--post-shadow-medium);
}

/* Recent Posts Styling */
.recent-post-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--post-border-light);
    transition: var(--post-transition);
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-item:hover {
    background: rgba(75, 235, 202, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin: 0 -1rem;
}

.post-thumbnail {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 10px;
    width: 80px;
    height: 60px;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--post-transition);
}

.post-thumbnail:hover img {
    transform: scale(1.1);
}

.post-info h6 a {
    color: var(--post-text-primary);
    transition: var(--post-transition);
    line-height: 1.4;
}

.post-info h6 a:hover {
    color: var(--post-primary-color);
}

/* Article Tags */
.article-tags {
    background: linear-gradient(135deg, rgba(75, 235, 202, 0.05), rgba(12, 12, 94, 0.02));
    border: 1px solid var(--post-border-light);
}

.article-tags .badge {
    background: var(--post-primary-color) !important;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--post-transition);
}

.article-tags .badge:hover {
    background: var(--post-secondary-color) !important;
    transform: translateY(-2px);
    box-shadow: var(--post-shadow-light);
}

/* Post Navigation */
.post-navigation .nav-post-link {
    background: #ffffff;
    transition: var(--post-transition);
    color: var(--post-text-primary);
}

.post-navigation .nav-post-link:hover {
    background: linear-gradient(135deg, rgba(75, 235, 202, 0.1), rgba(12, 12, 94, 0.05));
    color: var(--post-secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--post-shadow-medium);
}

.post-navigation .prev-post:hover::before {
    content: '← ';
    font-weight: bold;
}

.post-navigation .next-post:hover::after {
    content: ' →';
    font-weight: bold;
}

/* Quick Actions Widget */
.quick-actions .btn {
    transition: var(--post-transition);
    border-radius: 25px;
    font-weight: 500;
}

.quick-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--post-shadow-light);
}

/* Enhanced Responsive Design */
@media (max-width: 991.98px) {
    .post-content-body {
        padding: 2rem;
    }
    
    .sidebar-widget {
        margin-top: 3rem;
    }
    
    .social-share-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .post-header-section {
        padding: 60px 0 40px;
    }
    
    .post-header-section h1 {
        font-size: 1.75rem;
    }
    
    .post-content-body {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .share-section .d-flex {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .social-share-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .toc-container,
    .share-section,
    .sidebar-widget,
    .post-navigation,
    .reading-progress-container,
    .quick-actions,
    .breadcrumb-nav {
        display: none !important;
    }
    
    .post-content-body {
        box-shadow: none !important;
        padding: 1rem;
    }
    
    .post-header-section {
        background-image: none !important;
        color: #000 !important;
        padding: 2rem 0;
    }
    
    .post-content-section {
        background: white !important;
    }
    
    .col-lg-8 {
        width: 100% !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --post-text-primary: #e8e6e3;
        --post-text-secondary: #a8a29e;
        --post-border-light: #374151;
    }
    
    .post-content-section {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }
    
    .post-content-body {
        background: #1f2937;
        color: var(--post-text-primary);
    }
    
    .sidebar-widget .widget-item {
        background: #1f2937;
        border-color: var(--post-border-light);
    }
    
    .toc-container,
    .faq-section .accordion-item {
        background: #1f2937;
        border-color: var(--post-border-light);
    }
    
    .accordion-button {
        background: #374151;
        color: var(--post-text-primary);
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
*:focus {
    outline: 2px solid var(--post-primary-color);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .post-content-body {
        border: 2px solid var(--post-text-primary);
    }
    
    .social-share-btn {
        border: 2px solid var(--post-text-primary);
    }
}

/*
================================================
   15. Global Responsive Fixes & Utilities
================================================
*/

/* Main container overflow fix */
body {
    overflow-x: hidden;
}

/* Responsive images inside post content */
.post-content-body img {
    max-width: 100%;
    height: auto; /* This is crucial for responsiveness */
}

/* Responsive tables inside post content */
.post-content-body table {
    display: block; /* Allows table to be scrollable horizontally */
    overflow-x: auto;
    white-space: nowrap; /* Prevents text from wrapping inside cells */
}

/* Word wrapping for long code snippets and URLs */
.post-content-body pre,
.post-content-body code,
.post-content-body a {
    word-wrap: break-word;
    white-space: pre-wrap; /* Allows breaking of long lines */
}

/* Force bootstrap containers to not have horizontal padding causing overflow */
.container, .container-fluid {
    padding-right: 15px; /* Default Bootstrap gutter */
    padding-left: 15px;  /* Default Bootstrap gutter */
}

/* Overriding specific problematic row behavior if needed */
.row {
    margin-right: -15px; /* Ensure row fits within container padding */
    margin-left: -15px;
}

.row > * {
    padding-right: 15px;
    padding-left: 15px;
}

/* Fix for Flatpickr z-index issue */
.flatpickr-calendar {
    z-index: 1056 !important; /* Higher than Bootstrap's modal/offcanvas */
}

/*
================================================
   15. Booking Page Specific Styles
================================================
*/

/* --- Header Section --- */
.page-header-section {
    background: linear-gradient(135deg, var(--raha-dark-violet) 0%, var(--raha-dark-blue) 100%);
    padding: 80px 0 120px;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid var(--raha-turquoise);
}

.page-header-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M25 50.003C25 63.81 36.193 75.003 50 75.003S75 63.81 75 50.003 63.807 35 50 35 25 36.196 25 50.003z' fill-opacity='0.05' fill='%23FFF'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.page-header-section h1 {
    color: white !important;
    font-size: 3rem; font-weight: 700;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

/* --- Date Selector --- */
.date-selector-container {
    margin-top: -60px;
    position: relative;
    z-index: 10;
}
.date-selector-bar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px; padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}
.date-selector-bar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.date-scroll-container {
    display: flex; overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 0; gap: 12px;
}
.date-scroll-container::-webkit-scrollbar { display: none; }
.date-item {
    cursor: pointer; padding: 16px 20px; border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center; min-width: 85px; background: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative; overflow: hidden;
}
.date-item::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--gradient-turquoise);
    transition: left 0.4s ease; z-index: -1;
}
.date-item:hover::before, .date-item.active::before { left: 0; }
.date-item:hover, .date-item.active {
    color: white; transform: translateY(-4px) scale(1.05);
    border-color: var(--raha-turquoise);
    box-shadow: 0 8px 25px rgba(32, 178, 170, 0.3);
}
.day-name { font-weight: 600; font-size: 0.85rem; opacity: 0.8; margin-bottom: 4px; }
.day-number { font-weight: 700; font-size: 1.4rem; line-height: 1; }
.datepicker-trigger {
    background: var(--gradient-turquoise); color: white !important;
    border: none; border-radius: 50%;
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4); text-decoration: none;
}
.datepicker-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
    color: white !important;
}

/* --- Doctor Cards --- */
.booking-section { padding: 60px 0; }
.doctor-card-listing {
    background: white; border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(230,230,230,0.8);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.doctor-card-listing:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}
.doctor-info-header { padding: 2rem; background: #fdfdff; }
.doctor-avatar {
    width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
    border: 4px solid var(--raha-turquoise);
}
.doctor-info h4 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.doctor-description, .doctor-experience { color: #64748b; font-size: 0.95rem; }
.price-section { text-align: center; }
.price-amount {
    font-size: 1.8rem; font-weight: 700;
    background: var(--gradient-turquoise);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.price-note { font-size: 0.8rem; }
.time-slots { padding: 2rem; background: #f8f9fa; border-top: 1px solid #e9ecef; }
.slots-title { font-size: 1.1rem; font-weight: 700; color: var(--raha-dark-blue); margin-bottom: 20px; }
.time-slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.time-slot-btn {
    background: white !important; color: var(--raha-dark-blue) !important;
    border: 2px solid #e2e8f0 !important; border-radius: 12px !important;
    padding: 12px 16px; font-weight: 600; text-decoration: none;
    transition: all 0.3s ease; text-align: center; display: block;
}
.time-slot-btn:hover {
    color: white !important;
    border-color: var(--raha-turquoise) !important;
    background: var(--raha-turquoise) !important;
    transform: translateY(-3px); box-shadow: 0 6px 20px rgba(32, 178, 170, 0.3);
}

/* --- Loading & Empty States --- */
.loading-container { text-align: center; padding: 80px 20px; }
.spinner-custom {
    width: 50px; height: 50px; border: 4px solid #f3f4f6;
    border-top-color: var(--raha-turquoise);
    border-radius: 50%; animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.loading-text { color: #64748b; font-size: 1.1rem; font-weight: 500; }
.no-doctors-message { text-align: center; padding: 60px 20px; background: white;
    border-radius: 20px; margin: 20px 0; box-shadow: var(--shadow-soft);
}
.no-doctors-icon { font-size: 4rem; color: #cbd5e1; margin-bottom: 20px; }
.no-doctors-text { font-size: 1.2rem; color: #64748b; font-weight: 500; }



/*
================================================
   16. AI Chatbot Styles (Professional Redesign)
================================================
*/
.chatbot-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1050;
}
[dir="rtl"] .chatbot-container {
    right: auto;
    left: 25px;
}

/* Chat Bubble (the floating icon) */
.chatbot-bubble {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--raha-turquoise) 0%, var(--raha-dark-violet) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem; /* Slightly larger icon */
    color: white;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: pulse 2s infinite;
}
.chatbot-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(122, 45, 204, 0.4);
    animation-play-state: paused; /* Pause animation on hover */
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(75, 224, 194, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(75, 224, 194, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(75, 224, 194, 0); }
}

/* Notification Dot */
.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    background-color: #e63946; /* A more vibrant red */
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}
[dir="rtl"] .notification-dot {
    right: auto;
    left: -2px;
}

/* Chat Window (main container) */
.chatbot-window {
    width: 370px;
    max-height: 80vh;
    height: 600px;
    background-color: #f8f9fa; /* Slightly off-white background */
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 90px;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[dir="rtl"] .chatbot-window {
    right: auto;
    left: 0;
    transform-origin: bottom left;
}

.chatbot-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--raha-dark-blue) 0%, var(--raha-dark-violet) 100%);
    color: white;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-image: url('/assets/front/image/amal_avatar.png');
    background-size: cover;
    border: 2px solid var(--raha-turquoise);
    margin-right: 12px;
}
[dir="rtl"] .chatbot-avatar { margin-right: 0; margin-left: 12px; }

.chatbot-title h5 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
}
.chatbot-title small {
    font-size: 0.8rem;
    opacity: 0.9;
    color: var(--raha-turquoise);
}

.chatbot-close {
    margin-left: auto;
    background: none; border: none;
    color: white; font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: all 0.2s ease;
}
[dir="rtl"] .chatbot-close { margin-left: 0; margin-right: auto; }
.chatbot-close:hover { opacity: 1; transform: rotate(90deg); }

/* Chat Body (Messages container) */
.chatbot-body {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Space between messages */
}
.chat-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.5;
    word-wrap: break-word;
}
.bot-message {
    background-color: #ffffff;
    border: 1px solid var(--raha-border-light);
    color: var(--raha-text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.user-message {
    background: var(--raha-dark-blue);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Chat Footer & Input */
.chatbot-footer {
    padding: 1rem;
    border-top: 1px solid var(--raha-border-light);
    background: #ffffff;
}
#chatbot-form input {
    flex-grow: 1;
    border: none;
    background: var(--raha-bg-light);
    border-radius: 25px;
    padding: 10px 20px;
    outline: none;
}
#chatbot-form button {
    background: none; border: none; font-size: 1.5rem;
    color: var(--raha-turquoise);
    padding: 0 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
#chatbot-form button:hover {
    transform: scale(1.1);
}
.chatbot-branding { font-size: 0.75rem; text-align: center; margin-top: 0.75rem; color: #b0b0b0; }
.chatbot-branding a { color: #b0b0b0; text-decoration: none; }

/*
============================================================
   18. Toastr Notification Customization (Flasher)
============================================================
*/
.flasher .toastr {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    opacity: 0.95 !important;
    border: none !important;
    font-family: 'Tajawal', sans-serif !important;
}

/* Success Message */
.flasher .toastr-success {
    background-color: var(--raha-turquoise) !important;
}

/* Error Message */
.flasher .toastr-error {
    background-color: #dc3545 !important;
}

/* Warning Message */
.flasher .toastr-warning {
    background-color: #ffc107 !important;
    color: #333 !important;
}

/* Info Message */
.flasher .toastr-info {
    background-color: var(--raha-dark-blue) !important;
}

/* Title Styling */
.flasher .toastr .toastr-title {
    font-weight: 700 !important;
    font-size: 1rem !important;
}

/* Message Body */
.flasher .toastr .toastr-message {
    font-size: 0.95rem !important;
}

/* Progress Bar */
.flasher .toastr .toastr-progress {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

/* Positioning */
#flasher-toastr-container > div {
    position: fixed;
    top: 20px;
    right: 20px; /* Default for LTR */
}

[dir="rtl"] #flasher-toastr-container > div {
    right: auto !important;
    left: 20px !important;
}

