@media screen and (max-width: 768px) {
    h1 {
        font-size: clamp(3rem, 6vw, 2.5rem);
        margin: 0.3em 0;
    }
    h2 {
        font-size: clamp(2rem, 5vw, 2.2rem);
        margin: 0.25em 0;
    }
    h3 {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
        margin: 0.2em 0;
    }
    p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin: 0.3em 0;
    }
    
    /* Adjust company logos grid */
    .companies-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.5rem;
        margin: 0.5rem 0;
    }
    .company-logo {
        max-width: 80px;
        height: auto;
        margin: 0.25em;
    }
    /* Adjust main logo size */
    .main-logo {
        max-width: 170px;
        height: auto;
    }

    /* Navigation dots adjustments - keeping original spacing */
    .nav-dots {
        right: 10px;
        gap: 12px; /* Keep original gap */
    }
    
    .nav-dot {
        width: 8px;
        height: 8px;
    }
    
    .nav-dot-container {
        padding: 0;
        min-height: auto;
        min-width: auto;
    }
    
    /* Contact section specific improvements */
    #contact .content-wrapper {
        padding: 0.5rem;
    }
    
    /* Main contact information container */
    .contact-info {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        margin-top: 0.3rem;
    }
    
    /* Individual contact sections */
    .address, .contact-details, .social {
        margin: 0.1rem 0;
        padding: 0;
    }
    
    /* All contact items (address, phone, social) */
    .address-item, .contact-item, .social-item {
        font-size: 0.75rem;
        line-height: 1.2;
        margin: 0;
        padding: 0.1rem 0;
        display: flex;
        align-items: flex-start;
    }
    
    /* Icons in contact items */
    .icon {
        width: 12px;
        height: 12px;
        margin: 0.1rem 0.2rem 0 0.2rem;
        flex-shrink: 0;
    }
    
}

/* Fix for iOS viewport height issue */
@supports (-webkit-touch-callout: none) {
    .section {
        height: -webkit-fill-available;
    }
}

/* Additional optimization for very small screens */
@media screen and (max-width: 320px) {
    h1 {
        font-size: 1.2rem;
    }
    h2 {
        font-size: 1.1rem;
    }
    h3 {
        font-size: 1rem;
    }
    p {
        font-size: 0.8rem;
    }
    .content-wrapper {
        padding: 0.5rem;
    }
    
    /* Even more compact contact items for very small screens */
    .address-item, .contact-item, .social-item {
        font-size: 0.7rem;
    }
    
    .icon {
        width: 10px;
        height: 10px;
    }
}