/* Responsive Styles */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile Devices (max-width: 767px) */
@media (max-width: 767px) {
    /* Container */
    .container {
        padding: 0 15px;
    }

    /* Header */
    .header {
        padding: 0.8rem 0;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo p {
        font-size: 0.8rem;
    }

    .nav {
        float: none;
        display: block;
        margin-top: 1rem;
    }

    .nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav ul li {
        margin: 0 0.5rem;
    }

    .nav ul li a {
        font-size: 0.9rem;
        padding: 0.3rem 0;
    }

    /* Hero Section */
    .hero {
        padding: 3rem 0;
        min-height: 400px;
        height: 60vh;
    }
    
    .hero::before,
    .hero::after {
        display: none; /* Remove decorative elements on mobile for performance */
    }

    .hero.hero-small {
        padding: 2rem 0;
        min-height: 250px;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    /* Section Title */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    /* Features Section */
    .features {
        padding: 3rem 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .feature-card {
        margin-bottom: 1rem;
        /* Simplify shadows on mobile */
        box-shadow: var(--shadow-light-outer), var(--shadow-light-inner);
    }
    
    .feature-card:hover {
        box-shadow: var(--shadow-medium-outer), var(--shadow-medium-inner);
    }

    .feature-image {
        height: 200px;
    }

    /* About Section */
    .about {
        padding: 3rem 0;
    }

    .about-content {
        font-size: 1rem;
        padding: var(--spacing-md);
    }
    
    /* Get Started Section */
    .get-started {
        padding: 3rem 0;
    }
    
    .get-started-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .qr-code {
        width: 280px;
        height: 280px;
    }
    
    .search-guide {
        max-width: 100%;
    }

    /* User Guide Section */
    .user-guide {
        padding: 2rem 0;
    }

    .guide-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .guide-sidebar {
        position: static;
        order: 2;
    }

    .guide-content {
        order: 1;
        padding: 1.5rem;
    }

    .guide-title {
        font-size: 1.8rem;
    }

    .guide-subtitle {
        font-size: 1.3rem;
    }

    .guide-section {
        font-size: 1.1rem;
    }

    /* Guide Images - Mobile Full Width */
    .guide-image {
        margin-left: 0;
        margin-right: 0;
    }
    
    .guide-image img {
        width: 100%;
        max-width: 100%;
    }

    /* Lightbox adjustments for mobile */
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }

    .lightbox-close {
        top: -50px;
        right: 0;
        font-size: 28px;
        width: 36px;
        height: 36px;
    }

    .lightbox-caption {
        font-size: 0.9rem;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 0;
    }

    .footer-nav ul {
        gap: 1rem;
    }

    .footer-nav ul li a {
        font-size: 0.9rem;
    }
}

/* Tablets (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Container */
    .container {
        max-width: 90%;
    }

    /* Header */
    .nav ul li {
        margin-left: 1.5rem;
    }

    /* Hero Section */
    .hero-content h2 {
        font-size: 2.2rem;
    }

    /* Features Section */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    /* User Guide Section */
    .guide-layout {
        grid-template-columns: 220px 1fr;
        gap: 1.5rem;
    }

    .guide-sidebar {
        padding: 1.2rem;
    }

    .guide-content {
        padding: 1.8rem;
    }

    /* Guide Images - PC Larger Width */
    .guide-image img {
        max-width: 70%;
    }
}

/* Large Tablets and Small Desktops (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    /* Container */
    .container {
        max-width: 1000px;
    }

    /* Features Section */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    }

    /* Guide Images - PC Larger Width */
    .guide-image img {
        max-width: 75%;
    }
}

/* Extra Large Desktops (1200px+) */
@media (min-width: 1200px) {
    /* Container */
    .container {
        max-width: 1200px;
    }

    /* Guide Images - PC Larger Width */
    .guide-image img {
        max-width: 80%;
    }
}

/* Orientation Specific Styles */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }

    .hero.hero-small {
        padding: 1.5rem 0;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Add high DPI specific styles here if needed */
    .logo h1 {
        font-weight: 700;
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .header,
    .footer,
    .scroll-top {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .guide-layout {
        grid-template-columns: 1fr;
    }

    .guide-sidebar {
        display: none;
    }

    .guide-content {
        box-shadow: none;
        padding: 0;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
    }
}