/**
 * Mobile Responsive Enhancements
 * Proper support for all devices including iPhone, Android, tablets
 */

/* ════════════════════════════════════════════════════════════
   Global Mobile Fixes
════════════════════════════════════════════════════════════ */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal scroll on mobile */
body, html {
    overflow-x: hidden;
    width: 100%;
}

.container-fluid {
    overflow-x: hidden;
}

/* ════════════════════════════════════════════════════════════
   Responsive Images
════════════════════════════════════════════════════════════ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ════════════════════════════════════════════════════════════
   Mobile Navigation Fixes
════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    /* Top Bar Mobile */
    .top-bar-fusion {
        font-size: 0.75rem;
        padding: 8px 0;
    }

    .top-bar-fusion .container-fluid {
        flex-wrap: wrap;
    }

    .top-bar-fusion .d-flex {
        gap: 10px;
    }

    .top-bar-link {
        font-size: 0.7rem;
        gap: 4px;
    }

    .top-bar-link i {
        font-size: 0.8rem;
    }

    .top-bar-social {
        gap: 8px;
    }

    .top-social-icon {
        font-size: 0.85rem;
    }

    /* Navbar Mobile */
    .navbar-fusion {
        padding: 0.75rem 0;
    }

    .navbar-brand img {
        height: 50px !important;
        max-width: 180px;
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        background: var(--primary-color);
        border-radius: 8px;
    }

    .navbar-toggler-icon {
        width: 22px;
        height: 22px;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* Mobile Menu Dropdown */
    .navbar-collapse {
        background: var(--headerbackground);
        padding: 20px 15px;
        margin-top: 15px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .nav-link {
        padding: 12px 15px !important;
        margin: 5px 0;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .nav-link::after {
        display: none;
    }
}

/* ════════════════════════════════════════════════════════════
   Hero Section Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .hero-section-custom {
        margin-top: -75px !important;
    }

    .carousel-item-custom {
        height: 60vh;
        min-height: 450px;
    }

    .carousel-overlay-custom {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
    }

    .carousel-content-custom {
        text-align: center;
        padding: 0 20px;
    }

    .hero-overlay-card {
        text-align: center;
    }

    .hero-overlay-card h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
        margin-bottom: 20px !important;
        letter-spacing: 0.5px !important;
    }

    .hero-btn-cyan {
        padding: 12px 28px !important;
        font-size: 0.85rem !important;
        letter-spacing: 1.5px !important;
    }

    .carousel-control-custom {
        width: 10%;
    }

    .carousel-control-icon-custom i {
        font-size: 2rem !important;
    }

    .hero-wave-container {
        height: 35px;
    }
}

@media (max-width: 575.98px) {
    .carousel-item-custom {
        height: 50vh;
        min-height: 400px;
    }

    .hero-overlay-card h1 {
        font-size: clamp(1.5rem, 4.5vw, 2rem) !important;
    }

    .hero-btn-cyan {
        padding: 10px 24px !important;
        font-size: 0.8rem !important;
    }

    .hero-wave-container {
        height: 25px;
    }
}

/* ════════════════════════════════════════════════════════════
   About Section Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .mtt-about-section .row {
        flex-direction: column-reverse;
    }

    .mtt-about-left-inner {
        padding: 40px 20px !important;
    }

    .mtt-about-heading {
        font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
        margin-bottom: 15px !important;
    }

    .mtt-about-subtitle {
        font-size: 1rem !important;
        margin-bottom: 12px !important;
    }

    .mtt-about-desc {
        font-size: 0.9rem !important;
        margin-bottom: 25px !important;
    }

    .mtt-counter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .mtt-counter-card {
        padding: 18px 16px 14px;
    }

    .mtt-counter-icon {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .mtt-counter-icon img {
        width: 35px;
        height: 35px;
    }

    .mtt-counter-number {
        font-size: 2rem;
    }

    .mtt-counter-label {
        font-size: 0.85rem;
    }

    .mtt-about-right {
        min-height: 300px;
    }

    .mtt-about-img-bar {
        width: 5px;
        height: 45%;
    }
}

@media (max-width: 575.98px) {
    .mtt-about-left-inner {
        padding: 30px 15px !important;
    }

    .mtt-counter-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mtt-counter-card {
        flex-direction: row;
        gap: 12px;
        padding: 15px;
        align-items: center;
    }

    .mtt-counter-icon {
        margin-bottom: 0;
    }

    .mtt-counter-number {
        font-size: 1.75rem;
    }

    .mtt-about-right {
        min-height: 250px;
    }

    .mtt-about-img-bar {
        display: none;
    }
}

/* ════════════════════════════════════════════════════════════
   Products Section Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .mtt-products-section {
        padding: 50px 0 60px;
    }

    .mtt-prod-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 30px;
    }

    .mtt-prod-title {
        font-size: clamp(1.5rem, 3vw, 2rem) !important;
    }

    .mtt-prod-viewall {
        font-size: 0.75rem;
        padding: 7px 18px;
    }

    .mtt-prod-card {
        flex-direction: column;
        min-height: unset;
        margin-bottom: 20px;
    }

    .mtt-prod-card-body {
        padding: 20px;
    }

    .mtt-prod-name {
        font-size: 1.1rem !important;
    }

    .mtt-prod-desc {
        font-size: 0.82rem;
    }

    .mtt-prod-btn {
        font-size: 0.75rem;
        padding: 10px 20px;
    }

    .mtt-prod-card-img {
        width: 100%;
        clip-path: none;
        padding: 20px;
    }

    .mtt-prod-card-img img {
        height: 220px;
    }
}

@media (max-width: 575.98px) {
    .mtt-products-section {
        padding: 40px 0 50px;
    }

    .mtt-prod-card-body {
        padding: 15px;
    }

    .mtt-prod-card-img {
        padding: 15px;
    }

    .mtt-prod-card-img img {
        height: 180px;
    }
}

/* ════════════════════════════════════════════════════════════
   Category Cards Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .modern-category-card {
        padding: 20px;
    }

    .modern-category-card img {
        height: 150px;
    }

    .modern-category-card h4 {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 575.98px) {
    .modern-category-card {
        padding: 15px;
    }

    .modern-category-card img {
        height: 120px;
    }

    .modern-category-card h4 {
        font-size: 1rem !important;
    }
}

/* ════════════════════════════════════════════════════════════
   Product Cards Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .modern-product-card {
        margin-bottom: 20px;
    }

    .product-img-wrapper {
        height: 220px;
    }

    .product-info {
        padding: 20px;
    }

    .product-info h4 {
        font-size: 1.1rem !important;
    }

    .product-cat-name {
        font-size: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .product-img-wrapper {
        height: 180px;
    }

    .product-info {
        padding: 15px;
    }

    .product-badge {
        font-size: 0.7rem;
        padding: 4px 12px;
    }
}

/* ════════════════════════════════════════════════════════════
   Blog Cards Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .blog-img-wrapper {
        height: 200px;
    }

    .blog-body {
        padding: 20px;
    }

    .blog-body h4 {
        font-size: 1.2rem !important;
    }

    .blog-body p {
        font-size: 0.9rem;
    }

    .blog-date-badge {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* ════════════════════════════════════════════════════════════
   Team Cards Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .modern-team-card {
        padding: 25px;
        margin-bottom: 20px;
    }

    .team-img-wrapper {
        width: 120px;
        margin-bottom: 15px;
    }

    .modern-team-card h4 {
        font-size: 1.15rem !important;
    }

    .modern-team-card p {
        font-size: 0.88rem;
    }
}

/* ════════════════════════════════════════════════════════════
   Testimonial Cards Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .testimonial-card-modern {
        padding: 25px 20px;
        margin-bottom: 20px;
    }

    .testimonial-quote-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .testimonial-text {
        font-size: 0.9rem;
    }

    .testimonial-name {
        font-size: 1rem;
    }
}

/* ════════════════════════════════════════════════════════════
   FAQ Section Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .faq-title-modern {
        font-size: 1.75rem;
        margin-bottom: 30px;
    }

    .faq-outer-container {
        padding: 20px;
    }

    .faq-item-modern {
        margin-bottom: 12px !important;
    }

    .faq-button-modern,
    .faq-item-modern .accordion-button,
    #accordionFAQ .accordion-button {
        font-size: 1rem !important;
        padding: 15px 18px !important;
    }

    .faq-body-modern {
        padding: 0 18px 20px !important;
        font-size: 0.92rem;
    }
}

/* ════════════════════════════════════════════════════════════
   Gallery Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .gallery-card-img {
        height: 200px;
    }

    .gallery-card-content h5 {
        font-size: 0.88rem !important;
    }

    .gallery-carousel .owl-nav button {
        width: 40px;
        height: 40px;
        margin: 0 -5px !important;
    }

    .gallery-carousel .owl-nav button i {
        font-size: 16px;
    }
}

/* ════════════════════════════════════════════════════════════
   Footer Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .footer {
        padding: 40px 0 20px;
        text-align: center;
    }

    .footer .row > div {
        margin-bottom: 30px;
    }

    .footer h5 {
        font-size: 1.1rem !important;
        margin-bottom: 15px !important;
    }

    .footer-link {
        font-size: 0.9rem;
        text-align: center;
        margin-bottom: 8px;
    }

    .social-icon {
        margin: 5px;
    }
}

/* ════════════════════════════════════════════════════════════
   Sidebar Social Icons - Hide on Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .sticky-icon {
        display: none !important;
    }
}

/* ════════════════════════════════════════════════════════════
   Mobile Bottom Navigation Improvements
════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 70px !important;
    }

    .mobile-bottom-nav {
        height: 70px;
        padding: 5px 0;
        padding-bottom: max(5px, env(safe-area-inset-bottom));
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
    }

    .nav-item-mobile {
        padding: 8px 5px;
    }

    .nav-item-mobile i {
        font-size: 1.4rem;
        margin-bottom: 3px;
    }

    .nav-item-mobile span {
        font-size: 0.68rem;
        font-weight: 600;
    }

    .nav-item-mobile:active {
        transform: scale(0.95);
    }

    .back-to-top {
        bottom: 85px !important;
        right: 20px !important;
        width: 48px !important;
        height: 48px !important;
        z-index: 1040 !important;
    }

    .back-to-top i {
        font-size: 1.1rem;
        line-height: 48px !important;
    }
}

/* ════════════════════════════════════════════════════════════
   Floating Contact Panel Mobile Fix
════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .fcp-floating-panel {
        display: none !important;
    }
}

/* ════════════════════════════════════════════════════════════
   Preloader Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 575.98px) {
    .animation-preloader .spinner {
        height: 80px;
        width: 80px;
        border-width: 2px;
        margin-bottom: 20px;
    }

    .animation-preloader .spinner::before {
        height: 68px;
        width: 68px;
        border-width: 2px;
    }

    .animation-preloader .spinner::after {
        height: 56px;
        width: 56px;
        border-width: 2px;
    }

    .txt-loading .letters-loading {
        font-size: 1rem !important;
        letter-spacing: 0.02em !important;
    }

    .animation-preloader p {
        font-size: 0.7rem;
        letter-spacing: 0.4em;
    }
}

/* ════════════════════════════════════════════════════════════
   Section Padding Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .container-fluid.py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .container.py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    section.py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}

@media (max-width: 575.98px) {
    .container-fluid.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .container.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    section.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* ════════════════════════════════════════════════════════════
   Typography Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.3rem !important;
    }

    h4 {
        font-size: 1.15rem !important;
    }

    h5 {
        font-size: 1rem !important;
    }

    p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

@media (max-width: 575.98px) {
    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.35rem !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    p {
        font-size: 0.88rem;
    }
}

/* ════════════════════════════════════════════════════════════
   Buttons Mobile
════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .btn-fusion {
        padding: 10px 24px;
        font-size: 0.88rem;
    }

    .btn-lg {
        padding: 12px 28px !important;
        font-size: 0.95rem !important;
    }
}

@media (max-width: 575.98px) {
    .btn-fusion {
        padding: 9px 20px;
        font-size: 0.85rem;
    }

    .btn-lg {
        padding: 10px 24px !important;
        font-size: 0.9rem !important;
    }
}

/* ════════════════════════════════════════════════════════════
   Touch Improvements
════════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
    /* Better touch targets */
    .btn,
    .nav-link,
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Remove hover effects on touch devices */
    .glass-card:hover {
        transform: none;
    }

    .modern-team-card:hover,
    .modern-category-card:hover,
    .modern-product-card:hover {
        transform: none;
    }
}

/* ════════════════════════════════════════════════════════════
   Safe Area Insets for iPhone X and later
════════════════════════════════════════════════════════════ */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    .mobile-bottom-nav {
        padding-bottom: max(5px, env(safe-area-inset-bottom));
    }

    .container-fluid,
    .container {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
}

/* ════════════════════════════════════════════════════════════
   Landscape Orientation Fixes
════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) and (orientation: landscape) {
    .carousel-item-custom {
        height: 80vh;
        min-height: 400px;
    }

    .mobile-bottom-nav {
        height: 60px;
    }

    .nav-item-mobile i {
        font-size: 1.2rem;
    }

    .nav-item-mobile span {
        font-size: 0.65rem;
    }

    body {
        padding-bottom: 65px !important;
    }
}

/* ════════════════════════════════════════════════════════════
   Print Styles
════════════════════════════════════════════════════════════ */
@media print {
    .mobile-bottom-nav,
    .back-to-top,
    .navbar-toggler,
    .sticky-icon,
    .fcp-floating-panel {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}
