/* 1. Запобігаємо виходу контенту за межі body */
html {
    /* Дозволяємо вертикальний скрол, але ховаємо горизонтальний */
    overflow-x: hidden;
    /* Видаляємо фіксовану висоту, якщо вона була */
    height: auto;
}

body {
    /* Не обмежуємо висоту body, щоб контент міг тягнутися вниз */
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    /* Це допоможе уникнути "стрибків" на iOS */
    -webkit-overflow-scrolling: touch; 
}

/* 2. Важливо: box-sizing змушує padding і border входити в ширину 100% */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 3. Всі зображення мають бути гумовими за замовчуванням */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Contacts page styles */

.contacts-hero{ padding: 220px 0 20px;
  position: relative;
  background-image: url('../images/2bg.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #1f2a2e;
  background-attachment: fixed;
  
  /* Спочатку префікс для Chrome/Safari/Edge */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 160%);
  
  /* Потім стандартна властивість */
  mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 95%, transparent 160%);
}
.contacts-grid{ display:grid; grid-template-columns: 520px 1fr; gap:30px; align-items:start; }
.contacts-info{ max-width:520px; }
.contacts-title{ font-family: 'Montserrat', sans-serif; font-size:42px; font-weight:400; margin: 10px 0 18px; letter-spacing:6px; }
.contacts-decor{ width:434px; height:20px; background-image: url('../images/ornament_animals\ 1.png'); background-repeat:no-repeat; background-size:contain; margin-bottom:24px; margin-top: 70px;}

.contacts-list{ margin-top:10px; display:flex; flex-direction:column; gap:18px; }
.contact-item{ display:flex; gap:18px; align-items:center; color:#222; font-weight:600; text-decoration:none; }
.contact-icon{ width:28px; height:auto; flex:0 0 28px; }
.contact-text{ font-size:14px; }
.contact-item:hover .contact-text{ text-decoration:underline; }

.contacts-image img{ width:100%; height:360px; object-fit:cover; max-width:100%; display:block; padding-top: 25px;}

.contacts-map{ background-image: url('../images/2bg.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #1f2a2e;
  background-attachment: fixed;
  
  /* Спочатку префікс для Chrome/Safari/Edge */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 0%, black 95%, transparent 160%);
  
  /* Потім стандартна властивість */
  mask-image: linear-gradient(to bottom, transparent 0%, black 0%, black 95%, transparent 160%);
}
.contacts-map img{ width:100%; height:100%; object-fit:cover; display:block; }

/* About Us Section Styles */
.about-us-block {
    margin-bottom: 60px;
    max-width: 900px; /* Keep it readable */
}

.about-title {
    margin-bottom: 10px;
}

.about-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: #1f2a2e;
    margin-bottom: 20px;
}

.about-content {
    color: #222;
    font-size: 16px;
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 16px;
}

.about-content ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 16px;
}

.about-content li {
    margin-bottom: 8px;
}

.about-content strong {
    color: #000;
    font-weight: 600;
}

.about-image {
    margin-top: 30px;
    border-radius: 12px;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.contacts-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 60px 0;
    width: 100%;
}

/* Contact Item Updates */
.contact-item {
    align-items: flex-start; /* Align to top because of badges */
}

.contact-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15); /* Soft blue */
    color: #222; /* Темний/чорний текст */
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

/* Document Modal Styles */
.modal__content--docs {
    width: min(700px, 92%);
    padding: 40px;
}

.docs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #fdfdfd;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px;
    text-decoration: none !important;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.doc-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-color: rgba(164, 59, 44, 0.2);
}

.doc-item__icon {
    width: 50px;
    height: 50px;
    background: rgba(164, 59, 44, 0.05);
    color: #a43b2c;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s, color 0.3s;
}

.doc-item:hover .doc-item__icon {
    background: #a43b2c;
    color: #fff;
}

.doc-item__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.doc-item__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2a2e;
    line-height: 1.3;
}

.doc-item__view {
    font-size: 13px;
    font-weight: 600;
    color: #a43b2c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* Responsive */
/* Responsive Styles for Contacts Page */

/* Планшети та малі екрани (до 1024px) */
@media (max-width: 1024px) {
  .contacts-hero {
      padding: 120px 0 40px;
  }
  
  .contacts-grid {
      grid-template-columns: 1fr 1fr;
      gap: 30px;
      padding-top: 30px;
  }

  .contacts-image img {
      height: 320px;
  }
}

/* Мобільні пристрої (до 768px) */
@media (max-width: 768px) {
  .contacts-hero {
    padding: 150px 0 20px;
  }

  .contacts-grid {
      grid-template-columns: 1fr; /* Перемикаємо в одну колонку */
      gap: 40px;
  }

  .contacts-info {
      max-width: 100%;
      text-align: left;
      order: 2; /* Текст буде під картинкою */
  }

  .contacts-image {
      order: 1; /* Картинка буде зверху */
  }

  .contacts-image img {
      height: 280px;
      max-width: 100%;
  }

  .contacts-title {
      font-size: 32px;
      letter-spacing: 4px;
      margin-top: 0;
  }

  .contacts-decor {
      width: 100%;
      max-width: 300px;
      margin: 20px 0;
  }

  .contacts-list {
      align-items: flex-start;
  }

  .contact-item {
      justify-content: flex-start;
      width: 100%;
  }

  .contacts-map img {
      height: 220px;
  }
}

/* Маленькі смартфони (до 480px) */
@media (max-width: 480px) {
  .contacts-hero {
      padding: 100px 0 20px;
  }

  .contacts-title {
      font-size: 26px;
      letter-spacing: 2px;
  }

  .contact-text {
      font-size: 13px;
  }

  .contacts-image img {
      height: 220px;
  }

  .contacts-map img {
      height: 180px;
  }
  
  .modal__content--docs {
      padding: 30px 20px;
  }
  
  .doc-item {
      padding: 15px;
      gap: 15px;
  }
  
  .doc-item__icon {
      width: 40px;
      height: 40px;
  }
  
  .doc-item__icon svg {
      width: 20px;
      height: 20px;
  }
  
  .doc-item__title {
      font-size: 14px;
  }
}
