/* ============================================================
   Webfamily – Social Icons, Pulse Buttons & Mobile Navbar
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   1. FOOTER SOCIAL MEDIA ICONS
   ══════════════════════════════════════════════════════════ */
.footer-social-row {
    margin-top: 18px;
}

.footer-social-row p {
    font-size: 13px;
    font-weight: 600;
    color: #aaa;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.footer-social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 15px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-social-icons a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
    background: rgba(255, 255, 255, 0.15);
}

.footer-social-icons a:hover::before {
    opacity: 1;
}

.footer-social-icons a:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Brand colours */
.footer-social-icons .si-linkedin {
    background: #0077b5;
}

.footer-social-icons .si-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.footer-social-icons .si-facebook {
    background: #1877f2;
}

.footer-social-icons .si-youtube {
    background: #ff0000;
}

.footer-social-icons .si-whatsapp {
    background: #25d366;
}

.footer-social-icons .si-x {
    background: #000;
}

/* Dark mode */
.active-dark .footer-social-row p {
    color: #888;
}

/* ══════════════════════════════════════════════════════════
   2. 3D PULSE FLOATING CALL & WHATSAPP BUTTONS
   ══════════════════════════════════════════════════════════ */
.floating-action-btns {
    position: fixed;
    left: 20px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 9999;
}

/* Base button */
.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    text-decoration: none;
    position: relative;
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.25),
        inset 0 -3px 0 rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transform-style: preserve-3d;
}

.fab-btn:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.3),
        inset 0 -3px 0 rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.25);
    color: #fff;
}

.fab-btn:active {
    transform: translateY(0) scale(0.97);
}

/* Pulse rings */
.fab-btn::before,
.fab-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: fabPulse 2.4s ease-out infinite;
    pointer-events: none;
}

.fab-btn::after {
    animation-delay: 1.2s;
}

/* Call button — green */
.fab-call {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.fab-call::before,
.fab-call::after {
    background: rgba(34, 197, 94, 0.45);
}

/* WhatsApp button — whatsapp green */
.fab-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.fab-whatsapp::before,
.fab-whatsapp::after {
    background: rgba(37, 211, 102, 0.45);
}

@keyframes fabPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    70% {
        transform: scale(1.9);
        opacity: 0;
    }

    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

/* Tooltip label */
.fab-btn .fab-label {
    position: absolute;
    left: 66px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.fab-btn:hover .fab-label {
    opacity: 1;
}

/* Responsive — slightly smaller on mobile */
@media (max-width: 480px) {
    .floating-action-btns {
        left: 14px;
        bottom: 22px;
        gap: 12px;
    }

    .fab-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* ══════════════════════════════════════════════════════════
   3. MOBILE NAVBAR REDESIGN
   ══════════════════════════════════════════════════════════ */

/* Mobile nav panel — slide in from RIGHT */
#main-nav {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 99999;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

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

/* Mobile nav header (logo + close) */
.mob-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.mob-nav-logo img {
    height: 40px;
    width: auto;
}

.mob-nav-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #374151;
    transition: background 0.2s;
}

.mob-nav-close:hover {
    background: #e5e7eb;
}

/* Nav links */
.first-nav {
    list-style: none;
    padding: 12px 0;
    margin: 0;
    flex: 1;
}

.first-nav>li>a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #1e1b4b;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s, color 0.2s;
}

.first-nav>li>a:hover {
    background: #f5f3ff;
    color: #6366f1;
}

.first-nav>li>a .arrow-icon {
    font-size: 11px;
    transition: transform 0.25s;
    color: #9ca3af;
}

.first-nav>li.open>a .arrow-icon {
    transform: rotate(90deg);
    color: #6366f1;
}

/* ── has-sub: Services row — flex container with perfectly aligned link + toggle ── */
.first-nav>li.has-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    /* vertically center ALL children in the row */
    min-height: 52px;
    /* match normal nav-item height */
    border-bottom: 1px solid #f0f0f0;
}

/* Remove border-bottom from the <a> inside has-sub (row border handles it) */
.first-nav>li.has-sub>a {
    flex: 1;
    min-width: 0;
    border-bottom: none !important;
    /* row owns the border */
    padding-top: 0;
    padding-bottom: 0;
    height: 52px;
    display: flex;
    align-items: center;
}

/* Sub-toggle arrow button */
.sub-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    /* exact same height as the Services link */
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-left: 1px solid #e5e7eb;
    cursor: pointer;
    font-size: 14px;
    /* larger, more readable chevron */
    color: #6b7280;
    padding: 0;
    line-height: 1;
    transition: background 0.22s ease, color 0.22s ease, transform 0.28s ease;
    border-radius: 0;
}

.sub-toggle:hover {
    background: #f5f3ff;
    color: #6366f1;
}

/* Rotate arrow 90° when submenu opens */
.first-nav>li.has-sub.open>.sub-toggle {
    transform: rotate(90deg);
    color: #6366f1;
    background: #ede9fe;
}

/* Submenu spans the full row width */
.first-nav>li.has-sub>ul {
    width: 100%;
    flex-basis: 100%;
}

/* Submenu */
.first-nav>li>ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f9fafb;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.first-nav>li.open>ul {
    max-height: 800px;
}

.first-nav>li>ul>li>a {
    display: block;
    padding: 10px 20px 10px 36px;
    font-size: 13.5px;
    color: #4b5563;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.2s, background 0.2s;
}

.first-nav>li>ul>li>a:hover {
    color: #6366f1;
    background: #ede9fe;
}

/* Mobile nav social icons */
.mob-nav-social {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.mob-nav-social p {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.mob-nav-social .footer-social-icons {
    gap: 8px;
}

.mob-nav-social .footer-social-icons a {
    width: 34px;
    height: 34px;
    font-size: 14px;
}

/* Bottom action bar inside mobile nav */
.mob-nav-actions {
    padding: 16px 20px;
    display: flex;
    gap: 10px;
}

.mob-nav-actions a {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mob-nav-actions .mob-call-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.mob-nav-actions .mob-wa-btn {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.mob-nav-actions a:hover {
    transform: translateY(-2px);
    color: #fff;
}

/* Overlay when nav is open */
.mob-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
    backdrop-filter: blur(2px);
}

.mob-nav-overlay.show {
    display: block;
}

/* Dark mode for mobile nav */
.active-dark #main-nav {
    background: #111827;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
}

.active-dark .mob-nav-header {
    background: #111827;
    border-bottom-color: #1f2937;
}

.active-dark .mob-nav-close {
    background: #1f2937;
    color: #e5e7eb;
}

.active-dark .first-nav>li>a {
    color: #e5e7eb;
    border-bottom-color: #1f2937;
}

.active-dark .first-nav>li>a:hover {
    background: #1e1b4b;
    color: #a5b4fc;
}

.active-dark .first-nav>li>ul {
    background: #0f172a;
}

.active-dark .first-nav>li>ul>li>a {
    color: #9ca3af;
    border-bottom-color: #1f2937;
}

.active-dark .first-nav>li>ul>li>a:hover {
    color: #a5b4fc;
    background: #1e1b4b;
}

.active-dark .mob-nav-social {
    border-top-color: #1f2937;
}

.active-dark .mob-nav-actions {
    border-top: 1px solid #1f2937;
}

/* Dark mode sub-toggle button */
.active-dark .first-nav>li.has-sub {
    border-bottom-color: #1f2937;
}

.active-dark .sub-toggle {
    border-left-color: #1f2937;
    color: #6b7280;
}

.active-dark .sub-toggle:hover {
    background: #1e1b4b;
    color: #a5b4fc;
}

.active-dark .first-nav>li.has-sub.open>.sub-toggle {
    color: #a5b4fc;
    background: #1e1b4b;
}

/* ══════════════════════════════════════════════════════════
   4. DESKTOP NAVBAR — dark mode toggle visible on desktop
   ══════════════════════════════════════════════════════════ */
/* Show dark mode toggle on desktop too */
.darkmodeswitch {
    display: flex !important;
    align-items: center;
}

/* ══════════════════════════════════════════════════════════
   5. HAMBURGER TOGGLE BUTTON
   ══════════════════════════════════════════════════════════ */
/* Reset <button> browser defaults so .toggle looks the same as the old <a> */
button.toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

button.toggle:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 3px;
    border-radius: 3px;
}

.toggle {
    display: inline-block;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
    z-index: 100;
    /* Ensure it's clickable */
}

.toggle span,
.toggle span::before,
.toggle span::after {
    display: block;
    width: 100%;
    height: 3px;
    background: #1e1b4b;
    /* Default dark color */
    position: absolute;
    border-radius: 2px;
    transition: all 0.3s;
}

.toggle span {
    top: 50%;
    transform: translateY(-50%);
}

.toggle span::before {
    content: '';
    top: -8px;
}

.toggle span::after {
    content: '';
    bottom: -8px;
}

/* Hover effect */
.toggle:hover span {
    background: #6366f1;
}

.toggle:hover span::before,
.toggle:hover span::after {
    background: #6366f1;
}

/* Dark mode for hamburger */
.active-dark .toggle span,
.active-dark .toggle span::before,
.active-dark .toggle span::after {
    background: #fff;
}

/* Specific override for when header is dark/transparent if needed */
header.active-dark .toggle span,
header.active-dark .toggle span::before,
header.active-dark .toggle span::after {
    background: #fff;
}