:root {
    --medical-primary: #2563eb;
    --medical-secondary: #8b5cf6;
    --medical-accent: #06b6d4;
    --medical-success: #10b981;
    --medical-warning: #f59e0b;
    --medical-danger: #ef4444;
    --medical-dark: #0f172a;
    --medical-light: #f8fafc;
    --medical-glass: rgba(255, 255, 255, 0.08);
    --medical-glass-border: rgba(255, 255, 255, 0.12);
    --medical-glow: 0 0 20px rgba(37, 99, 235, 0.3);
    --iranmedika-primary: #2563eb;
    --iranmedika-secondary: #8b5cf6;
    --iranmedika-accent: #06b6d4;
    --iranmedika-success: #10b981;
    --iranmedika-light: #f8fafc;
    --iranmedika-dark: #0f172a;

    --medical-blue: #3b82f6;
    --medical-green: #10b981;
    --medical-purple: #8b5cf6;
    --medical-teal: #06b6d4;
    --medical-red: #ef4444;
    --medical-yellow: #f59e0b;
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #8b5cf6;
    --primary-soft: rgba(124, 58, 237, 0.1);

    --secondary: #d946ef;
    --secondary-dark: #c026d3;
    --secondary-light: #e879f9;
    --secondary-soft: rgba(217, 70, 239, 0.1);

    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fbbf24;
    --accent-soft: rgba(245, 158, 11, 0.1);

    --success: #10b981;
    --success-dark: #059669;
    --success-light: #34d399;
    --success-soft: rgba(16, 185, 129, 0.1);

    --error: #ef4444;
    --error-dark: #dc2626;
    --error-light: #f87171;
    --error-soft: rgba(239, 68, 68, 0.1);

    --info: #06b6d4;
    --info-dark: #0891b2;
    --info-light: #22d3ee;
    --info-soft: rgba(6, 182, 212, 0.1);

    --dark: #0f172a;
    --darker: #020617;
    --dark-light: #1e293b;

    --light: #f8fafc;
    --lighter: #ffffff;
    --light-dark: #e2e8f0;

    /* ===== GLASS EFFECTS ===== */
    --glass-ultra-light: rgba(255, 255, 255, 0.95);
    --glass-light: rgba(255, 255, 255, 0.15);
    --glass: rgba(255, 255, 255, 0.08);
    --glass-dark: rgba(255, 255, 255, 0.05);
    --glass-ultra-dark: rgba(15, 23, 42, 0.8);
    --glass-primary: rgba(124, 58, 237, 0.15);
    --glass-secondary: rgba(217, 70, 239, 0.15);
    --glass-accent: rgba(245, 158, 11, 0.15);

    --glass-border-ultra-light: rgba(255, 255, 255, 0.3);
    --glass-border-light: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-dark: rgba(255, 255, 255, 0.08);
    --glass-border-primary: rgba(124, 58, 237, 0.3);
    --glass-border-secondary: rgba(217, 70, 239, 0.3);
    --glass-border-accent: rgba(245, 158, 11, 0.3);

    /* ===== GLOW EFFECTS ===== */
    --glow-xs: 0 0 10px rgba(124, 58, 237, 0.2);
    --glow-sm: 0 0 20px rgba(124, 58, 237, 0.25);
    --glow: 0 0 30px rgba(124, 58, 237, 0.3);
    --glow-lg: 0 0 40px rgba(124, 58, 237, 0.4);
    --glow-xl: 0 0 50px rgba(124, 58, 237, 0.5);
    --glow-accent: 0 0 30px rgba(245, 158, 11, 0.3);
    --glow-success: 0 0 30px rgba(16, 185, 129, 0.3);
    --glow-error: 0 0 30px rgba(239, 68, 68, 0.3);
    --glow-info: 0 0 30px rgba(6, 182, 212, 0.3);

    /* ===== TYPOGRAPHY ===== */
    --font-primary: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Vazirmatn', 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* ===== SPACING ===== */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* ===== BORDER RADIUS ===== */
    --radius-none: 0;
    --radius-sm: 0.125rem;
    --radius: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;

    /* ===== SHADOWS ===== */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 50px 100px -20px rgba(0, 0, 0, 0.25);

    /* ===== TRANSITIONS ===== */
    --transition-fast: 150ms ease;
    --transition: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-bounce: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* ===== Z-INDEX ===== */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
    --z-toast: 1070;
}

/* ===== BASE RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body.medical-theme {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    overflow-x: hidden;
    line-height: 1.7;
    padding-top: 80px;
    min-height: 100vh;
}

/* ===== MEDICAL BACKGROUND ANIMATIONS ===== */
.medical-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.heartbeat-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--medical-primary), transparent);
    animation: heartbeat 2s ease-in-out infinite;
}

.pulse-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.pulse-dots::before,
.pulse-dots::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--medical-accent);
    border-radius: 50%;
    animation: pulseDot 3s ease-in-out infinite;
}

.pulse-dots::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.pulse-dots::after {
    top: 70%;
    left: 85%;
    animation-delay: 1.5s;
}

.dna-helix {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--medical-secondary), transparent);
    animation: dnaRotate 20s linear infinite;
}

.dna-helix::before,
.dna-helix::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--medical-primary);
    border-radius: 50%;
    animation: dnaNode 2s ease-in-out infinite;
}

.dna-helix::before {
    top: 30%;
    animation-delay: 0s;
}

.dna-helix::after {
    top: 60%;
    animation-delay: 1s;
}

.ecg-wave {
    position: absolute;
    bottom: 20%;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,60 C200,10 400,110 600,60 C800,10 1000,110 1200,60" fill="none" stroke="rgba(37,99,235,0.1)" stroke-width="2"/></svg>');
    animation: ecgMove 4s linear infinite;
}

/* ===== LOGO STYLES ===== */
.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--medical-primary), var(--medical-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand-text {
    color: white;
}

.brand-text strong {
    background: linear-gradient(135deg, var(--medical-primary), var(--medical-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-logo {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.navbar-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* ===== NAVIGATION ===== */
.navbar-medical {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--medical-glass-border);
    padding: 0.1rem 0;
    transition: all 0.3s ease;
}

.navbar-medical.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.medical-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.medical-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.medical-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.2), transparent);
    transition: left 0.5s ease;
}

.medical-link:hover {
    color: white !important;
    background: var(--medical-glass);
    transform: translateY(-2px);
}

.medical-link:hover::before {
    left: 100%;
}

.medical-link i {
    margin-left: 0.5rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--medical-primary), var(--medical-secondary));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--medical-glow);
    color: white;
}

.nav-btn:hover::before {
    left: 100%;
}

.btn-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: btnPulse 2s ease-out infinite;
}

.medical-toggler {
    border: none;
    background: transparent;
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
}

.toggler-icon {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ===== DROPDOWN STYLES ===== */
.medical-dropdown {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    margin-top: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.medical-dropdown .dropdown-item {
    color: #e2e8f0 !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    margin: 2px 0 !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
}

.medical-dropdown .dropdown-item:hover {
    background: rgba(37, 99, 235, 0.2) !important;
    color: white !important;
    transform: translateX(5px) !important;
}

.medical-dropdown .dropdown-item i {
    width: 20px !important;
    margin-left: 8px !important;
    color: var(--medical-accent) !important;
}

.medical-dropdown .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1) !important;
    margin: 8px 0 !important;
}

/* ===== USER MENU STYLES ===== */
.navbar-nav.ms-0 {
    margin-right: 0 !important;
    margin-left: auto !important;
}

.navbar-nav.ms-0 .nav-item {
    margin-left: 8px !important;
}

.navbar-nav.ms-0 .nav-link {
    padding: 8px 12px !important;
}

/* ===== NAV LINK ACTIVE STATE ===== */
.nav-link.medical-link.active {
    color: var(--medical-primary) !important;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 8px;
    position: relative;
}

.nav-link.medical-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, var(--medical-primary), var(--medical-secondary));
    border-radius: 2px;
    animation: navPulse 2s ease-in-out infinite;
}

/* ===== CONCENTRIC CIRCLES ANIMATION ===== */
.concentric-circles {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.main-circle {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-core {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--medical-primary), var(--medical-accent));
    border-radius: 50%;
    position: relative;
    z-index: 20;
    animation: corePulse 2s ease-in-out infinite;
    box-shadow:
        0 0 30px rgba(37, 99, 235, 0.8),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.concentric-ring {
    position: absolute;
    border-style: solid;
    border-radius: 50%;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-1 {
    width: 100px;
    height: 100px;
    border-width: 1.5px;
    border-color: rgba(37, 99, 235, 0.8);
    animation: ringPulse1 4s ease-in-out infinite,
               ringRotate1 15s linear infinite;
    box-shadow:
        0 0 20px rgba(37, 99, 235, 0.4),
        inset 0 0 10px rgba(37, 99, 235, 0.2);
}

.ring-2 {
    width: 160px;
    height: 160px;
    border-width: 2px;
    border-color: rgba(6, 182, 212, 0.7);
    animation: ringPulse2 5s ease-in-out infinite,
               ringRotate2 20s linear infinite reverse;
    box-shadow:
        0 0 25px rgba(6, 182, 212, 0.3),
        inset 0 0 15px rgba(6, 182, 212, 0.15);
}

.ring-3 {
    width: 220px;
    height: 220px;
    border-width: 1.5px;
    border-color: rgba(139, 92, 246, 0.6);
    animation: ringPulse3 6s ease-in-out infinite,
               ringRotate3 25s linear infinite;
    box-shadow:
        0 0 30px rgba(139, 92, 246, 0.25),
        inset 0 0 20px rgba(139, 92, 246, 0.1);
}

.ring-4 {
    width: 280px;
    height: 280px;
    border-width: 2px;
    border-color: rgba(16, 185, 129, 0.5);
    animation: ringPulse4 7s ease-in-out infinite,
               ringRotate4 30s linear infinite reverse;
    box-shadow:
        0 0 35px rgba(16, 185, 129, 0.2),
        inset 0 0 25px rgba(16, 185, 129, 0.08);
}

.floating-medical-icon {
    position: absolute;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(15px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 15;
}

.icon-1 { top: 15%; left: 50%; transform: translateX(-50%); animation: floatIcon1 5s ease-in-out infinite; }
.icon-2 { top: 30%; right: 20%; animation: floatIcon2 6s ease-in-out infinite; }
.icon-3 { bottom: 30%; right: 20%; animation: floatIcon3 7s ease-in-out infinite; }
.icon-4 { bottom: 15%; left: 50%; transform: translateX(-50%); animation: floatIcon4 5.5s ease-in-out infinite; }
.icon-5 { bottom: 30%; left: 20%; animation: floatIcon5 6.5s ease-in-out infinite; }
.icon-6 { top: 30%; left: 20%; animation: floatIcon6 7.5s ease-in-out infinite; }

.circle-rays {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotateRays 40s linear infinite;
    opacity: 0.6;
}

.circle-ray {
    position: absolute;
    width: 1.5px;
    height: 100px;
    background: linear-gradient(to bottom,
        transparent 0%,
        var(--medical-primary) 20%,
        var(--medical-accent) 50%,
        var(--medical-primary) 80%,
        transparent 100%);
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    filter: blur(0.5px);
}

.circle-ray:nth-child(1) { transform: rotate(0deg); }
.circle-ray:nth-child(2) { transform: rotate(60deg); }
.circle-ray:nth-child(3) { transform: rotate(120deg); }
.circle-ray:nth-child(4) { transform: rotate(180deg); }
.circle-ray:nth-child(5) { transform: rotate(240deg); }
.circle-ray:nth-child(6) { transform: rotate(300deg); }

/* ===== ANIMATIONS ===== */
@keyframes heartbeat {
    0%, 100% { opacity: 0.3; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.2); }
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 1; }
}

@keyframes dnaRotate {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

@keyframes dnaNode {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.5); }
}

@keyframes ecgMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes btnPulse {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 100px; height: 100px; opacity: 0; }
}

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

@keyframes navPulse {
    0%, 100% { opacity: 1; transform: translateX(-50%) scaleX(1); }
    50% { opacity: 0.7; transform: translateX(-50%) scaleX(0.8); }
}

@keyframes ctaPulse {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

@keyframes corePulse {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.08); }
    50% { transform: scale(1.15); }
    75% { transform: scale(1.08); }
}

@keyframes ringPulse1 {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes ringPulse2 {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 0.9; }
}

@keyframes ringPulse3 {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.06); opacity: 0.8; }
}

@keyframes ringPulse4 {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.04); opacity: 0.7; }
}

@keyframes ringRotate1 {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes ringRotate2 {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(-360deg) scale(1); }
}

@keyframes ringRotate3 {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes ringRotate4 {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(-360deg) scale(1); }
}

@keyframes floatIcon1 {
    0%, 100% { transform: translateX(-50%) translateY(0px) rotate(0deg); }
    25% { transform: translateX(-50%) translateY(-12px) rotate(3deg); }
    50% { transform: translateX(-50%) translateY(-20px) rotate(0deg); }
    75% { transform: translateX(-50%) translateY(-12px) rotate(-3deg); }
}

@keyframes floatIcon2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(4deg); }
    50% { transform: translateY(-25px) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(-4deg); }
}

@keyframes floatIcon3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(12px) rotate(-3deg); }
    50% { transform: translateY(20px) rotate(0deg); }
    75% { transform: translateY(12px) rotate(3deg); }
}

@keyframes floatIcon4 {
    0%, 100% { transform: translateX(-50%) translateY(0px) rotate(0deg); }
    25% { transform: translateX(-50%) translateY(10px) rotate(-2deg); }
    50% { transform: translateX(-50%) translateY(18px) rotate(0deg); }
    75% { transform: translateX(-50%) translateY(10px) rotate(2deg); }
}

@keyframes floatIcon5 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(14px) rotate(3deg); }
    50% { transform: translateY(22px) rotate(0deg); }
    75% { transform: translateY(14px) rotate(-3deg); }
}

@keyframes floatIcon6 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-16px) rotate(-4deg); }
    50% { transform: translateY(-26px) rotate(0deg); }
    75% { transform: translateY(-16px) rotate(4deg); }
}

@keyframes rotateRays {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-sm {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .medical-brand {
        font-size: 1.2rem;
    }

    .brand-icon {
        width: 35px;
        height: 35px;
    }

    .nav-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .navbar-collapse {
        background: rgba(15, 23, 42, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        border-radius: 0 0 15px 15px !important;
        padding: 15px !important;
        margin-top: 10px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .medical-dropdown {
        background: rgba(255, 255, 255, 0.05) !important;
        margin: 10px 0 !important;
    }

    .navbar-nav.ms-0 {
        margin-left: 0 !important;
        margin-top: 15px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding-top: 15px !important;
    }

    .navbar-nav.ms-0 .nav-item {
        margin-left: 0 !important;
        margin-bottom: 8px !important;
    }

    .medical-dropdown {
        left: auto !important;
        right: 0 !important;
    }

    .nav-link.medical-link.active::after {
        bottom: -5px;
        width: 20px;
    }

    .navbar-nav.mx-auto {
        text-align: center;
        margin: 1rem 0;
    }

    .nav-link.medical-link {
        padding: 0.8rem 1rem;
        margin: 0.2rem 0;
    }

    .concentric-circles {
        width: 280px;
        height: 280px;
    }

    .ring-1 { width: 80px; height: 80px; }
    .ring-2 { width: 130px; height: 130px; }
    .ring-3 { width: 180px; height: 180px; }
    .ring-4 { width: 230px; height: 230px; }

    .floating-medical-icon {
        width: 40px;
        height: 40px;
    }

    .floating-medical-icon i {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .concentric-circles {
        width: 250px;
        height: 250px;
    }

    .ring-1 { width: 70px; height: 70px; }
    .ring-2 { width: 110px; height: 110px; }
    .ring-3 { width: 150px; height: 150px; }
    .ring-4 { width: 190px; height: 190px; }

    .floating-medical-icon {
        width: 35px;
        height: 35px;
    }
}

/* ===== DASHBOARD PAGES FIX ===== */
.doctor-complete-profile-wrapper,
.doctor-education-wrapper,
.doctor-experience-wrapper,
.doctor-photo-upload-wrapper {
    min-height: calc(100vh - 80px);
    padding: 20px 0;
}

.completion-section {
    margin-top: auto;
}

/* ===== SCROLLBAR STYLES ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--medical-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--medical-glass-border);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--medical-primary);
}

/* ===== SELECTION STYLES ===== */
::selection {
    background: rgba(37, 99, 235, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(37, 99, 235, 0.3);
    color: white;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .concentric-circles * {
        animation: none !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .glass-card, .glass-panel, .glass-btn {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    .btn {
        background: #f8f9fa !important;
        border: 1px solid #ddd !important;
        color: #333 !important;
    }

    .text-gradient {
        background: none !important;
        -webkit-text-fill-color: #333 !important;
        color: #333 !important;
    }
}

/* ===== UTILITY CLASSES ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-6);
}

.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.ms-0 { margin-right: 0 !important; margin-left: auto !important; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

.m-0 { margin: var(--space-0); }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-5 { margin: var(--space-5); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }
.m-10 { margin: var(--space-10); }

.mt-0 { margin-top: var(--space-0); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }

.p-0 { padding: var(--space-0); }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.p-10 { padding: var(--space-10); }

.grid { display: grid; gap: var(--space-8); }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-sm { animation: float-sm 4s ease-in-out infinite; }
.animate-pulse { animation: pulse 3s ease-in-out infinite; }
.animate-pulse-soft { animation: pulse-soft 2s ease-in-out infinite; }
.animate-slide-in-up { animation: slideInUp 0.6s ease-out; }
.animate-slide-in-down { animation: slideInDown 0.6s ease-out; }
.animate-slide-in-left { animation: slideInLeft 0.6s ease-out; }
.animate-slide-in-right { animation: slideInRight 0.6s ease-out; }
.animate-fade-in { animation: fadeIn 0.5s ease-out; }
.animate-fade-out { animation: fadeOut 0.5s ease-out; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 1s ease-in-out infinite; }
.animate-shake { animation: shake 0.5s ease-in-out; }
.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }

.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;
}
/* ===== PROFESSIONAL THUMBNAIL STYLES ===== */

/* استایل پایه برای همه thumbnailها */
.author-avatar img,
.video-thumbnail,
.post-image {
    /* حالت نرم و آنتی‌الیاس */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -ms-interpolation-mode: bicubic;

    /* انیمیشن نرم برای لود */
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* استایل خاص برای عکس‌های استاتیک (لوگو) */
.author-avatar img[alt="MedikaTrip"] {
    /* برای لوگو کیفیت بالا */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3px;
}

/* حالت hover برای آواتارها */
.author-avatar:hover img {
    transform: scale(1.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ===== STATIC IMAGE OPTIMIZATION ===== */

/* فیلترهای رنگی برای بهبود نمایش */
.static-image-optimized {
    /* بهبود کنتراست */
    filter:
        brightness(1.02)
        contrast(1.05)
        saturate(1.1);

    /* کاهش نویز */
    image-rendering: optimizeQuality;
}

/* برای حالت تاریک */
@media (prefers-color-scheme: dark) {
    .author-avatar img[alt="MedikaTrip"] {
        filter:
            drop-shadow(0 2px 6px rgba(0,0,0,0.3))
            brightness(1.1)
            contrast(1.05);
        border-color: rgba(255, 255, 255, 0.15);
    }
}

/* ===== RESPONSIVE THUMBNAIL SIZING ===== */

/* سایزهای مختلف براساس breakpoint */
.author-avatar {
    width: clamp(40px, 8vw, 60px); /* حداقل 40px، حداکثر 60px */
    height: clamp(40px, 8vw, 60px);
}

/* برای دسکتاپ بزرگ */
@media (min-width: 1200px) {
    .author-avatar {
        width: 60px;
        height: 60px;
    }
}

/* برای تبلت */
@media (max-width: 768px) {
    .author-avatar {
        width: 50px;
        height: 50px;
    }
}

/* برای موبایل */
@media (max-width: 480px) {
    .author-avatar {
        width: 44px;
        height: 44px;
    }
}

/* ===== LOADING STATES ===== */

/* نمایش loading برای عکس‌ها */
.author-avatar {
    position: relative;
    background: linear-gradient(
        90deg,
        var(--glass) 25%,
        var(--glass-light) 50%,
        var(--glass) 75%
    );
    background-size: 200% 100%;
}

.author-avatar img.loaded {
    background: none;
    animation: none;
}

/* ===== BORDER RADIUS VARIANTS ===== */

/* حالت‌های مختلف border-radius */
.avatar-rounded {
    border-radius: 50%;
}

.avatar-rounded-lg {
    border-radius: 20%;
}

.avatar-square {
    border-radius: 12px;
}

/* ===== SHADOW EFFECTS ===== */

/* سایه‌های مختلف */
.avatar-shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.avatar-shadow-md {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.avatar-shadow-lg {
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* سایه داخلی برای عمق */
.avatar-inner-shadow {
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.1),
        inset 0 -2px 4px rgba(0,0,0,0.1);
}

/* ===== SPECIAL EFFECTS FOR LOGO ===== */

.logo-glow {
    position: relative;
}

.logo-glow::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        rgba(124, 58, 237, 0.3),
        rgba(236, 72, 153, 0.3),
        rgba(239, 68, 68, 0.3)
    );
    border-radius: inherit;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.5;
}

/* ===== PERFORMANCE OPTIMIZATION ===== */

/* بهینه‌سازی performance */
img {
    content-visibility: auto;
    contain-intrinsic-size: 100px 100px; /* اندازه تقریبی */
}

/* Lazy loading styles */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ===== PRINT STYLES ===== */

@media print {
    .author-avatar img {
        filter: none !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}