/* ========================================
   MOBILE RESPONSIVE DESIGN - VERSION 2
   Optimized for all devices
   ======================================== */

/* ===== MOBILE FIRST - BASE STYLES ===== */

/* Tablet and below (1024px) */
@media (max-width: 1024px) {
    .container {
        width: 95%;
        padding: 0 1.5rem;
    }

    /* Hero Section */
    .hero {
        height: 70vh;
        min-height: 500px;
    }

    .hero-content-section {
        padding: 5rem 0;
    }

    .hero-main-title {
        font-size: 3.5rem;
    }

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

    /* Stats Grid */
    .hero-stats-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* About Section */
    .about-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-text-block {
        position: relative;
        top: 0;
    }

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

    .modal-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .modal-main-card {
        position: relative;
        top: 0;
        height: 400px;
    }

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

/* ===== MOBILE (768px and below) ===== */
@media (max-width: 768px) {
    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    /* Navigation */
    .navbar {
        width: calc(100% - 20px);
        top: 10px;
        padding: 0.5rem 1rem;
        border-radius: 8px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        gap: 1.5rem;
        border-radius: 0 0 12px 12px;
    }

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

    .nav-menu a {
        font-size: 1.1rem;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    /* Hero Section */
    .hero {
        height: 60vh;
        min-height: 450px;
    }

    .hero-text-overlay h1 {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }

    .hero-text-overlay .subtitle {
        font-size: 0.6rem;
    }

    /* Hero Content */
    .hero-content-section {
        padding: 4rem 0;
    }

    .hero-main-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        padding: 1.2rem 2rem;
        font-size: 0.95rem;
    }

    /* Stats Cards - Single Column */
    .hero-stats-modern {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100%;
    }

    .stat-card {
        padding: 2rem 1.5rem;
    }

    .stat-number-modern {
        font-size: 3rem;
    }

    .stat-label-modern {
        font-size: 0.65rem;
    }

    /* Section Headers */
    .section-title {
        font-size: 2rem;
    }

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

    /* About Section */
    .about {
        padding: 4rem 0;
    }

    .about-text-block p {
        font-size: 1rem;
        line-height: 1.8;
    }

    .about-feature-card {
        padding: 1.5rem;
    }

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

    .about-feature-card h4 {
        font-size: 1rem;
    }

    /* Services Section */
    .services {
        padding: 4rem 0;
    }

    .service-card {
        height: 400px;
    }

    .service-number {
        font-size: 4rem;
        top: 1.5rem;
        right: 1.5rem;
    }

    .service-content {
        padding: 2rem;
    }

    .service-content h3 {
        font-size: 1.6rem;
    }

    /* Services Modal - Full Screen Mobile */
    .services-modal {
        padding: 1rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }

    .modal-content {
        margin: 2rem auto;
    }

    .modal-main-card {
        height: 300px;
    }

    .modal-subcategories h2 {
        font-size: 2rem;
    }

    .modal-subcategories h4 {
        font-size: 0.85rem;
        margin-bottom: 2rem;
    }

    .subcategory-card {
        height: 280px;
    }

    .subcategory-card h5 {
        font-size: 1.3rem;
    }

    /* Projects Section - Mobile Optimized */
    .projects {
        padding: 4rem 0;
    }

    .projects-collage {
        column-count: 1;
        gap: 0.8rem;
    }

    .project-card {
        height: 350px !important;
        margin-bottom: 0.8rem;
    }

    .project-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-category {
        font-size: 0.7rem;
    }

    .project-overlay h3 {
        font-size: 1.4rem;
    }

    .project-overlay p {
        font-size: 0.85rem;
    }

    /* Testimonials */
    .testimonials {
        padding: 4rem 0;
    }

    .testimonials-slider {
        min-height: 250px;
    }

    .testimonial-card {
        padding: 2rem;
    }

    .quote-icon {
        font-size: 3rem;
    }

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

    .testimonial-author {
        margin-top: 1.5rem;
    }

    /* Contact Section */
    .contact {
        padding: 4rem 0;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .form-group input,
    .form-group textarea {
        font-size: 1rem;
        padding: 1rem;
    }

    .submit-btn {
        width: 100%;
        padding: 1.2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-col h4 {
        font-size: 1.1rem;
    }
}

/* ===== SMALL MOBILE (480px and below) ===== */
@media (max-width: 480px) {
    /* Navigation */
    .logo {
        font-size: 0.9rem;
        gap: 6px;
    }

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

    /* Hero */
    .hero {
        height: 50vh;
        min-height: 400px;
    }

    .hero-text-overlay h1 {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

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

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

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

    /* Stats */
    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-number-modern {
        font-size: 2.5rem;
    }

    .stat-label-modern {
        font-size: 0.6rem;
        letter-spacing: 1.5px;
    }

    /* Section Spacing */
    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

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

    .section-tag {
        font-size: 0.75rem;
    }

    /* About */
    .about-text-block p {
        font-size: 0.95rem;
    }

    .about-feature-card {
        padding: 1.2rem;
    }

    .about-feature-card h4 {
        font-size: 0.95rem;
    }

    .about-feature-card p {
        font-size: 0.8rem;
    }

    /* Services */
    .service-card {
        height: 350px;
    }

    .service-content h3 {
        font-size: 1.4rem;
    }

    .service-content p {
        font-size: 0.85rem;
    }

    /* Modal */
    .modal-subcategories h2 {
        font-size: 1.6rem;
    }

    .subcategory-card {
        height: 250px;
    }

    .subcategory-card h5 {
        font-size: 1.1rem;
    }

    .subcategory-card p {
        font-size: 0.8rem;
    }

    /* Projects */
    .project-card {
        height: 300px !important;
    }

    .project-overlay h3 {
        font-size: 1.2rem;
    }

    /* Contact */
    .contact-info-item {
        padding: 1rem;
    }

    .contact-info-item h4 {
        font-size: 0.95rem;
    }

    .contact-info-item p {
        font-size: 0.85rem;
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 100vh;
    }

    .hero-content-section {
        padding: 3rem 0;
    }

    .hero-stats-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-number-modern {
        font-size: 2.5rem;
    }
}

/* ===== TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    .nav-menu a,
    .service-link,
    .project-link {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects, show directly */
    .project-overlay {
        opacity: 1;
    }

    .service-card .service-link {
        opacity: 1;
        transform: translateX(0);
    }

    /* Better spacing for fingers */
    .nav-menu {
        gap: 2rem;
    }

    .hero-buttons {
        gap: 1.2rem;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .hamburger,
    .hero-buttons,
    .contact-form,
    footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

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