/* Mobile Optimizations for iPhone 14 Pro Max and Large Mobile Devices */

/* Ensure text is readable on all iOS devices */
* {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Base mobile improvements */
@media (max-width: 768px) {
    /* Navigation improvements */
    .header {
        padding: 1rem 0;
    }

    .nav {
        padding: 0 1.5rem;
    }

    .nav-brand h2 {
        font-size: 1.75rem;
    }

    .nav-toggle {
        width: 32px;
        height: 32px;
        justify-content: center;
        align-items: center;
        min-height: 44px;
        min-width: 44px;
    }

    .nav-toggle span {
        width: 28px;
        height: 3px;
    }

    .nav-menu {
        padding: 2.5rem 2rem;
        z-index: 1000;
    }

    .nav-link {
        padding: 1rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    /* Hero section improvements */
    .hero {
        padding: 6rem 0 4rem;
        min-height: 100vh;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.6;
    }

    .hero-buttons {
        justify-content: center;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .hero-contact {
        justify-content: center;
        gap: 1rem;
    }

    /* Button improvements */
    .btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 48px;
        min-width: 140px;
    }

    .contact-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        min-width: 120px;
    }

    /* Floating cards mobile optimization */
    .hero-graphic {
        position: relative;
        height: 300px;
        margin-top: 2rem;
    }

    .floating-card {
        padding: 1rem 1.25rem;
    }

    .card-1 {
        top: 20px;
        left: 10%;
        animation-delay: 0s;
    }

    .card-2 {
        top: 120px;
        right: 10%;
        animation-delay: 2s;
    }

    .card-3 {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        animation-delay: 4s;
    }

    /* Global section spacing */
    section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 3rem;
        text-align: center;
    }

    .section-title {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
        max-width: 90%;
        margin: 0 auto;
    }

    /* Services grid mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Contact form mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 1rem;
        font-size: 1rem;
        min-height: 48px;
    }

    .form-buttons {
        gap: 1rem;
        flex-direction: column;
    }

    .form-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* System cards mobile */
    .systems-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .system-card {
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .system-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    /* About section mobile */
    .about {
        padding: 4rem 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: left;
        padding: 0 1rem;
    }

    .about-text {
        order: 1;
    }

    .section-title {
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .about-description {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        text-align: left;
        padding: 0 0.5rem;
    }

    .features-list {
        margin-top: 2rem;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

    .feature-item {
        font-size: 1rem;
        line-height: 1.4;
        padding: 0.5rem 0;
    }

    .feature-item i {
        min-width: 20px;
        font-size: 1.1rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
        order: 2;
    }

    .stat-item {
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .stat-number {
        font-size: 2rem;
        display: block;
        margin-bottom: 0.5rem;
    }

    .stat-label {
        font-size: 0.95rem;
        line-height: 1.3;
    }
}

/* iPhone 14 Pro Max and large mobile devices (430px) */
@media (max-width: 430px) and (min-height: 900px) {
    .hero {
        padding: 7rem 0 5rem;
    }

    .hero-title {
        font-size: 2.75rem;
        line-height: 1.1;
    }

    .hero-description {
        font-size: 1.15rem;
        line-height: 1.6;
    }

    .floating-card {
        padding: 1.25rem 1.5rem;
    }

    .floating-card span {
        font-size: 1rem;
    }

    .btn {
        padding: 1.125rem 2.25rem;
        font-size: 1.05rem;
    }

    .contact-btn {
        padding: 1.125rem 1.75rem;
    }

    /* Better spacing for large mobile screens */
    .hero-buttons {
        gap: 1.25rem;
        margin-bottom: 2.5rem;
    }

    .hero-contact {
        gap: 1.25rem;
    }

    /* Optimize floating cards positioning for larger mobile screens */
    .hero-graphic {
        height: 350px;
        margin-top: 2.5rem;
    }

    .card-1 {
        top: 30px;
        left: 5%;
    }

    .card-2 {
        top: 140px;
        right: 5%;
    }

    .card-3 {
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Better form spacing */
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-buttons {
        margin-top: 2rem;
        gap: 1.25rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    /* About section for small mobile */
    .about {
        padding: 3rem 0;
    }

    .about-content {
        gap: 2rem;
        padding: 0 0.5rem;
    }

    .section-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }

    .about-description {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
        padding: 0;
        text-align: left;
    }

    .about-description strong {
        display: inline;
        font-weight: 700;
    }

    .features-list {
        gap: 1.25rem;
        margin-top: 1.5rem;
        padding: 0;
    }

    .feature-item {
        font-size: 0.95rem;
        line-height: 1.4;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .feature-item span {
        flex: 1;
        text-align: left;
    }

    .about-stats {
        margin-top: 1.5rem;
    }

    .stat-item {
        padding: 1.25rem 0.75rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .floating-card {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }

    .floating-card i {
        font-size: 1.5rem;
    }

    /* Stack floating cards for very small screens */
    .card-1, .card-2, .card-3 {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none;
        margin: 0.5rem;
        display: inline-flex;
    }

    .hero-graphic {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        height: auto;
        margin-top: 1.5rem;
    }

    .systems-grid {
        grid-template-columns: 1fr;
    }

    .form-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn, .contact-btn, .nav-link, .social-link {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        min-height: 48px;
    }

    /* Improve hover states for touch */
    .btn:active, .contact-btn:active {
        transform: scale(0.98);
    }

    .nav-link:active {
        background-color: rgba(0, 0, 0, 0.05);
    }
}