/* ============================================
   MOBILE RESPONSIVE STYLES - FIXED VERSION
   ============================================ */

/* Global Mobile Fixes - Prevent Horizontal Scroll */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

section {
    overflow-x: hidden;
}

/* Tablet and Below (1024px) */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .services-container,
    .about-content {
        flex-direction: column;
    }

    .services-image,
    .about-visual {
        width: 100%;
        height: 400px;
    }

    .about-text h2 {
        font-size: 4rem;
    }

    .project-grid {
        flex-direction: column;
    }

    .project-column,
    .column-center,
    .column-right {
        margin-top: 0;
    }

    .testimonial-header-container {
        flex-direction: column;
        gap: 40px;
    }

    .testimonial-image-placeholder {
        width: 100%;
        height: 400px;
    }

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

/* Mobile Styles (768px and below) */
@media (max-width: 768px) {

    /* Navigation */
    .navbar {
        padding: 20px;
        width: 100%;
    }

    .nav-links,
    .nav-cta {
        display: none;
    }

    /* Hero Section */
    .hero {
        padding-top: 80px;
        min-height: 100vh;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 2.8rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .hero-content p br {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
        align-items: center;
    }

    .hero-buttons .btn-outline {
        width: auto;
        min-width: 220px;
        max-width: 280px;
        justify-content: center;
        padding: 12px 20px;
    }

    .scroll-indicator {
        display: none;
    }

    /* Logo Marquee - Fix overflow */
    .logo-marquee {
        width: 100%;
        overflow: hidden;
    }

    /* Projects Section - 2 Column Grid on Mobile */
    .projects {
        padding: 60px 20px;
        width: 100%;
    }

    .project-feature {
        display: block;
        margin-bottom: 30px;
        border-radius: 16px;
        overflow: hidden;
        height: 360px;
        position: relative;
    }

    .project-feature img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .project-feature .center-pill {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .project-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        width: 100%;
    }

    .project-column {
        display: contents;
    }

    .project-card,
    .project-card.tall {
        height: 200px;
        border-radius: 10px;
        width: 100%;
    }

    /* Hide About Us hero-card on mobile */
    .project-card.hero-card {
        display: none;
    }

    .center-pill {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .btn-glass-sm {
        font-size: 0.75rem;
        padding: 8px 16px;
    }

    /* Project Info Overlay - Mobile Fix */
    .project-info {
        padding: 15px;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .project-title {
        font-size: 1rem;
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .project-description {
        font-size: 0.75rem;
        line-height: 1.4;
        max-width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .close-project-info {
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }

    .projects-footer {
        flex-direction: column;
        gap: 20px;
        margin-top: 40px;
    }

    .projects-footer .btn-outline,
    .projects-footer .link-underline {
        width: 100%;
        text-align: center;
        display: block;
    }

    /* Services Section - Image First on Mobile */
    .services {
        padding: 60px 20px;
        width: 100%;
    }

    .services-container {
        gap: 30px;
        display: flex;
        flex-direction: column;
    }

    .services-image {
        order: -1;
        height: 250px;
        width: 100%;
    }

    .services-text h2 {
        font-size: 2.5rem;
    }

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

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

    .service-buttons .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .service-cards {
        flex-direction: column;
        width: 100%;
    }

    .service-card {
        width: 100%;
    }

    /* About Section - Image First on Mobile */
    .about-section {
        padding: 60px 20px;
        width: 100%;
    }

    .about-content {
        gap: 30px;
        display: flex;
        flex-direction: column;
    }

    .about-visual {
        order: -1;
        height: 300px;
        width: 100%;
    }

    .about-text h2 {
        font-size: 2.5rem !important;
    }

    .about-text p {
        font-size: 0.95rem !important;
    }

    .about-tags {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
        width: 100%;
    }

    .about-tags .tag {
        font-size: 0.75rem;
        padding: 6px 12px;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .exp-item {
        flex-direction: column;
        gap: 10px;
        padding: 18px 0 18px 18px;
        position: relative;
    }

    .experience-list {
        padding: 0;
        background: transparent;
        border: none;
        gap: 0;
    }

    .exp-item {
        width: 100%;
        background: transparent;
        border-radius: 0;
        margin-bottom: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .exp-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 14px;
        bottom: 14px;
        width: 2px;
        border-radius: 999px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
        opacity: 0.7;
    }

    .exp-item::after {
        content: '';
        position: absolute;
        left: -4px;
        top: 14px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.85);
        box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
    }

    .exp-item:last-child {
        border-bottom: none;
    }

    .exp-item h4 {
        font-size: 1.1rem;
        letter-spacing: 0.02em;
    }

    .exp-item span {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.75);
    }

    .exp-company {
        text-align: left;
    }

    /* Testimonials - Image First on Mobile */
    .testimonials {
        padding: 60px 20px;
        gap: 50px;
        width: 100%;
    }

    .testimonial-header-container {
        gap: 30px;
        display: flex;
        flex-direction: column;
    }

    .testimonial-image-placeholder {
        order: -1;
        height: 250px;
        width: 100%;
    }

    .testimonial-header {
        padding-left: 0;
    }

    .testimonial-header h2 {
        font-size: 2.2rem;
    }

    .testimonial-header p {
        font-size: 0.95rem;
    }

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

    .testimonial-buttons .btn-outline {
        width: 100%;
        text-align: center;
    }

    .testimonial-card {
        width: 280px;
        height: 320px;
        padding: 25px;
    }

    .client-info h3 {
        font-size: 1.2rem;
    }

    .client-info span {
        font-size: 0.95rem;
    }

    .testimonial-card p {
        font-size: 1rem;
    }

    .testimonial-grid {
        width: 100%;
    }

    .testimonial-grid::before,
    .testimonial-grid::after {
        width: 50px;
    }

    /* Contact Section */
    .contact-section {
        padding: 60px 20px;
        width: 100%;
    }

    .contact-card {
        padding: 30px 20px;
        gap: 30px;
        width: 100%;
    }

    .contact-intro h2 {
        font-size: 2rem;
    }

    .contact-intro p {
        font-size: 1rem;
    }

    .contact-link {
        font-size: 0.9rem;
        padding: 10px 14px;
    }

    /* Stats Section */
    .stats {
        padding: 40px 20px;
        width: 100%;
    }

    .stats-card {
        flex-direction: column;
        padding: 40px 30px;
        gap: 30px;
        width: 100%;
    }

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

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

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

    /* CTA Section */
    .cta-section {
        padding: 60px 20px;
        width: 100%;
    }

    .cta-content h2 {
        font-size: 2rem;
        margin: 20px 0 30px;
    }

    .cta-links {
        margin-top: 40px;
        font-size: 1.2rem;
    }

    /* FAQ Section */
    .faq {
        padding: 60px 20px;
        width: 100%;
    }

    .faq-container {
        flex-direction: column;
        gap: 40px;
    }

    .faq-text h2 {
        font-size: 2.5rem;
    }

    .faq-text p {
        font-size: 1rem;
    }

    .faq-image {
        height: 250px;
        margin-top: 20px;
        width: 100%;
    }

    .faq-question {
        font-size: 1rem;
        padding: 18px;
    }

    .faq-answer {
        padding: 0 18px;
    }

    .faq-answer p {
        font-size: 0.9rem;
    }

    .faq-item.active .faq-answer {
        padding-bottom: 18px;
    }

    /* Footer */
    .footer {
        padding: 30px 20px;
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        font-size: 0.85rem;
    }
}

/* Extra Small Devices (480px and below) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .project-card,
    .project-card.tall,
    .project-card.hero-card {
        height: 180px;
    }

    .about-tags {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }

    .about-tags .tag {
        font-size: 0.7rem;
        padding: 6px 10px;
    }

    .about-text h2 {
        font-size: 2rem !important;
    }

    .testimonial-header h2 {
        font-size: 1.8rem;
    }

    .services-text h2,
    .faq-text h2 {
        font-size: 2rem;
    }
}