html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}
/* Avoid horizontal scrollbars on mobile */
body, html {
  overflow-x: hidden;
}
/* Space for mobile sticky bar so content isn't covered */
@media (max-width: 767.98px) {
  body {
    padding-bottom: 80px; /* enough room for sticky CTA */
  }
}

/* Logo sizing */
.logo-img {
  height: auto;
  height: 80px;
  width: auto;
  object-fit: contain;
  display: block;
}
@media (min-width: 768px) {
  .logo-img {
    height: 120px;
  }
}

/* Right header logo */
.header-logo-right {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.header-logo-right:hover {
  opacity: 1;
}

@media (min-width: 768px) {
  .header-logo-right {
    height: 50px;
  }
}

/* Mobile adjustments for right logo */
@media (max-width: 767.98px) {
  .header-logo-right {
    height: 35px;
  }
  
  .navbar-nav .nav-item:last-child {
    margin-top: 0.5rem;
  }
}
/* Larger variant used in hero */
.logo-img.logo-lg {
  max-height: 88px;
}

/* Hero logo bigger and centered container in markup */
.hero-logo {
  height: auto;
  max-height: 320px;
  width: auto;
  object-fit: contain;
}
@media (min-width: 768px) {
  .hero-logo {
    max-height: 420px;
  }
}

/* Header brand size tweaks */
.brand-name {
  font-size: 1.6rem; /* larger brand label */
}
@media (min-width: 768px) {
  .brand-name {
    font-size: 2rem;
  }
  .logo-img {
    height: 120px; /* increase header logo on md+ */
  }
}

/* Red 24/7 badge */
.badge-247 {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background-color: #dc3545; /* Bootstrap danger red */
  border-radius: 999px;
  line-height: 1;
}

/* Mobile-specific polish */
@media (max-width: 767.98px) {
  .top-contact-bar .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }
  header .logo-img {
    height: 96px; /* bigger logo on mobile */
  }
  .hero {
    overflow: visible; /* allow inner elements/shadows to be fully visible */
    padding: 1.5rem !important; /* reduce padding on mobile */
  }
  .hero-logo {
    max-height: 240px; /* bigger hero logo on mobile */
  }
  
  /* Mobile typography improvements */
  .display-5 {
    font-size: 1.8rem !important;
    line-height: 1.3;
  }
  
  .lead {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  /* Mobile button improvements */
  .btn-lg {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  
  /* Mobile card improvements */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Mobile form improvements */
  .form-control {
    font-size: 16px; /* prevents zoom on iOS */
  }
  
  /* Mobile spacing improvements */
  .mb-5 {
    margin-bottom: 2rem !important;
  }
  
  .p-4 {
    padding: 1rem !important;
  }
  
  /* Mobile list improvements */
  .list-group-item {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  
  /* Mobile section titles */
  .h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem !important;
  }
  
  /* Mobile pricing display */
  .display-6 {
    font-size: 2rem !important;
  }
  
  /* Force mobile layout improvements */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Mobile hero section improvements */
  .hero .row {
    margin: 0;
  }
  
  .hero .col-md-7,
  .hero .col-md-5 {
    padding: 0;
  }
  
  /* Mobile button stack */
  .d-flex.gap-2 {
    flex-direction: column;
    gap: 0.5rem !important;
  }
  
  .d-flex.gap-2 .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Sticky CTA bar on mobile */
@media (max-width: 767.98px) {
  .mobile-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 6px;
    padding: 10px 10px;
    margin: 0 8px;            /* keep inside edges on all devices */
    background: rgba(255,255,255,0.98);
    border-top: 1px solid #e5e5e5;
    z-index: 1030;
    box-sizing: border-box;
    width: auto;             /* width controlled by margins/edges */
    max-width: calc(100% - 16px);
    overflow: hidden;      /* prevent inner bleed */
  }
  .mobile-sticky-cta .cta {
    flex: 1 1 0;
    flex-basis: 0;         /* allow equal split and shrink */
    min-width: 0; /* allow flex items to shrink so they don't stick out */
    width: 50%;            /* stable split to avoid subpixel overflow */
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 600;
    border: 1px solid #0d6efd;
  }
  .mobile-sticky-cta .cta:first-child {
    background: #0d6efd;
    color: #fff;
  }
  .mobile-sticky-cta .cta:last-child {
    background: #fff;
    color: #0d6efd;
  }
}

/* Floating WhatsApp button - always visible */
.floating-whatsapp {
  position: fixed;
  right: 14px;
  bottom: 86px; /* above sticky bar */
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  z-index: 1030;
}

/* Desktop floating WhatsApp button */
@media (min-width: 768px) {
  .floating-whatsapp {
    right: 24px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    font-size: 16px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
    transition: transform .15s ease, filter .15s ease;
  }
}

.floating-whatsapp:hover { text-decoration: none; filter: brightness(0.95); transform: translateY(-1px); }

/* Hide mobile-only UI on md+ just in case */
@media (min-width: 768px) {
  .mobile-sticky-cta { display: none !important; }
}

/* Extra small mobile devices (phones in portrait) */
@media (max-width: 575.98px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .hero {
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .display-5 {
    font-size: 1.5rem !important;
    line-height: 1.2;
  }
  
  .lead {
    font-size: 0.95rem;
  }
  
  .btn-lg {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .d-flex.gap-2 {
    flex-direction: column;
    gap: 0.5rem !important;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  .h3 {
    font-size: 1.25rem;
  }
  
  .display-6 {
    font-size: 1.75rem !important;
  }
  
  .list-group-item {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Mobile map height adjustment */
  #map {
    height: 200px !important;
  }
  
  /* Mobile form improvements for very small screens */
  .form-control {
    padding: 0.6rem 0.75rem;
  }
  
  textarea.form-control {
    min-height: 100px;
  }
}

/* Force mobile button layout for all mobile devices */
@media (max-width: 767.98px) {
  .hero .d-flex.gap-2 {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  
  .hero .d-flex.gap-2 .btn {
    width: 100% !important;
    margin-bottom: 0.5rem !important;
  }
  
  .hero .d-flex.gap-2 .btn:last-child {
    margin-bottom: 0 !important;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px; /* Apple's recommended minimum touch target */
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .form-control {
    min-height: 44px;
  }
  
  .floating-whatsapp {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }
}

/* Landscape mobile orientation */
@media (max-width: 767.98px) and (orientation: landscape) {
  .hero {
    padding: 1rem !important;
  }
  
  .hero-logo {
    max-height: 180px;
  }
  
  .display-5 {
    font-size: 1.6rem !important;
  }
}

/* Light-gray highlight for all cards to match the hero section */
.card {
  background-color: var(--bs-light);
  border-color: #e9ecef; /* subtle gray border */
}
.card .card-header,
.card .card-footer,
.card .list-group-item {
  background-color: var(--bs-light);
}

/* WhatsApp button styling - keeping green for WhatsApp brand */
.btn-success {
  background-color: #25D366;
  border-color: #25D366;
}

.btn-success:hover {
  background-color: #1ea952;
  border-color: #1ea952;
}

/* Mobile button adjustments for contact section */
@media (max-width: 767.98px) {
  .contact .d-flex.gap-2 {
    flex-direction: column;
    gap: 0.5rem !important;
  }
  
  .contact .btn-lg {
    width: 100%;
    margin-bottom: 0;
  }
  /* Reduce bottom gap of contact section on mobile */
  #kontakt.mb-5 {
    margin-bottom: 1rem !important;
  }
}

/* Service cards styling */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e9ecef;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Service icons */
.service-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border: 2px solid #0d6efd;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.icon-circle i {
  font-size: 2rem;
  color: #0d6efd;
  transition: all 0.3s ease;
}

.service-card:hover .icon-circle {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  transform: scale(1.1);
}

.service-card:hover .icon-circle i {
  color: white;
  transform: scale(1.1);
}

/* Mobile service card adjustments */
@media (max-width: 767.98px) {
  .service-card .card-body {
    padding: 1.5rem 1rem;
  }
  
  .icon-circle {
    width: 70px;
    height: 70px;
  }
  
  .icon-circle i {
    font-size: 1.75rem;
  }
  
  .service-card h3 {
    font-size: 1.1rem;
  }
  
  .service-card p {
    font-size: 0.9rem;
  }
}

/* Testimonials Slider */
.testimonials-slider {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.testimonials-track {
  display: flex;
  animation: slide-right-to-left 60s linear infinite;
  width: calc(300% + 2rem); /* 3 sets of cards + gaps */
}

.testimonial-card {
  flex: 0 0 calc(33.333% - 1rem);
  margin-right: 1rem;
  min-width: 300px;
}

/* Pause animation on hover */
.testimonials-slider:hover .testimonials-track {
  animation-play-state: paused;
}

/* Keyframes for right-to-left animation */
@keyframes slide-right-to-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-33.333% - 1rem));
  }
}

/* Stars styling */
.stars {
  display: flex;
  gap: 2px;
}

.stars i {
  font-size: 0.9rem;
}

/* Mobile testimonials adjustments */
@media (max-width: 767.98px) {
  .testimonials-track {
    width: calc(400% + 1rem); /* 4 sets for mobile */
    animation-duration: 80s; /* Slower on mobile */
  }
  
  .testimonial-card {
    flex: 0 0 calc(25% - 0.5rem);
    margin-right: 0.5rem;
    min-width: 250px;
  }
  
  @keyframes slide-right-to-left {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(calc(-25% - 0.5rem));
    }
  }
}

/* Testimonial card hover effects */
.testimonial-card .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover .card {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}