/* Ellis Website - Mobile Optimierungen */

/* Mobile Typography Fixes für Startseite */
@media screen and (max-width: 768px) {
  
  /* Header kompakter auf Mobile */
  #header {
    padding: 0.8rem 1rem !important;
    min-height: 60px !important;
  }
  
  #header h1 {
    margin: 0 !important;
  }
  
  #header h1 .ellis-logo {
    max-height: 40px !important;
    width: auto !important;
  }
  
  body {
    padding-top: 70px !important; /* Reduziert für kompakteren Header */
  }
  
  /* Hauptüberschrift auf Startseite */
  #intro .main-headline,
  #intro h2.main-headline {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }
  
  /* Intro Text - Kompaktere Darstellung */
  #intro p {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1rem !important;
  }
  
  /* Sektions-Überschriften */
  .main h2 {
    font-size: 1.8rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
  }
  
  /* Sektions-Text - Kompaktere Darstellung */
  .main p {
    font-size: 1rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1rem !important;
  }
  
  /* Zitat-Text */
  .main .box h2 {
    font-size: 1.6rem !important;
    line-height: 1.4 !important;
  }
  
  /* Button Text */
  .button {
    font-size: 0.9rem !important;
    padding: 0.8rem 1.5rem !important;
  }
  
  /* Intro Section Padding - Optimiert für mehr Textbreite */
  #intro .content {
    padding: 1.5rem 0.75rem !important;
  }
  
  /* Content Box Padding - Optimiert für mehr Textbreite */
  .main .content.box {
    padding: 1.5rem 1rem !important;
  }
  
  /* Ellis Engel Image */
  .ellis-engel img {
    max-width: 120px !important;
    height: auto !important;
    margin-bottom: 1rem !important;
  }
  
  /* Text Content Spacing - Maximale Breite für mehr Wörter pro Zeile */
  .text-content {
    text-align: center !important;
    max-width: 100% !important;
    padding: 0 0.5rem !important;
  }
  
  /* Service Cards auf Startseite - Optimiert für mehr Platz */
  .gallery {
    padding: 0.5rem !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 0.75rem !important;
  }
  
  /* Kacheln volle Höhe nutzen */
  .gallery article {
    width: 100% !important;
  }
  
  .gallery article .image {
    min-height: 200px !important;
  }
  
  /* Angebote Überschrift */
  #work h2 {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
  }
  
  #work p {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    margin-bottom: 2rem !important;
  }
  
  /* Overlay-Boxen auf mobilen Geräten optimieren */
  .gallery article .overlay {
    padding: 2.5rem 1rem !important; /* Weniger horizontales Padding für breitere Box */
  }
  
  .gallery article .overlay h3 {
    font-size: 85% !important; /* Etwas größere Schrift als vorher */
    margin-bottom: 1rem !important;
  }
  
  .gallery article .overlay p {
    font-size: 85% !important; /* Etwas größere Schrift als vorher */
    line-height: 1.5 !important;
  }
  
  /* Navigation Dropdown - Verschiebung bei Hover entfernen */
  #header nav ul li.dropdown .dropdown-menu li a:hover {
    transform: none !important; /* Keine Verschiebung bei Hover auf Mobile */
  }
  
  /* Dropdown Menü optische Verbesserungen für Mobile */
  #header nav ul li.dropdown .dropdown-menu {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%) !important;
    border: 2px solid rgba(255, 140, 66, 0.2) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(255, 140, 66, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    margin-top: 0.8rem !important;
    padding: 1rem 0 !important;
  }
  
  #header nav ul li.dropdown .dropdown-menu li a {
    color: #2c5f5d !important;
    font-weight: 500 !important;
    padding: 1rem 1.5rem !important;
    margin: 0 0.5rem !important;
    border-radius: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    font-size: 1rem !important; /* Kleiner als Hauptmenü (1.3rem) */
  }
  
  #header nav ul li.dropdown .dropdown-menu li a::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 3px !important;
    height: 100% !important;
    background: linear-gradient(135deg, #FF8C42, #d4af37) !important;
    transform: scaleY(0) !important;
    transition: transform 0.3s ease !important;
    transform-origin: bottom !important;
  }
  
  #header nav ul li.dropdown .dropdown-menu li a:hover {
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.08), rgba(212, 175, 55, 0.05)) !important;
    color: #FF8C42 !important;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.15) !important;
    transform: none !important; /* Keine Verschiebung bei Hover */
  }
  
  #header nav ul li.dropdown .dropdown-menu li a:hover::before {
    transform: scaleY(1) !important;
  }
}

/* Extra kleine Bildschirme */
@media screen and (max-width: 480px) {
  
  #intro .main-headline,
  #intro h2.main-headline {
    font-size: 2rem !important;
    line-height: 1.1 !important;
  }
  
  #intro p {
    font-size: 1rem !important;
  }
  
  .main h2 {
    font-size: 1.5rem !important;
  }
  
  .main p {
    font-size: 0.95rem !important;
  }
  
  .main .content.box {
    padding: 1.5rem 0.75rem !important;
    margin: 0.5rem !important;
  }
  
  #intro .content {
    padding: 1.25rem 0.5rem !important;
  }
  
  /* Gallery - Kleinere minmax für sehr kleine Bildschirme */
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    padding: 0.5rem !important;
  }
  
  /* Overlay-Boxen auf sehr kleinen Bildschirmen optimieren */
  .gallery article .overlay {
    padding: 2rem 0.75rem !important; /* Noch weniger horizontales Padding bei sehr kleinen Bildschirmen */
  }
  
  .gallery article .overlay h3 {
    font-size: 80% !important; /* Etwas kleinere Schrift bei sehr kleinen Bildschirmen */
    margin-bottom: 0.8rem !important;
  }
  
  .gallery article .overlay p {
    font-size: 80% !important; /* Etwas kleinere Schrift bei sehr kleinen Bildschirmen */
    line-height: 1.4 !important;
  }
  
  /* Navigation Dropdown - Verschiebung bei Hover entfernen (sehr kleine Bildschirme) */
  #header nav ul li.dropdown .dropdown-menu li a:hover {
    transform: none !important; /* Keine Verschiebung bei Hover auf Mobile */
  }
  
  /* Dropdown Menü für sehr kleine Bildschirme anpassen */
  #header nav ul li.dropdown .dropdown-menu {
    padding: 0.8rem 0 !important;
    margin-top: 0.6rem !important;
  }
  
  #header nav ul li.dropdown .dropdown-menu li a {
    padding: 0.9rem 1.2rem !important;
    margin: 0 0.3rem !important;
    font-size: 0.9rem !important; /* Noch kleiner für sehr kleine Bildschirme */
  }
  
  /* Hover-Effekte auch für kleine Bildschirme fixieren */
  #header nav ul li.dropdown .dropdown-menu li a:hover {
    transform: none !important; /* Keine Verschiebung bei Hover */
  }
}
