/* COMPREHENSIVE TABLET MODE RESPONSIVE FIXES - ALL SECTIONS */
/* Add this to your existing mobile-emergency-fix.css file */

/* TABLET SPECIFIC BREAKPOINT (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    
    /* HEADER SPACING FIX FOR TABLET */
    .header .container {
        padding: 0 30px !important; /* Fix right side spacing */
        max-width: 100% !important;
    }
    
    .nav {
        margin-right: 20px !important; /* Ensure spacing from right edge */
    }
    
    /* HERO SECTION FIX */
    .hero {
        min-height: 100vh !important;
        padding: 80px 20px 50px !important;
    }
    
    .hero-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px !important;
    }
    
    .hero-text h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        text-align: center !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-text p {
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
        max-width: 80% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .cta-button {
        font-size: 1.1rem !important;
        padding: 15px 30px !important;
        display: block !important;
        margin: 0 auto !important;
        width: auto !important;
        min-width: 160px !important;
    }
    
    /* SERVICES SECTION FIX */
    .services {
        padding: 60px 0 !important;
    }
    
    .services .container {
        max-width: 95% !important;
        padding: 0 20px !important;
    }
    
    .services h2 {
        font-size: 2.2rem !important;
        text-align: center !important;
        margin-bottom: 3rem !important;
    }
    
    .services-container {
        flex-direction: row !important;
        gap: 30px !important;
    }
    
    .services-nav {
        width: 300px !important;
        flex-shrink: 0 !important;
    }
    
    .service-nav-item {
        width: 100% !important;
        margin-bottom: 10px !important;
        padding: 15px !important;
    }
    
    .services-content {
        flex: 1 !important;
        width: auto !important;
    }
    
    .service-content.active {
        flex-direction: row !important;
        gap: 30px !important;
    }
    
    .service-content-left {
        flex: 1 !important;
        width: auto !important;
    }
    
    .service-content-right {
        width: 300px !important;
        flex-shrink: 0 !important;
    }
    
    /* MOBILE SHOWCASE SECTION FIX */
    .mobile-showcase {
        padding: 40px 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .mobile-container {
        position: static !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .mobile-image {
        max-width: 300px !important;
        height: auto !important;
        width: auto !important;
    }
    
    /* ABOUT SECTION FIX */
    .about {
        padding: 60px 0 !important;
        overflow: visible !important;
    }
    
    .about .container {
        max-width: 95% !important;
        padding: 0 20px !important;
    }
    
    .about-content {
        padding: 0 20px !important;
        max-width: 800px !important;
        margin: 0 auto !important;
    }
    
    .about-text h2 {
        font-size: 2.2rem !important;
        line-height: 1.3 !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
    }
    
    .about-text p {
        font-size: 1.1rem !important;
        line-height: 1.7 !important;
        text-align: center !important;
    }
    
    /* PARTNERSHIP SECTION FIX */
    .partnership {
        padding: 60px 0 !important;
        overflow: visible !important;
    }
    
    .partnership .container {
        max-width: 95% !important;
        padding: 0 20px !important;
    }
    
    .partnership-content {
        flex-direction: row !important;
        gap: 40px !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: left !important;
        max-width: 900px !important;
        margin: 0 auto !important;
    }
    
    .partnership-text {
        flex: 1 !important;
        margin-right: 0 !important;
    }
    
    .partnership-text h2 {
        font-size: 2.2rem !important;
        margin-bottom: 1rem !important;
        text-align: left !important;
    }
    
    .partnership-text p {
        font-size: 1.1rem !important;
        text-align: left !important;
    }
    
    .partnership-badge {
        flex-shrink: 0 !important;
        margin-left: 0 !important;
    }
    
    .partnership-badge img {
        width: 200px !important;
        height: auto !important;
    }
    
    /* PORTFOLIO SECTION FIX */
    .portfolio {
        padding: 60px 0 80px !important; /* Increased bottom padding */
        height: auto !important;
        overflow: visible !important;
        margin-bottom: 40px !important;
    }
    
    .portfolio .container {
        max-width: 95% !important;
        padding: 0 20px !important;
    }
    
    .portfolio h2 {
        font-size: 2.2rem !important;
        margin-bottom: 3rem !important;
        text-align: center !important;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 25px !important;
        max-width: 900px !important;
        margin: 0 auto !important;
    }
    
    .portfolio-item {
        padding: 15px !important;
        margin: 0 !important;
        max-width: none !important;
    }
    
    .portfolio-image {
        height: 180px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        margin-bottom: 15px !important;
    }
    
    .portfolio-item h3 {
        font-size: 1rem !important;
        text-align: center !important;
        margin: 0 !important;
    }
    
    .portfolio-dots {
        text-align: center !important;
        margin-top: 30px !important;
    }
    
    /* CONSULTATION SECTION FIX */
    .consultation {
        padding: 60px 0 80px !important; /* Increased bottom padding to prevent cutting */
        overflow: visible !important;
        margin-bottom: 40px !important;
    }
    
    .consultation .container {
        max-width: 95% !important;
        padding: 0 20px !important;
    }
    
    .consultation h2 {
        font-size: 2.2rem !important;
        text-align: center !important;
        margin-bottom: 3rem !important;
    }
    
    .consultation-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 30px !important;
        max-width: 900px !important;
        margin: 0 auto !important;
    }
    
    .consultation-card {
        min-height: 450px !important; /* Ensure cards aren't cut off */
        padding: 30px 25px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        overflow: visible !important;
    }
    
    .consultation-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        margin-bottom: 20px !important;
    }
    
    .consultation-card h3 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        flex: 1 !important;
        max-width: 60% !important;
    }
    
    .consultation-icon,
    .consultation-icon2 {
        width: 70px !important;
        height: 70px !important;
        flex-shrink: 0 !important;
        margin-left: 15px !important;
    }
    
    .consultation-icon img,
    .consultation-icon2 img {
        width: 35px !important;
        height: 35px !important;
    }
    
    .consultation-card p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 20px !important;
    }
    
    .consultation-card ul {
        margin-bottom: 25px !important;
    }
    
    .consultation-card ul li {
        font-size: 0.9rem !important;
        margin-bottom: 8px !important;
        line-height: 1.4 !important;
    }
    
    .book-btn {
        padding: 12px 25px !important;
        font-size: 1rem !important;
        margin-top: auto !important;
        min-height: 45px !important;
        width: 100% !important;
    }
    
    /* CONTACT SECTION FIX */
    .contact-location {
        padding: 60px 0 80px !important;
        overflow: visible !important;
        margin-bottom: 40px !important;
    }
    
    .contact-location .container {
        max-width: 95% !important;
        padding: 0 20px !important;
    }
    
    .contact-location h2 {
        font-size: 2.2rem !important;
        margin-bottom: 3rem !important;
        text-align: center !important;
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr !important;
        gap: 30px !important;
        max-width: 1000px !important;
        margin: 0 auto !important;
        height: auto !important;
    }
    
    .contact-info {
        padding: 30px 25px !important;
        min-height: auto !important;
    }
    
    .contact-list li {
        margin-bottom: 15px !important;
        align-items: flex-start !important;
    }
    
    .contact-details .value {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
    
    .location-icons {
        margin-top: 20px !important;
        justify-content: flex-start !important;
        gap: 15px !important;
    }
    
    .location-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    .map-container {
        min-height: 350px !important;
        height: 350px !important;
    }
    
    .map-container iframe {
        height: 350px !important;
        min-height: 350px !important;
    }
    
    /* CTA FOOTER WRAPPER FIX */
    .cta-footer-wrapper {
        margin-top: 60px !important;
        overflow: visible !important;
        min-height: auto !important;
    }
    
    /* CTA SECTION FIX */
    .cta-section {
        padding: 60px 0 40px !important;
        text-align: center !important;
        overflow: visible !important;
    }
    
    .cta-section .container {
        max-width: 95% !important;
        padding: 0 20px !important;
    }
    
    .cta-section h2 {
        font-size: 2.5rem !important;
        margin-bottom: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .email-form {
        flex-direction: row !important;
        gap: 15px !important;
        margin-bottom: 2rem !important;
        width: 100% !important;
        max-width: 400px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        justify-content: center !important;
    }
    
    .email-input {
        flex: 1 !important;
        max-width: 300px !important;
        text-align: left !important;
        padding: 12px 15px !important;
        font-size: 1rem !important;
    }
    
    .submit-btn {
        position: static !important;
        width: 50px !important;
        height: 50px !important;
        flex-shrink: 0 !important;
    }
    
    .social-icons {
        position: static !important;
        justify-content: center !important;
        margin-top: 30px !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
    }
    
    .social-icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;
    }
    
    .line,
    .line2 {
        width: 90% !important;
        margin: 0 auto !important;
        position: relative !important;
        top: 0 !important;
    }
    
    /* FOOTER FIX */
    .footer {
        padding: 40px 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .footer .container {
        max-width: 95% !important;
        padding: 0 20px !important;
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 30px !important;
        text-align: left !important;
        position: relative !important;
        top: 0 !important;
    }
    
    .logo2 {
        justify-content: flex-start !important;
        margin-bottom: 0 !important;
    }
    
    .logo2-image {
        height: 50px !important;
        width: auto !important;
    }
    
    .footer-section h4 {
        font-size: 1.1rem !important;
        margin-bottom: 15px !important;
    }
    
    .footer-section p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 10px !important;
    }
    
    .contact-info2 {
        justify-content: flex-start !important;
        gap: 10px !important;
        margin-bottom: 8px !important;
    }
    
    .contact-info2 span {
        font-size: 0.9rem !important;
    }
    
    /* PREVENT HORIZONTAL SCROLLING */
    body, html {
        overflow-x: hidden !important;
    }
    
    /* ENSURE ALL SECTIONS ARE VISIBLE */
    .services,
    .mobile-showcase,
    .about,
    .partnership,
    .portfolio,
    .consultation,
    .contact-location,
    .cta-section,
    .footer {
        overflow: visible !important;
        position: relative !important;
        z-index: 1 !important;
    }
}

/* SPECIFIC FIXES FOR iPAD AIR DIMENSIONS (820x1180) */
@media (min-width: 810px) and (max-width: 830px) and (min-height: 1170px) and (max-height: 1190px) {
    .header .container {
        padding: 0 40px !important;
    }
    
    .portfolio-grid {
        gap: 20px !important;
    }
    
    .consultation-grid {
        max-width: 750px !important;
        gap: 25px !important;
    }
    
    .consultation-card {
        min-height: 400px !important;
        padding: 25px 20px !important;
    }
    
    .contact-content {
        max-width: 750px !important;
    }
}