/* Responsive Design - Mobile First Approach */

/* Tablet Styles (768px and up) */
@media screen and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-tagline {
        font-size: 1.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-visual {
        grid-template-columns: 1fr 1fr;
        max-width: 700px;
        margin: 0 auto;
        gap: 1.5rem;
    }

    .visual-card {
        height: 240px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-container {
        margin-left: 20px;
    }

    .timeline-container::before {
        left: 0;
    }

    .timeline-item {
        width: 100%;
        padding-left: 40px;
        padding-right: 20px;
        text-align: left;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-dot {
        left: -10px !important;
    }
}

/* Mobile Styles - Specific for landscape */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .visual-card {
        height: 180px;
    }
}

/* Mobile Styles (767px and below) */
@media screen and (max-width: 767px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Language Selector Mobile */
    .lang-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
        border-width: 1.5px;
    }

    .language-dropdown {
        min-width: 140px;
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }

    .language-dropdown.active {
        transform: translateX(-50%) translateY(0);
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Hero Section */
    .hero {
        min-height: 100vh;
        padding: 80px 0 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .btn {
        width: 200px;
        text-align: center;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* About Section */
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-visual {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 10px;
    }

    .visual-card {
        height: 220px;
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }

    .visual-card .card-front,
    .visual-card .card-back {
        padding: 2rem;
    }

    .visual-card h4 {
        font-size: 1.4rem;
        font-weight: 700;
    }

    .visual-card p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .icon-wrapper {
        width: 70px;
        height: 70px;
    }

    .icon {
        width: 35px;
        height: 35px;
    }

    /* Service Section */
    .service-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }

    /* Back to Top */
    .back-to-top {
        width: 40px;
        height: 40px;
        right: 20px;
        bottom: 20px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }

    /* CTA Section */
    .cta {
        padding: 60px 0;
    }

    .cta h2 {
        font-size: 2rem;
    }

    .cta p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Small Mobile (480px and below) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    /* Visual Cards - Better visibility on small screens */
    .visual-card {
        height: 200px;
        width: 100%;
        max-width: none;
    }

    .visual-card .card-front,
    .visual-card .card-back {
        padding: 1.5rem;
    }

    .icon-wrapper {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .icon {
        width: 30px;
        height: 30px;
    }

    .visual-card h4 {
        font-size: 1.3rem;
        font-weight: 700;
    }

    .visual-card p {
        font-size: 0.95rem;
    }

    .about-visual {
        padding: 0 5px;
    }

    /* Typography */
    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    p {
        font-size: 0.95rem;
    }

    /* Buttons */
    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    /* Cards */
    .feature-card {
        padding: 1.5rem;
    }

    .feature-box {
        padding: 1.5rem;
    }

    /* Timeline */
    .timeline-item {
        padding: 15px 30px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        gap: 2rem;
    }
}

/* Landscape Mobile */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .scroll-indicator {
        display: none;
    }
}

/* Large Desktop (1400px and up) */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 5rem;
    }

    .hero-tagline {
        font-size: 2.5rem;
    }

    .service-features {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .navbar,
    .scroll-indicator,
    .back-to-top,
    .hero-bg,
    .floating-shapes,
    .hamburger,
    .cta-buttons {
        display: none !important;
    }

    .hero {
        min-height: auto;
        page-break-after: always;
    }

    section {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }

    img {
        max-width: 100% !important;
    }

    h2, h3 {
        page-break-after: avoid;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .floating-shapes {
        display: none;
    }

    .gradient-bg {
        animation: none;
    }

    .parallax-bg {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0040ff;
        --secondary-color: #6000ff;
        --text-dark: #000000;
        --text-light: #333333;
        --bg-light: #ffffff;
        --bg-white: #ffffff;
    }

    .btn-primary,
    .btn-outline:hover {
        background: #0040ff;
        border: 2px solid #000000;
    }

    .navbar {
        border-bottom: 2px solid #000000;
    }

    .feature-card,
    .feature-box,
    .visual-card {
        border: 2px solid #000000;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f7fafc;
        --text-light: #cbd5e0;
        --text-lighter: #718096;
        --bg-light: #1a202c;
        --bg-white: #2d3748;
    }

    body {
        background-color: var(--bg-light);
        color: var(--text-dark);
    }

    .navbar {
        background: rgba(26, 32, 44, 0.95);
    }

    .nav-menu {
        background-color: var(--bg-light);
    }

    .feature-card,
    .feature-box,
    .card-front {
        background: var(--bg-white);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer {
        background: #0f1419;
    }

    .privacy-container {
        background: var(--bg-white);
    }

    .privacy-toc {
        background: var(--bg-light);
    }

    .privacy-section {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        padding: 14px 32px;
        font-size: 1rem;
    }

    .nav-link {
        padding: 10px;
    }

    /* Disable hover flip on touch devices */
    .visual-card:hover .card-inner {
        transform: none;
    }

    /* Enable tap to flip */
    .visual-card {
        cursor: pointer;
    }

    .visual-card.flipped .card-inner {
        transform: rotateY(180deg);
    }

    .feature-card:hover,
    .feature-box:hover {
        transform: none;
    }
}

/* Retina Display */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .logo-text,
    .text-gradient {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}