/* ============================================
   MR Digital Solutions - Responsive Styles
   Mobile-First Approach
   ============================================ */

/* --- Tablet (max-width: 1024px) --- */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        order: 2;
    }

    .hero-badge {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-name {
        font-size: clamp(2.2rem, 6vw, 3.2rem);
    }

    .hero-typewriter {
        justify-content: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image-col {
        display: flex;
        justify-content: center;
    }

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

    .skills-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .cursor-glow {
        display: none;
    }
}

/* --- Mobile Large (max-width: 768px) --- */
@media (max-width: 768px) {
    :root {
        --section-padding: 64px 0;
        --nav-height: 64px;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: var(--bg-nav);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transform: translateX(100%);
        transition: transform var(--transition-smooth);
        border-top: 1px solid var(--border-color);
    }

    [dir="rtl"] .nav-menu {
        transform: translateX(-100%);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 14px 28px;
    }

    .nav-hamburger {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-height) + 40px);
        padding-bottom: 80px;
    }

    .hero-name {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .hero-typewriter {
        font-size: 1.1rem;
        flex-wrap: wrap;
    }

    .hero-stats {
        gap: 20px;
    }

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

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

    .hero-scroll {
        display: none;
    }

    .section-title {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }

    .section-header {
        margin-bottom: 40px;
    }

    .about-image-frame {
        width: 240px;
        height: 240px;
    }

    .about-info-grid {
        grid-template-columns: 1fr;
    }

    .about-subtitle {
        font-size: 1.3rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 28px 22px;
    }

    .portfolio-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 16px;
        font-size: 0.82rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        padding: 32px 24px;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .contact-info-col h3 {
        font-size: 1.5rem;
    }

    .contact-form {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .contact-socials {
        justify-content: center;
    }

    /* RTL mobile adjustments */
    [dir="rtl"] .about-experience-badge {
        left: auto;
        right: -10px;
    }
}

/* --- Mobile Small (max-width: 480px) --- */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .hero-code-block {
        font-size: 0.75rem;
    }

    .code-content {
        padding: 14px;
        font-size: 0.72rem;
    }

    .about-image-frame {
        width: 200px;
        height: 200px;
    }

    .exp-number {
        font-size: 1.4rem;
    }

    .about-float-icon {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .service-number {
        font-size: 2rem;
    }

    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }

    .testimonial-author h4 {
        text-align: center;
    }

    [dir="rtl"] .testimonial-author h4 {
        text-align: center;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
    }

    [dir="rtl"] .back-to-top {
        right: auto;
        left: 20px;
    }
}

/* --- Large Desktop (min-width: 1400px) --- */
@media (min-width: 1400px) {
    :root {
        --container-width: 1320px;
    }

    .hero-name {
        font-size: 4.5rem;
    }

    .hero-description {
        font-size: 1.15rem;
    }
}

/* --- Print Styles --- */
@media print {
    .navbar,
    .hero-bg-effects,
    .back-to-top,
    .preloader,
    .cursor-glow,
    .nav-actions {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .section {
        padding: 30px 0;
        page-break-inside: avoid;
    }
}