/* Mobile-specific fixes */

/* General mobile adjustments */
@media (max-width: 768px) {
    /* Ensure text doesn't overflow */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    h1, h2, h3, p {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Adjust container padding for mobile */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Header and Navigation fixes */
@media (max-width: 768px) {
    /* Fix logo visibility in mobile */
    .header .logo {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-width: 120px;
    }
    
    .header .logo img {
        max-height: 30px;
        display: block !important;
    }
    
    /* Improve mobile menu */
    .mobile-menu-btn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1000;
    }
    
    /* Ensure nav is properly hidden until toggled */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--darker-color, #0A0F1C);
        z-index: 999;
        transition: right 0.3s ease;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-list li {
        margin: 10px 0;
        width: 100%;
    }
    
    .nav-list a {
        display: block;
        padding: 10px 0;
        font-size: 1.1rem;
    }
    
    /* Overlay for when menu is open */
    .nav.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Hero section fixes */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-content .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-content .value-prop {
        font-size: 1rem;
    }
    
    .countdown-item {
        padding: 10px;
        min-width: 60px;
    }
}

/* Comparison table fixes */
@media (max-width: 768px) {
    /* Completely redesign the comparison table for mobile */
    .comparison-table {
        display: block;
        overflow-x: hidden;
    }
    
    .comparison-header {
        display: none; /* Hide the header row on mobile */
    }
    
    .comparison-row {
        display: block;
        margin-bottom: 20px;
        border: 1px solid var(--gray-700, #374151);
        border-radius: 8px;
        overflow: hidden;
    }
    
    .comparison-feature {
        display: block;
        width: 100%;
        padding: 15px;
        background-color: rgba(58, 134, 255, 0.1);
        color: var(--primary-color, #3A86FF);
        font-weight: 600;
        text-align: center;
        border-bottom: 1px solid var(--gray-700, #374151);
    }
    
    .comparison-provider {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        border-bottom: 1px solid var(--gray-700, #374151);
    }
    
    .comparison-provider:last-child {
        border-bottom: none;
    }
    
    /* Add labels for each provider */
    .comparison-provider:nth-child(2)::before {
        content: 'Designbold.AI';
        font-weight: 500;
    }
    
    .comparison-provider:nth-child(3)::before {
        content: 'Individual AI Services';
        font-weight: 500;
    }
    
    .comparison-provider:nth-child(4)::before {
        content: 'Other Design Platforms';
        font-weight: 500;
    }
}

/* Services grid fixes */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .service-card {
        padding: 15px;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .service-card h3 {
        font-size: 0.9rem;
        margin: 10px 0 5px;
    }
    
    .service-card p {
        font-size: 0.8rem;
    }
}

/* USP grid fixes */
@media (max-width: 768px) {
    .usp-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Steps fixes */
@media (max-width: 768px) {
    .steps {
        flex-direction: column;
    }
    
    .step {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Pricing section fixes */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
}

/* Form fixes */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* Footer fixes */
@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-brand {
        text-align: center;
        margin: 0 auto;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links h4 {
        text-align: center;
    }
    
    .footer-links ul {
        text-align: center;
    }
}
