/* Mobile Responsiveness Fixes for Luderi Technologies Website */

/* Base Mobile Improvements */
@media (max-width: 768px) {
    /* Fix body overflow and scrolling */
    body {
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
    }

    /* Contact page specific fixes */
    .contact-hero {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .contact-hero .container {
        max-width: 100% !important;
        padding: 0 20px !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .contact-form-section {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 !important;
    }

    .contact-form-section .container {
        max-width: 100% !important;
        padding: 0 20px !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Navigation Mobile Fixes */
    .navbar {
        padding: 10px 0 15px 0;
    }

    .nav-container {
        padding: 0 15px;
        height: 60px;
        position: relative;
    }

    .nav-logo {
        margin-left: 0;
        gap: 8px;
    }

    .logo-image {
        width: 45px;
        height: 45px;
    }

    .luderi-text {
        font-size: 1.4rem;
    }

    .technologies-text {
        font-size: 0.8rem;
        margin-top: 4px;
        margin-left: 12px;
    }

    /* Hide desktop navigation elements on mobile */
    .nav-buttons {
        display: none;
    }
    
    /* Hide the desktop navigation completely on mobile */
    .nav-center {
        display: none !important;
    }

    /* Mobile Hamburger Menu - Top Right */
    .hamburger {
        display: flex !important;
        position: fixed !important;
        right: 15px !important;
        top: 15px !important;
        flex-direction: column !important;
        cursor: pointer !important;
        z-index: 1001 !important;
        background: rgba(30, 41, 59, 0.9) !important;
        padding: 10px !important;
        border-radius: 8px !important;
        backdrop-filter: blur(15px) !important;
        border: 1px solid rgba(96, 165, 250, 0.2) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    }

    .bar {
        width: 20px;
        height: 2px;
        background: white;
        margin: 2px 0;
        transition: 0.3s;
        display: block;
        border-radius: 1px;
    }

    /* Hamburger animation */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* Mobile Dropdown Menu - Smooth Dropdown from Top */
    .mobile-nav-menu {
        position: fixed;
        top: -100%;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 400px;
        background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
        backdrop-filter: blur(20px);
        border-radius: 0 0 20px 20px;
        padding: 20px 0;
        z-index: 1000;
        transition: top 0.4s ease-in-out;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(96, 165, 250, 0.2);
        border-top: none;
    }

    .mobile-nav-menu.active {
        top: 0;
    }

    .mobile-nav-menu ul {
        list-style: none;
        margin: 0;
        padding: 0 20px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .mobile-nav-menu li {
        margin: 0;
    }

    .mobile-nav-menu a {
        display: block;
        color: #e2e8f0;
        text-decoration: none;
        font-size: 1.1rem;
        font-weight: 500;
        padding: 15px 20px;
        border-radius: 12px;
        transition: all 0.3s ease;
        text-align: center;
        background: rgba(71, 85, 105, 0.2);
        border: 1px solid rgba(148, 163, 184, 0.1);
        backdrop-filter: blur(10px);
        position: relative;
        overflow: hidden;
    }

    .mobile-nav-menu a::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .mobile-nav-menu a:hover::before {
        left: 100%;
    }

    .mobile-nav-menu a:hover {
        background: rgba(96, 165, 250, 0.2);
        color: #60a5fa;
        border-color: rgba(96, 165, 250, 0.4);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(96, 165, 250, 0.2);
    }

    .mobile-nav-menu a.active {
        background: rgba(96, 165, 250, 0.3);
        color: #60a5fa;
        border-color: rgba(96, 165, 250, 0.6);
        box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
    }

    /* Remove old horizontal navigation styles - not needed anymore */

    /* Hero Section Mobile Fixes */
    .hero {
        min-height: 100vh;
        padding: 80px 15px 40px 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 15px;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1;
        margin-bottom: 1.5rem;
        margin-top: 1rem;
        letter-spacing: -0.01em;
    }

    .hero-description {
        font-size: 1rem !important;
        margin-bottom: 2rem;
        line-height: 1.5;
        max-width: 100%;
        padding: 0 10px;
    }

    .hero-cta-button {
        padding: 16px 32px;
        font-size: 1rem;
        min-height: 48px;
        margin-top: 1rem;
    }

    /* Light effects mobile optimization */
    .light-effect {
        width: 400px !important;
        height: 400px !important;
    }

    .light-effect-2 {
        width: 350px !important;
        height: 350px !important;
    }

    .light-effect-3 {
        width: 500px !important;
        height: 500px !important;
    }

    .light-effect-4 {
        width: 300px !important;
        height: 300px !important;
    }

    .light-effect-5 {
        width: 250px !important;
        height: 250px !important;
    }

    .light-effect-6 {
        width: 450px !important;
        height: 450px !important;
    }

    /* What Lead Us Here Section Mobile */
    .what-lead-section {
        padding: 60px 0 40px 0;
    }

    .what-lead-content {
        flex-direction: column;
        gap: 40px;
        padding: 0 20px;
        max-width: 100%;
    }

    .what-lead-headline {
        font-size: 3rem !important;
        min-width: auto;
        flex: none;
        text-align: center;
        margin-bottom: 20px;
    }

    .info-box {
        max-width: 100%;
        flex: none;
        margin: 0;
    }

    .content-container {
        padding: 30px 20px;
    }

    .expandable-header {
        padding: 15px 0;
    }

    .title {
        font-size: 1.4rem;
    }

    .expandable-content {
        padding: 0 20px 0 20px;
    }

    .expandable-content.active {
        padding: 15px 20px 15px 20px;
    }

    .expandable-content p {
        font-size: 1rem;
        padding-left: 15px;
    }

    /* New Headline Section Mobile */
    .new-headline-section {
        padding: 40px 0;
    }

    .new-headline-content {
        padding: 0 15px;
        gap: 40px;
    }

    .new-headline-box {
        width: 100%;
        padding: 40px 20px;
        margin: 0;
    }

    .new-headline {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    /* Icons Container Mobile */
    .icons-container {
        flex-direction: column;
        gap: 30px;
        margin-top: 40px;
        align-items: center;
    }

    .icon-item {
        width: 100%;
        max-width: 350px;
        height: auto;
        padding: 30px 20px;
        margin: 0;
    }

    .icon-headline {
        font-size: 1.3rem;
        height: auto;
        margin-bottom: 15px;
    }

    .feature-icon {
        width: 80px;
        height: 80px;
    }

    .icon-description {
        font-size: 0.9rem;
        max-width: 100%;
    }

    /* Full Width Dark Box Mobile */
    .full-width-dark-box {
        padding: 60px 0 80px 0;
    }

    .dark-box-content {
        padding: 0 20px;
    }

    .dark-box-headline {
        font-size: 2.5rem !important;
        margin-bottom: 20px;
    }

    .dark-box-description {
        font-size: 1.1rem;
    }

    /* Black Section Mobile */
    .black-section {
        width: calc(100% - 20px);
        margin: 2rem 10px 0 10px;
        padding-bottom: 2rem;
    }

    .grey-section-content {
        padding: 2rem 1rem;
    }

    .grey-section-headline {
        font-size: 2.5rem !important;
        margin-bottom: 2rem;
    }

    .offers-headline {
        margin-top: 3rem;
    }

    /* Grey Section Grid Mobile */
    .grey-section-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 0;
    }

    .grey-section-card {
        padding: 2rem 1.5rem;
        min-height: auto;
        margin: 0;
    }

    .grey-section-card h3 {
        font-size: 1.2rem;
        height: auto;
        margin-bottom: 1rem;
    }

    .grey-section-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
        height: auto;
    }

    .grey-section-card p {
        font-size: 1rem;
    }

    /* Connection Lines - Hide on mobile */
    .connection-line {
        display: none;
    }

    /* Contact Section Mobile */
    .contact-section {
        padding: 40px 0;
        margin-top: 40px;
    }

    .contact-content {
        padding: 0 20px;
    }

    .get-in-touch-headline {
        font-size: 2.5rem !important;
        margin-bottom: 15px;
    }

    .contact-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .contact-form-container {
        max-width: 100%;
        padding: 0 20px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow-x: hidden;
    }

    .contact-form-large {
        max-width: 100% !important;
        width: 100% !important;
        padding: 30px 20px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-form-large .form-group input,
    .contact-form-large .form-group textarea,
    .contact-form-large .form-group select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .contact-form-large .submit-btn {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .form-group label {
        font-size: 1rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 15px 18px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }

    .submit-btn {
        padding: 18px 35px;
        font-size: 1rem;
        margin-top: 10px;
    }

    /* Footer Mobile */
    .footer {
        padding: 30px 0;
    }

    .footer-container {
        flex-direction: column;
        gap: 25px;
        text-align: center;
        padding: 0 20px;
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        margin: 0;
    }

    .footer-link {
        font-size: 1rem;
    }

    .footer-contact {
        align-items: center;
    }

    /* Revolution Section Mobile */
    .revolution-section {
        padding: 60px 0 !important;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
        position: relative !important;
        z-index: 1 !important;
    }

    .revolution-section::before {
        display: none !important;
    }

    .revolution-container {
        padding: 0 20px;
    }

    .revolution-title {
        font-size: 2.5rem !important;
        margin-bottom: 15px;
        color: #1e293b !important;
    }

    .revolution-subtitle {
        font-size: 1.1rem;
        color: #64748b !important;
    }

    .revolution-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .call-to-action {
        padding: 40px 25px;
    }

    .call-to-action h3 {
        font-size: 1.6rem;
    }

    .action-text {
        font-size: 1.1rem;
    }

    .testimonial-card {
        padding: 30px 25px;
    }

    .testimonial-quote {
        font-size: 1.1rem;
    }

    /* Touch improvements */
    .btn-get-started, 
    .btn-login, 
    .hero-cta-button, 
    .submit-btn,
    .nav-link {
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* Better mobile spacing */
    .container {
        padding: 0 15px;
    }

    /* Fix any horizontal scrolling */
    * {
        max-width: 100%;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.1;
    }

    .hero-description {
        font-size: 0.95rem !important;
    }

    .nav-container {
        padding: 0 10px;
    }

    .hero {
        padding: 70px 10px 30px 10px;
    }

    .hero-content {
        padding: 0 10px;
    }

    .new-headline {
        font-size: 1.8rem !important;
    }

    .dark-box-headline {
        font-size: 2rem !important;
    }

    .grey-section-headline {
        font-size: 2rem !important;
    }

    .get-in-touch-headline {
        font-size: 2rem !important;
    }

    .what-lead-headline {
        font-size: 2.5rem !important;
    }

    .revolution-title {
        font-size: 2rem !important;
    }

    .icon-item {
        padding: 25px 15px;
    }

    .grey-section-card {
        padding: 1.5rem 1rem;
    }

    .content-container {
        padding: 20px 15px;
    }
}

/* Very small devices */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.8rem !important;
    }

    .hero-description {
        font-size: 0.9rem !important;
    }

    .new-headline {
        font-size: 1.6rem !important;
    }

    .dark-box-headline {
        font-size: 1.8rem !important;
    }

    .grey-section-headline {
        font-size: 1.8rem !important;
    }

    .get-in-touch-headline {
        font-size: 1.8rem !important;
    }

    .what-lead-headline {
        font-size: 2.2rem !important;
    }

    .revolution-title {
        font-size: 1.8rem !important;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 60px 15px 20px 15px;
    }

    .hero-title {
        font-size: 2.2rem !important;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem;
    }

    .what-lead-section {
        padding: 40px 0 30px 0;
    }

    .new-headline-section {
        padding: 30px 0;
    }

    .full-width-dark-box {
        padding: 40px 0 60px 0;
    }
}

/* Fix for iOS Safari viewport issues */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
    
    body {
        min-height: -webkit-fill-available;
    }
}

/* Prevent horizontal scroll on all mobile devices */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .container,
    .nav-container,
    .hero-content,
    .contact-content,
    .footer-container {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* About Page Mobile Fixes */
    .about-hero {
        padding: 100px 0 60px 0;
    }

    .about-hero .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2;
        text-align: center;
        padding: 0 20px;
    }

    .about-content {
        padding: 60px 0 0 0;
    }

    .content-grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
        padding: 0 20px;
    }

    .text-content {
        margin-left: 0;
        width: 100%;
    }

    .content-card {
        padding: 30px 20px;
        margin-bottom: 20px;
    }

    .card-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .card-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    .image-content {
        padding-top: 0;
        align-items: center;
    }

    .founder-image {
        width: 100%;
        max-width: 400px;
        height: 400px;
        margin: 0 auto 30px auto;
    }

    .founder-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .quote-text {
        margin-top: 20px;
        margin-left: 0;
        text-align: center;
        max-width: 100%;
    }

    .quote-text p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .problem-card {
        margin-top: 20px;
        margin-left: 0;
        width: 100%;
        padding: 30px 20px;
    }

    .erik-image-container {
        margin: 30px 0;
        text-align: center;
    }

    .erik-image {
        width: 100%;
        max-width: 400px;
        height: 400px;
        margin: 0 auto;
    }

    .erik-quote {
        margin-top: 20px;
        text-align: center;
        max-width: 100%;
    }

    .erik-quote p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .viktor-image-container {
        margin: 30px 0;
        text-align: center;
    }

    .viktor-image {
        width: 100%;
        max-width: 400px;
        height: 400px;
        margin: 0 auto;
    }

    .viktor-quote {
        margin-top: 20px;
        text-align: center;
        max-width: 100%;
    }

    .adam-image-container {
        margin: 20px 0;
        text-align: center;
    }

    .adam-image {
        width: 100% !important;
        max-width: 300px !important;
        height: 300px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        margin: 0 auto;
    }

    .adam-quote {
        margin-top: 20px;
        text-align: center;
        max-width: 100%;
    }

    .adam-quote p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .viktor-quote p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .advisors-section {
        padding: 80px 0 60px 0;
    }

    .advisors-title {
        font-size: 2.5rem !important;
        margin-bottom: 30px;
        text-align: center;
    }

    .advisors-grid {
        grid-template-columns: 1fr !important;
        gap: 25px;
        margin-top: 40px;
        padding: 0 20px;
    }

    .advisor-card {
        padding: 30px 20px;
        text-align: center;
    }

    .advisor-name {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }

    .advisor-role {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .advisor-details {
        text-align: left;
    }

    .advisor-details li {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    /* Hide decorative circles on mobile */
    .third-circle {
        display: none;
    }

    /* Contact section mobile fixes for About page */
    .contact-section {
        padding: 40px 0;
        margin-top: 40px;
    }

    .get-in-touch-headline {
        font-size: 2.2rem !important;
        margin-bottom: 15px;
    }

    .contact-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
}
