/* ============================================
   Jincheng Huaxia - Responsive Stylesheet
   Mobile & Tablet Adaptations
   ============================================ */

/* Extra Large Screens (1400px and above) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .section {
        padding: 80px 0;
    }
}

/* Large Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 3rem;
    }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-column:last-child {
        grid-column: 1 / -1;
        margin-top: 1rem;
    }
    
    .about-grid {
        gap: 3rem;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-header h2::after {
        width: 60px;
        height: 3px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 3rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-about {
        grid-column: 1 / -1;
    }
    
    .page-header {
        padding: 130px 0 80px;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px !important;
        padding-right: 0 !important;
        text-align: left !important;
        margin-bottom: 2rem;
    }
    
    .timeline-marker {
        left: 20px !important;
        right: auto !important;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Navigation adjustments */
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    /* Hero adjustments */
    .hero {
        min-height: 600px;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-buttons {
        gap: 1rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .service-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1rem;
    }
    
    .feature-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }
    
    .feature-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .stat-item {
        padding: 1rem 0.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-image {
        height: 200px;
    }
    
    .news-content {
        padding: 1rem;
    }
    
    .news-title {
        font-size: 1.1rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-info {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-about {
        grid-column: 1;
    }
    
    .footer-column h4 {
        margin-bottom: 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-header {
        padding: 120px 0 60px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .breadcrumb {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .value-card {
        padding: 1.5rem;
    }
    
    .value-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }
    
    .value-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .timeline {
        padding: 0 1rem;
    }
    
    .timeline-item {
        padding-left: 50px !important;
        margin-bottom: 1.5rem;
    }
    
    .timeline-marker {
        width: 16px;
        height: 16px;
        left: 10px !important;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    .timeline-year {
        font-size: 1.3rem;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .team-photo {
        height: 250px;
    }
    
    .team-info {
        padding: 1rem;
    }
    
    .team-name {
        font-size: 1.1rem;
    }
    
    /* Header */
    .header {
        background: rgba(26, 26, 26, 0.98);
    }
    
    .logo svg {
        width: 40px;
        height: 40px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .mobile-menu-btn {
        display: flex;
        padding: 8px;
    }
    
    .mobile-menu-btn span {
        width: 24px;
        height: 2px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 1.5rem;
        transform: translateX(-100%);
        transition: var(--transition-smooth);
        gap: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 0.75rem 0;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
        margin-top: 0.5rem;
        opacity: 1;
        visibility: visible;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Hero */
    .hero {
        min-height: 500px;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 0.75rem 1.5rem;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
    
    .scroll-indicator svg {
        width: 24px;
        height: 24px;
    }
    
    /* Scroll to top */
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .scroll-top svg {
        width: 20px;
        height: 20px;
    }
    
    /* Legal pages */
    .legal-content {
        padding: 2rem 1rem;
    }
    
    .legal-content h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .legal-content h3 {
        font-size: 1.2rem;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .legal-content p {
        font-size: 0.95rem;
        line-height: 1.8;
        margin-bottom: 1rem;
    }
    
    .legal-content ul {
        padding-left: 1.5rem;
    }
    
    .legal-content li {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
}

/* Mobile Small (up to 575px) */
@media (max-width: 575px) {
    .container {
        width: 100%;
        padding: 0 0.75rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .services-grid,
    .features-grid,
    .news-grid {
        gap: 1rem;
    }
    
    .service-card,
    .feature-item,
    .news-card {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem 0.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .about-list li {
        font-size: 0.9rem;
    }
    
    .footer-grid {
        gap: 1.5rem;
    }
    
    .footer-about p {
        font-size: 0.9rem;
    }
    
    .footer-links a {
        font-size: 0.9rem;
    }
    
    .footer-bottom p {
        font-size: 0.85rem;
    }
    
    .footer-legal a {
        font-size: 0.85rem;
    }
    
    .page-header {
        padding: 100px 0 50px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .page-header p {
        font-size: 0.95rem;
    }
    
    .values-grid {
        gap: 1rem;
    }
    
    .value-card {
        padding: 1rem;
    }
    
    .value-icon {
        width: 70px;
        height: 70px;
    }
    
    .value-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .timeline {
        margin: 2rem auto;
    }
    
    .timeline-item {
        padding-left: 40px !important;
        margin-bottom: 1rem;
    }
    
    .timeline-marker {
        width: 14px;
        height: 14px;
        left: 5px !important;
        top: 20px;
    }
    
    .timeline-content {
        padding: 0.75rem;
    }
    
    .timeline-year {
        font-size: 1.1rem;
    }
    
    .timeline-title {
        font-size: 1rem;
    }
    
    .timeline-text {
        font-size: 0.9rem;
    }
    
    .team-grid {
        gap: 1rem;
    }
    
    .team-photo {
        height: 200px;
    }
    
    .team-info {
        padding: 0.75rem;
    }
    
    .team-name {
        font-size: 1rem;
    }
    
    .team-role {
        font-size: 0.9rem;
    }
    
    /* Contact form */
    .contact-info {
        padding: 1rem;
    }
    
    .contact-item {
        margin-bottom: 1rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .contact-text h5 {
        font-size: 1rem;
    }
    
    .contact-text p {
        font-size: 0.9rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    /* Legal content */
    .legal-content {
        padding: 1.5rem 0.75rem;
    }
    
    .legal-content h2 {
        font-size: 1.3rem;
    }
    
    .legal-content h3 {
        font-size: 1.1rem;
    }
    
    .legal-content p,
    .legal-content li {
        font-size: 0.9rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .news-card:hover,
    .team-member:hover {
        transform: none;
    }
    
    /* Make buttons larger for touch */
    .btn {
        padding: 0.9rem 1.8rem;
        min-height: 48px;
    }
    
    /* Improve touch targets */
    .nav-link {
        padding: 1rem 0;
    }
    
    .footer-links a {
        padding: 0.5rem 0;
        display: block;
    }
    
    /* Disable some animations for performance */
    .animate-float,
    .animate-bounce {
        animation: none;
    }
    
    /* Improve scrolling */
    html {
        scroll-behavior: auto;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 1rem;
    }
    
    .btn {
        width: auto;
        max-width: none;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .scroll-top,
    .mobile-menu-btn,
    .hero-buttons,
    .scroll-indicator {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
    
    .service-card,
    .news-card,
    .team-member {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .legal-content {
        max-width: 100%;
    }
}

/* 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 {
        opacity: 1;
        transform: none;
    }
    
    .stagger-item {
        opacity: 1;
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-dark: #000000;
        --primary-blue: #0000ff;
        --white: #ffffff;
        --light-gray: #eeeeee;
        --medium-gray: #444444;
        --dark-gray: #111111;
    }
    
    .service-card,
    .news-card,
    .team-member {
        border: 2px solid var(--primary-dark);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-gray: #2d2d2d;
        --medium-gray: #aaaaaa;
        --dark-gray: #f0f0f0;
    }
    
    body {
        background-color: #121212;
    }
    
    .service-card,
    .news-card,
    .team-member,
    .contact-form,
    .value-card,
    .timeline-content {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }
    
    .footer,
    .header {
        background-color: #0a0a0a;
    }
    
    .form-group input,
    .form-group textarea {
        background-color: #2d2d2d;
        border-color: #444444;
        color: #e0e0e0;
    }
}
