/* ===================================
   Liuyang Fanranwo Trading Co., Ltd.
   Responsive Stylesheet
   Mobile-First Design
   =================================== */

/* Extra Small Devices (Mobile Phones) */
@media screen and (max-width: 480px) {
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    /* Container */
    .container {
        padding: 0 1rem;
    }
    
    /* Section */
    section {
        padding: 4rem 0;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    /* Hero Section */
    .hero {
        min-height: 100vh;
        padding-top: calc(var(--header-height) + 2rem);
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
        letter-spacing: 2px;
    }
    
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Header */
    .header-container {
        padding: 0 1rem;
    }
    
    .logo svg {
        height: 40px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-text span {
        font-size: 0.625rem;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 3rem;
        gap: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-link {
        font-size: 1.25rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .service-title {
        font-size: 1.25rem;
    }
    
    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image::before {
        display: none;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* News Grid */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-image {
        height: 200px;
    }
    
    .news-content {
        padding: 1.5rem;
    }
    
    /* CTA Section */
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .footer-about {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links {
        text-align: center;
    }
    
    .footer-contact {
        text-align: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .footer-bottom {
        padding: 1.5rem 1rem;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Page Header */
    .page-header {
        padding: 8rem 0 3rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .breadcrumb {
        font-size: 0.75rem;
    }
    
    /* Form Styles */
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-icon {
        width: 80px;
        height: 80px;
    }
    
    .feature-icon svg {
        width: 40px;
        height: 40px;
    }
    
    /* Timeline */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 50px !important;
        padding-right: 0 !important;
        width: 100%;
        margin-left: 0 !important;
        text-align: left !important;
    }
    
    .timeline-dot {
        left: 10px !important;
        right: auto !important;
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .team-image {
        height: 250px;
    }
    
    /* Button */
    .btn {
        padding: 0.875rem 2rem;
        font-size: 0.875rem;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    /* Scroll Progress */
    .scroll-progress {
        height: 2px;
    }
}

/* Small Devices (Large Phones, Small Tablets) */
@media screen and (min-width: 481px) and (max-width: 768px) {
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
    
    /* Container */
    .container {
        padding: 0 1.5rem;
    }
    
    /* Section */
    section {
        padding: 5rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-stats {
        gap: 2.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Header */
    .header-container {
        padding: 0 1.5rem;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 3rem;
        gap: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* News Grid */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Form Styles */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Timeline */
    .timeline::before {
        left: 50%;
    }
    
    .timeline-item {
        width: 50%;
    }
    
    .timeline-item:nth-child(odd) {
        padding-right: 3rem;
    }
    
    .timeline-item:nth-child(even) {
        padding-left: 3rem;
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* CTA Section */
    .cta-content h2 {
        font-size: 2.5rem;
    }
}

/* Medium Devices (Tablets) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* Container */
    .container {
        padding: 0 2rem;
    }
    
    /* Section */
    section {
        padding: 5.5rem 0;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-stats {
        gap: 3rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* About Section */
    .about-grid {
        gap: 3rem;
    }
    
    /* News Grid */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Large Devices (Laptops, Small Desktops) */
@media screen and (min-width: 1025px) and (max-width: 1200px) {
    /* Container */
    .container {
        padding: 0 2.5rem;
    }
    
    /* Section */
    section {
        padding: 6rem 0;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 3.75rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Extra Large Devices (Desktops) */
@media screen and (min-width: 1201px) and (max-width: 1440px) {
    /* Container */
    .container {
        padding: 0 3rem;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 4rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Ultra Wide Devices (Large Monitors) */
@media screen and (min-width: 1441px) {
    /* Container */
    .container {
        padding: 0 4rem;
    }
    
    /* Section */
    section {
        padding: 7rem 0;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-description {
        font-size: 1.5rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
}

/* Retina Display */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* High resolution images */
    .hero-bg svg,
    .service-icon svg,
    .feature-icon svg,
    .footer-social svg {
        transform: scale(1);
    }
}

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    header,
    .hero,
    .cta-section,
    .back-to-top,
    .scroll-progress,
    .menu-toggle {
        display: none !important;
    }
    
    /* Reset background and colors */
    body {
        background: white !important;
        color: black !important;
    }
    
    section {
        padding: 2rem 0;
    }
    
    /* Ensure links are visible */
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    /* Page breaks */
    .service-card,
    .news-card,
    .team-card {
        page-break-inside: avoid;
    }
    
    /* Print-friendly font sizes */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    /* Remove shadows */
    .service-card,
    .news-card,
    .team-card,
    .contact-form {
        box-shadow: none !important;
        border: 1px solid #ccc;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        /* Override for dark mode if needed */
        /* Currently using light theme */
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .news-card:hover,
    .team-card:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Disable certain animations */
    .animate-float,
    .animate-glow {
        animation: none;
    }
}

/* Landscape Mode on Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + 2rem) 0 4rem;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Tablet in Portrait */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #0000ff;
        --accent-color: #ff6600;
        --text-dark: #000000;
        --text-light: #333333;
        --border-color: #000000;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-accent {
        border: 2px solid #000;
    }
    
    .service-card,
    .news-card,
    .team-card {
        border: 2px solid #000;
    }
}

/* 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;
    }
    
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-rotate {
        opacity: 1;
        transform: none;
    }
}