/* ===== Typography base (как просил) ===== */
:root{
  --ag-dark: #2f2f2f;
  --ag-dark-2: #262626;
  --ag-line: rgba(255,255,255,0.20);
  --ag-text: #111;
  --ag-muted: rgba(0,0,0,0.55);
  --ag-white: #fff;
}

.ag-h2,
.ag-branch__title{
  font-family: "Inria Serif", serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.5px;
}

.ag-form__hint,
.ag-label,
.ag-input,
.ag-textarea,
.ag-check__text,
.ag-branch__addr,
.ag-branch__phone,
.ag-crumbs{
  font-family: Arial, Helvetica, sans-serif;
}

/* ===== Breadcrumbs ===== */

.ag-crumbs__inner{
  max-width: 1680px;
  margin: 0 auto;
  padding: 14px 24px;
  font-size: 20px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ag-crumbs a{ color: rgba(0,0,0,0.55); text-decoration: none; }
.ag-crumbs a:hover{ text-decoration: underline; }
.ag-crumbs__current{ color: rgba(0,0,0,0.75); }
.ag-crumbs__sep{ opacity: .65; }

/* ===== OUR BRANCHES ===== */
.ag-branches{
  background: var(--ag-dark-2);
  color: #fff;
}
.ag-branches__inner{
  max-width: 1680px;
  margin: 0 auto;
  padding: 52px 24px 46px;
}
.ag-branches__head{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}
.ag-h2{
  font-size: 40px;
  text-transform: uppercase;
  margin: 0;
}
.ag-branches__line{
  height: 2px;
  background: var(--ag-line);
  transform: translateY(2px);
}

.ag-branches__arrows{
  display: flex;
  gap: 10px;
}
.ag-arrow{
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.ag-arrow:hover{ background: rgba(255,255,255,0.06); }

.ag-branches__track{
  margin-top: 26px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 26px;
  overflow: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
.ag-branches__track::-webkit-scrollbar{ height: 8px; }
.ag-branches__track::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.18); border-radius: 10px; }

.ag-branch__title{
  font-size: 20px;
  text-transform: uppercase;
  line-height: 1.25;
  opacity: 0.95;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ag-branch__img{
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.ag-branch__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ag-branch__meta{
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  
}

.ag-branch__meta a{
color:#fff;
}
.ag-branch__addr{ margin-bottom: 6px;opacity: 0.75; }
.ag-branch__phone{
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}
.ag-branch__phone:hover{ text-decoration: underline; }

/* ===== CONTACT (map + form) ===== */

.ag-contact__inner{
  max-width: 1680px;
  margin: 0 auto;
  padding: 52px 24px 70px;
  display: grid;
  grid-template-columns: 1.05fr 1.55fr;
  gap: 56px;
  align-items: start;
}

.ag-h2--contact{
  color: #111;
  font-size: 40px;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.ag-map{
  width: 100%;
  height: 360px;
  background: #f1f1f1;
  border: 1px solid rgba(0,0,0,0.08);
  overflow: hidden;
}
.ag-map__frame{
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) contrast(1.05) brightness(1.05);
}

.ag-form__hint{
  font-size: 18px;
  color: rgba(0,0,0,0.55);
  max-width: 520px;
  margin-bottom: 22px;
  line-height: 1.5;
}

.ag-field{ margin-bottom: 16px; }
.ag-label{
  display: block;
  font-size: 18px;
  color: rgba(0,0,0,0.55);
  margin-bottom: 6px;
}
.ag-input,
.ag-textarea{
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,0.25);
  padding: 10px 0 10px;
  outline: none;
  font-size: 13px;
  background: transparent;
}
.ag-input:focus,
.ag-textarea:focus{
  border-bottom-color: rgba(0,0,0,0.65);
}

.ag-error{
  min-height: 16px;
  font-size: 11px;
  color: #b00020;
  padding-top: 6px;
}

.ag-consent{
  margin: 16px 0 18px;
}
.ag-check{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.ag-check input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ag-check__box{
  width: 14px;
  height: 14px;
  border: 1px solid rgba(0,0,0,0.45);
  margin-top: 2px;
  flex: 0 0 auto;
}
.ag-check input:checked + .ag-check__box{
  background: #111;
  border-color: #111;
}
.ag-check__text{
  font-size: 12px;
  color: rgba(0,0,0,0.55);
  line-height: 1.45;
}
.ag-check__text a{ color: rgba(0,0,0,0.65); }
.ag-check__text a:hover{ color: rgba(0,0,0,0.9); }

.ag-form__bottom{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 10px;
}

.ag-form__status{
  font-size: 12px;
  color: rgba(0,0,0,0.60);
}

.ag-send{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 170px;
  height: 52px;
  background: #2f2f2f;
  color: #fff;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.6px;
}
.ag-send:hover{ background: #242424; }
.ag-send__arr{ font-size: 18px; transform: translateY(-1px); }

/* ===== Responsive ===== */
@media (max-width: 980px){
  .ag-contact__inner{
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .ag-map{ height: 320px; }
  .ag-branches__head{
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .ag-branches__line{
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px){

  .ag-branches{
    padding: 24px 0;
  }

  .ag-branches__title{
    font-size: 28px;
    line-height: 1.1;
    margin-bottom: 12px;
  }

  .ag-branches__line{
    height: 1px;
    opacity: .25;
    margin-bottom: 18px;
  }

  .ag-branches__track{
    /* строго 1 карточка */
    grid-auto-columns: calc(100% - 32px);
    gap: 16px;
    padding: 0 16px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .ag-branch{
    scroll-snap-align: start;
    background: transparent;
  }

  /* Заголовок филиала — меньше и без диких переносов */
  .ag-branch__title{
    font-size: 18px;
    line-height: 1.15;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
    word-break: normal;
    overflow-wrap: anywhere; /* если очень длинно */
  }

  /* Картинка — одинаковая высота, красиво */
  .ag-branch__image{
    width: 100%;
    aspect-ratio: 16 / 10;     /* держит пропорции */
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    margin-bottom: 12px;
  }

  .ag-branch__image img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* Адрес и телефон — компактнее */
  .ag-branch__meta{
    font-size: 14px;
    line-height: 1.35;
    opacity: .85;
  }

  .ag-branch__phone{
    display: inline-block;
    margin-top: 10px;
    font-size: 16px;
    letter-spacing: .4px;
  }

  .ag-branches__track{
    grid-auto-columns: 100%;
    gap: 16px;
    padding-left: 16px;
    padding-right: 16px;
    scroll-snap-type: x mandatory;
  }

  .ag-branch{
    scroll-snap-align: start;
  }
}

@media (max-width: 560px){
  .ag-branches__inner{ padding: 38px 16px 34px; }
  .ag-contact__inner{ padding: 38px 16px 54px; }
  .ag-h2{ font-size: 24px; }
  .ag-h2--contact{ font-size: 24px; }

  .ag-branch__img{ height: 170px; }

  .ag-form__bottom{
    grid-template-columns: 1fr;
  }
  .ag-send{
    width: 100%;
    min-width: 0;
  }
  .ag-branches__track{
    margin-top: 26px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 1fr);
    gap: 26px;
    overflow: auto;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
  }
}