/* ======================
   BASE STYLES - GDPR COMPLIANT - БЕЗ КОНФЛІКТІВ
   Базові стилі для всього сайту без зовнішніх CDN
====================== */

:root {
  /* ОСНОВНІ КОЛЬОРИ */
  --primary: #ff9800;
  --primary-dark: #f57c00;
  --dark: #121212;
  --light: #f5f5f5;
  --gray: #757575;
  --bg-dark: #121212;
  --bg-light: #1e1e1e;
  --card-bg: #252525;
  
  /* HEADER ЗМІННІ - додано для сумісності */
  --header-shadow-orange: 0 4px 20px rgba(255, 152, 0, 0.15), 0 2px 8px rgba(255, 152, 0, 0.1), 0 2px 10px rgba(0, 0, 0, 0.3);
  --header-shadow-light: 0 1px 5px rgba(0, 0, 0, 0.1);
  --header-shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.2);
  --header-bg-solid: #121212;
  --header-bg-transparent: rgba(18, 18, 18, 0);
  --header-bg-semi: rgba(18, 18, 18, 0.3);
  --header-bg-medium: rgba(18, 18, 18, 0.6);
  --header-bg-almost: rgba(18, 18, 18, 0.9);
  --header-min-height-desktop: 80px;
  --header-min-height-large-desktop: 100px;
  --header-min-height-tablet: 100px;
  --header-min-height-mobile: 90px;
  --header-min-height-small: 80px;
}

/* ======================
   RESET & BASE
====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* GDPR-сумісні системні шрифти замість Google Fonts */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 
               'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 
               'Droid Sans', 'Helvetica Neue', sans-serif;
  background: var(--bg-dark);
  color: var(--light);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ======================
   TYPOGRAPHY - АДАПТИВНІ ЗАГОЛОВКИ
====================== */
h1, h2, h3, h4, h5, h6 {
  /* Системні шрифти замість 'Titillium Web' */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 
               'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  font-weight: 600;
}

/* H1 - завжди по центру */
h1 {
  font-size: 2.5rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* H2 - адаптивне позиціонування рисочки */
h2 {
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: var(--primary);
  position: relative;
}

/* H2 по центру (за замовчуванням) */
h2 {
  text-align: center;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* H2 зліва (коли має клас або в певних секціях) */
h2.text-left,
.service-text h2,
.service-detail h2 {
  text-align: left;
}

h2.text-left::after,
.service-text h2::after,
.service-detail h2::after {
  left: 0;
  transform: none;
}

/* H3 в service cards - завжди по центру */
.service-card h3 {
  text-align: center;
  margin-bottom: 1rem;
  color: white;
  position: relative;
}

/* Інші заголовки */
h3, h4, h5, h6 {
  color: var(--light);
  margin-bottom: 1rem;
}

/* ======================
   SVG ICONS - GDPR-СУМІСНА ЗАМІНА FONT AWESOME
====================== */

/* БАЗОВІ СТИЛІ ДЛЯ SVG ІКОНОК */
.icon {
  /* Розмір і позиціонування */
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  
  /* Колір і заливка */
  fill: currentColor;
  color: inherit;
  
  /* Переходи для плавної анімації */
  transition: all 0.3s ease;
  
  /* Flexbox вирівнювання */
  flex-shrink: 0;
  
  /* Забороняємо вибір тексту */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  
  /* Покращуємо рендеринг */
  shape-rendering: geometricPrecision;
  
  /* Забороняємо pointer events на самій іконці */
  pointer-events: none;
}

/* РОЗМІРИ ІКОНОК */
.icon-xs  { width: 0.75em; height: 0.75em; }
.icon-sm  { width: 0.875em; height: 0.875em; }
.icon-md  { width: 1em; height: 1em; }
.icon-lg  { width: 1.25em; height: 1.25em; }
.icon-xl  { width: 1.5em; height: 1.5em; }
.icon-2xl { width: 2em; height: 2em; }
.icon-3xl { width: 2.5em; height: 2.5em; }
.icon-4xl { width: 3em; height: 3em; }

/* КОЛЬОРИ ІКОНОК */
.icon-primary { color: var(--primary) !important; }
.icon-secondary { color: var(--gray) !important; }
.icon-success { color: #4caf50 !important; }
.icon-warning { color: #ff9800 !important; }
.icon-danger { color: #f44336 !important; }
.icon-light { color: var(--light) !important; }
.icon-dark { color: var(--dark) !important; }

/* ======================
   BUTTONS - БАЗОВІ СТИЛІ БЕЗ КОНФЛІКТІВ З HEADER
====================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  font-family: inherit;
}

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

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

/* ======================
   SERVICE CARDS ІКОНКИ - ІДЕАЛЬНЕ ЦЕНТРУВАННЯ
====================== */

/* Базові стилі для іконок в service cards */
.service-card .icon,
.service-card svg.icon {
  display: block !important;
  margin: 0 auto 1.5rem auto !important;
  color: var(--primary);
  transition: all 0.3s ease;
  text-align: center;
}

.service-card .icon-2xl,
.service-card svg.icon-2xl {
  display: block !important;
  margin: 0 auto 1.5rem auto !important;
  width: 3rem !important;
  height: 3rem !important;
}

.service-card:hover .icon {
  transform: scale(1.1);
  color: var(--primary);
}

/* ======================
   FOOTER СОЦМЕРЕЖІ
====================== */

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.social-links .icon {
  width: 1.2em;
  height: 1.2em;
}

/* ======================
   CTA КНОПКИ
====================== */

.service-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  font-family: inherit;
}

.service-cta-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 152, 0, 0.6);
}

/* ======================
   FLOATING CONTACT BUTTON
====================== */

.contact-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  z-index: 999;
  text-decoration: none;
}

.contact-float .icon {
  width: 1.5em;
  height: 1.5em;
}

.contact-float:hover {
  background-color: var(--primary-dark);
  transform: scale(1.1);
}

/* ======================
   СПЕЦІАЛЬНІ ЕФЕКТИ
====================== */

.icon-hover-bounce:hover {
  animation: iconBounce 0.6s ease;
}

.icon-hover-rotate:hover {
  transform: rotate(360deg);
}

.icon-hover-pulse:hover {
  animation: iconPulse 1s infinite;
}

/* Анімації */
@keyframes iconBounce {
  0%, 20%, 60%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  80% { transform: translateY(-5px); }
}

@keyframes iconPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes iconSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.icon-spin {
  animation: iconSpin 1s linear infinite;
}

/* ======================
   ANIMATIONS
====================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ======================
   RESPONSIVE TYPOGRAPHY
====================== */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* ======================
   RESPONSIVE СТИЛІ ДЛЯ ІКОНОК
====================== */

/* Великі екрани (1920px+) */
@media (min-width: 1920px) {
  .contact-float .icon { 
    width: 1.8em; 
    height: 1.8em; 
  }
}

/* Мобільні (до 767px) */
@media (max-width: 768px) {
  /* Floating кнопка на мобільних */
  .contact-float {
    width: 50px;
    height: 50px;
  }
  
  .contact-float .icon {
    width: 1.3em;
    height: 1.3em;
  }
  
  /* Social links на мобільних */
  .social-links a {
    width: 35px;
    height: 35px;
  }
  
  .social-links .icon {
    width: 1em;
    height: 1em;
  }
}

/* Малі мобільні (до 480px) */
@media (max-width: 480px) {
  /* Floating кнопка на малих екранах */
  .contact-float {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
  
  .contact-float .icon {
    width: 1.1em;
    height: 1.1em;
  }
}

/* ======================
   ACCESSIBILITY ТА PERFORMANCE
====================== */

/* Для користувачів з порушеннями зору */
@media (prefers-reduced-motion: reduce) {
  .icon {
    transition: none;
  }
  
  .icon-hover-bounce:hover,
  .icon-hover-rotate:hover,
  .icon-hover-pulse:hover {
    animation: none;
    transform: none;
  }
}

/* Dark mode підтримка */
@media (prefers-color-scheme: dark) {
  .icon {
    filter: brightness(1.1);
  }
}

/* Покращуємо якість на Retina дисплеях */
@media (min-resolution: 2dppx) {
  .icon {
    shape-rendering: geometricPrecision;
  }
}