/* ========================================= 
   MOBILE FIXES FOR TOURS PAGE
   File: css/tours-mobile.css
========================================= */

@media screen and (max-width: 768px) {
  /* Fix body and main container overflow */
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  main {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  /* Fix hero section */
  .service-hero {
    padding: 40px 0 20px !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  
  .service-hero .container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .service-hero h1 {
    font-size: 28px !important;
    line-height: 1.3 !important;
    padding: 0 10px !important;
    margin-bottom: 15px !important;
  }
  
  .service-hero .subtitle {
    font-size: 16px !important;
    line-height: 1.5 !important;
    padding: 0 15px !important;
    margin-bottom: 20px !important;
    max-width: 100% !important;
  }
  
  /* Fix hero image container */
  .hero-image-container {
    width: 100vw !important;
    margin: 20px 0 0 !important;
    height: 250px !important;
    position: relative !important;
    left: 0 !important;
    transform: none !important;
  }
  
  #pano-banner {
    width: 100% !important;
    height: 100% !important;
  }
  
  /* Fix overview section */
  .tours-overview-section {
    padding: 40px 0 !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  
  .tours-overview-section .container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Fix service container */
  .service-container {
    padding: 20px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix service header */
  .service-header {
    flex-direction: column !important;
    text-align: center !important;
    margin-bottom: 15px !important;
  }
  
  .service-header h2 {
    font-size: 24px !important;
    margin-bottom: 0 !important;
  }
  
  .service-icon-large {
    width: 50px !important;
    height: 50px !important;
    font-size: 24px !important;
    margin-bottom: 10px !important;
  }
  
  /* Fix content grid */
  .tours-content-grid {
    display: block !important;
    margin-bottom: 20px !important;
  }
  
  .tours-text-content,
  .tours-image-content {
    width: 100% !important;
    min-width: unset !important;
    margin-bottom: 20px !important;
  }
  
  .tours-text-content p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
  }
  
  /* Fix all images */
  .service-image {
    margin: 15px 0 !important;
    max-height: 250px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  .service-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 250px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 8px !important;
  }
  
  /* Fix features section */
  .tours-features-section {
    padding: 40px 0 !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  
  .tours-features-section .container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Fix service grid */
  .service-grid {
    display: block !important;
    width: 100% !important;
  }
  
  .service-feature {
    margin-bottom: 20px !important;
    padding: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .service-feature h3 {
    font-size: 18px !important;
  }
  
  .service-feature p {
    font-size: 14px !important;
  }
  
  .feature-icon {
    width: 35px !important;
    height: 35px !important;
    font-size: 16px !important;
  }
  
  /* Fix stats container */
  .stats-container {
    margin-top: 30px !important;
    padding: 30px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .stats-title {
    font-size: 24px !important;
    margin-bottom: 15px !important;
  }
  
  .stats-subtitle {
    font-size: 16px !important;
    margin-bottom: 30px !important;
  }
  
  .stats-grid {
    display: block !important;
    width: 100% !important;
  }
  
  .stat-item {
    width: 100% !important;
    margin-bottom: 25px !important;
    padding: 0 !important;
    text-align: center !important;
  }
  
  .counter-number {
    font-size: 36px !important;
    margin-bottom: 10px !important;
  }
  
  .stat-item p {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }
  
  /* Fix applications section */
  .tours-applications-section {
    padding: 40px 0 !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  
  .tours-applications-section .container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Fix portfolio section */
  .featured-tours-section {
    padding: 40px 0 20px !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  
  .featured-tours-section .container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .tours-description {
    padding: 0 10px !important;
    margin-bottom: 30px !important;
    font-size: 15px !important;
  }
  
  .portfolio-grid {
    display: block !important;
    width: 100% !important;
    margin-top: 20px !important;
    padding: 0 !important;
  }
  
  .portfolio-item {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 20px 0 !important;
    box-sizing: border-box !important;
  }
  
  .portfolio-image {
    height: 200px !important;
    width: 100% !important;
  }
  
  .portfolio-info {
    padding: 20px 15px !important;
  }
  
  .portfolio-info h3 {
    font-size: 18px !important;
    margin-bottom: 8px !important;
  }
  
  .portfolio-info p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  
  /* Fix CTA section */
  .cta-section {
    padding: 30px 0 !important;
    text-align: center !important;
  }
  
  .cta-section .cta-button {
    display: inline-block !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
  }
  
  /* Fix CTA banner */
  .cta-banner {
    padding: 30px 15px !important;
    width: 100% !important;
  }
  
  .cta-banner h2 {
    font-size: 20px !important;
    line-height: 1.3 !important;
    padding: 0 10px !important;
  }
  
  /* Fix footer */
  footer {
    width: 100% !important;
    overflow: hidden !important;
  }
  
  footer .container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Ensure all sections stay within viewport */
  section {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  
  /* Fix any absolute positioned elements */
  *[style*="position: absolute"] {
    position: relative !important;
  }
  
  /* Remove any negative margins */
  * {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Fix container widths */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
  }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
  .service-hero h1 {
    font-size: 24px !important;
  }
  
  .service-hero .subtitle {
    font-size: 14px !important;
  }
  
  .section-title {
    font-size: 22px !important;
  }
  
  .subtitle {
    font-size: 14px !important;
  }
  
  .service-container {
    padding: 15px !important;
  }
  
  .stats-title {
    font-size: 20px !important;
  }
  
  .counter-number {
    font-size: 32px !important;
  }
  
  .hero-image-container {
    height: 200px !important;
  }
}

/* Landscape mobile fix */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .hero-image-container {
    height: 200px !important;
  }
  
  .service-hero {
    padding: 30px 0 15px !important;
    
  }
}