/* src/static/css/radindex.css */

:root {
    --primary-color: #3a8ffe;
    --primary-hover-color: #1d63c3;
    --primary-light: #3b82f6;
    --secondary-color: #047857;
    --secondary-light: #059669;
    --accent-color: #dc2626;
    --info-color: #0891b2;
    --warning-color: #d97706;
    --success-color: #059669;
    
    --background-color: #f8fafc;
    --foreground-color: #ffffff;
    --card-background: #ffffff;
    --section-background: #f1f5f9;
    --text-color: #1e293b;
    --text-muted-color: #64748b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(15, 23, 42, 0.08);
    --shadow-hover-color: rgba(15, 23, 42, 0.15);
    --cta-banner-start: #3a8ffe;
    --cta-banner-mid: #2a7bdc;
    --cta-banner-end: #1e5aa6;
    --cta-banner-text: #ffffff;
    
    --font-family: 'Assistant', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
    --primary-color: #3a8ffe;
    --primary-hover-color: #1d63c3;
    --primary-light: #60a5fa;
    --secondary-color: #10b981;
    --secondary-light: #34d399;
    --accent-color: #ef4444;
    --info-color: #06b6d4;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    
    --background-color: #0f172a;
    --foreground-color: #1e293b;
    --card-background: #334155;
    --section-background: #1e293b;
    --text-color: #f1f5f9;
    --text-muted-color: #94a3b8;
    --border-color: #475569;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover-color: rgba(0, 0, 0, 0.5);
    --cta-banner-start: #2563eb;
    --cta-banner-mid: #1d4ed8;
    --cta-banner-end: #1e3a8a;
    --cta-banner-text: #f8fafc;
}

/* Base Styles */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    transition: all 0.3s ease;
    min-height: 100vh;
}

/* Container Enhancement */
.radindex-container {
    max-width: 1200px;
}

/* Professional Header */
header {
    background-color: var(--foreground-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 700;
    transition: color 0.2s ease;
}

.navbar-brand:hover {
    color: var(--primary-hover-color);
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

[data-theme="light"] .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%2830, 41, 59, 0.75%29' stroke-linecap='round' stroke-miterlimit='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme="dark"] .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%28241, 245, 249, 0.75%29' stroke-linecap='round' stroke-miterlimit='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar .nav-link {
    color: var(--text-muted-color);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(58, 143, 254, 0.1);
}

/* Professional Dark Mode Toggle */
.dark-mode-toggle {
    cursor: pointer;
    color: var(--text-muted-color);
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
}

.dark-mode-toggle:hover {
    color: var(--primary-color);
    background-color: var(--section-background);
    border-color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    padding: 6rem 0;
    background-color: var(--foreground-color);
    border-bottom: 1px solid var(--border-color);
}

.hero-section u {
    text-underline-offset: 0.1em;
}

/* Typography sizing for Hero */
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.2;
    color: var(--text-color);
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--text-muted-color);
    line-height: 1.4;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description {
    font-size: clamp(1.1rem, 1.5vw, 1.25rem);
    line-height: 1.7;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-weight: 400;
    opacity: 0.9;
}

.hero-buttons {
    margin-top: 2rem;
}

.hero-btn {
    font-size: 1.1rem;
    font-weight: 500;
    min-width: 180px;
    transition: all 0.3s ease;
}

/* Gradient text for רדיולוג */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

/* Fallback for browsers that don't support background-clip: text */
@supports not (-webkit-background-clip: text) {
    .gradient-text {
        color: var(--primary-color);
        background: none;
    }
}

/* Enhanced Features Section */
.features-section {
    background-color: var(--section-background);
    padding: 5rem 0;
}

.feature-card {
    background-color: var(--card-background);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* ensures vertical spacing between top and bottom */
    height: 100%; /* fill the full height of its grid column */
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px var(--shadow-hover-color);
    border-color: var(--primary-color);
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.feature-card:nth-child(1) .feature-icon-wrapper {
    background-color: var(--primary-color);
}

.feature-card:nth-child(2) .feature-icon-wrapper {
    background-color: var(--secondary-color);
}

.feature-card:nth-child(3) .feature-icon-wrapper {
    background-color: var(--info-color);
}

.feature-icon-wrapper i {
    color: white;
    font-size: 2rem;
}

.feature-card:hover .feature-icon-wrapper {
    transform: scale(1.05);
}

/* Services Section */
#services {
    background-color: var(--background-color);
    padding: 5rem 0;
}

.section-heading {
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    display: none;
}

/* CTA Banner */
.radindex-cta-banner {
    position: relative;
    background: linear-gradient(135deg, var(--cta-banner-start) 0%, var(--cta-banner-mid) 50%, var(--cta-banner-end) 100%);
    border-radius: 16px;
    padding: 28px 35px;
    margin: 0 0 20px 0;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 12px 35px var(--shadow-hover-color), 0 4px 12px var(--shadow-color);
    overflow: hidden;
    text-align: center;
    animation: bannerFadeIn 0.6s ease-out;
}

.radindex-cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
}

.cta-banner-content {
    position: relative;
    z-index: 2;
}

.cta-banner-title {
    color: var(--cta-banner-text);
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.3;
}

.cta-banner-subtitle {
    color: rgba(255, 255, 255, 0.92);
    font-size: 26px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

#ini_msg {
    font-size: 22px;
}

[data-theme="dark"] .cta-banner-subtitle {
    color: rgba(248, 250, 252, 0.92);
}

.cta-banner-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    animation: pulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes bannerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0%, 100% { transform: translate(-10%, -10%); }
    50% { transform: translate(10%, 10%); }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0;
    }
}

@media (max-width: 767px) {
    .radindex-cta-banner {
        padding: 22px 20px;
        margin: 0 auto 20px auto;
        width: calc(100% - 20px);
        border-radius: 12px;
    }

    .cta-banner-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .cta-banner-subtitle {
        font-size: 17px;
    }

    #ini_msg {
        font-size: 14.5px !important;
    }
}

@media (max-width: 400px) {
    .radindex-cta-banner {
        padding: 18px 15px;
        width: calc(100% - 20px);
        margin: 0 auto 20px auto;
    }

    .cta-banner-title {
        font-size: 18px;
    }

    .cta-banner-subtitle {
        font-size: 16px;
    }

    #ini_msg {
        font-size: 13.5px !important;
    }
}

.subspecialty-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    position: relative;
}

.subspecialty-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px var(--shadow-hover-color);
    border-color: var(--primary-color);
}

.subspecialty-card .card-body {
    padding: 2.5rem;
}

.subspecialty-card .category-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    padding: 10px;
    background-color: var(--card-background);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.subspecialty-card:hover .category-img {
    transform: scale(1.05);
    border-color: var(--secondary-color);
    box-shadow: 0 8px 25px var(--shadow-hover-color);
}

/* Subspecialty typography */
.subspecialty-title {
    font-size: 26px;
}

.subspecialty-desc {
    font-size: 18px;
    margin-bottom: 0;
}

/* Radiologist Section */
.radiologist-section {
    background-color: var(--section-background);
    padding: 5rem 0;
}

/* Enhanced Radiologist Cards */
#query_result .portfolio-item {
    margin-bottom: 2.5rem;
}

#query_result .portfolio-link {
    display: block;
    position: relative;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-color);
    background-color: var(--card-background);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

#query_result .portfolio-link:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px var(--shadow-hover-color);
    border-color: var(--primary-color);
}

#query_result .portfolio-hover {
    background-color: rgba(58, 143, 254, 0.9);
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#query_result .portfolio-link:hover .portfolio-hover {
    opacity: 1;
}

#query_result .portfolio-hover-content {
    font-size: 20px;
    color: #fff;
    font-weight: 600;
}

#query_result .img-div {
    height: 280px;
    background-size: cover;
    background-position: center;
}

#query_result .portfolio-caption {
    padding: 2rem;
    text-align: center;
    background-color: var(--card-background);
    color: var(--text-color);
    position: relative;
}

#query_result .portfolio-caption::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

#query_result .portfolio-caption h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

#query_result .portfolio-caption p {
    font-size: 1rem;
    margin: 0;
    color: var(--text-muted-color);
}

/* Professional Footer */
.radindex-footer {
    background-color: var(--foreground-color);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted-color);
    padding: 3rem 0;
}

.radindex-footer a {
    color: var(--text-muted-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.radindex-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.radindex-footer a:hover::after {
    width: 100%;
}

.radindex-footer a:hover {
    color: var(--primary-color);
}

.radindex-footer .social-icon {
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: white;
    transition: all 0.3s ease;
}

.radindex-footer .social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-hover-color);
}

/* Professional Button Styles - Consistent with client_mainscreen */
.btn-custom {
    padding: 0.4rem 1rem;
    font-weight: 500;
    border-radius: 5px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.btn-primary,
.btn-primary.btn-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary.btn-custom:hover {
    background-color: var(--primary-hover-color);
    border-color: var(--primary-hover-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary,
.btn-outline-primary.btn-custom {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
    font-weight: 500;
    border-radius: 5px;
    border-width: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary.btn-custom:hover {
    color: white;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-success {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 5px;
    padding: 0.4rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-outline-success:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-info {
    border: 2px solid var(--info-color);
    color: var(--info-color);
    border-radius: 5px;
    padding: 0.4rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-outline-info:hover {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Button focus states - Consistent with client_mainscreen */
.btn-custom:focus, 
.btn-custom:active, 
.btn-custom.active,
.btn-primary:focus,
.btn-outline-primary:focus,
.btn-outline-success:focus,
.btn-outline-info:focus {
    opacity: 1 !important;
    box-shadow: 0 0 0 0.25rem rgba(58, 143, 254, 0.25) !important;
}

.btn-outline-primary.btn-custom:focus,
.btn-outline-primary:focus {
    color: var(--primary-color);
    background-color: transparent;
}

.btn-primary.btn-custom:focus,
.btn-primary:focus {
    color: white;
    background-color: var(--primary-color);
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Modal Styles */
.bootbox.accessibility-modal .modal-dialog {
    max-width: 1000px;
    width: 96vw;
}

[data-theme="dark"] .bootbox .modal-content,
[data-theme="dark"] .modal-content {
    background-color: var(--card-background);
    color: var(--text-color);
    border-color: var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 40px var(--shadow-hover-color);
}

[data-theme="dark"] .bootbox .modal-header,
[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color);
    background-color: var(--primary-color);
    color: white;
    border-radius: 12px 12px 0 0;
}

[data-theme="dark"] .bootbox .modal-footer,
[data-theme="dark"] .modal-footer {
    border-top-color: var(--border-color);
    background-color: var(--section-background);
    border-radius: 0 0 12px 12px;
}

[data-theme="dark"] .bootbox .btn-close,
[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Refunds Modal */
.refunds-modal .modal-dialog {
    max-width: 2000px;
    width: min(2000px, calc(100vw - 2rem));
    margin: 1.5rem auto;
}

.refunds-modal .modal-content {
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 30px 80px -40px rgba(15, 23, 42, 0.4);
    overflow: hidden;
}

.refunds-modal .modal-header {
    border-bottom: none;
    background: transparent;
    padding: 0.75rem 1rem 0;
}

.refunds-modal .modal-body {
    padding: 0;
    background: var(--section-background);
}

.refunds-modal .modal-footer {
    border-top: none;
    background: var(--section-background);
    padding: 0 2rem 1.75rem;
    gap: 0.75rem;
    justify-content: flex-start;
}

.refunds-modal .modal-footer .btn {
    border-radius: 999px;
    padding: 0.55rem 1.5rem;
}

.refunds-modal-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: start;
}

.refunds-modal-hero {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: var(--card-background);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -15px rgba(15, 23, 42, 0.2);
}

.refunds-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3a8ffe 0%, #1d63c3 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.refunds-modal-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
}

.refunds-modal-subtitle {
    margin: 0.5rem 0 0;
    color: var(--text-muted-color);
    font-size: 1rem;
    line-height: 1.6;
}

.refunds-modal-card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border-color);
}

.refunds-modal-card p {
    margin: 0.5rem 0 0;
    color: var(--text-color);
    line-height: 1.65;
}

.refunds-modal-card p:first-child {
    margin-top: 0;
}

.refunds-modal-emphasis {
    font-weight: 700;
    color: var(--text-color);
}

.refunds-links-title {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.refunds-providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.refunds-provider-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.25);
}

.refunds-provider-logo {
    width: 72px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.refunds-provider-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.refunds-provider-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.refunds-provider-link {
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: underline;
}

.refunds-provider-link:hover {
    color: var(--primary-hover-color);
}

.refunds-provider-phone a {
    color: var(--text-muted-color);
    font-weight: 600;
    text-decoration: none;
}

.refunds-provider-phone a:hover {
    text-decoration: underline;
}

.refunds-modal-disclaimer {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    color: #1e3a8a;
    font-size: 0.98rem;
    line-height: 1.6;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.refunds-modal-disclaimer i {
    font-size: 1.25rem;
    margin-top: 0.1rem;
    color: #2563eb;
}

@media (max-width: 640px) {
    .refunds-modal-body {
        padding: 1.5rem;
    }

    .refunds-modal-hero {
        flex-direction: column;
    }

    .refunds-provider-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .refunds-provider-logo {
        width: 100%;
        justify-content: flex-start;
        padding: 0.35rem 0.5rem;
    }
}

/* Professional Insurance Info Card */
.info-card {
    padding: 2.5rem;
    background-color: var(--card-background);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 8px 25px var(--shadow-color);
    max-width: 700px;
    margin: 0 auto;
}

.info-title {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.info-title i {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-left: 1rem;
}

.info-text {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    text-align: right;
    direction: rtl;
}

.info-highlight {
    background-color: rgba(58, 143, 254, 0.05);
    border: 1px solid rgba(58, 143, 254, 0.2);
    border-right: 4px solid var(--primary-color);
    padding: 1.25rem;
    border-radius: 8px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.6;
    text-align: right;
    direction: rtl;
    position: relative;
}

.info-highlight::before {
    content: "💡";
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.2rem;
}

/* Dark theme adjustments */
[data-theme="dark"] .info-card {
    background-color: var(--card-background);
    border-color: var(--border-color);
    border-top-color: var(--primary-color);
}

[data-theme="dark"] .info-highlight {
    background-color: rgba(58, 143, 254, 0.1);
    border-color: rgba(58, 143, 254, 0.3);
    border-right-color: var(--primary-color);
}

/* Loading Animation */
.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.25em;
}

/* Physician Cards Styling */
.physician-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

.physician-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover-color) !important;
}

.card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background-color: var(--section-background);
    display: flex;
    align-items: center;
    justify-content: center;
}

.physician-photo {
    width: 100%;
    height: 200px;
    object-fit: contain;
    object-position: center;
}

.physician-photo-placeholder {
    width: 100%;
    height: 200px;
    background-color: var(--section-background);
    border-bottom: 1px solid var(--border-color);
}

.physician-name {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.physician-card .card-body {
    padding: 1.25rem;
    background-color: var(--card-background);
}

.physician-card .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.physician-card .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

/* Dark mode support for physician cards */
[data-bs-theme="dark"] .physician-card {
    background-color: var(--card-background-dark);
    border-color: var(--border-color-dark);
}

[data-bs-theme="dark"] .physician-card .card-body {
    background-color: var(--card-background-dark);
}

[data-bs-theme="dark"] .physician-name {
    color: var(--text-color-dark);
}

[data-bs-theme="dark"] .physician-photo-placeholder {
    background-color: var(--section-background-dark);
    border-bottom-color: var(--border-color-dark);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-img-wrapper,
    .physician-photo,
    .physician-photo-placeholder {
        height: 180px;
    }
    
    .physician-card .card-body {
        padding: 1rem;
    }
    
    .physician-name {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .card-img-wrapper,
    .physician-photo,
    .physician-photo-placeholder {
        height: 160px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 1rem;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: clamp(1.1rem, 4vw, 1.25rem);
        margin-bottom: 1.5rem !important;
    }

    .hero-description {
        font-size: clamp(1rem, 3.5vw, 1.1rem);
        line-height: 1.6;
        max-width: 100%;
        margin-bottom: 2rem !important;
    }

    .hero-buttons {
        margin-top: 1.5rem;
    }

    .hero-btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .features-section,
    #services,
    .radiologist-section {
        padding: 3rem 0;
    }

    .feature-card {
        flex-direction: row;
        align-items: flex-start;
        text-align: right !important;
        padding: 1.5rem !important;
        gap: 1.5rem;
        height: auto; /* Remove the 100% height from desktop to fix bottom padding */
        justify-content: flex-start;
    }

    .feature-card .feature-icon-wrapper {
        margin: 0;
        flex-shrink: 0;
        width: 65px;
        height: 65px;
        order: 2; /* Move icon to the right visually */
    }

    .feature-card .feature-icon-wrapper i {
        font-size: 1.75rem;
    }

    .feature-content-wrapper {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        align-items: flex-start;
        order: 1; /* Move content to the left visually */
    }

    .feature-card h5 {
        margin-bottom: 0.5rem;
        font-size: 1.25rem !important;
    }

    .feature-card p {
        font-size: 1rem !important;
        margin-bottom: 0.75rem; /* Reduced margin before button to eliminate extra space */
        text-align: right;
    }

    .feature-card .btn {
        font-size: 1rem !important;
        align-self: flex-start;
        padding: 0.4rem 1rem;
    }
    
    .feature-card,
    .subspecialty-card {
        margin-bottom: 0; /* Let grid gap handle spacing on mobile */
    }

    .subspecialty-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .subspecialty-desc {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .subcategory-card .category-img,
    .subspecialty-card .category-img {
        width: 65px;
        height: 65px;
        border-width: 2px;
        padding: 8px;
    }

    .info-card {
        padding: 2rem;
        margin: 1rem;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .section-heading {
        font-size: 1.8rem;
    }

    /* Mobile Physician Cards Layout */
    #query_result {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important; /* Small gap between cards */
        margin: 0 !important; /* Override row negative margins */
        padding: 0 0.5rem !important;
        --bs-gutter-y: 0 !important; /* Prevent Bootstrap gutter top-margin */
        --bs-gutter-x: 0 !important;
    }

    #query_result > div {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: 0 !important; /* Override col padding */
        margin-top: 0 !important; /* Prevent bootstrap g-4 top margin */
        margin-bottom: 0 !important; /* Prevent bootstrap mb-4 */
    }

    #query_result .physician-card {
        flex-direction: row;
        align-items: center;
        height: auto !important;
        padding: 0.75rem 1rem; /* Slightly reduced top/bottom padding */
        border-radius: 12px;
        box-shadow: 0 2px 8px var(--shadow-color) !important;
        margin: 0 !important; /* Ensure card wrapper carries no rogue margins */
    }

    #query_result .card-img-wrapper {
        width: 80px;
        height: 80px !important;
        flex-shrink: 0;
        order: 2; /* Move image to the right visually */
        margin-right: 0;
        margin-left: 1.25rem;
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid var(--border-color);
        background-color: var(--section-background);
    }

    #query_result .physician-photo,
    #query_result .physician-photo-placeholder {
        width: 100%;
        height: 100%;
        object-fit: cover !important; /* Make sure photos fill the square */
        border-bottom: none;
    }

    #query_result .physician-photo-placeholder i {
        font-size: 2rem; /* Scale down the placeholder icon */
    }

    #query_result .card-body {
        padding: 0;
        text-align: right;
        flex-grow: 1;
        order: 1; /* Move content to the left visually */
        align-items: flex-start;
        justify-content: center; /* Center the text vertically relative to the image */
        background-color: transparent !important;
        margin-left: 0.5rem; /* Add breathing room from edge */
        overflow: hidden; /* Added to deal with text-overflow on child element */
        min-width: 0; /* Ensures the flex item doesn't exceed its container width */
    }

    #query_result .physician-name {
        font-size: 1.1rem !important;
        margin-bottom: 0.15rem !important;
    }

    #query_result .card-text {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3;

        /* Truncate effectively: If it's too long, break it to 2 lines max */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;

        /* Ensure it never touches the logo */
        max-width: 100%;
        word-break: break-word;
    }

    #query_result .phys-modal-btn {
        margin-top: 0 !important;
        font-size: 0.85rem !important;
        padding: 0.25rem 0.75rem; /* Make button compact */
    }
}

.btn-custom {
    padding: 0.4rem 1rem;
    font-weight: 500;
    border-radius: 5px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.btn-primary.btn-custom {
    background-color: #3a8ffe;
    border-color: #3a8ffe;
}

.btn-primary.btn-custom:hover {
    background-color: #1d63c3;
    border-color: #1d63c3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary.btn-custom {
    color: #3a8ffe;
    border-color: #3a8ffe;
}

.btn-outline-primary.btn-custom:hover {
    color: white;
    background-color: #3a8ffe;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Fix focus states */
.btn-custom:focus, 
.btn-custom:active, 
.btn-custom.active {
    opacity: 1 !important;
    box-shadow: 0 0 0 0.25rem rgba(58, 143, 254, 0.25) !important;
}

.btn-outline-primary.btn-custom:focus {
    color: #3a8ffe;
    background-color: transparent;
}

.btn-primary.btn-custom:focus {
    color: white;
    background-color: #3a8ffe;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
