/* ============================================
   ScienceMed - Home Page Styles
   Direction: RTL | Colors: Blue & White
   Font: Cairo (Google Fonts)
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&display=swap');

/* ---------- CSS Variables ---------- */
:root {
    /* Primary Blues */
    --primary-900: #023e8a;
    --primary-800: #0353a4;
    --primary-700: #0466c8;
    --primary-600: #0077b6;
    --primary-500: #0096c7;
    --primary-400: #00b4d8;
    --primary-300: #48cae4;
    --primary-200: #90e0ef;
    --primary-100: #caf0f8;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-200: #dee2e6;
    --gray-300: #ced4da;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Background & Text */
    --bg-primary: #bfd4e6;
    --bg-main: #d9e8f5;
    --bg-card: #d9e8f5;
    --bg-footer: #96b5d2;
    --bg-secondary: #d9e8f5;
    --bg-header: var(--primary-600);
    --bg-navbar: var(--primary-800);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-700);
    --text-light: var(--white);

    /* Shadows & Transitions */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

/* ---------- Dark Mode Variables ---------- */
[data-theme="dark"] {
    --bg-primary: #0a1628;
    --bg-main: #0f1f3a;
    --bg-card: #112240;
    --bg-footer: #0c182c;
    --bg-secondary: #0f1f3a;
    --bg-header: #0d1b33;
    --bg-navbar: #081425;
    
    
    
    
    --text-primary: #e0e6ed;
    --text-secondary: #a0aec0;
    --text-light: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---------- Header ---------- */
.header {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-600) 50%, var(--primary-500) 100%);
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 100;
}

[data-theme="dark"] .header {
    background: linear-gradient(135deg, #0d1b33 0%, #122240 50%, #162a4d 100%);
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.header__brand:hover {
    opacity: 0.9;
}

.header__logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.header__brand:hover .header__logo-wrapper {
    transform: scale(1.05);
}

.header__logo {
    height: 64px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.18));
    transition: var(--transition);
}

.header__info {
    display: flex;
    flex-direction: column;
}

.header__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 1.5px;
    line-height: 1.2;
    text-transform: uppercase;
}

.header__subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.header__controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---------- Toggle Buttons ---------- */
.toggle-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.toggle-btn i {
    font-size: 1rem;
}

.toggle-btn--active {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-700);
}

/* ---------- Navigation Bar ---------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-navbar);
    padding: 0 40px;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 99;
}

[data-theme="dark"] .navbar {
    background: #081425;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar__list {
    display: flex;
    align-items: center;
    gap: 0;
}

.navbar__item {}

.navbar__link {
    display: block;
    padding: 14px 28px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
    transition: var(--transition);
}

.navbar__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--primary-300);
    transition: var(--transition);
    border-radius: 3px 3px 0 0;
}

.navbar__link:hover,
.navbar__link--active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.navbar__link:hover::after,
.navbar__link--active::after {
    width: 100%;
}

/* Hamburger Menu (Mobile) */
.navbar__toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 14px 0;
}

/* ---------- Footer ---------- */
.footer {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 100%);
    color: var(--white);
    padding: 40px;
    text-align: center;
}

[data-theme="dark"] .footer {
    background: linear-gradient(135deg, #060e1a 0%, #0a1628 100%);
}

.footer__text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer__text a {
    color: var(--primary-300);
    font-weight: 600;
}

.footer__text a:hover {
    color: var(--white);
}

/* Social specific colors *//* Social tooltip *//* ---------- Animations ---------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slideIn {
    animation: slideInRight 0.8s ease forwards;
}

/* ---------- Responsive Design ---------- */

/* Tablet */
@media (max-width: 992px) {
    .header {
        padding: 12px 24px;
    }

    .header__title {
        font-size: 1.25rem;
    }

    .navbar {
        padding: 0 24px;
    }

    .navbar__link {
        padding: 12px 18px;
        font-size: 0.88rem;
    }

    .slider__number {
        font-size: 4rem;
    }

    .slider__text {
        font-size: 1.2rem;
    }

    .welcome__title {
        font-size: 2rem;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
        padding: 40px 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header {
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .header__logo { height: 48px; width: auto; }

    .header__title {
        font-size: 1.1rem;
    }

    .header__subtitle {
        font-size: 0.65rem;
    }

    .header__controls {
        gap: 8px;
    }

    .toggle-btn {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    /* Mobile Nav */
    .navbar {
        padding: 0 16px;
    }

    .navbar__toggle {
        display: block;
    }

    .navbar__list {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .navbar__list--open {
        display: flex;
    }

    .navbar__link {
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .navbar__link::after {
        display: none;
    }

    /* Slider */
    .slider__number {
        font-size: 3rem;
    }

    .slider__text {
        font-size: 1rem;
    }

    .slider__text-en {
        font-size: 0.85rem;
    }

    /* Welcome */
    .welcome {
        padding: 50px 16px;
    }

    .welcome__title {
        font-size: 1.6rem;
    }

    .welcome__text {
        font-size: 1rem;
    }

    /* Features */
    .features {
        grid-template-columns: 1fr;
        padding: 30px 16px;
        gap: 20px;
    }

    /* Social Float *//* Footer */
    .footer {
        padding: 30px 16px;
    }

    .main-content {
        padding: 40px 16px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .header__brand {
        gap: 10px;
    }

    .header__logo { height: 40px; width: auto; }

    .header__title {
        font-size: 0.95rem;
    }

    .header__controls {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }

    .slider__number {
        font-size: 2.5rem;
    }

    .slider__text {
        font-size: 0.9rem;
    }

    .welcome__title {
        font-size: 1.4rem;
    }
}

/* ---------- LTR Mode (English) ---------- */
[dir="ltr"] {
    text-align: left;
}

[dir="ltr"] .navbar__link::after {
    right: auto;
    left: 0;
}

[dir="ltr"] .section-title::after {
    right: auto;
    left: 0;
}


/* ---------- Social Media Float Directions ---------- *//* ========== Footer Modern Styles ========== */
.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}
.footer-link:hover {
    color: var(--primary-500);
    transform: translateX(-5px); /* Slide left in RTL */
}
html[dir="ltr"] .footer-link:hover {
    transform: translateX(5px); /* Slide right in LTR */
}

.footer-social:hover {
    background: var(--primary-500) !important;
    color: var(--white) !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}
[data-theme="dark"] .footer__bottom {
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.footer-email:hover { color: var(--primary-500) !important; text-decoration: underline !important; }

.footer-human-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800)) !important;
}


/* TELEGRAM INJECTIONS *//* Telegram Magic Circle & Fairy Dust */
.tg-dust-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    animation: tg-spin-dust 4s linear infinite;
}
.tg-dust-ring::before,
.tg-dust-ring::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
}
.tg-dust-ring::before {
    top: 5px; left: 50%;
    box-shadow: 
        10px -5px 3px #ff0000, 
        20px 5px 3px #ff7f00, 
        15px 20px 3px #ffff00, 
        -5px 20px 3px #00ff00, 
        -20px 10px 3px #0000ff, 
        -15px -10px 3px #4b0082, 
        -5px -20px 3px #9400d3;
    animation: tg-twinkle-dust 1s infinite alternate;
}
.tg-dust-ring::after {
    bottom: 5px; left: 50%;
    box-shadow: 
        15px 15px 2px #ffcc00, 
        -15px 15px 3px #00ffff, 
        -15px -15px 3px #ff00ff, 
        15px -15px 2px #00ff00,
        25px 0px 3px #ff0000,
        -25px 0px 3px #0000ff;
    animation: tg-twinkle-dust 1.5s infinite alternate-reverse;
}

.tg-stars-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 75px;
    height: 75px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    animation: tg-spin-stars 10s linear infinite reverse;
}
.tg-stars-circle i {
    position: absolute;
    color: #ffcc00;
    font-size: 9px;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
    animation: tg-star-blink 1.2s infinite alternate;
}
.tg-stars-circle .s1 { top: 0; left: 50%; margin-left: -4px; animation-delay: 0s; }
.tg-stars-circle .s2 { top: 12px; right: 12px; color: #00ffff; animation-delay: 0.2s; }
.tg-stars-circle .s3 { top: 50%; right: 0; margin-top: -4px; animation-delay: 0.4s; }
.tg-stars-circle .s4 { bottom: 12px; right: 12px; color: #ff00ff; animation-delay: 0.6s; }
.tg-stars-circle .s5 { bottom: 0; left: 50%; margin-left: -4px; animation-delay: 0.8s; }
.tg-stars-circle .s6 { bottom: 12px; left: 12px; color: #00ff00; animation-delay: 1s; }
.tg-stars-circle .s7 { top: 50%; left: 0; margin-top: -4px; animation-delay: 1.2s; }
.tg-stars-circle .s8 { top: 12px; left: 12px; color: #ffcc00; animation-delay: 1.4s; }

@keyframes tg-spin-dust { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes tg-spin-stars { 100% { transform: translate(-50%, -50%) rotate(-360deg); } }
@keyframes tg-twinkle-dust {
    0% { opacity: 0.3; filter: brightness(0.8); }
    100% { opacity: 1; filter: brightness(1.5) drop-shadow(0 0 2px #fff); }
}
@keyframes tg-star-blink {
    0% { opacity: 0.2; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1.3); }
}


/* Permanent Popup for Floating Icon */
.tg-popup {
    position: absolute;
    right: calc(100% + 20px);
    top: 50%;
    transform: translateY(-50%);
    background: #ffcc00;
    color: #111;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    pointer-events: none;
    animation: tg-bounce 2s infinite;
    z-index: 20;
    font-family: 'Cairo', sans-serif;
}
.tg-popup::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffcc00;
}
@keyframes tg-bounce {
    0%, 100% { transform: translate(0, -50%); }
    50% { transform: translate(-10px, -50%); }
}

/* Permanent Popup for Footer Icon */
.tg-popup-footer {
    position: absolute;
    bottom: calc(100% + 20px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffcc00;
    color: #111;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    pointer-events: none;
    animation: tg-bounce-up 2s infinite;
    z-index: 20;
    font-family: 'Cairo', sans-serif;
}
.tg-popup-footer::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: #ffcc00 transparent transparent transparent;
}
@keyframes tg-bounce-up {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -8px); }
}


/* RTL Popup Fix for Arabic */
[dir="rtl"] .tg-popup {
    left: calc(100% + 20px) !important;
    right: auto !important;
    animation: tg-bounce-rtl 2s infinite !important;
}
[dir="rtl"] .tg-popup::after {
    left: -8px !important;
    right: auto !important;
    border-width: 8px 8px 8px 0 !important;
    border-color: transparent #ffcc00 transparent transparent !important;
}
@keyframes tg-bounce-rtl {
    0%, 100% { transform: translate(0, -50%); }
    50% { transform: translate(10px, -50%); }
}

/* Ensure absolute positioning for stars to prevent layout breaking */
.tg-stars-circle i {
    position: absolute !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* Telegram Popup Close Button */
.tg-popup, .tg-popup-footer {
    pointer-events: auto !important;
    padding-right: 24px !important;
}
[dir="rtl"] .tg-popup, [dir="rtl"] .tg-popup-footer {
    padding-right: 12px !important;
    padding-left: 24px !important;
}
.close-tg-popup {
    position: absolute;
    top: 4px;
    right: 5px;
    cursor: pointer;
    color: #444;
    font-size: 10px;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    transition: 0.2s;
}
.close-tg-popup:hover {
    color: #000;
    background: rgba(0,0,0,0.15);
    transform: scale(1.1);
}
[dir="rtl"] .close-tg-popup {
    right: auto;
    left: 5px;
}


/* Universal Telegram Fix */
.telegram-magic {
    animation: magic-pulse 2s infinite ease-in-out !important;
    position: relative !important;
    z-index: 10 !important;
    overflow: visible !important;
    isolation: isolate !important;
    transform: translateZ(0) !important;
}
@keyframes magic-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.8), 0 0 15px rgba(0, 136, 204, 0.6); }
    50% { box-shadow: 0 0 0 15px rgba(0, 136, 204, 0), 0 0 25px rgba(0, 136, 204, 1); }
    100% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0), 0 0 15px rgba(0, 136, 204, 0.6); }
}


/* Swap Close Button Positions */
.close-tg-popup {
    left: 5px !important;
    right: auto !important;
}
.tg-popup, .tg-popup-footer {
    padding-left: 26px !important;
    padding-right: 14px !important;
}

[dir="rtl"] .close-tg-popup {
    right: 5px !important;
    left: auto !important;
}
[dir="rtl"] .tg-popup, [dir="rtl"] .tg-popup-footer {
    padding-right: 26px !important;
    padding-left: 14px !important;
}


/* Enlarge Close Button (X) */
.close-tg-popup {
    font-size: 14px !important;
    width: 24px !important;
    height: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(0,0,0,0.08) !important;
}
.close-tg-popup:hover {
    transform: translateY(-50%) scale(1.15) !important;
    background: transparent !important;
}

/* Adjust popup padding for larger X */
.tg-popup, .tg-popup-footer {
    padding-left: 34px !important;
    padding-right: 14px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}
[dir="rtl"] .tg-popup, [dir="rtl"] .tg-popup-footer {
    padding-right: 34px !important;
    padding-left: 14px !important;
}


/* Footer Active Page Indicator */
.footer-link--active {
    color: var(--primary-500) !important;
    font-weight: 800;
    position: relative;
}
.footer-link--active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 3px;
    background: var(--primary-500);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary-500);
}


/* Hide default black tooltip for Telegram */
.telegram-magic::before {
    display: none !important;
}/* =========================================
   AI Chat Modal (Dr. ScienceMed)
   ========================================= */
.ai-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
}
.ai-modal.active {
    display: flex;
}
.ai-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.4s ease;
}
.ai-modal__content {
    position: relative;
    width: 80%;
    height: 80vh;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: row; /* Magic: First child on Left (LTR), First child on Right (RTL) */
    overflow: hidden;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
[data-theme='dark'] .ai-modal__content {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.ai-modal__close {
    position: absolute;
    top: 25px;
    inset-inline-start: 25px; /* Adjusts based on RTL/LTR */
    background: rgba(255, 0, 0, 0.1);
    color: #ef4444;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}
.ai-modal__close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}
.ai-modal__body {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
}
.ai-modal__robot-side {
    width: 350px;
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.3);
    gap: 20px;
}
[data-theme='dark'] .ai-modal__robot-side {
    background: rgba(0, 0, 0, 0.2);
    border-inline-start-color: rgba(255, 255, 255, 0.05);
}

/* Robot Design */
.emo-robot {
    width: 140px;
    height: 160px;
    position: relative;
    animation: hoverBot 4s ease-in-out infinite;
}
.emo-head {
    width: 110px;
    height: 90px;
    background: #1e293b;
    border-radius: 25px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4), inset 0 5px 15px rgba(255,255,255,0.1);
    border: 3px solid #334155;
    z-index: 2;
}
/* Ears */
.emo-head::before, .emo-head::after {
    content: '';
    position: absolute;
    top: 25px;
    width: 15px;
    height: 40px;
    background: var(--primary-500);
    border-radius: 8px;
    box-shadow: 0 0 10px var(--primary-500);
}
.emo-head::before { left: -12px; }
.emo-head::after { right: -12px; }

.emo-face {
    position: absolute;
    top: 12px; left: 12px; right: 12px; bottom: 12px;
    background: #020617;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    overflow: hidden;
}
.emo-eye {
    width: 20px;
    height: 30px;
    background: #38bdf8;
    border-radius: 10px;
    box-shadow: 0 0 12px #38bdf8;
    animation: blink 4s infinite, lookAround 8s infinite;
}
.emo-body {
    width: 60px;
    height: 50px;
    background: #cbd5e1;
    border-radius: 15px 15px 30px 30px;
    margin: -10px auto 0;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.2);
}
[data-theme='dark'] .emo-body {
    background: #475569;
}

.ai-bot-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-800);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
[data-theme='dark'] .ai-bot-title {
    color: var(--primary-300);
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes hoverBot {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}
@keyframes lookAround {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(0); }
}


.navbar { display: flex; flex-wrap: wrap; }
.navbar__extra { display: flex; gap: 10px; align-items: center; }
.dr-sciencemed-btn, .vetcast-btn { white-space: nowrap; }
.human-health-btn { white-space: nowrap; }


/* ---------- Social Media Floating Buttons ---------- */
.social-float {
    position: fixed;
    /* Position handled by dir attribute */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.social-float__link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.social-float__link:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-lg);
}

/* Social specific colors */
.social-float__link--facebook {
    background: linear-gradient(135deg, #1877f2, #0d65d9);
}

.social-float__link--whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}
.social-float__link--telegram {
    background: linear-gradient(135deg, #0088cc, #005580);
}


.social-float__link--youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
}

.social-float__link--tiktok {
    background: linear-gradient(135deg, #000000, #333333);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Social tooltip */
.social-float__link::before {
    content: attr(data-tooltip);
    position: absolute;
    /* Position handled by dir attribute */
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-900);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.social-float__link:hover::before {
    opacity: 1;
    visibility: visible;
}



/* Modern Edge Social Icons - Sleek Slide Out */
.social-float {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-float__link {
    width: 38px !important;
    height: 42px !important;
    font-size: 1.2rem !important;
}

[dir="rtl"] .social-float__link {
    border-radius: 0 20px 20px 0 !important;
    transform-origin: left center;
    padding-left: 4px;
}
[dir="ltr"] .social-float__link {
    border-radius: 20px 0 0 20px !important;
    transform-origin: right center;
    padding-right: 4px;
}

[dir="rtl"] .social-float {
    left: 0 !important;
    right: auto !important;
    transform: translateX(-4px);
}
[dir="rtl"] .social-float:hover {
    transform: translateX(0);
}

[dir="ltr"] .social-float {
    right: 0 !important;
    left: auto !important;
    transform: translateX(4px);
}
[dir="ltr"] .social-float:hover {
    transform: translateX(0);
}

@media (max-width: 768px) {
    [dir="rtl"] .social-float { transform: translateX(0); }
    [dir="ltr"] .social-float { transform: translateX(0); }
}

/* Ensure Telegram Stars are perfectly centered on the icon */
.social-float__link--telegram .tg-dust-ring,
.social-float__link--telegram .tg-stars-circle {
    top: 50% !important;
    left: 50% !important;
    margin: 0 !important;
}

/* ===== Footer contact people cards ===== */
.footer-person {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 16px;
    background: var(--bg-primary);
    border: 1px solid rgba(4, 102, 200, 0.15);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(2, 62, 138, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.footer-person:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(2, 62, 138, 0.16); }
[data-theme="dark"] .footer-person { border-color: rgba(72, 202, 228, 0.2); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.footer-person__icon {
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
    color: #fff; font-size: 1.1rem; margin-bottom: 4px;
}
.footer-person__name { font-weight: 800; font-size: 1.05rem; color: var(--text-primary); }
.footer-person__role { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 6px; }
.footer-person__phone {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 18px; border-radius: 25px;
    background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
    color: #fff !important; font-weight: 700; font-size: 0.95rem; text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.footer-person__phone:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(4, 102, 200, 0.35); }

/* ===== Footer people: one horizontal row ===== */
.footer__people {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 10px 20px;
}
.footer__people .footer-person {
    flex: 1 1 240px;
    max-width: 320px;
}
@media (max-width: 768px) {
    .footer__people { flex-direction: column; align-items: center; }
    .footer__people .footer-person { width: 100%; max-width: 340px; flex: 0 0 auto; }
}

/* ===== Footer people: first element in footer ===== */
.footer__people { padding: 50px 20px 0 20px; }
.footer__people + .footer__container { padding-top: 40px !important; }

/* ===== Footer contact title above people ===== */
.footer__people-title {
    text-align: center;
    color: var(--primary-600);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto;
    padding: 50px 20px 0 20px;
}
.footer__people-title + .footer__people { padding-top: 24px; }
[data-theme="dark"] .footer__people-title { color: var(--primary-300); }

/* ==========================================================================
   Unified Balanced Footer Design (Preserves --bg-footer & Original Card Styles)
   ========================================================================== */
.footer {
    background: var(--bg-footer) !important;
    padding: 40px 20px 22px 20px !important;
    color: var(--text-primary);
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer__people-title {
    text-align: center;
    color: var(--primary-700) !important;
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    margin: 0 auto 22px auto !important;
    padding: 0 20px 10px 20px !important;
    position: relative;
}

.footer__people-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 68px;
    height: 3.5px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary-700), var(--primary-500));
}

[data-theme="dark"] .footer__people-title {
    color: var(--primary-300) !important;
}

.footer__people {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 22px !important;
    max-width: 1200px !important;
    margin: 0 auto 36px auto !important;
    padding: 0 !important;
}

.footer__people .footer-person {
    max-width: none !important;
    width: 100% !important;
}

/* 3 Balanced Columns inside the SAME unified footer */
.footer__main-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr 1.15fr;
    gap: 36px;
    align-items: start;
    padding: 34px 0 28px 0;
    border-top: 1px solid rgba(4, 102, 200, 0.16);
    border-bottom: 1px solid rgba(4, 102, 200, 0.16);
    text-align: start;
}

[data-theme="dark"] .footer__main-grid {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Column 1: Brand + Golden Logo */
.footer__brand-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    text-align: center;
    gap: 16px;
}

.footer__brand-desc {
    color: var(--text-primary);
    line-height: 1.7;
    font-weight: 800;
    font-size: 1.04rem;
    margin: 0;
    text-align: center;
}

.footer__brand-desc span {
    color: var(--primary-700);
}

[data-theme="dark"] .footer__brand-desc span {
    color: var(--primary-300);
}

/* Column Headings */
.footer__col-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--primary-800);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-theme="dark"] .footer__col-title {
    color: var(--primary-300);
}

.footer__col-title::before {
    content: '';
    width: 4px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--primary-700), var(--primary-500));
    flex-shrink: 0;
}

/* Column 2: Quick Links */
.footer__links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-width: 240px;
}

.footer__links-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 14px;
    border-radius: 11px;
    background: var(--bg-primary);
    border: 1px solid rgba(4, 102, 200, 0.15);
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

[data-theme="dark"] .footer__links-pill {
    border-color: rgba(72, 202, 228, 0.2);
}

.footer__links-pill:hover {
    transform: translateX(-4px);
    border-color: var(--primary-500);
    color: var(--primary-700);
    box-shadow: 0 4px 12px rgba(2, 62, 138, 0.1);
}

html[dir="ltr"] .footer__links-pill:hover {
    transform: translateX(4px);
}

[data-theme="dark"] .footer__links-pill:hover {
    color: var(--primary-300);
    border-color: var(--primary-400);
}

.footer__links-pill.active {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(4, 102, 200, 0.25);
}

.footer__links-pill i {
    font-size: 0.72rem;
    color: var(--primary-600);
    transition: transform 0.22s ease;
}

html[dir="ltr"] .footer__links-pill i {
    transform: rotate(180deg);
}

[data-theme="dark"] .footer__links-pill i {
    color: var(--primary-300);
}

.footer__links-pill.active i {
    color: #ffffff !important;
}

/* Column 3: Contact Info + Human Health + Original Telegram Magic Socials */
.footer__contact-col {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer__info-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--bg-primary);
    border: 1px solid rgba(4, 102, 200, 0.15);
    color: var(--text-primary);
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

[data-theme="dark"] .footer__info-pill {
    border-color: rgba(72, 202, 228, 0.2);
}

a.footer__info-pill:hover {
    transform: translateY(-2px);
    border-color: var(--primary-500);
}

.footer__info-pill i {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    flex-shrink: 0;
}

.footer__human-cta {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: #ffffff !important;
    padding: 11px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.96rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: var(--shadow-sm);
    margin-top: 2px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.footer__human-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.footer__social-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 62px;
    padding-bottom: 6px;
}

.footer__bottom {
    text-align: center;
    padding: 20px 10px 4px 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer__bottom-brand {
    color: var(--primary-700);
    font-weight: 700;
    text-decoration: none;
}

[data-theme="dark"] .footer__bottom-brand {
    color: var(--primary-300);
}

@media (max-width: 960px) {
    .footer__main-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer__col-title {
        justify-content: center;
    }

    .footer__links-list {
        margin: 0 auto;
        max-width: 290px;
    }

    .footer__contact-col {
        max-width: 360px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .footer__people {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        max-width: 360px !important;
    }
}
