/* ===================================================
   COMPREHENSIVE RESPONSIVE FIXES
   For All Devices: 320px, 375px, 425px, 768px, 1024px, 1440px
   =================================================== */

/* ===== NAVBAR Z-INDEX FIX ===== */
.navbar {
    z-index: 9999 !important; /* Higher than hero content */
}

.hero-section {
    z-index: 1;
}

.hero-content {
    z-index: 2;
}

/* Fix nav overlap on screens below 1370px */
@media (max-width: 1370px) {
    .navbar {
        z-index: 10000 !important;
    }
    
    .hero-section {
        padding-top: 100px;
    }
    
    .hero-content {
        position: relative;
        z-index: 2;
    }
}

/* ===== EXTRA LARGE DESKTOP (1440px and above) ===== */
@media (min-width: 1441px) {
    .container {
        max-width: 1320px;
    }
}

/* ===== LARGE DESKTOP (1370px - 1440px) ===== */
@media (max-width: 1440px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1370px) {
    .navbar {
        z-index: 10001 !important;
        position: fixed !important;
    }
    
    .hero-section {
        padding-top: 120px;
    }
}

/* ===== DESKTOP/LAPTOP (1024px - 1370px) ===== */
@media (max-width: 1024px) {
    /* Container */
    .container {
        padding: 0 30px;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1rem;
        max-width: 600px;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Why Choose Section */
    .why-choose-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .why-choose .why-choose-content .section-badge,
    .why-choose .why-choose-content .section-title,
    .why-choose .why-choose-content .section-description {
        text-align: center;
    }
    
    .features-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .why-choose-image {
        display: none;
    }
    
    .image-placeholder {
        height: 400px;
    }
    
    .floating-card {
        display: none; /* Hide floating cards on medium screens */
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tech Grid */
    .tech-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    /* Footer */
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* About Page */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-img-placeholder {
        height: 400px;
    }
    
    /* Mission Vision */
    .mv-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Values Grid */
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Founder Section */
    .founder-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .founder-image {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .founder-social {
        justify-content: center;
    }
    
    .founder-divider {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===== TABLET LANDSCAPE (768px - 1023px) ===== */
@media (max-width: 968px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s;
        overflow-y: auto;
        z-index: 9998;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .btn-nav {
        display: none;
    }
    
    .nav-wrapper {
        padding: 0.8rem 0;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 80vh;
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    /* Portfolio */
    .portfolio-grid {
        /*grid-template-columns: 1fr;*/
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Tech Stack */
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    /* Testimonials */
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
    
    /* CTA */
    .cta-section {
        padding: 60px 20px;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: row;
    }
    
    /* Footer */
    .footer-top {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Service Detail */
    .service-detail-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem;
    }
    
    .service-detail-icon {
        margin: 0 auto;
    }
    
    .service-detail-features {
        grid-template-columns: 1fr;
    }
    
    /* Process Timeline */
    .process-step {
        grid-template-columns: 80px 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .step-number {
        width: 80px;
        height: 80px;
        font-size: 24px;
    }
    
    .process-step:not(:last-child)::after {
        left: 40px;
        height: calc(100% + 40px);
    }
    
    /* FAQ */
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    /* Form Row */
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== TABLET PORTRAIT (768px) ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    /* Hero */
    .hero-badge {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .mv-grid {
        grid-template-columns: 1fr;
    }
    
    .typed-text {
        display: block;
        min-width: auto;
    }
    
    /* Trusted Section */
    .trusted-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Tech Grid */
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    /* Values Grid */
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Page Hero */
    .page-hero {
        min-height: 350px;
        padding: 100px 0 60px;
    }
    
    .page-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .page-hero-content p {
        font-size: 1.1rem;
    }
    
    /* Founder Stats */
    .founder-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===== MOBILE LANDSCAPE (425px - 767px) ===== */
@media (max-width: 640px) {
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        gap: 0.6rem;
        margin-bottom: 2rem;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-item p {
        font-size: 0.85rem;
    }

    /* Sections */
    section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-description {
        font-size: 0.95rem;
    }
    
    /* Trusted Section */
    .trusted-section {
        padding: 40px 0;
    }
    
    .trusted-logos {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .logo-item {
        font-size: 1rem;
    }
    
    /* Service Cards */
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }
    
    .why-choose .why-choose-content .section-badge,
    .why-choose .why-choose-content .section-title,
    .why-choose .why-choose-content .section-description {
        text-align: left;
    }

    /* Features List */
    .features-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .feature-content h4 {
        font-size: 1rem;
    }
    
    .feature-content p {
        font-size: 0.9rem;
    }
    
    /* Tech Grid */
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .tech-item {
        padding: 1.5rem 1rem;
    }
    
    .tech-item i {
        font-size: 2.5rem;
    }
    
    .tech-item p {
        font-size: 0.85rem;
    }
    
    /* Portfolio */
    .portfolio-card {
        margin-bottom: 1rem;
    }
    
    .portfolio-image {
        height: 180px;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-text {
        font-size: 0.9rem;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 50px 15px;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 50px 0 20px;
    }
    
    .footer-logo {
        font-size: 1.3rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* About Page */
    .about-img-placeholder {
        height: 300px;
    }
    
    .about-content p {
        font-size: 0.95rem;
    }
    
    /* Mission Vision */
    .mv-card {
        padding: 30px 20px;
    }
    
    .mv-icon {
        width: 60px;
        height: 60px;
    }
    
    .mv-icon i {
        font-size: 28px;
    }
    
    .mv-card h3 {
        font-size: 22px;
    }
    
    /* Values */
    .value-card {
        padding: 10px 10px;
    }
    
    .value-icon {
        font-size: 36px;
    }
    
    .value-card h3 {
        font-size: 18px;
    }
    
    /* Team Card */
    .team-img-placeholder {
        width: 120px;
        height: 120px;
    }
    
    .team-img-placeholder i {
        font-size: 50px;
    }
    
    .team-card h3 {
        font-size: 20px;
    }
    
    /* Services Page */
    .service-detail-content {
        padding: 30px 20px;
    }
    
    .service-detail-icon {
        width: 100px;
        height: 100px;
    }
    
    .service-detail-icon i {
        font-size: 50px;
    }
    
    .service-detail-text h3 {
        font-size: 24px;
    }
    
    /* Process */
    .process-step {
        grid-template-columns: 60px 1fr;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
    
    .step-content {
        padding: 20px;
    }
    
    .step-content h3 {
        font-size: 18px;
    }
    
    .process-step:not(:last-child)::after {
        left: 30px;
        height: calc(100% + 30px);
    }
    
    /* Contact Page */
    .contact-info-section {
        padding: 30px 20px;
    }
    
    .contact-info-section h2 {
        font-size: 24px;
    }
    
    .contact-info-item {
        padding: 20px;
        gap: 15px;
    }
    
    .contact-info-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-info-icon i {
        font-size: 20px;
    }
    
    .form-wrapper {
        padding: 30px 20px;
    }
    
    .form-wrapper h2 {
        font-size: 24px;
    }
    
    .map-container {
        height: 350px;
    }
    
    /* Page Hero */
    .page-hero {
        min-height: 300px;
        padding: 80px 0 50px;
    }
    
    .page-hero-content h1 {
        font-size: 2rem;
    }
    
    .page-hero-content p {
        font-size: 1rem;
    }
    
    /* FAQ */
    .faq-item {
        padding: 20px 15px;
    }
    
    .faq-question h4 {
        font-size: 16px;
    }
    
    .faq-question i {
        font-size: 20px;
    }
    
    .faq-item p {
        font-size: 14px;
        padding-left: 35px;
    }
    
    /* Founder Section */
    .founder-section {
        padding: 60px 0;
    }
    
    .founder-card {
        padding: 30px 20px;
    }
    
    .founder-image {
        max-width: 250px;
    }
    
    .founder-img-placeholder i {
        font-size: 80px;
    }
    
    .founder-badge {
        width: 70px;
        height: 70px;
    }
    
    .founder-badge i {
        font-size: 24px;
    }
    
    .founder-info h3 {
        font-size: 24px;
    }
    
    .founder-title {
        font-size: 16px;
    }
    
    .founder-bio {
        font-size: 14px;
    }
    
    .founder-stat-number {
        font-size: 28px;
    }
    
    .founder-social-link {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* ===== MOBILE (425px) ===== */
@media (max-width: 425px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-buttons .btn {
        font-size: 0.85rem;
        padding: 10px 20px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-card h3 {
        font-size: 1.1rem;
    }
    
    .cta-content h2 {
        font-size: 1.6rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .founder-image {
        max-width: 220px;
    }
    
    .page-hero-content h1 {
        font-size: 1.8rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== MOBILE (375px) ===== */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .feature-item {
        gap: 1rem;
    }
    
    .tech-item {
        padding: 1rem;
    }
    
    .tech-item i {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .cta-content p {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .founder-card {
        padding: 25px 15px;
    }
    
    .page-hero-content h1 {
        font-size: 1.6rem;
    }
    
    .page-hero-content p {
        font-size: 0.9rem;
    }
}

/* ===== SMALL MOBILE (320px) ===== */
@media (max-width: 320px) {
    .hero-section {
        padding-top: 70px;
    }
    
    .hero-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
    }
    
    .hero-badge {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .hero-buttons .btn {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .stat-item p {
        font-size: 0.75rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .section-description {
        font-size: 0.85rem;
    }
    
    .trusted-logos {
        gap: 0.8rem;
    }
    
    .logo-item {
        font-size: 0.85rem;
    }
    
    .service-card {
        padding: 1.2rem;
    }
    
    .service-card h3 {
        font-size: 1rem;
    }
    
    .service-card p {
        font-size: 0.85rem;
    }
    
    .feature-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .feature-content h4 {
        font-size: 0.9rem;
    }
    
    .feature-content p {
        font-size: 0.8rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .tech-item {
        padding: 0.8rem;
    }
    
    .tech-item i {
        font-size: 1.8rem;
    }
    
    .tech-item p {
        font-size: 0.75rem;
    }
    
    .portfolio-image {
        height: 150px;
    }
    
    .portfolio-info h3 {
        font-size: 1rem;
    }
    
    .portfolio-info p {
        font-size: 0.85rem;
    }
    
    .testimonial-card {
        padding: 1.2rem;
    }
    
    .testimonial-text {
        font-size: 0.85rem;
    }
    
    .author-info h4 {
        font-size: 0.9rem;
    }
    
    .author-info p {
        font-size: 0.75rem;
    }
    
    .cta-section {
        padding: 40px 15px;
    }
    
    .cta-content h2 {
        font-size: 1.3rem;
    }
    
    .cta-content p {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    
    .footer-logo {
        font-size: 1.1rem;
    }
    
    .footer-description {
        font-size: 0.85rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }
    
    .footer-col h4 {
        font-size: 1rem;
    }
    
    .footer-links,
    .footer-contact {
        font-size: 0.85rem;
    }
    
    /* About Page */
    .about-img-placeholder {
        height: 250px;
    }
    
    .mv-card {
        padding: 25px 15px;
    }
    
    .mv-card h3 {
        font-size: 20px;
    }
    
    .value-card {
        padding: 25px 15px;
    }
    
    .value-icon {
        font-size: 32px;
    }
    
    .value-card h3 {
        font-size: 16px;
    }
    
    .team-card {
        padding: 20px 15px;
    }
    
    .team-img-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .team-img-placeholder i {
        font-size: 40px;
    }
    
    .team-card h3 {
        font-size: 18px;
    }
    
    /* Services Page */
    .service-detail-icon {
        width: 80px;
        height: 80px;
    }
    
    .service-detail-icon i {
        font-size: 40px;
    }
    
    .service-detail-text h3 {
        font-size: 20px;
    }
    
    .service-detail-text p {
        font-size: 0.85rem;
    }
    
    /* Contact Page */
    .contact-info-section {
        padding: 25px 15px;
    }
    
    .contact-info-section h2 {
        font-size: 20px;
    }
    
    .contact-info-item {
        padding: 15px;
    }
    
    .form-wrapper {
        padding: 25px 15px;
    }
    
    .form-wrapper h2 {
        font-size: 20px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* Page Hero */
    .page-hero {
        min-height: 250px;
        padding: 70px 0 40px;
    }
    
    .page-hero-content h1 {
        font-size: 1.4rem;
    }
    
    .page-hero-content p {
        font-size: 0.85rem;
    }
    
    /* Founder Section */
    .founder-image {
        max-width: 180px;
    }
    
    .founder-img-placeholder i {
        font-size: 60px;
    }
    
    .founder-badge {
        width: 60px;
        height: 60px;
    }
    
    .founder-badge i {
        font-size: 20px;
    }
    
    .founder-info h3 {
        font-size: 20px;
    }
    
    .founder-title {
        font-size: 14px;
    }
    
    .founder-bio {
        font-size: 13px;
    }
    
    .founder-stat-number {
        font-size: 24px;
    }
    
    .founder-stat-label {
        font-size: 12px;
    }
}

/* ===== UTILITY FIXES ===== */

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Image responsiveness */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Button responsiveness */
.btn {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .btn {
        white-space: normal;
        text-align: center;
    }
}

/* Fix for long text overflow */
h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Grid responsiveness fix */
@media (max-width: 640px) {
    .services-grid,
    .portfolio-grid,
    .testimonials-slider {
        grid-template-columns: 1fr !important;
    }
}

/* Form elements on small screens */
@media (max-width: 425px) {
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Safe area for notched devices */
@supports (padding: env(safe-area-inset-left)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* Touch target size for mobile */
@media (max-width: 640px) {
    a, button, .btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ===== END OF RESPONSIVE FIXES ===== */