/* CliniQo Global Layout & Theme Styles */
:root {
    --cliniqo-primary: #0077FE;
    --cliniqo-primary-dark: #005fd1;
    --cliniqo-cyan: #00B4D8;
    --cliniqo-teal: #00C49F;
    --cliniqo-navy: #0A1C36;
    --cliniqo-slate: #475569;
    --cliniqo-light: #F8FAFC;
    --cliniqo-soft-blue: #F0F8FF;
    --cliniqo-border: #E2E8F0;
    --cliniqo-gradient-1: linear-gradient(135deg, #0077FE 0%, #00B4D8 100%);
    --cliniqo-gradient-2: linear-gradient(135deg, #00B4D8 0%, #00C49F 100%);
    --cliniqo-gradient-hero: linear-gradient(135deg, #0A1C36 0%, #0B4F8A 50%, #0077FE 100%);
    --cliniqo-shadow-sm: 0 4px 12px rgba(10, 28, 54, 0.04);
    --cliniqo-shadow-md: 0 10px 30px rgba(0, 119, 254, 0.08);
    --cliniqo-shadow-lg: 0 20px 40px rgba(0, 119, 254, 0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #334155;
    background-color: #FFFFFF;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
}

html[lang="ar"] body,
html[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

main {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
}

img, svg, video, canvas, iframe {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}
@media (min-width: 576px) { .container { max-width: 540px !important; } }
@media (min-width: 768px) { .container { max-width: 720px !important; } }
@media (min-width: 992px) { .container { max-width: 960px !important; } }
@media (min-width: 1200px) { .container { max-width: 1140px !important; } }

/* Flex gap utility helpers */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 14px; }
.gap-4 { gap: 20px; }

/* Top Announcement Bar */
.cliniqo-topbar {
    background: #0A1C36;
    color: #94A3B8;
    padding: 9px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.cliniqo-topbar a {
    color: #E2E8F0;
    text-decoration: none;
    transition: color 0.2s ease;
}
.cliniqo-topbar a:hover {
    color: var(--cliniqo-cyan);
}
.topbar-badge-emergency {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 11.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pulse-red {
    width: 6px;
    height: 6px;
    background: #EF4444;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.6);
    animation: pulseRed 1.8s infinite;
}
@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Modern Sticky Header */
.cliniqo-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(10, 28, 54, 0.05);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}
.cliniqo-header .navbar {
    padding: 14px 0;
}
.brand-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}
.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--cliniqo-gradient-1);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(0, 119, 254, 0.3);
}
.brand-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--cliniqo-navy);
    margin: 0;
    line-height: 1;
}
.brand-title span {
    color: var(--cliniqo-primary);
}
.brand-tagline {
    font-size: 11px;
    color: #64748B;
    display: block;
    margin-top: 2px;
    font-weight: 600;
}

.cliniqo-nav-link {
    font-weight: 700;
    font-size: 14.5px;
    color: #334155 !important;
    padding: 8px 14px !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}
.cliniqo-nav-link:hover, .cliniqo-nav-link.active {
    color: var(--cliniqo-primary) !important;
    background: rgba(0, 119, 254, 0.06);
}

.btn-header-cta {
    background: var(--cliniqo-gradient-1);
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 119, 254, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    border: none;
}
.btn-header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.35);
    color: #FFFFFF !important;
}

.lang-switch-badge {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--cliniqo-border);
    color: var(--cliniqo-navy);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.lang-switch-badge:hover {
    background: #F0F8FF;
    border-color: var(--cliniqo-cyan);
    color: var(--cliniqo-primary);
}

/* Modern Footer */
.cliniqo-footer {
    background: #0A1C36;
    color: #94A3B8;
    padding-top: 70px;
    position: relative;
    overflow: hidden;
}
.cliniqo-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cliniqo-gradient-1);
}
.footer-widget h5 {
    color: #FFFFFF;
    font-weight: 800;
    font-size: 17px;
    margin-bottom: 22px;
    position: relative;
    padding-bottom: 10px;
}
.footer-widget h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 3px;
    background: var(--cliniqo-cyan);
    border-radius: 2px;
}
html[dir="rtl"] .footer-widget h5::after {
    right: 0;
    left: auto;
}
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links-list li {
    margin-bottom: 12px;
}
.footer-links-list a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-links-list a:hover {
    color: #FFFFFF;
    transform: translateX(4px);
}
html[dir="rtl"] .footer-links-list a:hover {
    transform: translateX(-4px);
}
.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 50px;
    font-size: 13.5px;
}
.social-pill-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #E2E8F0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-right: 6px;
}
.social-pill-btn:hover {
    background: var(--cliniqo-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Scroll to top button */
#btnScrollTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    left: auto;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--cliniqo-gradient-1);
    color: #FFFFFF;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(0, 119, 254, 0.35);
    z-index: 999;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
html[dir="rtl"] #btnScrollTop {
    left: 30px;
    right: auto;
}
#btnScrollTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 180, 216, 0.45);
}

/* Responsive Breakpoints & Mobile Styles */
@media(max-width: 991px) {
    .cliniqo-topbar .contact-items {
        display: none !important;
    }
    .cliniqo-header .navbar-collapse {
        background: #FFFFFF;
        border-radius: 18px;
        margin-top: 14px;
        padding: 20px 16px;
        box-shadow: 0 12px 35px rgba(10, 28, 54, 0.12);
        border: 1px solid #E2E8F0;
    }
    .cliniqo-nav-link {
        padding: 11px 16px !important;
        margin-bottom: 4px;
        border-radius: 10px;
        font-size: 15px;
    }
    .btn-header-cta {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
        padding: 12px 20px;
        font-size: 15px;
    }
    .cliniqo-footer {
        padding-top: 50px;
    }
    .cliniqo-footer .footer-widget {
        margin-bottom: 30px;
    }
}

@media(max-width: 767px) {
    .brand-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
        border-radius: 10px;
    }
    .brand-title {
        font-size: 20px;
    }
    .brand-tagline {
        font-size: 10px;
    }
    .navbar-toggler {
        padding: 6px 10px;
        border-radius: 8px;
        background: rgba(0, 119, 254, 0.08);
    }
    .footer-bottom {
        margin-top: 30px;
        text-align: center;
    }
    .footer-bottom .d-flex {
        flex-direction: column;
        gap: 12px !important;
    }
}

@media(max-width: 575px) {
    .cliniqo-topbar {
        padding: 7px 0;
    }
    .cliniqo-topbar .container > div {
        gap: 6px !important;
    }
    .topbar-badge-emergency {
        font-size: 11px;
        padding: 2px 7px;
    }
    .lang-switch-badge {
        padding: 4px 8px;
        font-size: 12px;
    }
    .cliniqo-topbar a.btn {
        padding: 3px 8px !important;
        font-size: 11.5px !important;
    }
    #btnScrollTop {
        bottom: 20px;
        right: 20px;
        left: auto;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    html[dir="rtl"] #btnScrollTop {
        left: 20px;
        right: auto;
    }
}
