/* Desktop Icon Fix */
.mobile-only-icon {
    display: none !important;
}

/* Desktop Nav Item Ordering: Place items with "About Us" and "Reviews" before "Contact Us" */
@media (min-width: 992px) {
    .nav-list {
        display: flex !important;
    }
    .nav-item-home { order: 1 !important; }
    .nav-item-founder { order: 2 !important; }
    .nav-item-services { order: 3 !important; }
    .nav-item-projects { order: 4 !important; }
    .nav-item-blog { order: 5 !important; }
    .nav-item-about { order: 6 !important; }
    .nav-item-reviews { order: 7 !important; }
    .nav-item-contact { order: 8 !important; }
}

/* Founder Mega Dropdown Styling (Desktop Hover) */
.dropdown-founder-wrapper {
    position: relative;
}
.founder-mega-dropdown {
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%) translateY(15px);
    width: 520px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(89, 53, 140, 0.18), 0 0 0 1px rgba(89, 53, 140, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1200;
    padding: 20px;
    margin-top: 10px;
}
.founder-mega-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 50%;
    transform: translateX(50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-top: 1px solid rgba(89, 53, 140, 0.08);
    border-right: 1px solid rgba(89, 53, 140, 0.08);
}
.dropdown-founder-wrapper:hover .founder-mega-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(50%) translateY(0);
}
.founder-card-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(89, 53, 140, 0.03) 0%, rgba(204, 88, 31, 0.03) 100%);
    border: 1px solid rgba(89, 53, 140, 0.06);
    border-radius: 16px;
    padding: 16px 20px;
}
.founder-preview-right {
    flex: 1;
    text-align: right;
    direction: rtl;
}
.founder-badge-mini {
    display: inline-block;
    background: rgba(204, 88, 31, 0.1);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 50px;
    margin-bottom: 6px;
}
.founder-preview-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0 0 6px 0;
}
.founder-preview-bio {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 14px 0;
}
.btn-founder-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff !important;
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(89, 53, 140, 0.25);
    transition: all 0.3s ease;
}
.btn-founder-more:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 88, 31, 0.35);
}
.btn-founder-more i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}
.btn-founder-more:hover i {
    transform: translateX(-4px);
}
.founder-preview-left {
    width: 125px;
    height: 125px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}
.founder-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Mobile Info Section (Hidden on Desktop) */
.mobile-menu-info {
    display: none;
}

/* Premium Mobile Navigation Enhancement */
@media (max-width: 991px) {
    .header-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 15px !important;
    }

    .header-actions {
        display: flex !important;
        align-items: center !important;
    }

    .header-actions .btn {
        display: none !important;
    }

    .mobile-only-icon {
        display: inline-block !important;
    }

    .navbar {
        direction: rtl;
        text-align: right;
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: #ffffff;
        z-index: 1000;
        display: flex !important;
        flex-direction: column;
        transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        padding: 80px 0 40px;
        overflow-y: auto !important;
    }

    .navbar.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0 !important;
        padding: 0 10px;
        margin: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(89, 53, 140, 0.04);
    }

    .nav-link {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 15px 15px !important;
        font-size: 1.1rem;
        color: var(--primary-dark) !important;
        gap: 12px !important;
    }

    /* Nav Icon Uniformity Fix */
    .nav-icon {
        font-size: 1.3rem !important;
        /* Slightly larger base */
        color: var(--secondary);
        width: 30px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Specific fix for Services Icon (Cogs) to match Home icon scale */
    .fa-cogs.nav-icon {
        font-size: 1.45rem !important;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--secondary) !important;
        background: rgba(89, 53, 140, 0.02);
        padding-right: 20px !important;
    }

    /* Projects Mega Dropdown Styling (Desktop Hover) */
    .dropdown-projects-wrapper {
        position: relative;
    }
    .projects-mega-dropdown {
        position: absolute;
        top: 100%;
        right: 50%;
        transform: translateX(50%) translateY(15px);
        width: 780px;
        background: #ffffff;
        border-radius: 24px;
        box-shadow: 0 25px 60px rgba(89, 53, 140, 0.22), 0 0 0 1px rgba(89, 53, 140, 0.08);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1200;
        padding: 24px;
        margin-top: 10px;
        direction: rtl;
    }
    .projects-mega-dropdown::before {
        content: '';
        position: absolute;
        top: -6px;
        right: 50%;
        transform: translateX(50%) rotate(45deg);
        width: 14px;
        height: 14px;
        background: #ffffff;
        border-top: 1px solid rgba(89, 53, 140, 0.08);
        border-right: 1px solid rgba(89, 53, 140, 0.08);
    }
    .dropdown-projects-wrapper:hover .projects-mega-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(50%) translateY(0);
    }
    .projects-mega-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 14px;
        margin-bottom: 18px;
        border-bottom: 1px dashed rgba(89, 53, 140, 0.12);
    }
    .projects-mega-header span {
        font-size: 0.95rem;
        font-weight: 800;
        color: var(--primary-dark);
    }
    .projects-mega-all-link {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--secondary);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.3s ease;
    }
    .projects-mega-all-link:hover {
        color: var(--primary);
        transform: translateX(-4px);
    }
    .projects-mega-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .project-mega-card {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 12px;
        border-radius: 18px;
        background: rgba(248, 250, 252, 0.85);
        border: 1px solid rgba(89, 53, 140, 0.05);
        text-decoration: none;
        transition: all 0.35s ease;
    }
    .project-mega-card:hover {
        background: #ffffff;
        border-color: rgba(89, 53, 140, 0.15);
        box-shadow: 0 12px 30px rgba(89, 53, 140, 0.1);
        transform: translateY(-4px);
    }
    .project-mega-img {
        position: relative;
        width: 100px;
        height: 75px;
        border-radius: 12px;
        overflow: hidden;
        flex-shrink: 0;
    }
    .project-mega-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }
    .project-mega-card:hover .project-mega-img img {
        transform: scale(1.1);
    }
    .project-mega-tag {
        position: absolute;
        bottom: 4px;
        right: 4px;
        background: rgba(15, 23, 42, 0.75);
        color: #ffffff;
        font-size: 0.65rem;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 6px;
        backdrop-filter: blur(4px);
    }
    .project-mega-body {
        display: flex;
        flex-direction: column;
    }
    .project-mega-body h5 {
        font-size: 0.92rem;
        font-weight: 800;
        color: var(--primary-dark);
        margin: 0 0 4px 0;
        line-height: 1.3;
        transition: color 0.3s ease;
    }
    .project-mega-card:hover .project-mega-body h5 {
        color: var(--secondary);
    }
    .project-mega-body p {
        font-size: 0.78rem;
        color: var(--text-muted);
        line-height: 1.4;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Blog Mega Dropdown Styling (Desktop Hover) */
    .dropdown-blog-wrapper {
        position: relative;
    }
    .blog-mega-dropdown {
        position: absolute;
        top: 100%;
        right: 50%;
        transform: translateX(50%) translateY(15px);
        width: 820px;
        background: #ffffff;
        border-radius: 24px;
        box-shadow: 0 25px 60px rgba(89, 53, 140, 0.22), 0 0 0 1px rgba(89, 53, 140, 0.08);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1200;
        padding: 24px;
        margin-top: 10px;
        direction: rtl;
    }
    .blog-mega-dropdown::before {
        content: '';
        position: absolute;
        top: -6px;
        right: 50%;
        transform: translateX(50%) rotate(45deg);
        width: 14px;
        height: 14px;
        background: #ffffff;
        border-top: 1px solid rgba(89, 53, 140, 0.08);
        border-right: 1px solid rgba(89, 53, 140, 0.08);
    }
    .dropdown-blog-wrapper:hover .blog-mega-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(50%) translateY(0);
    }
    .blog-mega-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 14px;
        margin-bottom: 18px;
        border-bottom: 1px dashed rgba(89, 53, 140, 0.12);
    }
    .blog-mega-header span {
        font-size: 0.95rem;
        font-weight: 800;
        color: var(--primary-dark);
    }
    .blog-mega-all-link {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--secondary);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.3s ease;
    }
    .blog-mega-all-link:hover {
        color: var(--primary);
        transform: translateX(-4px);
    }
    .blog-mega-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .blog-mega-card {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 10px 14px;
        border-radius: 16px;
        background: rgba(248, 250, 252, 0.85);
        border: 1px solid rgba(89, 53, 140, 0.05);
        text-decoration: none;
        transition: all 0.35s ease;
    }
    .blog-mega-card:hover {
        background: #ffffff;
        border-color: rgba(89, 53, 140, 0.15);
        box-shadow: 0 10px 25px rgba(89, 53, 140, 0.08);
        transform: translateY(-3px);
    }
    .blog-mega-img {
        width: 75px;
        height: 60px;
        border-radius: 12px;
        overflow: hidden;
        flex-shrink: 0;
    }
    .blog-mega-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }
    .blog-mega-card:hover .blog-mega-img img {
        transform: scale(1.1);
    }
    .blog-mega-body {
        display: flex;
        flex-direction: column;
    }
    .blog-mega-cat {
        font-size: 0.68rem;
        font-weight: 800;
        color: var(--secondary);
        margin-bottom: 2px;
    }
    .blog-mega-body h5 {
        font-size: 0.88rem;
        font-weight: 800;
        color: var(--primary-dark);
        margin: 0 0 3px 0;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        transition: color 0.3s ease;
    }
    .blog-mega-card:hover .blog-mega-body h5 {
        color: var(--primary);
    }
    .blog-mega-body p {
        font-size: 0.76rem;
        color: var(--text-muted);
        line-height: 1.35;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    /* Hide Desktop Mega Dropdowns completely on mobile drawer */
    .founder-mega-dropdown,
    .services-mega-dropdown,
    .projects-mega-dropdown,
    .blog-mega-dropdown {
        display: none !important;
    }

    .nav-list > li {
        order: 0 !important;
    }

    .dropdown-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100%;
        position: relative;
    }

    .dropdown-plus {
        margin-right: auto;
        font-size: 0.85rem;
        color: var(--primary);
        transition: transform 0.4s ease;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(89, 53, 140, 0.03);
        border-radius: 50%;
        margin-left: 10px;
    }

    .dropdown.active .dropdown-plus {
        transform: rotate(45deg);
        background: var(--secondary);
        color: #fff;
    }

    .navbar .dropdown-menu {
        display: none;
        position: static !important;
        background: rgba(89, 53, 140, 0.02);
        width: 100% !important;
        padding: 5px 30px 10px 10px !important;
        border-right: 2px solid var(--secondary-light);
        margin-right: 15px;
        border-top: none !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .dropdown.active .dropdown-menu {
        display: block !important;
    }

    .dropdown-item {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 12px 10px !important;
        font-size: 0.95rem !important;
        color: var(--text-main) !important;
    }

    .dropdown-item i {
        font-size: 1rem;
        color: var(--primary);
        width: 24px;
        text-align: center;
    }

    .menu-toggle-btn {
        background: rgba(89, 53, 140, 0.08);
        border: 1px solid rgba(89, 53, 140, 0.1);
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        z-index: 2000;
        width: 45px;
        height: 45px;
        border-radius: 12px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        box-shadow: 0 4px 15px rgba(89, 53, 140, 0.1);
    }

    .menu-toggle-btn.active {
        position: fixed;
        top: 20px;
        left: 20px;
        background: var(--primary);
        box-shadow: 0 8px 25px rgba(89, 53, 140, 0.3);
        border-color: transparent;
    }

    .menu-toggle-btn .line {
        display: block;
        width: 24px;
        height: 2.5px;
        background: var(--primary);
        border-radius: 4px;
        transition: all 0.4s ease;
    }

    .menu-toggle-btn.active .line {
        background: #ffffff !important;
    }

    .menu-toggle-btn.active .line-1 {
        transform: translateY(7.5px) rotate(45deg);
    }

    .menu-toggle-btn.active .line-2 {
        opacity: 0;
        transform: translateX(-10px);
    }

    .menu-toggle-btn.active .line-3 {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    .mobile-menu-info {
        padding: 25px 15px;
        background: linear-gradient(180deg, transparent, rgba(89, 53, 140, 0.03));
        margin-top: 15px;
        border-top: 1px solid rgba(89, 53, 140, 0.08);
        direction: rtl;
    }

    .mobile-info-stack {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 25px;
    }

    .mobile-info-row {
        background: #fff;
        border: 1px solid rgba(89, 53, 140, 0.08);
        padding: 12px 15px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: 15px;
        text-decoration: none;
    }

    .info-row-icon {
        width: 40px;
        height: 40px;
        background: rgba(204, 88, 31, 0.1);
        color: var(--secondary);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
    }

    .info-row-text {
        display: flex;
        flex-direction: column;
    }

    .info-row-text small {
        font-size: 0.75rem;
        color: var(--text-muted);
        font-weight: 600;
    }

    .info-row-text span {
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--primary);
    }

    .mobile-social-box p {
        margin-bottom: 12px;
        font-weight: 600;
        color: var(--text-muted);
        text-align: center;
        font-size: 0.85rem;
    }

    .mobile-social-icons {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-bottom: 25px;
    }

    .mobile-social-icons a {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1rem;
    }

    .wa {
        background: #25D366;
    }

    .tt {
        background: #000;
    }

    .ig {
        background: linear-gradient(45deg, #f09433, #bc1888);
    }

    .fb {
        background: #1877F2;
    }

    .yt {
        background: #FF0000;
    }

    .ln {
        background: #0077b5;
    }

    .mobile-menu-info {
        display: block;
    }
}
