/**
 * =================================================================
 * Bassmah Landing – Global Stylesheet
 * -----------------------------------------------------------------
 * Covers: Header, Footer, Floating buttons, Scroll-to-top,
 *         Navigation dropdowns, Mobile nav toggle, and responsive
 *         overrides for all global elements.
 *
 * Plugin : bassmah-landing
 * Version: 2.0.0
 */

/* ===== HIDE OLD NEVE HEADER/FOOTER (legacy cleanup) ===== */
#masthead.site-header,
header#masthead,
.nv-header-placeholder,
.hfg_header,
[data-elementor-id="41"],
footer#colophon.site-footer,
.nv-footer,
.hfg_footer {
    display: none !important;
}

/* Hide Neve/theme page title and content wrappers on bassmah templates */
.bassmah-frontpage .nv-page-title-wrap,
.bassmah-frontpage .nv-page-title,
.bassmah-frontpage .entry-header,
.bassmah-landing .nv-page-title-wrap,
.bassmah-landing .nv-page-title,
.bassmah-landing .entry-header {
    display: none !important;
}

/* Remove theme content padding/margins on bassmah templates */
.bassmah-frontpage .nv-content-wrap,
.bassmah-frontpage .nv-single-page-wrap,
.bassmah-frontpage .container-fluid.single-page-container,
.bassmah-landing .nv-content-wrap,
.bassmah-landing .nv-single-page-wrap,
.bassmah-landing .container-fluid.single-page-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/**
 * =================================================================
 * Bassmah Global Elements
 * =================================================================
 */

/* ----- CSS Variables (shared with page styles) ----- */
:root {
    --brand: #2f5aae;
    --brand-light: #338eaa;
    --green: #27ae60;
    --green-light: #2ecc71;
    --gold: #f39c12;
    --red: #e74c3c;
    --purple: #9b59b6;
    --dark: #0a0f1e;
    --dark-blue: #102a43;
    --light-bg: #f0f4f8;
    --text: #1a1a2e;
    --text-light: #3d4654;
    --shadow: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-lg: 0 25px 60px rgba(0,0,0,0.12);
    --radius: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   HEADER / NAV
   ===================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.main-header.scrolled {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border-bottom: 1px solid #e8ecf1;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
}

.header-logo,
.header-logo img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.header-logo img {
    height: 65px;
    transition: var(--transition);
    max-width: none;
}

.main-header.scrolled .header-logo img {
    height: 50px;
}

/* ----- Main Nav ----- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.main-nav > a,
.dropdown-toggle {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    padding: 8px 10px;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.main-nav > a:hover,
.dropdown-toggle:hover {
    color: var(--brand);
    background: rgba(47,90,174,0.06);
}

/* ----- CTA Button inside nav ----- */
.nav-cta {
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
    color: #fff !important;
    padding: 10px 22px !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 15px rgba(39,174,96,0.25);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39,174,96,0.35);
}

/* ----- Dropdown ----- */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}
.main-header.scrolled .dropdown-toggle { color: var(--dark); }
.dropdown-toggle:hover { color: #27ae60; }
.dropdown-toggle svg.dd-icon {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.nav-dropdown.is-open .dropdown-toggle svg.dd-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 14px;
    padding: 10px 0;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    min-width: 230px;
    z-index: 9999;
    border: 1px solid #e8ecf1;
    list-style: none;
    margin: 0;
    display: none;
}

.nav-dropdown.is-open > .dropdown-menu {
    display: block;
}

.dropdown-menu li { margin: 0; padding: 0; list-style: none; }
.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: rgba(39,174,96,0.06);
    color: #27ae60;
}

/* ----- Mobile Nav Toggle ----- */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--brand-light), var(--green));
}

.footer-main {
    padding: 70px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
    gap: 30px;
    width: 100%;
}

.footer-brand img {
    height: 60px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: 15px;
    line-height: 2;
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
    text-align: justify;
    text-align-last: center;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    transform: translateY(-3px);
}

.footer-social a svg {
    width: 20px;
    height: 20px;
    fill: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-social a:hover svg {
    fill: #fff;
}

/* Social media brand colors */
.footer-social .social--x {
    background: rgba(255,255,255,0.1);
}
.footer-social .social--x:hover {
    background: #000;
}
.footer-social .social--x svg {
    fill: #fff;
}

.footer-social .social--ig {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}
.footer-social .social--ig svg {
    fill: #fff;
}
.footer-social .social--ig:hover {
    background: linear-gradient(135deg, #6a1b9a, #e91e1e, #e6a030);
    box-shadow: 0 4px 20px rgba(131,58,180,0.4);
}

.footer-social .social--tt {
    background: #010101;
    position: relative;
    overflow: hidden;
}
.footer-social .social--tt svg {
    fill: #25f4ee;
}
.footer-social .social--tt:hover {
    background: #fe2c55;
    box-shadow: 0 4px 20px rgba(254,44,85,0.4);
}
.footer-social .social--tt:hover svg {
    fill: #fff;
}

.footer-social .social--snap {
    background: #fffc00;
}
.footer-social .social--snap svg {
    fill: #333;
}
.footer-social .social--snap:hover {
    background: #ffe600;
    box-shadow: 0 4px 20px rgba(255,252,0,0.4);
}
.footer-social .social--snap:hover svg {
    fill: #000;
}

.footer-col h4 {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-light));
    border-radius: 3px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col li a {
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col li a::before {
    content: '\2190';
    font-size: 12px;
    transition: var(--transition);
}

.footer-col li a:hover {
    color: var(--brand-light);
    padding-right: 6px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.footer-contact-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer-contact-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--brand-light);
    fill: none;
    stroke-width: 2;
}

.footer-contact-item span {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}

.footer-contact-item a {
    color: rgba(255,255,255,0.85);
    transition: var(--transition);
    white-space: nowrap;
}

.footer-contact-item a:hover {
    color: var(--brand-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
}

.footer-bottom a {
    color: var(--brand-light);
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: #fff;
}

/* Google Maps link — yellow */
.footer-bottom .footer-map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fbbf24;
}
.footer-bottom .footer-map-link:hover {
    color: #fcd34d;
}

/* =====================================================
   FLOATING BUTTONS
   ===================================================== */
.float-btns {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.whatsapp-float,
.profile-float {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.profile-float {
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    box-shadow: 0 6px 25px rgba(47,90,174,0.4);
}

.profile-float:hover {
    transform: scale(1.1);
}

.profile-float svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.whatsapp-float {
    background: #25d366;
    box-shadow: 0 6px 25px rgba(37,211,102,0.4);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

/* ----- Profile Float Label ----- */
.profile-float-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.profile-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand);
    background: #fff;
    padding: 2px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    white-space: nowrap;
}

/* =====================================================
   SCROLL-TO-TOP
   ===================================================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 48px;
    height: 48px;
    background: var(--brand);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-4px);
    background: var(--brand-light);
}

.scroll-top svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* =====================================================
   KEYFRAME – pulse (WhatsApp float)
   ===================================================== */
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
    70%  { box-shadow: 0 0 0 20px rgba(37,211,102,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* =====================================================
   RESPONSIVE – Header / Footer / Floats
   ===================================================== */

/* --- Tablet & below (992px) --- */
@media (max-width: 992px) {
    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1002;
    }

    .main-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background: #fff;
        padding: 0;
        box-shadow: -5px 0 30px rgba(0,0,0,0.15);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        gap: 0;
        align-items: stretch;
        z-index: 1001;
    }

    .main-nav.open {
        right: 0;
    }

    /* Sidebar Header */
    .main-nav::after {
        content: 'القائمة';
        display: block;
        padding: 24px 24px 16px;
        font-size: 20px;
        font-weight: 900;
        color: var(--dark);
        border-bottom: 1px solid #f1f5f9;
        order: -1;
        flex-shrink: 0;
    }

    /* Links styling */
    .main-nav > a {
        padding: 14px 24px;
        font-size: 15px;
        font-weight: 600;
        color: var(--dark);
        border-bottom: 1px solid #f8fafc;
        border-radius: 0;
        background: none;
        text-align: right;
    }
    .main-nav > a:hover {
        background: #f8fafc;
        color: var(--brand);
    }

    /* Dropdown in sidebar */
    .nav-dropdown {
        display: block;
    }
    .dropdown-toggle {
        width: 100%;
        padding: 14px 24px;
        font-size: 15px;
        font-weight: 600;
        color: var(--dark);
        border-bottom: 1px solid #f8fafc;
        justify-content: space-between;
        border-radius: 0;
    }
    .dropdown-toggle svg.dd-icon {
        width: 14px;
        height: 14px;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        display: none;
        background: #f8fafb;
        min-width: auto;
    }
    .nav-dropdown.is-open > .dropdown-menu {
        display: block;
    }
    .dropdown-menu a {
        padding: 12px 24px 12px 24px;
        padding-right: 40px;
        font-size: 14px;
        color: #475569;
        border-bottom: 1px solid #f1f5f9;
    }
    .dropdown-menu a:hover {
        background: #ecfdf5;
        color: #27ae60;
    }

    /* CTA Button in sidebar */
    .nav-cta {
        margin: 16px 24px !important;
        text-align: center !important;
        border-radius: 12px !important;
        padding: 14px !important;
        font-size: 16px !important;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Mobile (576px) --- */
@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom-inner {
        justify-content: center;
        text-align: center;
    }
}

/* ===== GLOBAL SECTION BADGE ===== */
.section-badge {
    display: block;
    width: fit-content;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #2f5aae, #338eaa);
    color: #fff;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

/* ===== GLOBAL REVEAL ANIMATION (Animate.css integration) ===== */
.reveal {
    opacity: 0;
    transition: opacity 0.1s;
}
.reveal.animated {
    opacity: 1;
}
