/* 
   Media Junkie - Custom Responsive Fixes 
   Ensures optimal display across Mobile, Tablet, and Desktop
*/

/* =========================================
   1. Global Typography Scaling
   ========================================= */
@media (max-width: 991px) {
    h1, .banner-area-global h1 {
        font-size: 2.5rem !important;
    }
    h2, .section-title .title {
        font-size: 2rem !important;
    }
    .banner-inner .subtitle, 
    .section-title .sub-title {
        font-size: 14px !important;
        letter-spacing: 2px !important;
    }
}

@media (max-width: 575px) {
    h1, .banner-area-global h1 {
        font-size: 2rem !important;
    }
    h2, .section-title .title {
        font-size: 1.75rem !important;
    }
    p, .content {
        font-size: 15px !important;
    }
}

/* =========================================
   2. Container & Layout Optimizations
   ========================================= */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
}

@media (max-width: 991px) {
    /* Fix Padding inconsistencies */
    .pd-top-120 { padding-top: 80px !important; }
    .pd-bottom-100 { padding-bottom: 60px !important; }
    .pd-top-100 { padding-top: 60px !important; }
    .pd-bottom-90 { padding-bottom: 50px !important; }

    /* Fix Custom Service Cards Layout */
    .service-slide-item {
        margin-bottom: 20px;
    }
}

/* =========================================
   3. Custom Component Fixes
   ========================================= */

/* Project Cards Responsive - reset fixed height on mobile */
@media (max-width: 767px) {
    .project-card-image {
        height: 200px !important;
    }
    .project-card-content {
        padding: 20px !important;
    }
}

/* Testimonial Cards */
@media (max-width: 767px) {
    .testimonial-card {
        padding: 20px !important; 
        margin-bottom: 15px;
    }
    .testimonial-text {
        font-size: 15px !important;
    }
}

/* Breadcrumb / Banner */
@media (max-width: 767px) {
    .breadcrumb-area-global {
        padding: 80px 0 60px !important;
    }
    .breadcrumb-area-global::before {
        background-size: 50% !important; /* Visual cleanup */
    }
}

/* =========================================
   4. Chatbot Mobile Optimization
   ========================================= */
/* Tablet Tweaks */
@media (min-width: 481px) and (max-width: 991px) {
    .chat-window {
        right: 20px;
        bottom: 100px;
        height: 500px;
        width: 350px;
    }
    .chat-fab {
        right: 20px;
        bottom: 25px;
    }
}

/* Mobile Tweaks (Refining existing base style) */
@media (max-width: 480px) {
    .chat-window {
        height: 60vh !important; /* Slightly shorter to avoid keyboard issues */
        width: calc(100% - 30px) !important;
        right: 15px !important;
        bottom: 90px !important;
        border-radius: 16px !important;
    }
    
    .chat-header {
        padding: 15px !important;
    }
    
    .chat-messages {
        padding: 15px !important;
    }
    
    /* Ensure chat FAB doesn't cover content */
    body {
        padding-bottom: 80px; /* safety padding for content at bottom */
    }
    
    /* Hide fancy animations on low-power mobile */
    .chat-fab::after, 
    .robot-antenna::after {
        animation: none !important;
        box-shadow: none !important;
    }
}

/* =========================================
   5. Navigation & Header
   ========================================= */
@media (max-width: 991px) {
    /* Fix sticky header overlapping content on mobile */
    body {
        padding-top: 0; 
    }
    
    .navbar-area .navbar-collapse {
        background: #fff;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border-radius: 0 0 16px 16px;
    }
    
    .navbar-area .nav-container .navbar-collapse .navbar-nav > li {
        border-bottom: 1px solid #f0f0f5;
    }
    
    .navbar-area .nav-container .navbar-collapse .navbar-nav > li:last-child {
        border-bottom: none;
    }
}

/* =========================================
   6. Footer Enhancements
   ========================================= */
@media (max-width: 767px) {
    .footer-area {
        text-align: center;
    }
    
    .footer-widget .widget_title::before {
        left: 50% !important;
        transform: translateX(-50%);
    }
    
    .footer-widget .widget_about p {
        padding-right: 0 !important;
    }
    
    .social-media {
        justify-content: center;
        margin-bottom: 20px;
    }
}
