/* ======================
   LAYOUT STYLES - ФІНАЛЬНА ВЕРСІЯ
   Правильний грід, секції без конфліктів з header
====================== */

/* ======================
   HERO SECTION
====================== */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
    url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') center/cover no-repeat;
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 0 2rem;
  box-sizing: border-box;
}

@media (min-width: 1920px) {
  .hero-section {
    padding-left: 6rem;
    padding-right: 6rem;
  }
}

@media (min-width: 1600px) and (max-width: 1919px) {
  .hero-section {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

@media (min-width: 1400px) and (max-width: 1599px) {
  .hero-section {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

@media (max-width: 767px) {
  .hero-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 320px) {
  .hero-section {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

#hero-tagline {
  font-size: clamp(1.2rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  max-width: 900px;
  animation: fadeIn 2.5s ease-in-out;
  font-weight: 400;
  line-height: 1.3;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-description {
  margin: 0 auto 3rem;
  max-width: 1000px;
  animation: fadeIn 3s ease-in-out;
}

.hero-description p {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.9);
}

.hero-section .btn {
  background: var(--primary);
  color: white;
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
  backdrop-filter: blur(10px);
}

.hero-section .btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
}

/* ======================
   SECTIONS - ЗБІЛЬШЕНІ ВІДСТАНІ
====================== */
section {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 4rem auto;
  background: var(--bg-light);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  position: relative;
}

@media (min-width: 1920px) {
  section {
    max-width: 1800px;
    padding: 4rem 4rem;
    margin: 5rem auto;
    border-radius: 30px;
  }
}

@media (min-width: 1600px) and (max-width: 1919px) {
  section {
    max-width: 1500px;
    padding: 3.5rem 3rem;
    margin: 4.5rem auto;
    border-radius: 25px;
  }
}

@media (min-width: 1400px) and (max-width: 1599px) {
  section {
    max-width: 1350px;
    padding: 3.25rem 2.5rem;
    margin: 4.25rem auto;
  }
}

@media (min-width: 1280px) and (max-width: 1399px) {
  section {
    max-width: 1200px;
    padding: 3rem 2.5rem;
    margin: 4rem auto;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  section {
    max-width: none;
    padding: 3rem 2rem;
    margin: 3rem 2rem;
  }
}

@media (max-width: 767px) {
  section {
    max-width: none;
    padding: 2.5rem 1.5rem;
    margin: 2.5rem 1rem;
    border-radius: 15px;
  }
}

@media (max-width: 480px) {
  section {
    padding: 2rem 1rem;
    margin: 2rem 0.5rem;
    border-radius: 12px;
  }
}

@media (max-width: 320px) {
  section {
    padding: 1.5rem 0.8rem;
    margin: 1.5rem 0.3rem;
    border-radius: 10px;
  }
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(45, 45, 45, 0.9));
  border-radius: 20px;
  z-index: -1;
}

/* ======================
   ПРАВИЛЬНІ АДАПТИВНІ СІТКИ
====================== */

/* БАЗОВИЙ ГРІД ДЛЯ ВСІХ .services */
.services {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
  /* За замовчуванням - 1 стовпчик на мобільних */
  grid-template-columns: 1fr;
}

/* ======================
   СПЕЦІАЛЬНІ НАЛАШТУВАННЯ ДЛЯ КОЖНОЇ СЕКЦІЇ
====================== */

/* СЕКЦІЯ "UNSERE LEISTUNGEN" - 4 картки */
#services .services {
  /* Мобільні: 1 стовпчик */
  grid-template-columns: 1fr;
}

@media (min-width: 768px) and (max-width: 1023px) {
  #services .services {
    /* Планшети: 2 стовпчики */
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  #services .services {
    /* Великі планшети: 2 стовпчики */
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (min-width: 1280px) {
  #services .services {
    /* Desktop: 4 стовпчики */
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1600px) {
  #services .services {
    /* Великі екрани: 4 стовпчики з більшими відступами */
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
  }
}

/* СЕКЦІЯ "ÜBER UNS" - 2 картки */
#about .services {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  #about .services {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* СЕКЦІЯ "KONTAKT" - 3 картки */
#contact .services {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) and (max-width: 1023px) {
  #contact .services {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  #contact .services {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* ======================
   SERVICE CARDS - ІДЕАЛЬНЕ ЦЕНТРУВАННЯ
====================== */
.service-card {
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--primary);
  transition: all 0.4s ease;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.service-card:hover::before {
  height: 10px;
}

/* ІКОНКИ - ІДЕАЛЬНЕ ЦЕНТРУВАННЯ */
.service-card .icon,
.service-card i,
.service-card svg {
  display: block !important;
  margin: 0 auto 1.5rem auto !important;
  font-size: 3rem;
  color: var(--primary);
  width: 48px;
  height: 48px;
  text-align: center;
  transition: all 0.3s ease;
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: white;
  line-height: 1.3;
  text-align: center;
  width: 100%;
}

.service-card p {
  color: var(--gray);
  line-height: 1.6;
  font-size: 1rem;
  text-align: center;
  width: 100%;
  flex-grow: 1;
}

/* Адаптивні розміри service cards */
@media (min-width: 1920px) {
  .service-card {
    padding: 3rem 2rem;
    border-radius: 20px;
  }
  
  .service-card .icon,
  .service-card i,
  .service-card svg {
    font-size: 3.5rem;
    width: 56px;
    height: 56px;
    margin-bottom: 2rem;
  }
  
  .service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
  }
}

@media (min-width: 1600px) and (max-width: 1919px) {
  .service-card {
    padding: 2.5rem 2rem;
    border-radius: 18px;
  }
  
  .service-card .icon,
  .service-card i,
  .service-card svg {
    font-size: 3.2rem;
    width: 52px;
    height: 52px;
  }
  
  .service-card h3 {
    font-size: 1.5rem;
  }
}

@media (min-width: 1280px) and (max-width: 1599px) {
  .service-card {
    padding: 2rem 1.5rem;
  }
  
  .service-card .icon,
  .service-card i,
  .service-card svg {
    font-size: 2.8rem;
    width: 44px;
    height: 44px;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .service-card {
    padding: 2.5rem 2rem;
  }
  
  .service-card .icon,
  .service-card i,
  .service-card svg {
    font-size: 3rem;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 767px) {
  .service-card {
    padding: 2rem 1.5rem;
  }
  
  .service-card .icon,
  .service-card i,
  .service-card svg {
    font-size: 2.5rem;
    width: 40px;
    height: 40px;
  }
}

/* ======================
   CTA SECTION
====================== */
.cta-section {
  text-align: center;
  margin-top: 3rem;
  padding: 3rem 2rem;
  background: var(--bg-light);
  border-radius: 20px;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 20px 20px 0 0;
}

.cta-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta-buttons .btn {
  min-width: 200px;
  padding: 1.2rem 2rem;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  
  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .cta-section {
    margin-top: 2rem;
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .cta-section {
    padding: 1.5rem 1rem;
    margin-top: 1.5rem;
  }
}

/* ======================
   SERVICE DETAIL PAGES
====================== */
.service-detail {
  max-width: 1200px;
  margin: 4rem auto;
  background: var(--bg-light);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  position: relative;
  padding: 3rem 2rem;
}

.service-detail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(45, 45, 45, 0.9));
  border-radius: 20px;
  z-index: -1;
}

.service-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .service-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .service-detail {
    padding: 3.5rem;
  }
}

.service-text h2 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-align: left;
  font-size: 1.8rem;
}

.service-text h2::after {
  display: none;
}

.service-text ul {
  margin-bottom: 2rem;
  line-height: 1.8;
  color: var(--light);
  padding-left: 1.5rem;
}

.service-text li {
  margin-bottom: 0.5rem;
  position: relative;
}

.service-text li::before {
  content: '▶';
  color: var(--primary);
  position: absolute;
  left: -1.5rem;
}

.service-text p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--light);
}

.service-image {
  text-align: center;
}

.service-image img {
  width: 100%;
  max-width: 500px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.service-image img:hover {
  transform: scale(1.05);
}

/* ======================
   CONTACT SPECIFIC STYLES
====================== */
#contact .service-card {
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
}

#contact .service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

#contact .service-card:hover::before {
  height: 5px;
}

#contact .service-card small {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

#contact .service-card:hover small {
  opacity: 1 !important;
  transform: translateY(-5px);
}

#contact .cta-section {
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(45, 45, 45, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

/* ======================
   LARGE SCREENS
====================== */
@media (min-width: 1920px) {
  .cta-section {
    padding: 4rem 3rem;
    margin-top: 4rem;
    border-radius: 25px;
  }
  
  .cta-buttons .btn {
    min-width: 250px;
    padding: 1.5rem 2.5rem;
    font-size: 1.1rem;
  }
}

@media (min-width: 1600px) and (max-width: 1919px) {
  .cta-section {
    padding: 3.5rem 2.5rem;
    margin-top: 3rem;
    border-radius: 22px;
  }
  
  .cta-buttons .btn {
    min-width: 220px;
    padding: 1.3rem 2.2rem;
    font-size: 1.05rem;
  }
}