html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  line-height: 1.6;
  color: #333;
  font-size: 16px;
  overflow-x: hidden;
}

header, section {
  padding: 2rem;
  max-width: 100%;
  width: 100%;
  margin: auto;
  overflow-x: hidden;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

header p {
  font-size: 1.2rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.navbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  background-color: #222;
  color: white;
  font-family: Arial, sans-serif;
  box-sizing: border-box;
  position: relative;
  flex-wrap: wrap;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: nowrap;
}

.navbar .logo {
  padding-left: 1rem;
  flex-shrink: 0;
}

.navbar .logo a {
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  align-items: left;
  text-decoration: none;
  display: block;
}

.navbar .logo img {
  max-height: 50px;
  width: auto;
  display: block;
  align-items: left;
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0 1rem 0 0;
}

.navbar .nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding: 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.navbar .nav-links li a:hover {
  color: #007bff;
  background-color: rgba(0, 123, 255, 0.1);
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  margin-left: auto;
  margin-right: 0;
  z-index: 1001;
}

.hamburger-menu span {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 3px;
  transition: all 0.3s ease;
  display: block;
  transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
  .hamburger-menu {
    display: flex;
  }

  .navbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1rem;
  }

  .navbar .logo {
    padding-left: 0;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
  }

  .navbar .nav-links {
    position: static;
    background-color: transparent;
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .navbar .nav-links.active {
    max-height: 500px;
    background-color: #1a1a1a;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
  }

  .navbar .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
  }

  .navbar .nav-links li:last-child {
    border-bottom: none;
  }

  .navbar .nav-links li a {
    display: block;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    white-space: normal;
  }

  .navbar .nav-links li a:hover {
    background-color: #007bff;
    color: white;
    padding-left: 2rem;
  }
}

@media (max-width: 480px) {
  .hamburger-menu {
    margin-right: 0;
  }

  .hamburger-menu span {
    width: 22px;
    height: 2.5px;
  }

  .navbar {
    padding: 0.5rem;
  }

  .navbar .logo {
    margin-bottom: 0.5rem;
  }

  .navbar .nav-links li a {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .navbar .nav-links li a:hover {
    padding-left: 1.5rem;
  }
}

#info {
  background: #f7f7f7;
  padding: 2rem;
  margin-top: 2rem;
  border-radius: 10px;
}

.info-card {
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

form input, form textarea, form button {
  margin-bottom: 1rem;
  padding: 0.75rem;
  font-size: 1rem;
  width: 100%;
  min-height: 44px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: Arial, sans-serif;
}

form input {
  background-color: #fff;
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

form input:focus, form textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

form button {
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s ease, transform 0.2s ease;
  font-weight: 500;
}

form button:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

form button:active {
  transform: translateY(0);
}

.contact-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.map-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

#contract {
  align-items: center;
  background-color: #ddd;
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.contract-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 2rem auto;
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: #f0f0f0;
  color: #333;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: #3584e4;
  color: white;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: #3584e4;
  color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gallery-section {
  margin-bottom: 3rem;
}

.gallery-section h2 {
  color: #333;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

.gallery-section h2::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: #3584e4;
  border-radius: 2px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .image-caption {
  transform: translateY(0);
}

.image-caption h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.image-caption p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.9;
}

.load-more-container {
  text-align: center;
  margin-top: 3rem;
}

.load-more-btn {
  padding: 1rem 2rem;
  border: none;
  background: #3584e4;
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.load-more-btn:hover {
  background: #2563d7;
  transform: translateY(-2px);
}

/* Responsive Design for Gallery */
@media (max-width: 768px) {
  .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  .gallery-filters {
    gap: 0.75rem;
  }
  
  .filter-btn {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .image-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .gallery-item {
    margin-bottom: 1rem;
  }
  
  .gallery-item img {
    height: 180px;
  }

  .gallery-section h2::after {
    width: 40px;
  }

  .image-caption {
    padding: 1rem;
  }

  .image-caption h3 {
    font-size: 1rem;
  }

  .image-caption p {
    font-size: 0.85rem;
  }
}

/* Animation Classes */
.gallery-item.kitchen { border-left: 4px solid #4CAF50; }
.gallery-item.bedroom { border-left: 4px solid #2196F3; }
.gallery-item.living { border-left: 4px solid #FF9800; }
.gallery-item.exterior { border-left: 4px solid #FF5722; }

.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

footer {
  background-color: #222;
  color: white;
  padding: 2rem 1rem;
  font-family: Arial, sans-serif;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.footer-social,
.footer-container,
.footer-bottom {
  max-width: 900px;
  margin: auto;
}

.footer-social {
  margin-bottom: 1.5rem;
}

.footer-social a {
  color: white;
  margin: 0 0.5rem;
  font-size: 1.5rem;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: #007bff;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  text-align: left;
}

.footer-left, .footer-right {
  display: flex;
  flex-direction: column;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer a:hover {
  color: #007bff;
}

.footer-bottom {
  margin-top: 2rem;
  font-size: 0.9rem;
}

/* Vehicles Page Styles */
.vehicles-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.vehicles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.equipment-box, .technical-box {
  background: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.equipment-box:hover, .technical-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.equipment-box h2, .technical-box h2 {
  color: #333;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #3584e4;
}

.equipment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.equipment-list li {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1.1rem;
  color: #333;
}

.equipment-list li:last-child {
  border-bottom: none;
}

.equipment-list i {
  color: #3584e4;
  margin-right: 1rem;
  width: 20px;
  text-align: center;
}

.technical-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  font-weight: 600;
  color: #555;
  font-size: 1rem;
}

.spec-value {
  color: #333;
  font-size: 1rem;
  font-weight: 500;
}

#info table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
#info th {
  background: #3a4f68;
  color: white;
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
}
#info td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
  font-size: 0.95rem;
}
/* Striped rows for better readability */
#info tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}
#info tbody tr:nth-child(odd) {
  background-color: white;
}
/* Remove bottom border from last row */
#info tbody tr:last-child td {
  border-bottom: none;
}
#info td {
  text-align: center;
  font-weight: 500;
  color: #2c3e50;
}
/* Mobile responsive */
@media (max-width: 768px) {
  #info table {
    font-size: 0.9rem;
  }
  
  #info th,
  #info td {
    padding: 0.75rem 0.5rem;
  }
  
  /* Stack table on small screens */
  #info table,
  #info thead,
  #info tbody,
  #info th,
  #info td,
  #info tr {
    display: block;
  }
  
  #info thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  #info tr {
    border: 1px solid #e0e0e0;
    margin-bottom: 1rem;
    border-radius: 8px;
  }
  
  #info td {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 50%;
  }
  
  #info td:before {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 45%;
    padding-right: 0.75rem;
    white-space: nowrap;
    font-weight: 600;
    color: #3584e4;
  }
  
  #info td:nth-of-type(1):before { content: "Produkt"; }
  #info td:nth-of-type(2):before { content: "Preis/Tag"; }
  #info td:nth-of-type(3):before { content: "Preis/Woche"; }
}
@media (max-width: 480px) {
  #info td:before {
    font-size: 0.85rem;
    top: 0.5rem;
  }
  
  #info td {
    padding: 0.5rem;
    padding-left: 50%;
    font-size: 0.85rem;
  }
}

/* Responsive Design for Vehicles Page */
@media (max-width: 768px) {
  .vehicles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .equipment-box, .technical-box {
    padding: 1.5rem;
  }
  
  .equipment-box h2, .technical-box h2 {
    font-size: 1.3rem;
  }
  
  .equipment-list li {
    font-size: 1rem;
    padding: 0.75rem 0;
  }
  
  .spec-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .spec-label, .spec-value {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .vehicles-container {
    padding: 1rem;
  }

  .vehicles-grid {
    gap: 1rem;
  }

  .equipment-box, .technical-box {
    padding: 1rem;
    border-radius: 8px;
  }

  .equipment-box h2, .technical-box h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .equipment-list li {
    font-size: 0.95rem;
    padding: 0.5rem 0;
  }

  .equipment-list i {
    width: 18px;
  }

  .spec-label, .spec-value {
    font-size: 0.9rem;
  }
}

/* Improved touch targets and spacing for mobile */
@media (max-width: 768px) {
  .navbar .logo {
    padding-left: 1rem;
  }

  .navbar .nav-links {
    padding: 0.5rem 1rem 0 0;
    gap: 1rem;
  }

  .navbar .nav-links li a {
    padding: 0.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  form input, form textarea {
    padding: 0.75rem;
    min-height: 44px;
  }

  .filter-btn {
    min-height: 44px;
  }

  .load-more-btn {
    min-height: 44px;
  }
}

/* Mobile-first responsive design - small devices (max 480px) */
@media (max-width: 480px) {
  html, body {
    font-size: 14px;
  }

  header, section {
    padding: 1.5rem 1rem;
    max-width: 100%;
  }

  header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }

  header p {
    font-size: 1rem;
  }

  form input, form textarea, form button {
    padding: 0.75rem;
    font-size: 16px;
    min-height: 44px;
    width: 100%;
  }

  form button {
    min-width: 100%;
  }

  .gallery-filters {
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    width: 100%;
    min-height: 44px;
  }

  .gallery-section h2 {
    font-size: 1.5rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-left, .footer-right {
    margin-bottom: 1.5rem;
  }

  .footer-social {
    margin-bottom: 1.5rem;
  }

  .vehicles-container {
    padding: 1.5rem 1rem;
  }

  .equipment-box h2, .technical-box h2 {
    font-size: 1.2rem;
  }

  .equipment-list li {
    font-size: 1rem;
    padding: 0.5rem 0;
  }

  .spec-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .load-more-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    min-height: 44px;
    width: 100%;
    max-width: 300px;
  }
}

/* Tablet devices (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1.1rem;
  }

  .filter-btn {
    min-height: 44px;
  }

  form input, form textarea, form button {
    min-height: 44px;
  }

  .load-more-btn {
    min-height: 44px;
  }
}

/* Large screens (900px and above) */
@media (min-width: 900px) {
  .navbar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .navbar .logo {
    padding-left: 3rem;
    flex-shrink: 0;
  }

  .navbar .nav-links {
    flex-direction: row;
    padding: 0 2rem 0 0;
    position: static !important;
    background-color: transparent !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0;
    gap: 1.5rem;
  }

  .navbar .nav-links.active {
    max-height: none !important;
    padding: 0 2rem 0 0 !important;
  }

  .navbar .nav-links li {
    width: auto;
    border-bottom: none !important;
  }

  .navbar .nav-links li a {
    padding: 0.5rem;
    white-space: nowrap;
  }

  .contact-container {
    flex-direction: row;
    gap: 2rem;
  }

  form, .map-container {
    flex: 1;
  }

  .footer-container {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }

  .footer-left, .footer-right {
    margin-bottom: 0;
  }
}