/* Accounted Website - Responsive Styles */

/* ===============================================
   Mobile Styles (max-width: 768px)
   =============================================== */
@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }

    /* Improve text rendering on mobile */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }

    /* Ensure all images are responsive */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Prevent text from being too small */
    p, li, td {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Typography adjustments */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--surface);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-lg) 0;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Hero Section */
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero-content {
        order: -1;
        margin-bottom: var(--spacing-lg);
    }

    .hero-image {
        order: 1;
    }

    .hero-image img {
        max-width: 100%;
        width: 100%;
    }

    /* Benefits Grid */
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    /* Features */
    .feature-item {
        flex-direction: column;
        text-align: center;
    }

    .feature-item img {
        margin: 0 auto;
    }

    /* Pricing Cards */
    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    /* Download Buttons */
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Spacing adjustments */
    section {
        padding: var(--spacing-xl) 0;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    /* FAQ Sections */
    .faq-hero {
        padding: var(--spacing-lg) 0;
    }

    .faq-hero h1 {
        font-size: 1.75rem;
    }

    .faq-question h3 {
        font-size: 1.125rem;
    }

    .faq-item {
        padding: var(--spacing-sm);
    }

    /* Comparison Tables */
    .comparison-table-wrapper,
    .comparison-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 calc(var(--spacing-sm) * -1);
        padding: 0 var(--spacing-sm);
    }

    .comparison-table {
        min-width: 500px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
        white-space: nowrap;
    }

    /* Add scroll indicator for tables */
    .comparison-table-wrapper::after,
    .comparison-table-container::after {
        content: "← Scroll to see more →";
        display: block;
        text-align: center;
        padding: var(--spacing-xs);
        font-size: var(--font-size-xs);
        color: var(--text-secondary);
        font-style: italic;
    }

    /* Pricing Hero */
    .pricing-hero {
        padding: var(--spacing-xl) 0;
    }

    .pricing-hero h1 {
        font-size: 2rem;
    }

    .pricing-hero .section-subtitle {
        font-size: 1rem;
    }

    /* Large Pricing Cards */
    .pricing-cards-large {
        gap: var(--spacing-md);
    }

    .pricing-card-large {
        padding: var(--spacing-md);
        min-height: auto;
    }

    .price-large .amount {
        font-size: 2.5rem;
    }

    .price-large .currency {
        font-size: 1.5rem;
    }

    /* Buttons */
    .btn-large {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-base);
    }

    .btn-small {
        padding: 6px 12px;
        font-size: var(--font-size-sm);
    }

    /* Download section */
    .download-section {
        padding: var(--spacing-xl) 0;
    }

    .download-section h2 {
        font-size: 1.75rem;
    }

    /* Support page */
    .support-hero {
        padding: var(--spacing-lg) 0;
    }

    .support-options {
        grid-template-columns: 1fr;
    }

    /* How-to page */
    .how-to-steps {
        grid-template-columns: 1fr;
    }

    .step-card {
        padding: var(--spacing-md);
    }

    /* Logo sizing */
    .logo {
        width: 60px;
        height: 60px;
    }

    /* Terms and Privacy pages */
    .legal-content {
        padding: var(--spacing-md);
    }

    .legal-content h2 {
        font-size: 1.5rem;
    }

    .legal-content h3 {
        font-size: 1.25rem;
    }
}

/* ===============================================
   Small Mobile (max-width: 480px)
   =============================================== */
@media (max-width: 480px) {
    /* Extra small typography */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .price-large .amount {
        font-size: 2rem;
    }

    /* Tighter spacing on very small screens */
    section {
        padding: var(--spacing-lg) 0;
    }

    .container {
        padding: 0 var(--spacing-xs);
    }

    /* Smaller buttons */
    .btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: var(--font-size-sm);
    }

    /* Navbar adjustments */
    .logo {
        width: 50px;
        height: 50px;
    }

    /* Benefit cards more compact */
    .benefit-card {
        padding: var(--spacing-md);
    }

    .benefit-icon {
        font-size: 2rem;
    }

    /* Pricing cards more compact */
    .pricing-card {
        padding: var(--spacing-md);
    }

    .pricing-card-large {
        padding: var(--spacing-sm);
    }

    /* Feature items */
    .feature-item {
        padding: var(--spacing-sm);
    }

    .feature-item img {
        width: 40px;
        height: 40px;
    }

    /* Hero image fits screen on tiny screens */
    .hero-image img {
        max-width: 100%;
    }

    /* FAQ adjustments */
    .faq-question h3 {
        font-size: 1rem;
    }

    /* Payment options in payment-method page */
    .payment-option {
        padding: var(--spacing-md) !important;
    }

    .payment-option h3 {
        font-size: 1.25rem !important;
    }

    /* Ensure touch-friendly tap targets (minimum 44x44px) */
    .btn,
    .payment-btn,
    .nav-menu a,
    .faq-question {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu a {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* ===============================================
   Tablet Styles (768px - 1024px)
   =============================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Hero adjustments */
    .hero-title {
        font-size: 2.5rem;
    }

    /* Benefits grid */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Pricing cards */
    .pricing-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===============================================
   Large Desktop (min-width: 1440px)
   =============================================== */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    section {
        padding: 5rem 0;
    }
}

/* ===============================================
   Print Styles
   =============================================== */
@media print {
    .navbar,
    .hamburger,
    .hero-cta,
    .download-buttons,
    .footer {
        display: none;
    }

    body {
        color: black;
        background: white;
    }

    .pricing-card {
        border: 1px solid black;
        page-break-inside: avoid;
    }
}

/* ===============================================
   Accessibility - Reduced Motion
   =============================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===============================================
   Dark Mode Support (Optional)
   =============================================== */
@media (prefers-color-scheme: dark) {
    /*
    Uncomment to enable dark mode support

    :root {
        --background: #121212;
        --surface: #1E1E1E;
        --text-primary: #FFFFFF;
        --text-secondary: #B0B0B0;
        --border-color: #2C2C2C;
    }

    .hero {
        background: linear-gradient(135deg, var(--primary-dark) 0%, #1B5E20 100%);
    }
    */
}
