/* services_style.css */

/* Подключаем Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&family=Roboto:wght@400;500&display=swap');

/* Base styles and CSS variables */
:root {
  --primary-color: #301C50;
  --primary-hover: #9747FF;
  --text-color: #4C4C4C;
  --padding-standard: 30px;
  --max-width: 1920px;
  --card-width-1440: 360px;
  --card-width-1920: 384px;
  --card-height: 312px;
  
  /* Notification colors */
  --success-color: #4CAF50;
  --info-color: #2196F3;
  --warning-color: #FF9800;
  --error-color: #F44336;
  
  /* Footer colors */
  --footer-bg: #F8F8F8;
  --footer-text: #333333;
  --footer-link-hover: var(--primary-hover);
}

html {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--padding-standard);
  box-sizing: border-box;
  overflow: hidden;
}

/* Заголовки */
h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  margin: 0;
}
h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  margin: 0;
}

/* По умолчанию для текстов */
p, span, li, a {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
}

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

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

@keyframes lineGrow {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}



/* ===== SERVICES SECTION ===== */
.services-section {
  width: 100%;
}

.services-intro {
  background-color: #F6F6F6;
  padding: 40px 0 0 0;
  width: 100%;
}

.page-title {
  font-size: 42px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.intro-text {
  max-width: 900px;
  margin-bottom: 20px;
}

.intro-text p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-color);
}

/* Service Grid */
.services-grid {
  padding: 0 0 0 0;
  width: 100%;
}

.services-grid .container {
  padding: 0;
  max-width: 100%;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(var(--card-width-1440))), 1fr));
  gap: 0;
  width: 100%;
}

@media (min-width: 1600px) {
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(var(--card-width-1920))), 1fr));
  }
}

.service-card {
  display: flex;
  flex-direction: column-reverse;
  background-color: #fff;
  border: 1px solid #E0E0E0;
  overflow: hidden;
  text-decoration: none;
  height: var(--card-height);
  transition: box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  cursor: pointer;
}

.scroll-animation.visible .service-card {
  animation: cardAppear 0.5s ease forwards;
}

/* Создаем эффект появления с задержкой для каждой карточки */
@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-animation.visible .service-card:nth-child(1) { animation-delay: 0.1s; }
.scroll-animation.visible .service-card:nth-child(2) { animation-delay: 0.2s; }
.scroll-animation.visible .service-card:nth-child(3) { animation-delay: 0.3s; }
.scroll-animation.visible .service-card:nth-child(4) { animation-delay: 0.4s; }
.scroll-animation.visible .service-card:nth-child(5) { animation-delay: 0.5s; }
.scroll-animation.visible .service-card:nth-child(6) { animation-delay: 0.6s; }
.scroll-animation.visible .service-card:nth-child(7) { animation-delay: 0.7s; }
.scroll-animation.visible .service-card:nth-child(8) { animation-delay: 0.8s; }

.service-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* Изображение продукта */
.service-image {
  height: 210px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

/* Название продукта */
.service-title {
  padding: 20px;
  font-size: 18px;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  flex-grow: 1;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.service-card:hover .service-title {
  color: var(--primary-hover);
}




/* ===== RESPONSIVE STYLES ===== */
/* Desktop (1440px+) */
@media (min-width: 1440px) {
  .grid-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet (768px - 1439px) */
@media (min-width: 768px) and (max-width: 1439px) {
  .page-title {
    font-size: 36px;
    margin-bottom: 20px;
  }
  
  .intro-text p {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .grid-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .service-card {
    height: auto;
    min-height: 280px;
  }
  
  .service-image {
    height: 180px;
  }
  
  .service-title {
    font-size: 16px;
    padding: 16px;
  }
}

/* Mobile (320px - 767px) */
@media (max-width: 767px) {
  
  /* Typography */
  .page-title {
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: 20px;
  }
  
  .intro-text p {
    font-size: 15px;
    line-height: 1.6;
  }
  
  /* Services */
  .services-intro {
    padding: 30px 0 0 0;
  }
  
  .services-grid {
    padding: 0 0 0 0;
  }
  
  .grid-container {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .service-card {
    height: auto;
    min-height: 260px;
  }
  
  .service-image {
    height: 160px;
  }
  
  .service-title {
    font-size: 15px;
    padding: 15px;
    line-height: 1.4;
  }
}

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
  .page-title {
    font-size: clamp(20px, 6vw, 26px);
  }
  
  .intro-text p {
    font-size: 14px;
  }
  
  .service-card {
    min-height: 240px;
  }
  
  .service-image {
    height: 140px;
  }
  
  .service-title {
    font-size: 14px;
    padding: 12px;
  }
}
