/* Page Transition Overlay */
#page-transition-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #050505;
    z-index: 999999;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
body.light-mode #page-transition-overlay {
    background: #f8f9fa;
}

/* Range Input Styling for Calculator */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #11a35e;
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 0 10px rgba(17,163,94,0.8);
    transition: transform 0.2s;
}
input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
body.light-mode input[type=range]::-webkit-slider-runnable-track {
    background: rgba(0,0,0,0.1);
}
/* =========================================
   MOBILE RESPONSIVENESS FIXES (HOTFIX)
   ========================================= */
@media (max-width: 900px) {
    /* Prevent Hero text overflow on tablets */
    section#home h2 { font-size: 3.5rem !important; }
}

@media (max-width: 768px) {
    /* 1. Fix Navigation Menu (Override Inline Styles) */
    #nav-list {
        display: none !important;
        flex-direction: column !important;
        align-items: center !important;
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.98);
        padding: 30px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        gap: 20px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    #nav-list.active {
        display: flex !important;
    }
    body.light-mode #nav-list {
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid rgba(0,0,0,0.1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    /* Reset margins for items inside mobile nav */
    #nav-list li button, #nav-list li a.btn-small {
        margin-left: 0 !important;
    }

    /* 2. Fix Hero Section */
    section#home h2 {
        font-size: 2.5rem !important;
    }
    section#home p {
        font-size: 1rem !important;
    }
    section#home {
        padding-top: 100px !important;
    }

    /* 3. Fix Stats Overflow */
    #stats div {
        min-width: 100% !important;
        margin-bottom: 20px;
    }

    /* 4. Fix ROI Calculator Layout */
    #roi-calculator h2 {
        font-size: 1.8rem !important;
    }
    #calc-result {
        font-size: 2.2rem !important;
    }
    #roi-calculator .glass-panel {
        padding: 30px 20px !important;
    }

    /* 5. Fix Chatbot Overflow */
    #ux-chat-window {
        width: calc(100vw - 40px) !important;
        right: 20px !important;
        bottom: 100px !important;
        height: 450px !important;
    }
    #ux-chat-toggle {
        bottom: 20px !important;
        right: 20px !important;
    }
    
    /* 6. Form Fields */
    #contact-form-home input, #contact-form-home textarea {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    /* 7. Fix Testimonials */
    .testimonial-card {
        width: 300px !important;
        padding: 20px !important;
    }
    .section-title {
        font-size: 2.2rem !important;
    }
}

/* === FINAL HEADER LAYOUT FIXES === */
#primary-navigation {
    display: flex;
    align-items: center;
}
#nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}
.nav-logo {
    height: 60px; /* Base height */
    width: auto;
    object-fit: contain;
    margin-left: 10px;
    transform: scale(2.5); /* Scaled up safely */
    transform-origin: left center;
}

@media (max-width: 900px) {
    .nav-logo {
        transform: scale(1.8);
    }
}

@media (max-width: 768px) {
    header.glass-panel {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }
    
    .nav-logo {
        transform: scale(1.5); /* Much smaller for mobile phones */
        margin-left: 5px;
    }
    
    /* Ensure mobile toggle button is visible and above everything */
    .mobile-toggle {
        display: block !important;
        position: relative;
        z-index: 99999;
        font-size: 24px;
        background: transparent;
        color: #11a35e;
        border: none;
    }
    
    /* Clean up Mobile Dropdown */
    #primary-navigation {
        position: static;
    }
    
    #nav-list {
        display: none; /* Hide by default */
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.98);
        padding: 20px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        gap: 15px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.8);
        z-index: 99998;
    }
    
    #nav-list.active {
        display: flex !important;
    }
    
    body.light-mode #nav-list {
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid rgba(0,0,0,0.1);
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }
    
    #nav-list li {
        text-align: center;
        width: 100%;
    }
    
    #nav-list li a, #nav-list li button {
        display: inline-block;
        margin: 0 auto !important;
    }
}

/* =========================================
   LANDING PAGE SIDE DOCKS & PARTICLES
   ========================================= */

/* Hide side docks on mobile/tablet */
@media (max-width: 1024px) {
    .side-dock { display: none !important; }
}

.side-dock {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 50;
}

.side-dock.left-dock { left: 30px; }
.side-dock.right-dock { right: 30px; }

.side-dock a {
    color: rgba(255,255,255,0.4);
    font-size: 1.2rem;
    transition: color 0.3s, transform 0.3s;
    text-decoration: none;
}
.side-dock a:hover {
    color: #11a35e;
    transform: scale(1.2);
}

.dock-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: rgba(255,255,255,0.2);
    font-size: 0.8rem;
    letter-spacing: 4px;
    margin-top: 20px;
    font-weight: bold;
}

.dock-line {
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent);
    margin-bottom: 20px;
}

body.light-mode .side-dock a { color: rgba(0,0,0,0.4); }
body.light-mode .side-dock a:hover { color: #11a35e; }
body.light-mode .dock-text { color: rgba(0,0,0,0.2); }
body.light-mode .dock-line { background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.2), transparent); }

/* Portfolio Grid Hover Effects */
.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(17,163,94,0.2);
    border-color: rgba(17,163,94,0.5);
}
