/* Mobile Styles - Original Navigation and Responsive Design */

/* iOS Safari viewport fixes */
:root {
    --vh: 1vh;
    --vw: 1vw;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    /* Hide desktop navigation */
    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 60px);
        height: calc(var(--vh, 1vh) * 100 - 60px); /* iOS Safari fix */
        background: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        display: flex;
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links > li {
        display: block;
        width: 100%;
    }
    
    .nav-links > li > a {
        display: block;
        padding: 15px 0;
        font-size: 1.1em;
        border-bottom: 1px solid var(--light-gray);
    }
    
    /* Hide dropdowns completely on mobile - show only main menu items */
    .nav-item .dropdown {
        display: none !important;
    }

    .nav-item:hover .dropdown {
        display: none !important;
    }

    /* Ensure all main menu items are visible */
    .nav-links > li {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-links > li > a {
        color: #0A1628 !important;
        background: transparent !important;
    }

    .nav-links > li > a:hover,
    .nav-links > li > a:active {
        background: rgba(0, 102, 255, 0.05) !important;
        color: #0066FF !important;
    }
    
    /* Mobile menu toggle button */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
        padding: 10px;
        margin-right: -10px;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: var(--navy);
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Navigation container adjustments - prevent logo cutoff */
    .nav-container {
        padding: 15px 10px !important;
        overflow: visible !important;
        justify-content: space-between !important;
    }
    
    /* Logo adjustments for mobile - prevent cutoff */
    .logo-nav {
        gap: 8px !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
    }

    .logo-text-nav {
        font-size: 1.3em !important;
        white-space: nowrap !important;
        overflow: visible !important;
        display: inline-block !important;
    }

    .logo-dots-nav {
        width: 35px !important;
        height: 35px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    .logo-dots-nav div {
        width: 5px;
        height: 5px;
    }
    
    /* Hero section mobile styles */
    .hero {
        padding: 120px 20px 60px 20px;
        text-align: center;
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .logo-hero-container {
        margin-bottom: 40px;
    }
    
    .logo-full {
        transform: scale(0.9);
        justify-content: center;
    }
    
    .hero-text h1 {
        font-size: 2em;
        margin-bottom: 15px;
    }
    
    .hero-text .tagline {
        font-size: 1.4em;
        margin-bottom: 20px;
    }
    
    .hero-text p {
        font-size: 1.1em;
        max-width: 600px;
        margin: 0 auto 30px auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .cta-button,
    .secondary-button {
        width: 100%;
        max-width: 300px;
        padding: 15px 30px;
    }
    
    /* Services section mobile - COMMENTED OUT to allow new design
    .services {
        padding: 60px 20px;
    }
    
    .services-infographic {
        height: auto;
        margin: 40px 0;
    }
    
    .services-hub {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        height: auto;
    }
    
    .hub-center {
        position: relative;
        width: 120px;
        height: 120px;
        margin: 0 auto 30px auto;
        top: 0;
        left: 0;
        transform: none;
    }
    
    .service-node {
        position: relative;
        top: auto !important;
        left: auto !important;
        transform: none;
        width: 100%;
        margin: 0 0 20px 0;
        padding: 20px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    */
    
    .animated-connection,
    svg.connection-lines {
        display: none;
    }
    
    /* Timeline mobile styles */
    .service-timeline {
        margin-top: 60px;
        padding: 40px 20px;
    }
    
    .timeline-track {
        flex-direction: column;
        height: auto;
        gap: 30px;
    }
    
    .timeline-step {
        position: relative;
        left: 0;
        transform: none;
    }
    
    /* About section mobile */
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* Founders section mobile */
    .founders {
        flex-direction: column;
        gap: 40px;
    }
    
    .founder-card {
        max-width: 100%;
    }
    
    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* General mobile adjustments */
    section {
        padding: 60px 20px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.8em;
    }
    
    h3 {
        font-size: 1.4em;
    }
    
    p {
        font-size: 1em;
        line-height: 1.6;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    * {
        max-width: 100vw;
        max-width: calc(var(--vw, 1vw) * 100); /* iOS Safari fix */
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8em;
    }
    
    .hero-text .tagline {
        font-size: 1.2em;
    }
    
    .hero-text p {
        font-size: 1em;
    }
    
    .logo-full {
        transform: scale(0.75);
    }
    
    /* COMMENTED OUT - conflicts with new design
    .services-infographic {
        margin: 30px 0;
    }
    
    .service-node {
        padding: 15px;
    }
    */
    
    section {
        padding: 40px 15px;
    }
}

/* Very small devices */
@media (max-width: 375px) {
    .hero-text h1 {
        font-size: 1.6em;
    }
    
    .hero-text .tagline {
        font-size: 1.1em;
    }
    
    .logo-full {
        transform: scale(0.65);
    }
    
    .nav-container {
        padding: 12px 15px;
    }
    
    .cta-button,
    .secondary-button {
        padding: 12px 25px;
        font-size: 0.95em;
    }
}

/* ==================================
   CRITICAL MOBILE FIXES
   Logo cutoff and readability improvements
   ================================== */
@media (max-width: 768px) {
    /* Fix logo and text cutoff */
    .nav-container {
        padding: 15px 15px;
        overflow: visible;
    }

    .logo-nav {
        margin-left: 0;
        overflow: visible;
    }

    .logo-dots-nav {
        margin-left: 0;
        overflow: visible;
    }

    .logo-text-nav,
    .logo-text {
        overflow: visible;
        white-space: nowrap;
        margin-right: 5px; /* Ensure 'd' in Sevenfold is visible */
    }

    nav {
        overflow: visible;
    }

    /* Fix "Your Journey With Us" section - clean, modern style */
    .service-timeline {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.95));
        padding: 30px 20px;
        border-radius: 20px;
        margin-top: 30px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }

    .timeline-header h3 {
        color: #0A1628;
        font-weight: 600;
        font-size: 1.5em;
        text-align: center;
        margin-bottom: 25px;
        letter-spacing: -0.5px;
    }

    .timeline-track {
        background: transparent;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 15px 0;
        position: relative;
    }

    /* Timeline progress bar behind steps */
    .timeline-track::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 10%;
        right: 10%;
        height: 2px;
        background: linear-gradient(90deg, #0066FF, #00B4D8);
        transform: translateY(-50%);
        z-index: 1;
    }

    .timeline-step {
        position: relative;
        z-index: 2;
        text-align: center;
        flex: 1;
    }

    .timeline-step .step-dot {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: white;
        border: 3px solid #E0E6ED;
        margin: 0 auto 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: bold;
        color: #8892A6;
        transition: all 0.3s ease;
    }

    .timeline-step.active .step-dot {
        background: #0066FF;
        border-color: #0066FF;
        color: white;
        transform: scale(1.1);
        box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
    }

    .timeline-step .step-label {
        color: #0A1628;
        font-size: 0.85em;
        font-weight: 500;
        background: transparent;
        border: none;
        padding: 0;
        margin: 0;
    }

    .timeline-step.active .step-label {
        color: #0066FF;
        font-weight: 600;
    }
}