/* Mobile Interface Fixes */
/* This file contains additional fixes for mobile interface issues */

/* Fix mobile menu toggler positioning and appearance */
@media (max-width: 991.98px) {
  .navbar-toggler {
    position: relative !important;
    z-index: 1001 !important;
    margin-right: 0 !important;
    border: 2px solid rgba(255,255,255,0.4) !important;
    border-radius: 6px !important;
    background-color: rgba(255,255,255,0.1) !important;
    transition: all 0.3s ease !important;
  }
  
  .navbar-toggler:hover,
  .navbar-toggler:focus {
    border-color: rgba(255,255,255,0.7) !important;
    background-color: rgba(255,255,255,0.2) !important;
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25) !important;
  }
  
  .navbar-toggler.active {
    border-color: var(--color-tertiary) !important;
    background-color: rgba(255,218,0,0.2) !important;
  }
  
  /* Ensure navbar toggler doesn't overflow */
  .navbar .container {
    position: relative;
    overflow: visible;
  }
  
  /* Better mobile menu appearance */
  .navbar-collapse {
    background: rgba(0,0,0,0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
    margin-top: 1rem !important;
    padding: 1.5rem 1rem !important;
    z-index: 1000 !important;
    position: relative !important;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
  }
  
  .navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1) !important;
    transform: translateX(5px) !important;
  }
}

/* Fix review cards overlapping in mobile */
@media (max-width: 767.98px) {
  .reviews-section {
    overflow: hidden !important;
  }
  
  .reviews-section .row {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
  }
  
  .reviews-section .col-lg-6,
  .reviews-section .col-12 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-bottom: 2.5rem !important;
    clear: both !important;
    float: none !important;
  }
  
  .reviews-section .review-card {
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    clear: both !important;
    display: block !important;
  }
  
  /* Ensure the last review card has proper spacing */
  .reviews-section .col-12:last-child {
    margin-bottom: 4rem !important;
  }
}

/* Additional fixes for very small screens */
@media (max-width: 575.98px) {
  /* Prevent horizontal scrolling */
  body {
    overflow-x: hidden !important;
  }
  
  .container-fluid,
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  /* Fix navbar brand text overflow */
  .navbar-brand {
    font-size: 1rem !important;
    max-width: 180px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  
  /* Better hero section on small screens */
  .hero-content {
    padding: 1rem !important;
    text-align: center !important;
  }
  
  .hero-section {
    padding: 2rem 0 !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  /* Ensure all images are responsive */
  img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Fix service cards */
  .service-card,
  .price-card,
  .feature-item,
  .case-study-item,
  .process-item {
    margin-bottom: 2rem !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    z-index: auto !important;
  }
  
  /* Better spacing for sections */
  .section {
    padding: 3rem 0 !important;
    position: relative !important;
    z-index: auto !important;
  }
  
  /* Fix table responsiveness if any */
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* Fix for landscape orientation on phones */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: 100vh !important;
    padding: 1rem 0 !important;
  }
  
  .hero-content {
    padding-top: 1rem !important;
  }
  
  .section {
    padding: 2rem 0 !important;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .navbar-nav .nav-link:hover {
    transform: none !important;
  }
  
  .navbar-toggler {
    transition: none !important;
  }
}

/* Dark mode support preparation */
@media (prefers-color-scheme: dark) {
  .navbar-toggler {
    border-color: rgba(255,255,255,0.6) !important;
  }
  
  .navbar-collapse {
    background: rgba(255,255,255,0.1) !important;
  }
}

/* Z-index fixes to prevent element overlap */
.navbar {
  z-index: 1030 !important;
}

.navbar-toggler {
  z-index: 1031 !important;
}

.navbar-collapse {
  z-index: 1025 !important;
}

/* Ensure sections don't overlap */
.section {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

/* Fix for parallax elements that might overflow */
.hero-section::before {
  z-index: 0 !important;
}

.hero-content {
  z-index: 2 !important;
  position: relative !important;
}

/* Back to top button should be on top */
.back-to-top {
  z-index: 1040 !important;
}

/* Review cards proper stacking */
.review-card {
  position: relative !important;
  z-index: auto !important;
}

.review-card::before {
  z-index: 1 !important;
}

/* Team social links positioning */
.social-link {
  z-index: auto !important;
}

.social-link::before {
  z-index: 1 !important;
}

/* Process items numbering */
.process-item::before {
  z-index: 2 !important;
}

/* Cookie banner should be on top of everything */
.cookie-banner,
.cookie-modal {
  z-index: 10000 !important;
}

/* Ensure content doesn't get cut off */
@media (max-width: 991.98px) {
  .container {
    overflow: visible !important;
  }
  
  .row {
    overflow: visible !important;
  }
  
  .col,
  [class*="col-"] {
    overflow: visible !important;
  }
}

/* Sal.js fixes - ensure elements are always visible */
[data-sal] {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Override sal.js hiding behavior for images */
img[data-sal],
.hero-image[data-sal],
.team-member img[data-sal],
.service-card img[data-sal] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  display: block !important;
}

/* Fallback for when sal.js doesn't load */
.no-js [data-sal],
[data-sal]:not(.sal-animate) {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* Ensure text content is always visible */
[data-sal] h1,
[data-sal] h2,
[data-sal] h3,
[data-sal] h4,
[data-sal] h5,
[data-sal] h6,
[data-sal] p,
[data-sal] span,
[data-sal] div {
  opacity: 1 !important;
  visibility: visible !important;
} 