/* Mobile Optimization CSS - UV-Technik */

/* Enhanced Mobile Viewport and Base Styles */
@media (max-width: 767px) {

  /* Base body and container improvements */
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Header and Navigation Mobile Optimization */
  .main-navigation-wrapper {
    position: relative;
  }
  
  .top-navigation {
    padding: 8px 0;
  }
  
  .top-navigation-content {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  
  .phone-wrapper {
    font-size: 12px;
  }
  
  .language-wrapper {
    margin-left: auto;
  }
  
  /* Logo optimization for mobile */
  .header__logo {
    padding: 10px 0;
  }
  
  .logo {
    height: 40px !important;
    width: auto !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
  }
  
  /* Hamburger menu improvements */
  .hamburger {
    width: 40px;
    height: 40px;
    padding: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    position: relative;
    z-index: 1001;
  }
  
  .hamburger span,
  .hamburger span:before,
  .hamburger span:after {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
  }
  
  .hamburger span:before,
  .hamburger span:after {
    content: '';
    position: absolute;
  }
  
  .hamburger span:before {
    top: -8px;
  }
  
  .hamburger span:after {
    bottom: -8px;
  }
  
  /* Mobile menu optimization */
  #mobile-mmenu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  
  #mobile-mmenu.active {
    left: 0;
  }
  
  #mobile-mmenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  #mobile-mmenu > ul > li {
    border-bottom: 1px solid #eee;
  }
  
  #mobile-mmenu > ul > li > a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
  }
  
  #mobile-mmenu > ul > li > a:hover,
  #mobile-mmenu > ul > li > a:focus {
    background: #f5f5f5;
  }
  
  #mobile-mmenu ul ul {
    background: #f9f9f9;
  }
  
  #mobile-mmenu ul ul li a {
    padding: 12px 20px 12px 40px;
    font-size: 13px;
    color: #666;
  }
  
  /* Home stage mobile optimization */
  .home-stage {
    flex-direction: column;
    height: auto;
    min-height: 60vh;
  }
  
  .home-stage .left-side,
  .home-stage .right-side {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .home-stage .col-xs-6.col-sm-4 {
    width: 100%;
  }
  
  .home-stage .item {
    margin-bottom: 15px;
  }
  
  .home-stage .small-image {
    height: 150px;
    min-height: 150px;
  }
  
  /* Video container mobile optimization */
  .big-video {
    position: relative;
    height: 250px;
    overflow: hidden;
  }
  
  .big-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .slogan-wrapper {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    text-align: center;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 15px;
    border-radius: 5px;
  }
  
  .top-slogan {
    font-size: 18px;
    margin-bottom: 5px;
  }
  
  .sub-slogan {
    font-size: 14px;
  }
  
  /* Content and text optimization */
  .main-content {
    padding: 20px 0;
  }
  
  .main-content h1 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 20px;
  }
  
  .main-content h2 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 15px;
  }
  
  .main-content p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
  }
  
  /* Form optimization for mobile */
  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px 15px;
    border-radius: 5px;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 16px;
    min-height: 44px; /* Apple's recommended touch target size */
    border-radius: 5px;
  }
  
  /* Search form mobile optimization */
  .mobile-search-form {
    padding: 15px 0;
  }
  
  .mobile-search-form .form-control {
    margin-bottom: 10px;
  }
  
  /* Footer optimization */
  footer {
    margin-top: 40px;
  }
  
  .footer-top .col-md-4 {
    width: 100%;
    margin-bottom: 30px;
  }
  
  .footer-top .head {
    font-size: 16px;
    padding: 15px 0;
    display: block;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
  }
  
  .footer-top ul {
    padding-left: 0;
  }
  
  .footer-top ul li {
    margin-bottom: 8px;
  }
  
  .footer-top ul li a {
    font-size: 14px;
    padding: 8px 0;
    display: block;
  }
  
  /* Good reasons section mobile */
  .good-reasons {
    padding: 40px 0;
    text-align: center;
  }
  
  .good-reasons .headline {
    font-size: 20px;
    margin-bottom: 30px;
  }
  
  .reasons-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .reasons-items span {
    font-size: 16px;
    padding: 15px;
    background: rgba(255,255,255,0.9);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  /* Hide desktop-only elements on mobile */
  .scroll-down-link {
    display: none !important;
  }
  
  /* Overlay content mobile optimization */
  .overlay-content {
    padding: 15px;
  }
  
  .overlay-content .headline {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .overlay-content .btn {
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* Tablet optimization (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  
  .container {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .home-stage .col-xs-3.col-sm-4 {
    width: 50%;
  }
  
  .home-stage .col-xs-6.col-sm-4 {
    width: 100%;
  }
  
  .main-content h1 {
    font-size: 28px;
  }
  
  .main-content h2 {
    font-size: 22px;
  }
  
  .footer-top .col-md-4 {
    width: 50%;
    margin-bottom: 20px;
  }
}

/* Touch interface improvements for all mobile devices */
@media (max-width: 991px) {
  
  /* Ensure all interactive elements are touch-friendly */
  a, button, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Specific touch target improvements */
  .btn, .button, button {
    min-height: 48px;
    padding: 12px 20px;
    font-size: 16px;
    touch-action: manipulation;
    user-select: none;
  }
  
  /* Form elements optimization */
  input[type="text"], 
  input[type="email"], 
  input[type="tel"], 
  textarea, 
  select {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px; /* Prevent iOS zoom */
    border-radius: 8px;
    border: 2px solid #ddd;
    touch-action: manipulation;
  }
  
  /* Input focus state for better UX */
  input:focus, 
  textarea:focus, 
  select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
  }
  
  /* Navigation touch improvements */
  nav a, 
  .nav-link {
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 6px;
    transition: all 0.2s ease;
  }
  
  nav a:active, 
  .nav-link:active {
    transform: scale(0.98);
    background-color: rgba(0, 0, 0, 0.05);
  }
  
  /* Increase spacing between interactive elements */
  nav ul li {
    margin-bottom: 8px;
  }
  
  /* Card and content area touch improvements */
  .card, .content-block {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
  }
  
  /* Icon touch targets */
  .icon, [class*="icon-"] {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
  }
  
  /* Improve readability */
  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    line-height: 1.6;
  }
  
  /* Link spacing for touch */
  a {
    padding: 8px;
    margin: 2px;
    border-radius: 4px;
  }
  
  /* Prevent accidental touches */
  .overlay-content .btn,
  .product-card .btn {
    margin-top: 8px;
    margin-bottom: 8px;
  }
}
  
  /* Optimize images */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Background image optimization for mobile */
  .small-image,
  .big-image {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }
  
  /* Lazy loading support */
  img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  img[data-src].loaded {
    opacity: 1;
  }
  
  /* Responsive background images using data attributes */
  [data-mobile-bg] {
    background-image: attr(data-mobile-bg url) !important;
  }
  
  /* Remove hover effects on touch devices */
  .no-touch a:hover,
  .no-touch button:hover {
    /* Keep hover effects only for non-touch devices */
  }
}

/* Landscape orientation optimization for phones */
@media (max-width: 767px) and (orientation: landscape) {
  .home-stage {
    min-height: 40vh;
  }
  
  .big-video {
    height: 200px;
  }
  
  .slogan-wrapper {
    padding: 10px;
  }
  
  .top-slogan {
    font-size: 16px;
  }
  
  .sub-slogan {
    font-size: 12px;
  }
}

/* Loading and performance improvements */
@media (max-width: 767px) {
  
  /* Optimize animations for mobile */
  * {
    animation-duration: 0.3s !important;
    transition-duration: 0.3s !important;
  }
  
  /* Reduce motion for users who prefer it */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation: none !important;
      transition: none !important;
    }
  }
}