/**
 * Responsive CSS for Domain
 * Accounting Services Website
 */

/* Mobile First Approach */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 54rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 72rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 96rem;
    }
}

/* X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 114rem;
    }
}

/* Mobile Styles (max-width: 767px) */
@media (max-width: 767px) {
    html {
        font-size: 58%; /* Slightly smaller base font size on mobile */
    }
    
    /* Typography */
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.4rem;
    }
    
    h3 {
        font-size: 2rem;
    }
    
    /* Header & Navigation */
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-normal);
    }
    
    .main-navigation.active {
        max-height: 30rem;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: var(--spacing-sm) 0;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    /* Hero Section */
    .hero-section {
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-section .container {
        flex-direction: column;
    }
    
    .hero-image {
        margin-top: var(--spacing-md);
        justify-content: center;
    }
    
    /* About Section */
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        margin-bottom: var(--spacing-md);
    }
    
    /* Benefits Section */
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    /* Services Section */
    .service-card {
        flex-direction: column;
    }
    
    .service-image {
        max-width: 100%;
    }
    
    /* Testimonials Section */
    .testimonial-slide {
        padding: 0 var(--spacing-sm);
    }
    
    /* Pricing Section */
    .pricing-container {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .pricing-card {
        max-width: 100%;
    }
    
    .pricing-card.featured {
        transform: none;
        order: -1;
    }
    
    /* Contact Section */
    .contact-container {
        flex-direction: column;
    }
    
    .contact-card {
        height: auto;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .footer-info, .footer-links, .footer-legal {
        width: 100%;
    }
    
    /* Cookie Popup */
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Tablet Styles (min-width: 768px) and (max-width: 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    /* Hero Section */
    .hero-content {
        max-width: 50%;
    }
    
    /* Benefits Section */
    .benefits-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Pricing Section */
    .pricing-card {
        padding: var(--spacing-sm);
    }
    
    /* Footer */
    .footer-content {
        flex-wrap: wrap;
    }
    
    .footer-info {
        width: 100%;
        margin-bottom: var(--spacing-md);
    }
    
    .footer-links, .footer-legal {
        flex: 1;
    }
}

/* Animations for different devices */

/* Only apply certain animations on desktop to improve performance on mobile */
@media (min-width: 992px) {
    /* Apply more elaborate animations on desktop */
    .animated.fade-in {
        animation-name: fadeIn;
    }
    
    .animated.fade-in-up {
        animation-name: fadeInUp;
    }
    
    .animated.fade-in-left {
        animation-name: fadeInLeft;
    }
    
    .animated.fade-in-right {
        animation-name: fadeInRight;
    }
}

@media (max-width: 991px) {
    /* Simplify animations on mobile and tablets */
    .animated {
        opacity: 1;
        animation: none !important;
    }
}

/* Print Styles */
@media print {
    .site-header, .site-footer, .contact-form-container, .cookie-popup {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
}
