:root {
  --ag-offset: 80px; 
}
.ag-section {
  all: unset;
  display: block;
  box-sizing: border-box;
  width: 100%;
  background: #e5e5e5;
  padding: 80px 0 60px 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", MakoshFont, "Helvetica Neue", Arial, sans-serif;
}

.ag-header {
  padding: 0 0 48px var(--ag-offset);
  max-width: 700px;
  text-align: left;
}

.ag-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: #6e6e73;
  letter-spacing: 0.01em;
  margin: 0 0 2px 0;
  line-height: 1.4;
}

.ag-headline {
  display: block;
  font-size: 40px;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px 0;
}

.ag-description {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: #6e6e73;
  line-height: 1.6;
  margin: 0;
}

.ag-gallery-wrapper {
  position: relative;
  padding: 0 0 0 var(--ag-offset); 
}

.ag-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;        
  -ms-overflow-style: none;  
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.ag-scroll-container::-webkit-scrollbar {
  display: none;           
}

.ag-card-list {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 0 0 24px 0;
  list-style: none;
  margin: 0;
  width: max-content;
}

.ag-card {
  display: flex;
  flex-direction: column;
  width: 340px;
  flex-shrink: 0;
  scroll-snap-align: start;
  cursor: pointer;
}

.ag-card.wide {
  width: 420px;
}

.ag-card-image-wrap {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #f5f5f7;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  position: relative;
}

.ag-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0; 
  transition: transform 0.4s ease;
}

.ag-card:hover .ag-card-image-wrap img {
  transform: scale(1.02);
}

.ag-card-content {
  padding: 16px 4px 0 4px;
  flex: 1;
}

.ag-card-heading {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.35;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.ag-card-text {
  font-size: 14px;
  font-weight: 400;
  color: #6e6e73;
  line-height: 1.55;
  margin: 0;
}

.ag-card-footnote {
  padding: 10px 4px 0 4px;
}

.ag-card-footnote p {
  font-size: 12px;
  font-weight: 400;
  color: #6e6e73;
  opacity: 0.7;
  line-height: 1.4;
  margin: 0;
}

.ag-paddlenav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(calc(-50% - 60px)); 
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 10;
}

.ag-paddlenav-btn {
  pointer-events: all;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
  outline: none;
  opacity: 1;
}

.ag-paddlenav-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.08);
}

.ag-paddlenav-btn:active {
  transform: scale(0.95);
}

.ag-paddlenav-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.ag-paddlenav-btn svg {
  width: 20px;
  height: 20px;
  fill: #1d1d1f;
}

.ag-dots {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  padding: 20px 48px 0 var(--ag-offset);
}

.ag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d2d2d7;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  outline: none;
}

.ag-dot.active {
  background: #1d1d1f;
  transform: scale(1.25);
}
@media (max-width: 768px) {
  :root {
    --ag-offset: 24px;
  }
}

@media (max-width: 480px) {
  :root {
    --ag-offset: 16px;
  }
}
/* ---- Адаптив ---- */
@media (max-width: 768px) {
  .ag-section {
    padding: 60px 0 40px 0;
  }

  .ag-header {
    padding: 0 0 36px 24px;
    max-width: calc(100% - 24px);
  }

  .ag-headline {
    font-size: 28px;
  }

  .ag-card-list {
    padding: 0 24px 20px 24px;
    gap: 12px;
  }

  .ag-card {
    width: 280px;
  }

  .ag-card.wide {
    width: 300px;
  }

  .ag-paddlenav {
    display: none; 
  }

  .ag-dots {
    padding: 16px 24px 0 24px;
  }
}

@media (max-width: 480px) {
  .ag-header {
    padding: 0 0 28px 16px;
  }

  .ag-headline {
    font-size: 24px;
  }

  .ag-card-list {
    padding: 0 16px 16px 16px;
    gap: 10px;
  }

  .ag-card {
    width: calc(85vw);
  }

  .ag-card.wide {
    width: calc(88vw);
  }

  .ag-dots {
    padding: 14px 16px 0 16px;
  }
}