/* ========== ОРИГИНАЛЬНЫЙ СТИЛЬ ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #201D2F;
  color: #D9CDEC;
  font-family: 'Italian Old Antiqua', Gabriela, 'Georgia', 'Times New Roman', serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
}

/* шапка */
header {
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.6rem;
  letter-spacing: 2px;
  font-weight: 500;
  background: linear-gradient(135deg, #F5ECFF, #C9B0EC);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-bottom: 0.5rem;
}

/* hero-контейнер */
.hero {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
}

/* ряд кнопок */
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* общий стиль для кнопок в ряду — без скруглений */
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.nav-link {
  color: #D9CDEC;
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  background: transparent;
  padding: 0;
  border: none;
}

.nav-link:hover {
  color: #C9B0EC;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-separator {
  color: rgba(201, 176, 236, 0.4);
  font-size: 1rem;
}

/* Космос кнопка — справа */
.cosmos-area {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
  padding: 12px 20px;
  border: 1px solid rgba(139, 98, 188, 0.5);
  background: rgba(32, 29, 47, 0.6);
  backdrop-filter: blur(4px);
}

.button-cosmos {
  display: inline-block;
  background: rgba(76, 54, 112, 0.85);
  backdrop-filter: blur(8px);
  color: #F2EAFF;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  border: 1px solid rgba(139, 98, 188, 0.8);
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
  background-color: rgba(30, 20, 50, 0.8);
  border-radius: 0px;
  cursor: pointer;
}

.button-cosmos:hover {
  background: rgba(95, 69, 144, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  border-color: #C9B0EC;
}

/* картинка шапки */
.header-image {
  display: block;
  width: 90%;
  max-width: 100%;
  height: 120%;
  object-fit: cover;    /* картинка обрезается, сохраняя пропорции */
  object-position: center center;
  margin-top: 10px;
  margin-bottom: 1.5rem;
  object-fit: cover;
  border: none;
  border-radius: 0px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}
/* ========== МОБИЛЬНАЯ ВЕРСИЯ КНОПКИ КОСМОС (УМЕНЬШЕННЫЙ ПРЯМОУГОЛЬНИК) ========== */
.cosmos-area-mobile {
  display: none;
}

.button-cosmos-mobile {
  display: inline-block;
  background: rgba(76, 54, 112, 0.85);
  backdrop-filter: blur(8px);
  color: #F2EAFF;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(139, 98, 188, 0.8);
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
  background-color: rgba(30, 20, 50, 0.8);
  border-radius: 0px;
  cursor: pointer;
}

.button-cosmos-mobile:hover {
  background: rgba(95, 69, 144, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
  border-color: #C9B0EC;
}

/* боковая картинка (десктоп) */
.side-image {
  display: block;
  position: relative;
  float: left;
  width: 180px;
  height: auto;
  margin: 0 25px 20px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(139, 98, 188, 0.6);
  border-radius: 0px;
}   
/* мобильная картинка — скрыта на десктопе */
.mobile-image {
  display: none;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 1rem auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(139, 98, 188, 0.6);
  border-radius: 0px;
}

/* текстовая карточка */
.text-card {
  background: rgba(32, 29, 47, 0.9);
  border: 1px solid rgba(201, 176, 236, 0.6);
  padding: 1.2rem 1.8rem;
  margin-top: 1.5rem;
  text-align: center;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border-radius: 0px;
   clear: both;
}

.text-card p {
  font-size: 1.1rem;
  color: #D9CDEC;
  margin: 0;
  letter-spacing: 0.5px;
}

.card-subtitle {
  font-size: 0.7rem;
  margin-top: 8px;
  opacity: 0.7;
  letter-spacing: 1px;
}

/* подвал */
.footer-note {
  position: fixed;
  bottom: 8px;
  right: 12px;
  font-size: 10px;
  opacity: 0.5;
  z-index: 99;
  font-family: monospace;
}

/* универсальное — никаких скруглений */
button, a, div, section, img {
  border-radius: 0px;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
  .side-image {
    width: 140px;
    margin-right: 18px;
    margin-bottom: 15px;
  }
  .header-image {
    height: 100px;
  }
  .cosmos-area {
    padding: 8px 16px;
  }
  .button-cosmos {
    font-size: 0.8rem;
    padding: 0.5rem 1.2rem;
  }
  .nav-link {
    font-size: 0.9rem;
  }
}

/* ========== ТЕЛЕФОНЫ ========== */
@media (max-width: 550px) {
  .hero {
    padding: 1.2rem;
  }

  
  /* ССЫЛКИ ПОД КАРТИНКОЙ ШАПКИ (прямо под ней, без отступа от header) */
  .nav-links {
    margin-top: 0;
    margin-bottom: 1.5rem;
    gap: 0.8rem;
  }
  .nav-link {
    font-size: 0.85rem;
  }
  
  /* Десктопную кнопку Космос (которая справа) — СКРЫВАЕМ */
  .desktop-cosmos {
    display: none;
  }
  
  /* Мобильную кнопку Космос — ПОКАЗЫВАЕМ ПОСЛЕ ТЕКСТА с УМЕНЬШЕННЫМ ПРЯМОУГОЛЬНИКОМ */
  .cosmos-area-mobile {
    display: flex;
    justify-content: center;
    margin-top: 1.2rem;
    margin-bottom: 0;
    padding: 6px 12px;
    border: 1px solid rgba(139, 98, 188, 0.5);
    background: rgba(32, 29, 47, 0.6);
    backdrop-filter: blur(4px);
  }
  
  /* убираем floated картинку */
  .side-image {
    display: none;
  }
  .mobile-image {
    display: block;
    width: auto;
    margin: 0 auto 1rem auto;
  }
  
  .text-card {
    padding: 1rem 1.2rem;
    margin-top: 1rem;
    margin-bottom: 0;
    clear: both;
  }
  .text-card p {
    font-size: 1rem;
  }
  .header-image {
    height: 70px;
    margin-bottom: 0.8rem;
  }
}

img {
  max-width: 100%;
  height: auto;
}


/* ========== СТРАНИЦА "РАР" ========== */
.rar-page-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(32, 29, 47, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(201, 176, 236, 0.4);
  padding: 2rem;
}

.rar-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  color: #D9CDEC;
}

.rar-image {
  display: block;
  width: 250px;
  height: auto;
  float: left;
  margin: 0 25px 20px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(139, 98, 188, 0.6);
}

.rar-back-area {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  clear: both;
}

.back-button {
  display: inline-block;
  background: rgba(76, 54, 112, 0.7);
  backdrop-filter: blur(8px);
  color: #F2EAFF;
  text-decoration: none;
  border: 1px solid rgba(139, 98, 188, 0.8);
  padding: 0.6rem 1.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-radius: 0px;
}

.back-button:hover {
  background: rgba(95, 69, 144, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  border-color: #C9B0EC;
}

.rar-link {
  color: #D9CDEC;
  text-decoration: none;
  transition: all 0.2s ease;
}

.rar-link:hover {
  color: #C9B0EC;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Телефоны */
@media (max-width: 550px) {
  .rar-page-container {
    padding: 1.2rem;
  }
  .rar-image {
    float: none;
    display: block;
    margin: 0 auto 1.2rem auto;
    width: auto;
  }
  .back-button {
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
  }
}

.rar-content::after {
  content: "";
  display: table;
  clear: both;
}