/* Responsive CSS for GrammarAI Pro */

/* Mobile First Approach - Base styles for mobile devices */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.79rem;
    }
    
    h3 {
        font-size: 1.35rem;
    }
    
    /* Hero section */
    #hero {
        padding: 3rem 0;
        text-align: center;
    }
    
    #hero h1 {
        font-size: 2.28rem;
        margin-bottom: 1rem;
    }
    
    #hero h2 {
        font-size: 1.61rem;
        margin-bottom: 1rem;
    }
    
    #hero p {
        font-size: 1rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.34rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    /* Cards */
    .feature-card, .service-card, .review-card, .case-card, .blog-card, .price-card {
        padding: 1.5rem;
        margin-bottom: 1.56rem;
    }
    
    /* Team members */
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Process steps */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.30rem;
    }
    
    /* Contact form */
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 1.5rem;
        font-size: 1.02rem;
    }
    
    /* Grid adjustments */
    .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    /* Footer */
    footer {
        text-align: center;
    }
    
    footer .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    #hero h1 {
        font-size: 2.59rem;
    }
    
    #hero h2 {
        font-size: 1.88rem;
    }
    
    .navbar-brand {
        font-size: 1.39rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .feature-card, .service-card, .review-card, .case-card, .blog-card, .price-card {
        padding: 1.75rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    #hero {
        padding: 4rem 0;
    }
    
    #hero h1 {
        font-size: 2.78rem;
    }
    
    #hero h2 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.55rem;
    }
    
    section {
        padding: 4.5rem 0;
    }
    
    /* Adjust grid columns for tablets */
    .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 2rem;
    }
    
    /* Team layout for tablets */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Gallery adjustments */
    #gallery .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    #hero h1 {
        font-size: 3rem;
    }
    
    #hero h2 {
        font-size: 2.27rem;
    }
    
    section {
        padding: 5rem 0;
    }
    
    /* Restore normal grid for large screens */
    .col-lg-2 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    #hero h1 {
        font-size: 3.53rem;
    }
    
    #hero h2 {
        font-size: 2.61rem;
    }
    
    /* Larger spacing for big screens */
    section {
        padding: 6rem 0;
    }
    
    .feature-card, .service-card, .review-card, .case-card, .blog-card, .price-card {
        padding: 2.5rem;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    #hero h1 {
        font-size: 4rem;
    }
    
    #hero h2 {
        font-size: 2.85rem;
    }
}

/* Landscape orientation adjustments */
@media screen and (orientation: landscape) and (max-height: 500px) {
    #hero {
        padding: 2rem 0;
    }
    
    #hero h1 {
        font-size: 2rem;
        margin-bottom: 0.58rem;
    }
    
    #hero h2 {
        font-size: 1.56rem;
        margin-bottom: 0.63rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* Print styles */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    .contact-form,
    footer {
        display: none;
    }
    
    /* Ensure good contrast for printing */
    body {
        background: white !important;
        color: black !important;
    }
    
    /* Adjust typography for print */
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid;
    }
    
    /* Prevent breaking inside cards */
    .feature-card, .service-card, .review-card, .case-card, .blog-card, .price-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Remove shadows and effects for print */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Adjust images for retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    /* Remove animations for users who prefer reduced motion */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove transform effects */
    .feature-card:hover, 
    .service-card:hover, 
    .review-card:hover, 
    .case-card:hover, 
    .blog-card:hover, 
    .price-card:hover,
    .btn-primary:hover,
    #gallery img:hover {
        transform: none;
    }
}

/* Dark mode support */

/* Container adjustments for different screen sizes */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Specific responsive adjustments for additional pages */
@media (max-width: 991.98px) {
    /* Additional page grid adjustments */
    .col-lg-2.mb-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575.98px) {
    /* Stack all columns on mobile for additional pages */
    .col-lg-2.mb-4,
    .col-lg-3.mb-4,
    .col-lg-4.mb-4,
    .col-lg-6.mb-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1.73rem;
    }
    
    /* Breadcrumb adjustments */
    .breadcrumb {
        font-size: 1.02rem;
    }
    
    .breadcrumb img {
        width: 16px;
        height: 16px;
    }
}

/* Accessibility improvements for various screen sizes */
@media (max-width: 767.98px) {
    /* Larger touch targets on mobile */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    /* Better spacing for form elements */
    .form-control {
        padding: 1rem;
        font-size: 1.16rem;
    }
}

/* Height-based responsive adjustments */
@media (max-height: 600px) {
    #hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* Very wide screens optimization */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    /* Prevent content from becoming too spread out */
    .col-lg-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }
}

/* Hover effects optimization for touch devices */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .feature-card:hover, 
    .service-card:hover, 
    .review-card:hover, 
    .case-card:hover, 
    .blog-card:hover, 
    .price-card:hover,
    .btn-primary:hover,
    #gallery img:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
} 