/* ========================================
   CRONUSOFT - Responsive Design
   Mobile-First Approach
   ======================================== */

/* ========================================
   Mobile (320px - 640px)
   ======================================== */

@media (max-width: 640px) {
    :root {
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.75rem;
        --font-size-2xl: 1.25rem;
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
    }

    /* Navigation */
    .nav-container {
        padding: 0 1rem;
        height: 60px;
    }

    .nav-logo {
        gap: 0.5rem;
        font-size: 1rem;
    }

    .logo-icon {
        font-size: 1.25rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--bg-secondary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1rem;
        z-index: 20;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 0.5rem;
    }

    .hamburger {
        display: flex;
    }

    .language-switcher {
        flex-direction: row;
        gap: 0.25rem;
    }

    .lang-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }

    /* Hero */
    .hero {
        min-height: calc(100vh - 60px);
        margin-top: 60px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-cta {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .hero-stats {
        gap: 1rem;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .stat {
        min-width: 120px;
        padding: 1rem 0.75rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    /* Sections */
    section {
        padding: 1.5rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card {
        padding: 1rem;
    }

    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .portfolio-image {
        height: 200px;
    }

    .portfolio-content {
        padding: 1rem;
    }

    /* Process */
    .process-steps {
        flex-direction: column;
        gap: 1rem;
    }

    .step-arrow {
        transform: rotate(90deg);
        display: block;
        margin: 0.5rem 0;
    }

    /* Pricing */
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .badge {
        top: -8px;
        font-size: 0.65rem;
    }

    .price-amount {
        font-size: 1.75rem;
    }

    /* Portal Features */
    .portal-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Support */
    .support-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .support-info {
        padding: 1rem;
    }

    .ticket-form {
        padding: 1rem;
    }

    /* CTA */
    .cta-title {
        font-size: 1.5rem;
    }

    .cta-subtitle {
        font-size: 0.95rem;
    }

    /* Chat */
    .chat-widget {
        width: 100%;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .chat-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .trust-bar {
        padding: 1rem;
    }

    .trust-title {
        margin-bottom: 1rem;
    }

    .tech-stack {
        gap: 0.5rem;
    }

    .tech-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* ========================================
   Tablet (641px - 1024px)
   ======================================== */

@media (min-width: 641px) and (max-width: 1024px) {
    :root {
        --font-size-4xl: 2.5rem;
        --font-size-3xl: 2rem;
        --font-size-2xl: 1.5rem;
    }

    /* Navigation */
    .nav-container {
        padding: 0 1.5rem;
    }

    .hamburger {
        display: none;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    /* Sections */
    section {
        padding: 2rem 1.5rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    /* Pricing */
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-card.featured {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Process */
    .process-steps {
        flex-wrap: wrap;
    }

    .step-arrow {
        display: block;
    }

    /* Support */
    .support-content {
        grid-template-columns: 1fr 1fr;
    }

    /* Chat */
    .chat-widget {
        width: 350px;
        height: 500px;
        bottom: 80px;
        right: 2rem;
    }

    .chat-toggle {
        bottom: 2rem;
        right: 2rem;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-bar {
        padding: 1.5rem;
    }
}

/* ========================================
   Desktop (1025px+)
   ======================================== */

@media (min-width: 1025px) {
    .hamburger {
        display: none;
    }

    .nav-menu {
        gap: 2rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Pricing */
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-card.featured {
        transform: scale(1.05);
    }

    /* Process */
    .step-arrow {
        display: block;
    }

    /* Portal Features */
    .portal-features {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Support */
    .support-content {
        grid-template-columns: 1fr 1fr;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Chat */
    .chat-widget {
        width: 350px;
        height: 500px;
    }
}

/* ========================================
   Large Desktop (1440px+)
   ======================================== */

@media (min-width: 1440px) {
    .section-container {
        max-width: 1200px;
    }

    .nav-container {
        max-width: 1200px;
    }
}

/* ========================================
   Ultra Wide (1920px+)
   ======================================== */

@media (min-width: 1920px) {
    :root {
        --font-size-4xl: 4rem;
        --font-size-3xl: 3rem;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .navbar,
    .chat-toggle,
    .chat-widget,
    .btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }
}

/* ========================================
   Reduced Motion (Accessibility)
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   High Contrast Mode
   ======================================== */

@media (prefers-contrast: more) {
    :root {
        --border-color: #000;
        --text-primary: #000;
        --text-secondary: #333;
    }

    :root[data-theme="dark"] {
        --border-color: #fff;
        --text-primary: #fff;
        --text-secondary: #ccc;
    }
}

/* ========================================
   Dark Mode Preference
   ======================================== */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: var(--bg-primary-dark);
        --bg-secondary: var(--bg-secondary-dark);
        --bg-tertiary: var(--bg-tertiary-dark);
        --text-primary: var(--text-primary-dark);
        --text-secondary: var(--text-secondary-dark);
        --text-tertiary: var(--text-tertiary-dark);
        --border-color: var(--border-color-dark);
    }
}

/* ========================================
   Light Mode Preference
   ======================================== */

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg-primary: #ffffff;
        --bg-secondary: #f8f9fa;
        --bg-tertiary: #e9ecef;
        --text-primary: #1a1a1a;
        --text-secondary: #666666;
        --text-tertiary: #999999;
        --border-color: #e0e0e0;
    }
}

/* ========================================
   Touch Device Optimization
   ======================================== */

@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

    .service-card:hover {
        transform: none;
    }

    button {
        padding: 12px 16px;
        min-height: 44px;
        min-width: 44px;
    }
}

/* ========================================
   Landscape Orientation
   ======================================== */

@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: 80vh;
    }

    .hero-cta {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   iPad Specific
   ======================================== */

@media only screen and (device-width: 768px) and (device-height: 1024px) {
    .nav-container {
        padding: 0 2rem;
    }

    section {
        padding: 2rem;
    }
}

/* ========================================
   iPhone 12/13 Pro Specific
   ======================================== */

@media only screen and (device-width: 390px) and (device-height: 844px) {
    .chat-widget {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}
