/* ============================================
   24Software - Responsive Styles
   Mobile-First Responsive Design
   ============================================ */

/* Extra Large Devices (1400px and up) */
@media (max-width: 1400px) {
    :root {
        --container-max: 1100px;
    }

    .hero-title {
        font-size: 44px;
    }
}

/* Large Devices (1200px and down) */
@media (max-width: 1200px) {
    :root {
        --container-max: 960px;
        --section-spacing: 100px;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-inner {
        gap: 40px;
    }

    .features-grid,
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ecosystem-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ecosystem-grid .ecosystem-card:nth-child(4),
    .ecosystem-grid .ecosystem-card:nth-child(5),
    .ecosystem-grid .ecosystem-card:nth-child(6) {
        grid-column: span 1;
    }
}

/* Tablet Devices (992px and down) */
@media (max-width: 992px) {
    :root {
        --container-max: 720px;
        --section-spacing: 80px;
    }

    /* Header */
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        padding: 16px 0;
    }

    .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 4px;
    }

    .nav-link {
        padding: 12px 24px;
        border-radius: 0;
    }

    .nav-link.active::after {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .header-actions .btn {
        display: none;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    /* Sections */
    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Apps */
    .apps-grid {
        grid-template-columns: 1fr;
    }

    /* Why Grid */
    .why-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Ecosystem */
    .ecosystem-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ecosystem-grid .ecosystem-card:last-child {
        grid-column: span 2;
    }

    .ecosystem-grid .ecosystem-card:nth-last-child(2):nth-child(odd) {
        grid-column: span 2;
    }

    /* Store Profiles */
    .store-profiles {
        flex-direction: column;
        text-align: center;
        padding: 32px;
    }

    .store-profiles-links {
        flex-direction: column;
        width: 100%;
    }

    .store-profile-btn {
        width: 100%;
        justify-content: center;
    }

    /* CTA */
    .cta-box {
        padding: 40px 32px;
    }

    .cta-title {
        font-size: 24px;
    }

    .cta-description {
        font-size: 16px;
    }

    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Phone Mockups - Tablet */
    .showcase-title {
        font-size: 28px;
    }

    .phone-mockups {
        gap: 24px;
    }

    .phone-mockup-iphone .phone-frame {
        width: 220px;
        height: 460px;
        border-radius: 36px;
        padding: 10px;
    }

    .phone-mockup-android .phone-frame {
        width: 210px;
        height: 445px;
        border-radius: 30px;
        padding: 8px;
    }

    .phone-notch {
        width: 80px;
        height: 22px;
        top: 14px;
    }

    .phone-camera {
        width: 12px;
        height: 12px;
        top: 16px;
    }

    .phone-screen {
        border-radius: 28px;
    }

    .phone-mockup-android .phone-screen {
        border-radius: 24px;
    }
}

/* Small Tablet Devices (768px and down) */
@media (max-width: 768px) {
    :root {
        --section-spacing: 60px;
    }

    .container {
        padding: 0 20px;
    }

    /* Header */
    .header-inner {
        height: 64px;
    }

    .logo-text {
        font-size: 20px;
    }

    .lang-switcher {
        padding: 5px 10px;
        font-size: 13px;
    }

    /* Hero */
    .hero {
        padding-top: 100px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Section Header */
    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 24px;
    }

    /* Feature Cards */
    .feature-card {
        padding: 24px;
    }

    /* App Cards */
    .app-card-inner {
        padding: 24px;
    }

    /* Ecosystem */
    .ecosystem-grid {
        grid-template-columns: 1fr;
    }

    .ecosystem-grid .ecosystem-card:last-child {
        grid-column: span 1;
    }

    /* CTA */
    .cta-box {
        padding: 32px 24px;
    }

    .cta-title {
        font-size: 22px;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .cta-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Footer */
    .footer {
        padding: 48px 0 24px;
    }

    .footer-nav {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Phone Mockups - Small Tablet */
    .section-showcase {
        padding: 60px 0 80px;
    }

    .showcase-header {
        margin-bottom: 40px;
    }

    .showcase-title {
        font-size: 24px;
    }

    .showcase-description {
        font-size: 16px;
    }

    .phone-mockups {
        gap: 16px;
    }

    .phone-mockup-iphone .phone-frame {
        width: 170px;
        height: 356px;
        border-radius: 28px;
        padding: 8px;
        border-width: 2px;
    }

    .phone-mockup-android .phone-frame {
        width: 162px;
        height: 340px;
        border-radius: 24px;
        padding: 7px;
        border-width: 2px;
    }

    .phone-notch {
        width: 60px;
        height: 18px;
        top: 12px;
        border-radius: 14px;
    }

    .phone-camera {
        width: 10px;
        height: 10px;
        top: 14px;
    }

    .phone-screen {
        border-radius: 22px;
    }

    .phone-mockup-android .phone-screen {
        border-radius: 19px;
    }

    .phone-label {
        font-size: 12px;
    }

    .phone-label svg {
        width: 14px;
        height: 14px;
    }

    .showcase-actions {
        flex-direction: column;
        align-items: center;
    }

    .showcase-actions .btn {
        width: 100%;
        max-width: 340px;
        justify-content: center;
    }
}

/* Mobile Devices (576px and down) */
@media (max-width: 576px) {
    :root {
        --container-max: 100%;
    }

    .container {
        padding: 0 16px;
    }

    /* Header */
    .header-inner {
        height: 60px;
    }

    .logo-text {
        font-size: 18px;
    }

    .lang-switcher {
        padding: 4px 8px;
        font-size: 12px;
    }

    /* Hero */
    .hero {
        padding: 80px 0 60px;
    }

    .hero-title {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-actions {
        gap: 12px;
    }

    .btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    .btn-large {
        padding: 14px 24px;
        font-size: 15px;
    }

    /* Sections */
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 22px;
    }

    .section-subtitle {
        font-size: 15px;
    }

    /* Feature Cards */
    .feature-card {
        padding: 20px;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
    }

    .feature-icon svg {
        width: 40px;
        height: 40px;
    }

    .feature-title {
        font-size: 18px;
    }

    .feature-description {
        font-size: 14px;
    }

    /* App Cards */
    .app-card-inner {
        padding: 20px;
    }

    .app-icon {
        width: 56px;
        height: 56px;
    }

    .app-icon svg {
        width: 32px;
        height: 32px;
    }

    .app-title {
        font-size: 18px;
    }

    .app-description {
        font-size: 13px;
    }

    .app-stores {
        flex-direction: column;
    }

    .store-btn {
        width: 100%;
        justify-content: center;
    }

    /* Why Grid */
    .why-item {
        gap: 12px;
    }

    .why-number {
        font-size: 36px;
    }

    .why-title {
        font-size: 18px;
    }

    .why-description {
        font-size: 14px;
    }

    /* Ecosystem */
    .ecosystem-card {
        padding: 24px 16px;
    }

    .ecosystem-text {
        font-size: 16px;
    }

    .ecosystem-desc {
        font-size: 12px;
    }

    /* Store Profiles */
    .store-profiles {
        padding: 24px;
    }

    .store-profiles-title {
        font-size: 22px;
    }

    .store-profiles-desc {
        font-size: 14px;
    }

    .store-profile-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    /* CTA */
    .cta-box {
        padding: 28px 20px;
    }

    .cta-title {
        font-size: 20px;
    }

    .cta-description {
        font-size: 15px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-brand {
        gap: 12px;
    }

    .footer-desc {
        font-size: 13px;
    }

    .footer-group {
        font-size: 12px;
    }

    .footer-nav-title {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .footer-nav-list a {
        font-size: 13px;
    }

    .footer-copyright {
        font-size: 12px;
    }
}

/* Extra Small Devices (400px and down) */
@media (max-width: 400px) {
    .hero-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 13px;
    }

    .feature-card,
    .app-card-inner {
        padding: 16px;
    }

    /* Phone Mockups - Extra Small */
    .phone-mockup-iphone .phone-frame {
        width: 145px;
        height: 304px;
        border-radius: 24px;
        padding: 6px;
    }

    .phone-mockup-android .phone-frame {
        width: 138px;
        height: 290px;
        border-radius: 20px;
        padding: 5px;
    }

    .phone-notch {
        width: 50px;
        height: 15px;
        top: 10px;
        border-radius: 12px;
    }

    .phone-camera {
        width: 8px;
        height: 8px;
        top: 12px;
    }

    .phone-screen {
        border-radius: 20px;
    }

    .phone-mockup-android .phone-screen {
        border-radius: 17px;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-title {
        font-size: 28px;
    }

    .section {
        padding: 60px 0;
    }
}

/* Print Styles */
@media print {

    .header,
    .hero-visual,
    .footer,
    .btn,
    .lang-switcher,
    .mobile-toggle {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        padding: 40px 0;
    }

    .section {
        padding: 40px 0;
        page-break-inside: avoid;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .mockup-card {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.3);
        --text-secondary: #d0d0d0;
    }

    .btn {
        border: 2px solid currentColor;
    }
}