/* ============================================
   CODIFY - Responsive Stylesheet
   Version: 2.0 (2025)
   Breakpoints: 1200px, 992px, 768px, 576px
   ============================================ */

/* ==================== LARGE DESKTOP (≤1200px) ==================== */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero-text h1 {
        font-size: 2.8rem;
    }
    
    .hero-logo {
        max-width: 240px;
    }
    
    .logo-animation {
        max-width: 350px;
        height: 350px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* ==================== TABLET (≤992px) ==================== */
@media (max-width: 992px) {
    .section-padding {
        padding: 70px 0;
    }
    
    .section-title h2 {
        font-size: var(--text-3xl);
    }
    
    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }
    
    .hero-text h1 {
        font-size: 2.4rem;
    }
    
    .hero-description {
        margin: 0 auto 30px;
        max-width: 90%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .logo-animation {
        max-width: 280px;
        height: 280px;
        margin: 0 auto;
    }
    
    .hero-logo {
        max-width: 200px;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    /* Contact */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* Process */
    .process-step {
        gap: 20px;
    }
    
    .step-number {
        min-width: 56px;
        height: 56px;
        font-size: var(--text-xl);
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==================== MOBILE LANDSCAPE (≤768px) ==================== */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.4rem;
        --text-4xl: 2rem;
        --text-3xl: 1.6rem;
        --text-2xl: 1.4rem;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .section-title h2 {
        font-size: var(--text-3xl);
    }
    
    .section-title p {
        font-size: var(--text-base);
    }
    
    /* ==================== MOBILE NAVIGATION ==================== */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: center;
        padding: 40px 30px;
        gap: 4px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links a {
        width: 100%;
        padding: 16px 20px;
        font-size: var(--text-lg);
        text-align: center;
        border-radius: var(--radius-md);
        border-bottom: 1px solid var(--glass-border);
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .btn-cv {
        margin-top: 20px;
        justify-content: center;
        padding: 14px 28px !important;
        font-size: var(--text-base) !important;
    }
    
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }
    
    /* Mobile Menu Open State */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Hero */
    .hero {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 60px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
    }
    
    .hero-description {
        font-size: var(--text-base);
        max-width: 100%;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .logo-animation {
        max-width: 220px;
        height: 220px;
    }
    
    .hero-logo {
        max-width: 160px;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .service-card {
        padding: 24px 20px;
    }
    
    /* Features / Why Choose Us */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .feature-item {
        padding: 20px 14px;
    }
    
    .counter {
        font-size: var(--text-2xl);
    }
    
    /* Technologies Marquee */
    .marquee-item {
        padding: 12px 20px;
        font-size: var(--text-base);
        gap: 8px;
    }
    
    /* Portfolio */
    .portfolio-filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: var(--text-xs);
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .portfolio-card {
        height: 250px;
    }
    
    /* Process */
    .process-steps::before {
        left: 27px;
    }
    
    .process-step {
        gap: 16px;
        margin-bottom: 30px;
    }
    
    .step-number {
        min-width: 48px;
        height: 48px;
        font-size: var(--text-lg);
    }
    
    .step-content h3 {
        font-size: var(--text-lg);
    }
    
    /* About */
    .about-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .stat-number {
        font-size: var(--text-2xl);
    }
    
    /* Pricing */
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .pricing-card.popular {
        transform: scale(1);
    }
    
    .pricing-card.popular:hover {
        transform: translateY(-8px);
    }
    
    .pricing-toggle {
        gap: 10px;
        font-size: var(--text-sm);
    }
    
    /* Testimonials */
    .testimonial-card {
        min-width: 280px;
        padding: 24px;
    }
    
    /* FAQ */
    .faq-question {
        padding: 16px 20px;
    }
    
    .faq-question h3 {
        font-size: var(--text-sm);
    }
    
    /* CTA */
    .cta {
        padding: 50px 24px;
    }
    
    .cta h2 {
        font-size: var(--text-2xl);
    }
    
    .cta p {
        font-size: var(--text-base);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* Contact */
    .contact-card {
        padding: 16px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-logo-container {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .newsletter-form {
        max-width: 300px;
        margin: 12px auto 0;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Floating Buttons */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: var(--text-xl);
    }
    
    .back-to-top {
        bottom: 80px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .dark-mode-toggle {
        bottom: 135px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    /* Chatbot */
    .ai-chatbot {
        bottom: 20px;
        left: 20px;
    }
    
    .chatbot-trigger {
        width: 48px;
        height: 48px;
        font-size: var(--text-xl);
    }
    
    .chatbot-window {
        width: 300px;
        left: -10px;
    }
}

/* ==================== SMALL MOBILE (≤576px) ==================== */
@media (max-width: 576px) {
    .container {
        padding: 0 16px;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    .section-badge {
        font-size: 0.7rem;
        padding: 4px 12px;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    /* Hero */
    .hero {
        padding-top: 100px;
        padding-bottom: 40px;
    }
    
    .hero-text h1 {
        font-size: 1.7rem;
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
    }
    
    .hero-description {
        font-size: var(--text-sm);
    }
    
    .logo-animation {
        max-width: 180px;
        height: 180px;
    }
    
    .hero-logo {
        max-width: 130px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Portfolio Filters */
    .portfolio-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .portfolio-filters::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* About Stats */
    .about-stats {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    /* Pricing */
    .pricing-card {
        padding: 28px 20px;
    }
    
    .price-amount {
        font-size: 2.5rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        min-width: 260px;
    }
    
    /* FAQ */
    .faq-question h3 {
        font-size: 0.85rem;
        padding-right: 10px;
    }
    
    /* CTA */
    .cta {
        padding: 40px 16px;
        border-radius: var(--radius-lg);
    }
    
    .cta h2 {
        font-size: 1.4rem;
    }
    
    /* Contact Form */
    .form-group input,
    .form-group textarea {
        padding: 14px 16px;
    }
    
    /* Chatbot */
    .chatbot-window {
        width: calc(100vw - 40px);
        max-width: 300px;
        left: -10px;
    }
    
    /* Footer */
    footer {
        padding: 40px 0 0;
    }
    
    .footer-logo {
        width: 40px;
        height: 40px;
    }
    
    .footer-logo-text {
        font-size: var(--text-xl);
    }
}

/* ==================== VERY SMALL MOBILE (≤380px) ==================== */
@media (max-width: 380px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-buttons .btn {
        font-size: 0.8rem;
        padding: 12px 20px;
    }
    
    .service-icon {
        width: 48px;
        height: 48px;
        font-size: var(--text-lg);
    }
    
    .service-card h3 {
        font-size: var(--text-base);
    }
    
    .pricing-card {
        padding: 24px 16px;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .contact-card {
        flex-direction: column;
        text-align: center;
    }
    
    .testimonial-card {
        min-width: 240px;
        padding: 20px;
    }
}

/* ==================== HEIGHT-BASED RESPONSIVE ==================== */
@media (max-height: 700px) {
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 40px;
    }
    
    .logo-animation {
        max-width: 200px;
        height: 200px;
    }
}

/* ==================== DARK MODE PREFERENCE ==================== */
@media (prefers-color-scheme: light) {
    /* System preference handled by JS dark mode toggle */
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    header,
    .whatsapp-float,
    .back-to-top,
    .dark-mode-toggle,
    .ai-chatbot,
    .custom-cursor,
    .cursor-follower,
    .scroll-indicator {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section-padding {
        padding: 20px 0;
    }
}