/* Mobile Styles */
@media (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        transition: top 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        top: 70px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .floating-cards {
        display: none;
    }
    
    /* Sections */
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* FAQ */
    .faq {
        padding: 60px 0;
    }
    
    .faq-content {
        padding: 0 1rem;
    }
    
    .faq-question {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .faq-question h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .faq-answer {
        padding: 0 1.5rem;
        font-size: 0.95rem;
    }
    
    /* FAQ Section */
    .faq-question {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .faq-question h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .faq-question i {
        align-self: flex-end;
        margin-top: -1.5rem;
    }
    
    .faq-answer {
        padding: 0 1.5rem 1rem;
        max-height: none;
    }
    
    .faq-item.active .faq-answer {
        padding: 0.5rem 1.5rem 1rem;
        max-height: none;
    }
    
    /* Benefits Grid */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Use Cases */
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* Eligibility */
    .eligibility-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Calculator */
    .calculator-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Terms */
    .terms-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tips */
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    /* Quick Check */
    .options {
        flex-direction: column;
    }
    
    .option-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Price Comparison */
    .price-comparison {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* CTA */
    .cta h2 {
        font-size: 2.5rem;
    }
    
    .cta p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cta-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-features .feature {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 20px;
        margin-top: 60px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-brand {
        margin-bottom: 2rem;
    }
    
    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    /* Table */
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 1rem 0.5rem;
    }
    
    /* Steps */
    .step {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-number {
        align-self: flex-start;
    }
    
    /* Benefit Items */
    .benefit-item {
        flex-direction: column;
        text-align: center;
    }
    
    .document {
        flex-direction: column;
        text-align: center;
    }
    
    /* Timeline */
    .timeline-event {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .renewal-options {
        gap: 1rem;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero .container {
        gap: 3rem;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .terms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Desktop Styles */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .use-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-header h2 {
        font-size: 3rem;
    }
}

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .header,
    .nav-toggle,
    .cta,
    .footer,
    .back-to-top {
        display: none;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .section {
        padding: 1rem 0;
        break-inside: avoid;
    }
    
    h1, h2, h3 {
        break-after: avoid;
    }
    
    .btn {
        border: 1px solid black;
        padding: 0.5rem 1rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --text-color: #000000;
        --bg-color: #ffffff;
        --border-color: #000000;
    }
    
    body {
        color: var(--text-color);
        background: var(--bg-color);
    }
    
    .btn {
        border: 2px solid var(--border-color);
    }
    
    .benefit-item,
    .document,
    .faq-item {
        border: 1px solid var(--border-color);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-cards .feature-card {
        animation: none;
    }
    
    .hero-badge {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .header {
        background: rgba(18, 18, 18, 0.95);
    }
    
    .hero {
        background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    }
    
    .benefits,
    .use-cases,
    .eligibility,
    .pro-tips,
    .terms-important,
    .faq {
        background: #1e1e1e;
    }
    
    .quick-check,
    .testimonials,
    .how-to-apply,
    .storage-calculator,
    .comparison {
        background: #2d2d2d;
    }
    
    .benefit-category,
    .testimonial,
    .step,
    .calculator-tool,
    .renewal-planner,
    .comparison-table {
        background: #333333;
        border-color: #404040;
    }
    
    .question,
    .benefit-item,
    .use-case,
    .tip-category,
    .term-item,
    .faq-item {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .faq-question {
        background: #333333;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #ffffff;
    }
    
    p, li {
        color: #b0b0b0;
    }
    
    .nav-link {
        color: #b0b0b0;
    }
    
    .comparison-table th {
        background: #2d2d2d;
        color: #ffffff;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.nav-link:focus,
.option-btn:focus,
.faq-question:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #4285f4;
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #4285f4;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth scrolling for older browsers */
html {
    scroll-behavior: smooth;
}

/* Selection styles */
::selection {
    background: rgba(66, 133, 244, 0.2);
    color: inherit;
}

::-moz-selection {
    background: rgba(66, 133, 244, 0.2);
    color: inherit;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4285f4;
}

/* Image optimization */
img {
    height: auto;
    max-width: 100%;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
