/* ====================================================
   CODE SIYA9A - DYNAMIC SITE LAYOUT STYLES
   Header (Top Announcement Bar + Navbar) & Footer
   ==================================================== */

/* --- Top Announcement Bar --- */
.top-announcement-bar {
    background: linear-gradient(90deg, #071938 0%, #0e2d63 30%, #1a56a8 65%, #0b224d 100%);
    color: #ffffff;
    font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    z-index: 70;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.tab-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    direction: rtl;
    text-align: right;
}

.tab-content {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
    justify-content: flex-start;
}

.tab-badge {
    background: rgba(255, 215, 0, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    font-size: 11.5px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}

.tab-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
    text-align: right;
}

.tab-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #25D366;
    color: #ffffff !important;
    font-size: 12.5px;
    font-weight: 800;
    padding: 5px 16px;
    border-radius: 50px;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
    transition: all .25s cubic-bezier(0.22, 1, 0.36, 1);
}

.tab-cta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.tab-cta:hover {
    background: #20ba56;
    transform: translateY(-1px) scale(1.03);
    color: #ffffff !important;
}

.tab-cta:hover svg {
    transform: translateX(-3px);
}

@media (max-width: 768px) {
    .tab-inner {
        padding: 7px 16px;
        gap: 10px;
        text-align: right;
    }
    .tab-text {
        font-size: 12px;
    }
    .tab-badge {
        font-size: 11px;
        padding: 2px 8px;
    }
    .tab-cta {
        padding: 4px 12px;
        font-size: 11.5px;
    }
}

@media (max-width: 540px) {
    .tab-inner {
        padding: 6px 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        text-align: right;
    }
    .tab-content {
        flex: 1;
        min-width: 0;
        gap: 6px;
        text-align: right;
        justify-content: flex-start;
    }
    .tab-badge {
        display: none;
    }
    .tab-text {
        font-size: 11.5px;
        line-height: 1.35;
        text-align: right;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .tab-cta {
        padding: 4px 10px;
        font-size: 11px;
        gap: 3px;
        flex-shrink: 0;
    }
    .tab-cta svg {
        width: 12px;
        height: 12px;
    }
}

/* --- Main Navbar --- */
.navbar {
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 60;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    transition: box-shadow .3s;
    font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 28px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    cursor: pointer;
    color: inherit;
}

.nav-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(58, 123, 213, 0.3);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.nav-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    animation: logoShine 4s ease-in-out infinite;
}

@keyframes logoShine {
    0%, 100% { transform: translateX(-100%) rotate(-45deg); }
    50% { transform: translateX(100%) rotate(-45deg); }
}

.nav-logo svg {
    width: 22px;
    height: 22px;
    color: white;
    position: relative;
    z-index: 1;
}

.nav-brand-text {
    font-size: 18px;
    font-weight: 800;
    color: #2c3e50;
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #5a6a7d;
    text-decoration: none !important;
    transition: all .2s;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    background: #f0f4f8;
    color: #2c3e50;
}

.nav-link.active {
    background: #edf2ff;
    color: #3a7bd5;
    font-weight: 700;
}

.nav-cta-btn {
    padding: 8px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    color: white !important;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 3px 10px rgba(58, 123, 213, 0.25);
    transition: all .25s;
    margin-right: 8px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(58, 123, 213, 0.3);
}

/* --- Categories Dropdown Navigation --- */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #5a6a7d;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s ease;
    user-select: none;
}

.nav-dropdown-btn:hover {
    background: #f0f4f8;
    color: #2c3e50;
}

.nav-dropdown:hover .nav-dropdown-btn,
.nav-dropdown.is-open .nav-dropdown-btn {
    background: #f0f4f8;
    color: #2c3e50;
}

.nav-dropdown-btn.active {
    background: #edf2ff;
    color: #3a7bd5;
    font-weight: 700;
}

.dropdown-chevron {
    width: 15px;
    height: 15px;
    transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1);
    color: currentColor;
    flex-shrink: 0;
}

.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown.is-open .dropdown-chevron {
    transform: rotate(180deg);
}

/* Desktop Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 300px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e9f0;
    padding: 8px;
    z-index: 120;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    pointer-events: none;
    direction: rtl;
    text-align: right;
}

/* Invisible bridge so hover isn't lost moving mouse from button to dropdown */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none !important;
    color: #2c3e50;
    transition: background .15s ease, transform .15s ease;
    font-family: inherit;
    background: transparent;
}

.dropdown-item:hover {
    background: #f8fafc;
}

.dropdown-item.active {
    background: #eff6ff;
}

.dropdown-item.active .dropdown-item-title {
    color: #2563eb;
    font-weight: 800;
}

.dropdown-item-badge {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
    letter-spacing: -0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dropdown-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
    flex: 1;
    min-width: 0;
}

.dropdown-item-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    transition: color .15s ease;
}

.dropdown-item:hover .dropdown-item-title {
    color: #3a7bd5;
}

.dropdown-item-desc {
    font-size: 11.5px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.25;
}

.dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 6px 4px;
}

.dropdown-item-all {
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #3a7bd5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #f0f7ff;
    border-radius: 8px;
    margin-top: 2px;
}

.dropdown-item-all:hover {
    background: #e0effe;
    color: #1d4ed8;
}

.dropdown-item-all .dropdown-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

#sections {
    scroll-margin-top: 85px;
}

/* --- Mobile Hamburger --- */
.nav-hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #d5dce6;
    background: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    transition: all .2s;
}

.nav-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #2c3e50;
    border-radius: 2px;
    transition: all .3s;
}

.nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

@media (max-width: 900px) {
    .nav-hamburger {
        display: flex;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 12px 16px 16px;
        gap: 6px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
        border-top: 1px solid #d5dce6;
        display: none;
        z-index: 100;
    }
    .nav-links.mobile-open {
        display: flex !important;
        animation: navSlideDown 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    @keyframes navSlideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .nav-link, .nav-cta-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        margin: 0;
        padding: 10px 16px;
    }
    .nav-cta-btn {
        margin-top: 4px;
    }
    .navbar-inner {
        padding: 10px 16px;
    }

    /* Mobile Categories Dropdown */
    .nav-dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .nav-dropdown-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13.5px;
        position: relative;
    }
    .nav-dropdown-btn .dropdown-chevron {
        position: absolute;
        left: 18px;
        top: 50%;
        transform: translateY(-50%);
    }
    .nav-dropdown.is-open .nav-dropdown-btn .dropdown-chevron {
        transform: translateY(-50%) rotate(180deg);
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
        border-radius: 10px;
        margin: 4px 0 8px;
        padding: 6px;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 100%;
    }
    .nav-dropdown:hover .dropdown-menu {
        display: none;
    }
    .nav-dropdown.is-open .dropdown-menu {
        display: flex;
        flex-direction: column;
        gap: 4px;
        animation: navSlideDown 0.2s ease both;
    }
    .dropdown-item {
        padding: 9px 12px;
        background: #ffffff;
        border: 1px solid #edf2f7;
    }
    .dropdown-item:hover {
        background: #f1f5f9;
    }
}

/* --- Dynamic Footer --- */
.site-footer {
    background: linear-gradient(180deg, #0c1424 0%, #070d18 100%);
    color: #94a3b8;
    position: relative;
    direction: rtl;
    font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top-line {
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #38bdf8, #10b981, #f59e0b, #2563eb);
    background-size: 300% 100%;
    animation: footerLine 8s linear infinite;
}

@keyframes footerLine {
    0%   { background-position: 0% 0; }
    100% { background-position: 300% 0; }
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 56px 24px 44px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
}

.footer-links-col {
    display: flex;
    flex-direction: column;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    text-decoration: none;
}

.footer-logo {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.footer-logo svg {
    width: 22px;
    height: 22px;
    color: white;
}

.footer-brand-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-brand-name {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.footer-brand-sub {
    font-size: 11.5px;
    font-weight: 600;
    color: #38bdf8;
    line-height: 1.2;
}

.footer-desc {
    font-size: 13.5px;
    line-height: 1.8;
    color: #94a3b8;
    margin-bottom: 18px;
    max-width: 320px;
}

.footer-trust-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
}

.footer-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 8px;
    width: fit-content;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.footer-social-btn.fb:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.4);
    transform: translateY(-3px);
}

.footer-social-btn.ig:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(214, 36, 159, 0.4);
    transform: translateY(-3px);
}

.footer-social-btn.yt:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 0, 0, 0.4);
    transform: translateY(-3px);
}

.footer-social-btn.wa:hover {
    background: #25d366;
    border-color: #25d366;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    transform: translateY(-3px);
}

.footer-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: -0.2px;
}

.footer-title-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0ea5e9;
    box-shadow: 0 0 8px #0ea5e9;
    flex-shrink: 0;
}

.footer-links-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-list li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    padding: 3px 0;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.site-footer .footer-link::before,
.footer-link::before {
    display: none !important;
    content: none !important;
}

.footer-link:hover {
    color: #ffffff;
    transform: translateX(-4px);
}

/* Category Badge Pills */
.cat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    flex-shrink: 0;
}

.cat-pill.a {
    background: rgba(2, 132, 199, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(2, 132, 199, 0.35);
}

.cat-pill.b {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.cat-pill.c {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.cat-pill.d {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.35);
}

/* Featured Badges */
.footer-pill-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    margin-right: 6px;
    line-height: 1.2;
}

.footer-pill-badge.hot {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.footer-pill-badge.app {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.35);
}

.footer-link-featured:hover {
    color: #f87171;
}

.footer-link-app:hover {
    color: #38bdf8;
}

/* Footer Bottom Bar */
.footer-bottom {
    background: rgba(0, 0, 0, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 22px 24px;
}

.footer-bottom-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12.5px;
    color: #64748b;
}

.footer-bottom-legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-legal-link {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-legal-link:hover {
    color: #38bdf8;
}

.footer-legal-link.js-legal-modal-trigger {
    color: #fbbf24;
    font-weight: 600;
    cursor: pointer;
}

.footer-legal-link.js-legal-modal-trigger:hover {
    color: #fde047;
    text-decoration: underline;
}

.footer-sep {
    color: rgba(255, 255, 255, 0.2);
    font-weight: bold;
    user-select: none;
}

.footer-bottom-copy {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-credit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-credit a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.footer-credit a:hover {
    color: #67e8f9;
    text-decoration: underline;
}

.footer-heart {
    color: #ef4444;
    display: inline-block;
    animation: heartPulse 2s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

/* Responsive Footer */
@media (max-width: 1024px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 36px 28px;
        padding: 44px 20px 32px;
    }
    .footer-brand-col {
        grid-column: span 2;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 28px;
    }
    .footer-desc {
        max-width: 100%;
    }
    .footer-trust-badges {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 36px 16px 24px;
    }
    .footer-brand-col {
        grid-column: span 1;
        padding-bottom: 24px;
    }
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        gap: 14px;
    }
    .footer-bottom-legal,
    .footer-bottom-copy {
        justify-content: center;
    }
}
