/**
 * =================================================================
 * 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 THEME'S HEADER/FOOTER ===== */
#masthead.site-header,
header#masthead,
.nv-header-placeholder,
.hfg_header,
[data-elementor-id="41"],
footer#colophon.site-footer,
.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: #0c1a2a;
    --dark-blue: #102a43;
    --light-bg: #f0f4f8;
    --text: #1a1a2e;
    --text-light: #64748b;
    --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;
    color: var(--text-light);
    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; }
.dd-arrow { font-size: 10px; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    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;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

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

.dropdown-menu li { margin: 0; padding: 0; }
.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    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: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 36px;
}

.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.6);
    margin-bottom: 20px;
}

.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 {
    background: var(--brand);
    transform: translateY(-3px);
}

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

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

.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.6);
    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.7);
}

.footer-contact-item a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.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.4);
}

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

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

/* =====================================================
   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;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        padding: 80px 24px 30px;
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
        overflow-y: auto;
        gap: 6px;
        align-items: stretch;
    }

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

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 12px;
        display: none;
        background: var(--light-bg);
        border-radius: 12px;
        margin-top: 4px;
    }

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

    .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;
    }
}
