/* =========================================
   GEORGE tecoil - Full Mobile Responsive CSS
   Complete mobile responsiveness for entire website
   ========================================= */

/* =====================
   CSS Variables
   ===================== */
:root {
  --mobile-padding: 15px;
  --tablet-padding: 30px;
  --mobile-font-small: 14px;
  --mobile-font-base: 16px;
  --mobile-font-large: 18px;
  --mobile-font-heading: 24px;
  --brand-blue: #002d53;
  --brand-yellow: #fdc300;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* =====================
   Base Mobile Styles
   ===================== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden !important;
  width: 100% !important;
  min-height: 100vh;
}

/* Prevent any element from causing horizontal scroll */
* {
  max-width: 100vw;
}

/* =====================
   Container Responsive
   ===================== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: var(--mobile-padding);
  padding-right: var(--mobile-padding);
  box-sizing: border-box;
}

/* =====================
   Images Responsive
   ===================== */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* =====================
   TABLET STYLES (768px - 1024px)
   ===================== */
@media screen and (max-width: 1024px) {
  /* Container */
  .container {
    padding-left: var(--tablet-padding);
    padding-right: var(--tablet-padding);
  }

  /* Header */
  .header-advanced,
  .site-header {
    padding: 0;
  }

  .header-top-bar {
    display: none;
  }

  .header-main-nav {
    padding: 10px 0 !important;
  }

  .nav-content {
    height: 60px !important;
    position: relative !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .logo-advanced {
    z-index: 1002;
    position: relative;
  }

  .logo-img {
    height: 35px !important;
  }

  .logo-text {
    display: none !important;
  }

  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    transition: all var(--transition-normal);
  }

  .mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all var(--transition-normal);
  }

  .mobile-menu-toggle.active {
    background: rgba(253, 195, 0, 0.2);
    border-color: rgba(253, 195, 0, 0.5);
  }

  .mobile-menu-toggle.active span {
    background: var(--brand-yellow);
  }

  /* Navigation Menu - Hidden by default on tablet/mobile */
  .nav-menu,
  .site-nav {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 85% !important;
    max-width: 380px !important;
    height: 100vh !important;
    background: var(--brand-blue) !important;
    z-index: 999999 !important;
    padding: 80px 20px 30px !important;
    overflow-y: auto !important;
    transition: right var(--transition-normal) !important;
    display: block !important;
  }

  .nav-menu.active,
  .site-nav.active,
  .site-nav.open {
    right: 0 !important;
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
  }

  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Nav List Styles */
  .nav-list,
  .site-nav ul {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  .nav-item,
  .site-nav li {
    margin: 0 !important;
  }

  .nav-link,
  .site-nav a {
    display: flex !important;
    align-items: center !important;
    padding: 16px 20px !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    transition: all var(--transition-normal) !important;
  }

  .nav-link:hover,
  .nav-link:active,
  .site-nav a:hover {
    background: rgba(253, 195, 0, 0.15) !important;
    color: var(--brand-yellow) !important;
    transform: translateX(8px) !important;
  }

  /* Hide dropdowns on mobile */
  .dropdown-menu {
    display: none !important;
  }

  .dropdown-icon {
    display: none !important;
  }

  /* Hero Section Tablet */
  .hero-section-advanced,
  .hero,
  .hero-split {
    padding: 80px 0 60px !important;
    min-height: auto !important;
  }

  .hero-split-inner {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    padding: 40px 30px !important;
  }

  .hero-col.media {
    order: 2;
  }

  .hero-col.text,
  .hero-col:first-child {
    order: 1;
  }

  .hero-title-advanced,
  .title-yellow,
  .hero h1 {
    font-size: clamp(28px, 5vw, 40px) !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  .hero-subtitle-advanced,
  .hero .sub {
    font-size: 18px !important;
    text-align: center !important;
  }

  .hero-stats-advanced,
  .hero-stats {
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 20px;
  }

  .stat-item-advanced,
  .hero-stat {
    flex: 1 1 calc(50% - 20px);
    min-width: 140px;
    text-align: center;
  }

  .hero-cta-advanced,
  .cta-group {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  /* Sections */
  .section {
    padding: 50px 0 !important;
  }

  /* Grids */
  .feature-grid,
  .usp-grid,
  .career-grid,
  .people-grid,
  .expertise-grid,
  .service-cards-container,
  .product-lines-grid,
  .branches-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }

  .branch-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Two Column Layouts */
  .two-col,
  .section-about .two-col,
  .section-contact .two-col,
  .section-services .two-col,
  .promise-inner {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  /* Quick Navigation */
  .quick-nav-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }

  /* Contact Content */
  .contact-content-modern {
    grid-template-columns: 1fr !important;
  }

  /* Footer */
  .footer-content-grid,
  .footer-inner {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px !important;
  }

  .footer-bottom-bar {
    flex-direction: column !important;
    gap: 15px !important;
    text-align: center !important;
  }
}

/* =====================
   MOBILE STYLES (max-width: 768px)
   ===================== */
@media screen and (max-width: 768px) {
  /* Container */
  .container {
    padding-left: var(--mobile-padding) !important;
    padding-right: var(--mobile-padding) !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Prevent overflow */
  body,
  body > * {
    overflow-x: hidden !important;
  }

  /* Header */
  .header-inner {
    padding: 10px 15px !important;
  }

  .brand-logo {
    height: 32px !important;
  }

  /* Nav Toggle */
  .nav-toggle {
    display: none !important;
  }

  /* Hero Section Mobile */
  .hero-section-advanced,
  .hero,
  .hero-split {
    padding: 60px 0 40px !important;
    min-height: auto !important;
  }

  .hero-split-inner {
    padding: 30px 20px !important;
    gap: 30px !important;
  }

  .hero-inner {
    text-align: center !important;
    padding: 0 15px !important;
  }

  .hero-badge-animated {
    justify-content: center !important;
    margin-bottom: 20px !important;
  }

  .hero-title-advanced,
  .title-yellow,
  .hero h1 {
    font-size: clamp(24px, 6vw, 36px) !important;
    line-height: 1.2 !important;
    margin-bottom: 15px !important;
  }

  .hero-subtitle-advanced,
  .hero .sub {
    font-size: clamp(16px, 4vw, 20px) !important;
    margin-bottom: 20px !important;
  }

  .hero-description-advanced {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 25px !important;
  }

  /* Hero Stats */
  .hero-stats-advanced,
  .hero-stats {
    flex-direction: column !important;
    width: 100% !important;
    gap: 15px !important;
    margin-bottom: 30px !important;
  }

  .stat-item-advanced,
  .hero-stat {
    flex: 1 1 100% !important;
    text-align: center !important;
    padding: 15px !important;
    margin: 5px 0 !important;
  }

  .stat-number {
    font-size: 28px !important;
  }

  .stat-label {
    font-size: 12px !important;
  }

  /* Hero CTA Buttons */
  .hero-cta-advanced,
  .cta-group {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: center !important;
    width: 100% !important;
  }

  .cta-primary-advanced,
  .cta-secondary-advanced,
  .btn {
    width: 100% !important;
    max-width: 320px !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Hide decorative elements on mobile */
  .hero-oil-icon,
  .floating-boxes,
  .floating-stat,
  .hero-particles,
  .particle {
    display: none !important;
  }

  /* Media Cards */
  .media-card img,
  .media-card.tall img {
    height: auto !important;
    max-height: 300px !important;
  }

  /* Sections Mobile */
  .section {
    padding: 40px 0 !important;
    overflow: hidden !important;
  }

  .section-head {
    margin-bottom: 25px !important;
    text-align: center !important;
  }

  .section h2 {
    font-size: clamp(22px, 5vw, 28px) !important;
  }

  /* Grids Mobile */
  .feature-grid,
  .usp-grid,
  .career-grid,
  .people-grid,
  .expertise-grid,
  .service-cards-container,
  .product-lines-grid,
  .branches-grid,
  .section-services .service-grid,
  .chip-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .branch-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Cards */
  .expertise-card,
  .service-card-modern,
  .product-line-card,
  .branch-card-modern,
  .feature,
  .usp-card,
  .career-role,
  .service {
    padding: 20px !important;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* Quick Navigation */
  .quick-nav-modern,
  .quick-nav-section {
    padding: 30px 0 !important;
  }

  .quick-nav-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 0 15px !important;
  }

  .quick-nav-box {
    width: 100% !important;
    max-width: 100% !important;
  }

  .quick-nav-items {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .quick-nav-item {
    padding: 12px !important;
    font-size: 13px !important;
  }

  /* Contact Section */
  .quick-contact-bar {
    flex-direction: column !important;
    gap: 15px !important;
    padding: 20px 15px !important;
  }

  .contact-item {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .contact-form-modern,
  .contact-form {
    padding: 20px !important;
  }

  .form-group-modern input,
  .form-group-modern textarea,
  .form-row input,
  .form-row textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }

  /* Footer */
  .footer-content-grid,
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    text-align: center !important;
  }

  .footer-social-links {
    justify-content: center !important;
  }

  .footer-nav {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
  }

  /* Wave transitions */
  .wave-transition,
  .wave-divider {
    width: 100% !important;
    overflow: hidden !important;
  }

  .wave-transition svg {
    height: 50px !important;
  }

  /* Hide sticky contact menu on mobile */
  .sticky-contact-menu {
    display: none !important;
  }

  /* Product Page Specific */
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  .product-gallery {
    position: relative !important;
    top: auto !important;
  }

  .main-image {
    min-height: 300px !important;
    padding: 20px !important;
  }

  .thumbnail-gallery,
  .thumbnail-gallery-extended {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }

  .thumbnail img {
    height: 60px !important;
  }

  /* Product Info */
  .product-info {
    padding: 0 !important;
  }

  .product-title {
    font-size: 24px !important;
  }

  /* Tabs */
  .tabs {
    flex-wrap: wrap !important;
  }

  .tab-button {
    flex: 1 1 calc(50% - 5px) !important;
    padding: 12px !important;
    font-size: 14px !important;
  }

  /* Tables */
  .specs-table,
  table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Branchen Page */
  .branchen-hero {
    padding: 80px 20px !important;
  }

  .branchen-hero h1 {
    font-size: 28px !important;
  }

  .branchen-grid {
    grid-template-columns: 1fr !important;
  }

  /* News Page */
  .news-grid {
    grid-template-columns: 1fr !important;
  }

  /* Team Page */
  .team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .person img {
    height: 150px !important;
  }

  /* Downloads Page */
  .downloads-grid {
    grid-template-columns: 1fr !important;
  }

  /* FAQ Page */
  .faq-item {
    padding: 15px !important;
  }

  .faq-question {
    font-size: 16px !important;
  }

  /* Service Page */
  .service-grid {
    grid-template-columns: 1fr !important;
  }

  /* Referenzen Page */
  .referenzen-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Lightbox Mobile */
  .lightbox img {
    max-width: 95vw !important;
    max-height: 80vh !important;
  }

  .lightbox .close {
    top: 10px !important;
    right: 10px !important;
  }

  .lightbox .prev,
  .lightbox .next {
    width: 35px !important;
    height: 35px !important;
    font-size: 20px !important;
  }

  .lightbox .prev {
    left: 10px !important;
  }

  .lightbox .next {
    right: 10px !important;
  }
}

/* =====================
   SMALL MOBILE STYLES (max-width: 480px)
   ===================== */
@media screen and (max-width: 480px) {
  /* Container */
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Hero */
  .hero-title-advanced,
  .title-yellow,
  .hero h1 {
    font-size: clamp(20px, 5vw, 28px) !important;
  }

  .hero-subtitle-advanced,
  .hero .sub {
    font-size: clamp(14px, 4vw, 18px) !important;
  }

  /* Stats */
  .stat-number {
    font-size: 24px !important;
  }

  /* Buttons full width */
  .btn,
  .cta-button,
  .cta-primary-advanced,
  .cta-secondary-advanced {
    width: 100% !important;
    max-width: none !important;
  }

  /* Sections */
  .section {
    padding: 30px 0 !important;
  }

  .section h2 {
    font-size: 20px !important;
  }

  /* Branch Grid */
  .branch-grid {
    grid-template-columns: 1fr !important;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr !important;
  }

  /* Quick Nav Items */
  .quick-nav-items {
    grid-template-columns: 1fr !important;
  }

  /* Team Grid */
  .team-grid,
  .people-grid {
    grid-template-columns: 1fr !important;
  }

  /* Referenzen */
  .referenzen-grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer */
  .footer-inner {
    padding: 20px 0 !important;
  }

  .copy {
    font-size: 12px !important;
  }

  /* Product Page */
  .product-section {
    padding: 0 10px !important;
    margin: 20px auto !important;
  }

  .main-image {
    min-height: 250px !important;
    padding: 15px !important;
  }

  .product-title {
    font-size: 20px !important;
  }

  /* Tabs single column */
  .tab-button {
    flex: 1 1 100% !important;
  }

  /* Hero badges */
  .hero-badges {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  .hero-badges li {
    font-size: 12px !important;
    padding: 5px 8px !important;
  }
}

/* =====================
   LANDSCAPE MOBILE
   ===================== */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .hero-section-advanced,
  .hero,
  .hero-split {
    min-height: auto !important;
    padding: 40px 0 30px !important;
  }

  .hero-stats-advanced,
  .hero-stats {
    flex-direction: row !important;
  }

  .stat-item-advanced,
  .hero-stat {
    flex: 1 1 auto !important;
  }

  .hero-features {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* =====================
   iOS SAFARI FIXES
   ===================== */
@supports (-webkit-touch-callout: none) {
  .hero-section-advanced,
  .hero {
    min-height: -webkit-fill-available;
  }

  .nav-menu,
  .site-nav {
    height: -webkit-fill-available !important;
  }

  /* Fix for iOS Safari viewport height */
  body {
    min-height: -webkit-fill-available;
  }
}

/* =====================
   TOUCH DEVICE ENHANCEMENTS
   ===================== */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .btn,
  .nav-toggle,
  .mobile-menu-toggle,
  .filter-btn,
  .gallery-item,
  .social-icon,
  a,
  button {
    min-height: 44px;
    min-width: 44px;
  }

  /* Remove hover effects */
  .service-card:hover,
  .branch-card:hover,
  .gallery-item:hover,
  .feature:hover,
  .usp-card:hover {
    transform: none !important;
  }

  /* Simplify animations */
  .floating-box,
  .wave-animation,
  .parallax-effect {
    animation: none !important;
    transform: none !important;
  }
}

/* =====================
   ACCESSIBILITY
   ===================== */
@media screen and (max-width: 768px) {
  /* Better focus indicators */
  a:focus,
  button:focus,
  .btn:focus,
  input:focus,
  textarea:focus,
  select:focus {
    outline: 3px solid var(--brand-yellow) !important;
    outline-offset: 2px !important;
  }

  /* Ensure text is readable */
  body {
    font-size: var(--mobile-font-base);
  }

  p {
    font-size: var(--mobile-font-small);
    line-height: 1.6;
  }

  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

/* =====================
   REDUCED MOTION
   ===================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .parallax-element {
    transform: none !important;
  }
}

/* =====================
   PRINT STYLES
   ===================== */
@media print {
  .site-header,
  .header-advanced,
  .nav-toggle,
  .mobile-menu-toggle,
  .mobile-menu-overlay,
  .sticky-contact-menu,
  .back-to-top,
  .lightbox {
    display: none !important;
  }

  .hero-section-advanced,
  .hero {
    min-height: auto;
    background: white !important;
    color: black !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: black;
    background: white;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}

/* =====================
   SAFE AREA INSETS (Notch devices)
   ===================== */
@supports (padding: max(0px)) {
  @media screen and (max-width: 768px) {
    .nav-menu,
    .site-nav {
      padding-top: max(80px, env(safe-area-inset-top, 80px)) !important;
      padding-bottom: max(30px, env(safe-area-inset-bottom, 30px)) !important;
      padding-left: max(20px, env(safe-area-inset-left, 20px)) !important;
      padding-right: max(20px, env(safe-area-inset-right, 20px)) !important;
    }

    .site-footer,
    .site-footer-complete {
      padding-bottom: max(20px, env(safe-area-inset-bottom, 20px)) !important;
    }
  }
}

/* =====================
   SPECIFIC PAGE FIXES
   ===================== */

/* Produkte Page */
@media screen and (max-width: 768px) {
  .produkte-hero {
    padding: 60px 15px !important;
  }

  .filter-buttons {
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
  }

  .filter-btn {
    padding: 10px 16px !important;
    font-size: 14px !important;
  }

  .product-cards-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Kontakt Page */
@media screen and (max-width: 768px) {
  .kontakt-hero {
    padding: 60px 15px !important;
  }

  .contact-grid {
    grid-template-columns: 1fr !important;
  }

  .map-container {
    height: 300px !important;
  }

  .map-container iframe {
    height: 100% !important;
  }
}

/* Karriere Page */
@media screen and (max-width: 768px) {
  .karriere-hero {
    padding: 60px 15px !important;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .job-listings {
    grid-template-columns: 1fr !important;
  }
}

@media screen and (max-width: 480px) {
  .benefits-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Standort Page */
@media screen and (max-width: 768px) {
  .standort-hero {
    padding: 60px 15px !important;
  }

  .location-info {
    grid-template-columns: 1fr !important;
  }

  .location-map {
    height: 300px !important;
  }
}

/* Ueber-uns Page */
@media screen and (max-width: 768px) {
  .ueber-uns-hero {
    padding: 60px 15px !important;
  }

  .timeline {
    padding-left: 20px !important;
  }

  .timeline-item {
    padding-left: 30px !important;
  }

  .timeline-year {
    font-size: 20px !important;
  }
}

/* AGB, Datenschutz, Impressum Pages */
@media screen and (max-width: 768px) {
  .legal-content {
    padding: 30px 15px !important;
  }

  .legal-content h1 {
    font-size: 24px !important;
  }

  .legal-content h2 {
    font-size: 20px !important;
  }

  .legal-content p,
  .legal-content li {
    font-size: 14px !important;
    line-height: 1.7 !important;
  }
}

/* History Strip */
@media screen and (max-width: 768px) {
  .history-strip {
    grid-auto-columns: minmax(200px, 1fr) !important;
    gap: 15px !important;
    padding: 15px !important;
  }

  .history-strip img {
    height: 120px !important;
  }
}

/* Partner Slider */
@media screen and (max-width: 768px) {
  .partner-slider {
    padding: 30px 15px !important;
  }

  .partner-logo {
    max-height: 50px !important;
  }
}

/* Marquee */
@media screen and (max-width: 768px) {
  .section-marquee {
    padding: 15px 0 !important;
  }

  .marquee .tile {
    flex: 0 0 160px !important;
    height: 90px !important;
  }
}

/* =====================================================
   CRITICAL MOBILE FIXES - Override Inline Styles
   These fix specific sections with inline styles
   ===================================================== */

/* Fix ALL inline flex/grid layouts that use gap: 80px */
@media screen and (max-width: 768px) {

  /* ==========================================
     FIX: "Unser Angebot im Überblick" Section
     ========================================== */
  #produkte > .container > div[style*="display: grid"],
  #produkte .container > div[style*="grid-template-columns"],
  .section-products > .container > div[style*="display: grid"],
  section[style*="padding: 180px"] > .container > div[style*="grid"] {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  /* Fix the two-column layout with Oil Drop and Cards */
  div[style*="grid-template-columns: 1fr 1.2fr"],
  div[style*="grid-template-columns:1fr 1.2fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
  }

  /* Fix the cards 2x2 grid to single column */
  div[style*="grid-template-columns: repeat(2, 1fr)"][style*="gap: 30px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* Oil Drop container - center and reduce padding */
  div[style*="border-radius: 30px"][style*="padding: 60px"] {
    padding: 30px !important;
    margin: 0 auto !important;
    max-width: 90% !important;
  }

  /* Cards in Angebot section */
  div[style*="backdrop-filter: blur(10px)"][style*="border-radius: 20px"][style*="padding: 35px"] {
    padding: 25px !important;
    margin-bottom: 15px !important;
  }

  /* Section title sizing */
  h2[style*="font-size: 4rem"] {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }

  p[style*="font-size: 1.5rem"][style*="max-width: 800px"] {
    font-size: 1rem !important;
    padding: 0 15px !important;
  }

  /* ==========================================
     FIX: "So arbeiten wir für Sie" Section
     ========================================== */

  /* Main two-column flex layout - force to column */
  div[style*="display: flex"][style*="gap: 80px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    padding: 0 15px !important;
  }

  /* Left column with pie chart */
  div[style*="flex: 1"][style*="justify-content: center"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* White card with pie chart */
  div[style*="background: white"][style*="border-radius: 24px"][style*="padding: 50px"] {
    padding: 25px !important;
    margin: 0 auto !important;
    max-width: 90% !important;
  }

  /* Pie chart image */
  img[src*="process-pie-chart"],
  img[alt*="Service-Prozess"] {
    max-width: 280px !important;
    margin: 0 auto !important;
  }

  /* Steps container */
  div[style*="flex: 1"] > div[style*="flex-direction: column"][style*="gap: 36px"] {
    gap: 20px !important;
    width: 100% !important;
  }

  /* Individual step cards */
  div[style*="display: flex"][style*="gap: 24px"][style*="backdrop-filter: blur"] {
    flex-direction: row !important;
    gap: 15px !important;
    padding: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Step number badges */
  div[style*="width: 56px"][style*="height: 56px"][style*="background: #fdc300"] {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    font-size: 1.2rem !important;
  }

  /* Step titles */
  h3[style*="font-size: 1.375rem"][style*="color: #fdc300"] {
    font-size: 1.1rem !important;
  }

  /* Step descriptions */
  p[style*="color: #ffffff"][style*="line-height: 1.6"][style*="opacity: 0.95"] {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
  }

  /* Section subtitle */
  h3[style*="font-size: 2rem"][style*="color: white"] {
    font-size: 1.5rem !important;
    padding: 0 15px !important;
  }

  /* ==========================================
     FIX: Section padding overrides
     ========================================== */

  section[style*="padding: 180px 0"],
  section[style*="padding: 180px"] {
    padding: 80px 0 !important;
  }

  section[style*="padding: 100px 0"],
  section[style*="padding: 100px"] {
    padding: 50px 0 !important;
  }

  /* Wave SVG heights */
  div[style*="position: absolute"][style*="top: 0"] svg[style*="height: 150px"],
  div[style*="position: absolute"][style*="bottom: 0"] svg[style*="height: 150px"] {
    height: 60px !important;
  }

  /* ==========================================
     FIX: Floating hamburger menu icon
     ========================================== */

  /* Hide any hamburger icons that appear outside header */
  .quick-navigation-section .mobile-menu-toggle,
  .section-products .mobile-menu-toggle,
  #produkte .mobile-menu-toggle,
  main .mobile-menu-toggle,
  section:not(.header-advanced) .mobile-menu-toggle,
  .container .mobile-menu-toggle:not(.header-main-nav .mobile-menu-toggle) {
    display: none !important;
  }

  /* Ensure only header hamburger is visible */
  .header-advanced .mobile-menu-toggle,
  .header-main-nav .mobile-menu-toggle,
  header .mobile-menu-toggle {
    display: flex !important;
  }

  /* Hide floating orbs on mobile - they cause overflow */
  div[style*="position: absolute"][style*="border-radius: 50%"][style*="filter: blur"] {
    display: none !important;
  }

  /* ==========================================
     FIX: General overflow prevention
     ========================================== */

  section,
  .section,
  .container {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Prevent text overflow */
  h1, h2, h3, h4, h5, h6, p, span, div {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Fix any elements with large gap values */
  [style*="gap: 80px"],
  [style*="gap: 60px"],
  [style*="gap:80px"],
  [style*="gap:60px"] {
    gap: 25px !important;
  }

  /* Fix margin-bottom large values */
  [style*="margin-bottom: 100px"],
  [style*="margin-bottom:100px"] {
    margin-bottom: 40px !important;
  }
}

/* Extra small screens */
@media screen and (max-width: 480px) {

  /* Even smaller step cards */
  div[style*="display: flex"][style*="gap: 24px"][style*="backdrop-filter: blur"] {
    padding: 15px !important;
    gap: 12px !important;
  }

  div[style*="width: 56px"][style*="height: 56px"][style*="background: #fdc300"] {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    font-size: 1rem !important;
  }

  h3[style*="font-size: 1.375rem"][style*="color: #fdc300"] {
    font-size: 1rem !important;
  }

  p[style*="color: #ffffff"][style*="line-height: 1.6"][style*="opacity: 0.95"] {
    font-size: 0.85rem !important;
  }

  /* Angebot section */
  h2[style*="font-size: 4rem"] {
    font-size: 1.5rem !important;
  }

  div[style*="border-radius: 30px"][style*="padding: 60px"] {
    padding: 20px !important;
  }

  div[style*="backdrop-filter: blur(10px)"][style*="border-radius: 20px"][style*="padding: 35px"] {
    padding: 20px !important;
  }
}

/* =====================================================
   COMPREHENSIVE MOBILE FIXES FOR ALL HOMEPAGE SECTIONS
   ===================================================== */

@media screen and (max-width: 768px) {

  /* ==========================================
     FIX: About/Über uns Two Column Section
     ========================================== */
  .two-col[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 60px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
  }

  /* ==========================================
     FIX: Karriere Benefits Grid (4 columns)
     ========================================== */
  .career-benefits[style*="grid-template-columns: repeat(4, 1fr)"],
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Career benefit cards */
  .career-benefits > div,
  div[style*="background: rgba(255,255,255,0.05)"][style*="border-radius: 16px"] {
    padding: 20px !important;
  }

  /* Career CTA buttons */
  div[style*="display: flex"][style*="gap: 20px"][style*="justify-content: center"] {
    flex-direction: column !important;
    gap: 15px !important;
    align-items: center !important;
  }

  /* ==========================================
     FIX: Footer Grid (5 columns to 1)
     ========================================== */
  div[style*="grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    text-align: center !important;
  }

  /* Footer brand section */
  div[style*="grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr"] > div:first-child {
    text-align: center !important;
  }

  /* Footer logo link */
  a[style*="display: flex"][style*="align-items: center"][style*="gap: 15px"] {
    justify-content: center !important;
  }

  /* Footer social icons */
  div[style*="display: flex"][style*="gap: 10px"][style*="margin-top: 15px"] {
    justify-content: center !important;
  }

  /* Footer column headings */
  footer h4,
  .site-footer h4 {
    text-align: center !important;
    margin-bottom: 15px !important;
  }

  /* Footer links */
  footer ul,
  .site-footer ul {
    text-align: center !important;
  }

  /* Footer bottom bar */
  div[style*="border-top: 1px solid"][style*="display: flex"][style*="justify-content: space-between"] {
    flex-direction: column !important;
    gap: 15px !important;
    text-align: center !important;
  }

  div[style*="display: flex"][style*="gap: 20px"][style*="flex-wrap: wrap"]:last-child {
    justify-content: center !important;
  }

  /* ==========================================
     FIX: Branchen Section Cards
     ========================================== */
  .branchen-grid,
  .branches-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Branch cards */
  .branch-card,
  div[style*="background: rgba(255,255,255,0.03)"][style*="border-radius: 20px"] {
    padding: 25px !important;
  }

  /* Branch card list items */
  .branch-card ul li,
  div[style*="border-radius: 20px"] ul li {
    font-size: 14px !important;
  }

  /* ==========================================
     FIX: Expertise Section
     ========================================== */
  .expertise-section .two-col,
  section[style*="background: #f8f9fa"] .two-col {
    flex-direction: column !important;
    gap: 30px !important;
  }

  /* Expertise numbered items */
  .expertise-item,
  div[style*="display: flex"][style*="gap: 20px"][style*="align-items: start"] {
    flex-direction: column !important;
    text-align: center !important;
    gap: 15px !important;
  }

  /* Expertise number badges */
  .expertise-number,
  div[style*="width: 48px"][style*="height: 48px"][style*="background: linear-gradient"] {
    margin: 0 auto !important;
  }

  /* Expertise stats row */
  .expertise-stats,
  div[style*="display: grid"][style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }

  /* ==========================================
     FIX: Produktgruppen Section
     ========================================== */
  .produktgruppen-grid,
  .product-groups-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }

  /* Product group cards */
  .produktgruppe-card {
    padding: 20px 15px !important;
  }

  .produktgruppe-card h3 {
    font-size: 1rem !important;
  }

  /* ==========================================
     FIX: Impressionen/Gallery Section
     ========================================== */
  .impressionen-section,
  .gallery-section {
    padding: 40px 0 !important;
  }

  .gallery-slider {
    padding: 0 15px !important;
  }

  .gallery-item,
  .impression-card {
    min-width: 280px !important;
  }

  /* Gallery navigation buttons */
  .gallery-nav {
    display: none !important;
  }

  /* Gallery feature boxes */
  div[style*="display: grid"][style*="grid-template-columns: repeat(4, 1fr)"][style*="gap: 20px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }

  /* ==========================================
     FIX: Contact Section
     ========================================== */
  .contact-section .two-col,
  #kontakt .two-col {
    flex-direction: column !important;
    gap: 30px !important;
  }

  /* Contact form */
  .contact-form {
    padding: 25px !important;
  }

  /* Contact info cards */
  .contact-info-card {
    padding: 20px !important;
  }

  /* Contact grid */
  .contact-grid {
    grid-template-columns: 1fr !important;
  }

  /* Map container */
  .map-container,
  iframe[style*="border-radius"] {
    height: 250px !important;
    border-radius: 12px !important;
  }

  /* ==========================================
     FIX: Service Versprechen Stats Row
     ========================================== */
  div[style*="display: grid"][style*="gap: 20px"]:not([style*="grid-template-columns: 1fr"]) {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Service stats at bottom of So arbeiten wir */
  .service-stats,
  div[style*="display: flex"][style*="justify-content: space-between"][style*="text-align: center"] {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 20px !important;
  }

  .service-stats > div,
  div[style*="text-align: center"] > div {
    flex: 0 0 45% !important;
  }

  /* ==========================================
     FIX: CTA Sections
     ========================================== */
  .cta-section,
  div[style*="background: linear-gradient"][style*="border-radius"][style*="padding: 60px"] {
    padding: 30px 20px !important;
    text-align: center !important;
  }

  .cta-section h3,
  .cta-section p {
    text-align: center !important;
  }

  .cta-buttons,
  div[style*="display: flex"][style*="gap: 20px"]:not([style*="flex-direction"]) {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: center !important;
  }

  /* ==========================================
     FIX: Quick Contact Bar
     ========================================== */
  .quick-contact-bar {
    flex-direction: column !important;
    gap: 15px !important;
    padding: 20px !important;
  }

  .contact-item {
    justify-content: center !important;
    text-align: center !important;
  }

  /* ==========================================
     FIX: All Section Headings
     ========================================== */
  section h2 {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
    text-align: center !important;
    padding: 0 15px !important;
  }

  section > .container > header {
    text-align: center !important;
  }

  /* ==========================================
     FIX: All Button Groups
     ========================================== */
  .btn-group,
  div[style*="display: flex"][style*="gap"]:not([style*="flex-direction: column"]) > a.btn,
  div[style*="display: flex"][style*="gap"]:not([style*="flex-direction: column"]) > button {
    width: 100% !important;
    max-width: 300px !important;
  }

  /* ==========================================
     FIX: Prevent Horizontal Scroll
     ========================================== */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  section, .section, .container, main, footer {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Hide decorative elements that cause overflow */
  div[style*="position: absolute"][style*="width: 300px"],
  div[style*="position: absolute"][style*="width: 400px"],
  div[style*="position: absolute"][style*="filter: blur"] {
    display: none !important;
  }
}

/* Extra small screens - 480px */
@media screen and (max-width: 480px) {

  /* Footer grid even smaller */
  div[style*="grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr"] {
    gap: 25px !important;
  }

  /* Career benefits */
  .career-benefits[style*="grid-template-columns: repeat(4, 1fr)"] > div {
    padding: 15px !important;
  }

  /* Stats grids */
  div[style*="display: grid"][style*="gap: 20px"]:not([style*="grid-template-columns: 1fr"]) {
    grid-template-columns: 1fr !important;
  }

  /* Produktgruppen - single column */
  .produktgruppen-grid,
  .product-groups-grid {
    grid-template-columns: 1fr !important;
  }

  /* Gallery features - single column */
  div[style*="display: grid"][style*="grid-template-columns: repeat(4, 1fr)"][style*="gap: 20px"] {
    grid-template-columns: 1fr !important;
  }

  /* Impressionen feature boxes */
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ============================================
   CRITICAL MOBILE OVERRIDES - 375px screens
   These MUST be at the end for highest priority
   ============================================ */

@media screen and (max-width: 768px) {

  /* FORCE Quick Nav Grid to Single Column */
  .quick-nav-grid,
  section .quick-nav-grid,
  .quick-nav-section .quick-nav-grid,
  .quick-nav-modern .quick-nav-grid,
  div.quick-nav-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
  }

  /* Quick Nav Box - Full Width */
  .quick-nav-box,
  .quick-nav-grid .quick-nav-box,
  .quick-nav-grid > div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Any 4-column grid on mobile - DEFAULT to 2 columns */
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Any 3-column grid on mobile */
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* FORCE Karriere Benefits to SINGLE Column - HIGH SPECIFICITY */
  .career-benefits[style*="grid-template-columns"],
  .career-benefits[style*="repeat"],
  div.career-benefits[style],
  .career-benefits,
  div.career-benefits,
  .karriere-benefits,
  [class*="career-benefit"],
  [class*="karriere-benefit"],
  .benefits-grid,
  section[class*="karriere"] .benefits-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Extra specificity override for career benefits */
  body .career-benefits[style*="repeat(4"],
  html body .career-benefits {
    grid-template-columns: 1fr !important;
  }

  /* FORCE Footer Single Column */
  .footer-grid,
  footer .footer-grid,
  .site-footer .footer-grid,
  footer div[style*="grid-template-columns"],
  .footer-content > div[style*="grid"],
  div[style*="1.5fr 1fr 1fr 1fr 1fr"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    text-align: center !important;
  }

  /* Footer columns */
  .footer-column,
  .footer-links,
  footer ul {
    text-align: center !important;
  }

  /* Footer logo area - prevent overflow */
  footer a[style*="display: flex"],
  footer .logo-link,
  footer div > a:first-child {
    flex-wrap: wrap !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 10px !important;
  }

  /* Footer logo text container */
  footer a[style*="flex"] > div,
  footer .logo-text {
    max-width: 100% !important;
    text-align: center !important;
  }

  /* Footer headings and text - center and constrain */
  footer h3,
  footer h4,
  footer p {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Footer container - prevent overflow */
  footer .container,
  footer > div {
    max-width: 100% !important;
    overflow-x: hidden !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
  }

  /* Footer - full width fix */
  footer,
  .site-footer-complete {
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
  }

  /* Prevent horizontal overflow */
  body,
  html {
    overflow-x: hidden !important;
  }

  main,
  section,
  .container,
  .section-content,
  .content-wrapper {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* FIX: Stats Bar - flex row to grid/wrap */
  div[style*="display: flex"][style*="justify-content: space-between"][style*="padding: 48px"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px 15px !important;
    padding: 30px 20px !important;
    justify-items: center !important;
  }

  /* Stats bar items - center and size properly */
  div[style*="display: flex"][style*="justify-content: space-between"][style*="padding: 48px"] > div {
    text-align: center !important;
    width: 100% !important;
  }

  /* Stats bar numbers - smaller on mobile */
  div[style*="display: flex"][style*="justify-content: space-between"][style*="padding: 48px"] > div > div:first-child {
    font-size: 2rem !important;
  }

  /* Stats bar labels */
  div[style*="display: flex"][style*="justify-content: space-between"][style*="padding: 48px"] > div > div:last-child {
    font-size: 0.8rem !important;
  }
}

/* Even smaller screens */
@media screen and (max-width: 480px) {

  /* Quick Nav more compact */
  .quick-nav-grid {
    padding: 0 10px !important;
    gap: 15px !important;
  }

  .quick-nav-box {
    padding: 20px !important;
  }

  /* Career benefits more compact */
  .career-benefits > div,
  .karriere-benefits > div,
  .benefits-grid > div {
    padding: 15px !important;
  }

  /* Any multi-column becomes single */
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:repeat(2"] {
    grid-template-columns: 1fr !important;
  }
}
