/* Mobile-specific text size fixes */
@media (max-width: 768px) {
    .huge-title {
        font-size: clamp(3.5rem, 12vw, 4.5rem) !important;
        line-height: 1.1 !important;
    }
    
    .huge-line {
        margin-bottom: 0.05em !important;
    }
    
    .huge-statement {
        font-size: clamp(1.8rem, 6vw, 2.2rem) !important;
        margin: 20px 0 !important;
    }
    
    .huge-hero-subtitle {
        margin-top: 40px !important;
    }
    
    /* Animation for hero text */
    .huge-hero-text {
        animation: heroTextAppear 1s ease-out forwards;
    }
    
    @keyframes heroTextAppear {
        0% {
            opacity: 0;
            transform: translateY(30px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .line1 {
        animation-delay: 0.1s !important;
    }
    
    .line2 {
        animation-delay: 0.3s !important;
    }
    
    .line3 {
        animation-delay: 0.5s !important;
    }
    
    .statement1 {
        animation-delay: 0.7s !important;
    }
    
    .statement2 {
        animation-delay: 0.9s !important;
    }
    
    /* Fix for text visibility on hover */
    .huge-service-item:hover .huge-service-title,
    .huge-work-item:hover .huge-work-title,
    .portfolio-item:hover .portfolio-title {
        color: var(--primary-black) !important;
        opacity: 1 !important;
    }
    
    /* Fix text color in overlays */
    .portfolio-overlay {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.95)) !important;
    }
    
    .portfolio-title, 
    .portfolio-category {
        color: var(--white) !important;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.5) !important;
    }
    
    /* Fix menu text visibility */
    .nav-links.active a,
    .huge-nav-links.active a {
        color: var(--primary-black) !important;
        font-weight: 600 !important;
    }
    
    /* Careers button */
    .careers-btn {
        background-color: var(--primary-black) !important;
        color: var(--white) !important;
        padding: 8px 20px !important;
        border-radius: 4px !important;
        margin-top: 10px !important;
    }
}

@media (max-width: 480px) {
    .huge-title {
        font-size: clamp(3rem, 14vw, 4rem) !important;
    }
    
    .huge-statement {
        font-size: clamp(1.6rem, 7vw, 2rem) !important;
    }
    
    .huge-hero {
        min-height: 85vh !important;
        padding: 100px 0 40px !important;
    }
    
    /* Prevent auto-scroll */
    html {
        scroll-behavior: auto;
    }
}

/* Text visibility fixes for all screens */
.huge-service-title,
.huge-work-title,
.portfolio-title,
.huge-about-desc,
.huge-belief-text {
    transition: color 0.3s ease, opacity 0.3s ease;
}

.huge-service-item:hover .huge-service-desc,
.huge-work-item:hover .huge-work-desc {
    opacity: 1 !important;
}

/* Mobile menu dropdown fixes */
@media (max-width: 768px) {
    .nav-dropdown .dropdown-menu {
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Ensure dropdown links don't have hover effects on mobile */
    .nav-dropdown a:hover::after {
        display: none;
    }
}