/* CSS переменные для единообразия */
:root {
  --primary-blue: rgba(46, 102, 223, 0.932);
  --shadow-blue: 0 0 20px var(--primary-blue);
  --font-main: "Comfortaa", Courier, monospace;
  --bg-light: rgba(255, 255, 255, 0.733);
  --bg-mobile: rgba(255, 255, 255, 0.85); /* Более прозрачный для мобильных */
}

/* Основные стили */
html {
  background-color: rgb(190, 228, 250);
}

body {
  background: url("drFoto/foto-44.jpg") no-repeat center;
  background-size: cover;
  background-attachment: fixed;
  font-family: var(--font-main);
}

/* Навигация */
.nav {
  background-color: rgba(214, 243, 242, 0.452);
  box-shadow: var(--shadow-blue);
  border-radius: 7px;
  width: 94%;
  margin: 1% 3% 2% 3%;
  padding: 1% 1% 1.3% 1%;
  display: flex;
  align-items: center;
}

.navA {
  flex-grow: 1;
  flex-basis: 0;
  text-align: center;
  font-size: 140%;
  font-weight: bold;
  color: rgb(12, 100, 201);
  padding: 0.5% 1% 0 1%;
  text-decoration: none;
  transition: color 0.3s ease;
}

.navA:hover {
  color: rgb(0, 60, 130);
  text-decoration: underline;
}

.logo {
  margin-left: auto;
  margin-right: 0.5em;
}

/* Мобильное меню - ИСПРАВЛЕНО */
details {
  padding: 0.4% 0% 0 0%;
  margin: 0 3% 0 3%;
  font-size: 170%;
  font-weight: bold;
  position: relative;
}

/* Стили для открытого меню */
details[open] .dropdown-menu {
  display: block !important;
  animation: slideDown 0.3s ease;
}

details:not([open]) .dropdown-menu {
  display: none !important;
}

/* Убираем стандартную стрелку */
details summary {
  list-style: none;
  cursor: pointer;
}

details summary::-webkit-details-marker {
  display: none;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  min-width: 200px;
}

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: #333;
}

.dropdown-menu a:hover {
  background-color: #f0f0f0;
}

/* Анимация для меню */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Главный экран */
.divEkran {
  height: 85vh;
  position: relative;
}

.logo-centr {
  max-height: 65%;
  margin: 9% 0 5% 0;
  text-align: center;
}

.logoCentrImg {
  display: block;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.logoCentrImg:hover {
  opacity: 0.9;
}

/* Иконки связи */
.SvyzIcon {
  background-color: rgba(46, 102, 223, 0.281);
  border-radius: 3px;
  box-shadow: var(--shadow-blue);
  max-width: 1.5em;
  transition: transform 0.3s ease;
}

.SvyzIcon:hover {
  transform: scale(1.1);
}

.svyaz {
  text-align: right;
  padding: 1% 3% 1% 1%;
}

.svyaz a {
  text-decoration: none;
}

/* Стрелка вниз */
.stDown {
  display: block;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* Блок с номерами */
.nomeraDiv {
  width: 95%;
  margin: 4% auto 4% auto;
}

.carousel-inner {
  border-radius: 0.9em;
  box-shadow: var(--shadow-blue);
}

.card {
  border-radius: 1em;
  box-shadow: var(--shadow-blue);
  border-color: #000;
  height: 100%;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-title {
  color: rgb(12, 100, 201);
  font-weight: bold;
  font-size: 1.2rem;
}

/* Карта */
iframe {
  border-radius: 1em;
  box-shadow: var(--shadow-blue);
  background-color: rgba(37, 120, 228, 0.233);
  padding: 0.1em;
  margin: 3%;
  max-width: 94%;
}

.map {
  text-align: center;
}

/* Сервис и таблица цен */
.servis,
.tableCeni {
  width: 90%;
  margin: 0 auto 1em auto;
  box-shadow: var(--shadow-blue);
  background-color: var(--bg-light);
  border-radius: 10px;
  padding: 2%;
  border-color: #000;
  text-align: center;
  overflow-x: auto;
}

.servis {
  text-align: left;
  line-height: 1.6;
}

.servis strong {
  color: rgb(12, 100, 201);
}

.tableCeni {
  overflow-x: scroll;
}

.tableCeni table {
  min-width: 600px;
}

.tableCeni th {
  background-color: rgba(46, 102, 223, 0.1);
}

/* Футер */
.spoler {
  box-shadow: var(--shadow-blue);
  width: 100%;
  padding: 2% 2% 3em 2%;
  color: aliceblue;
  background-color: rgba(31, 29, 29, 0.774);
  font-size: large;
  text-align: center;
}

.spoler a {
  color: #87cefa;
  text-decoration: none;
}

.spoler a:hover {
  text-decoration: underline;
  color: #fff;
}

/* Вспомогательные классы */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

/* Адаптивность */
@media screen and (max-width: 767px) {
  .navA {
    display: none;
  }

  details {
    display: block;
  }

  .Imap {
    width: 90%;
    height: 400px;
  }

  .svyaz1 {
    margin-top: 10vh;
  }

  .tableCeni {
    font-size: 14px;
  }

  .card-title {
    font-size: 1rem;
  }

  .logo-centr {
    margin: 15% 0 5% 0;
  }

  .SvyzIcon {
    max-width: 1.2em;
  }

  /* ИСПРАВЛЕНО: более прозрачный фон на мобильных */
  .card,
  .servis,
  .tableCeni,
  .partner-card {
    background-color: var(--bg-mobile) !important;
  }
}

@media screen and (min-width: 768px) {
  details {
    display: none;
  }

  .Imap {
    width: 60%;
    height: 400px;
  }
}

@media screen and (min-width: 1200px) {
  .nomeraDiv {
    width: 80%;
  }

  .servis,
  .tableCeni {
    width: 80%;
  }

  .Imap {
    width: 50%;
    height: 450px;
  }
}

/* Шрифты - оптимизировано */
@font-face {
  font-family: "Comfortaa";
  src: local("Comfortaa Bold"), local("Comfortaa-Bold"),
    url("Comfortaa/Comfortaa-Bold.woff2") format("woff2"),
    url("Comfortaa/Comfortaa-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comfortaa";
  src: local("Comfortaa Regular"), local("Comfortaa-Regular"),
    url("Comfortaa/Comfortaa-Regular.woff2") format("woff2"),
    url("Comfortaa/Comfortaa-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Печать */
@media print {
  body {
    background: none;
    background-color: white;
  }

  .nav,
  .svyaz,
  .stDown,
  footer .svyaz {
    display: none;
  }
}

/* ======== БЛОК С ТАУНХАУСОМ (ОБЪЕДИНЕН И ИСПРАВЛЕН) ======== */

.partner-section {
  width: 90%;
  margin: 3em auto;
  padding: 2em 0;
  border-top: 2px solid rgba(46, 102, 223, 0.3);
}

.section-title {
  text-align: center;
  color: rgb(12, 100, 201);
  margin-bottom: 1.5em;
  font-weight: bold;
  font-size: 1.8rem;
}

/* Основной блок для варианта с карточкой как у номеров */
.partnerDiv {
  width: 40%;
  margin: 3em auto;
}

/* Карточка партнера (общие стили для обоих вариантов) */
.partner-card {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 1em;
  box-shadow: 0 0 20px rgba(46, 102, 223, 0.3);
  overflow: hidden;
  padding: 1.5em;
  height: auto;
}

/* Мета-информация для партнера */
.partner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background-color: rgba(46, 102, 223, 0.05);
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 0.9rem;
  margin: 10px 0;
}

/* Сетка из двух фото (для варианта 1) */
.partner-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  margin-bottom: 1.5em;
}

.partner-main-image,
.partner-secondary-image {
  border-radius: 0.5em;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.partner-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.partner-img:hover {
  transform: scale(1.03);
}

/* Контент */
.partner-content {
  padding: 1em 0;
}

.partner-title {
  color: rgb(12, 100, 201);
  font-size: 1.5rem;
  margin-bottom: 0.5em;
  text-align: center;
}

.partner-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  color: #666;
  margin-bottom: 1em;
}

.partner-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8em;
  margin: 1.2em 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: #555;
  font-size: 0.9rem;
}

.partner-description {
  line-height: 1.5;
  color: #333;
  margin: 1.2em 0;
  font-size: 0.9rem;
  text-align: justify;
}

.partner-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  background-color: rgb(12, 100, 201);
  color: white;
  padding: 10px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.partner-button:hover {
  background-color: rgb(8, 70, 140);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(12, 100, 201, 0.3);
}

/* Для очень широких экранов */
@media screen and (min-width: 1920px) {
  .partnerDiv {
    width: 800px;
  }
}

/* Для ноутбуков среднего размера */
@media screen and (min-width: 1201px) and (max-width: 1919px) {
  .partnerDiv {
    width: 45%;
  }
}

/* Для планшетов */
@media screen and (min-width: 769px) and (max-width: 1200px) {
  .partnerDiv {
    width: 70%;
  }

  .partner-section {
    width: 70%;
  }
}

/* Для мобильных */
@media screen and (max-width: 768px) {
  .partner-image-grid {
    grid-template-columns: 1fr;
  }

  .partner-img {
    height: 180px;
  }

  .partner-features {
    grid-template-columns: 1fr;
  }

  .partnerDiv,
  .partner-section {
    width: 92%;
  }

  .partner-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .partner-meta span {
    margin-right: 0 !important;
  }
}

/* ======== ССЫЛКИ НА ЦЕНЫ ДЛЯ КАРТОЧЕК НОМЕРОВ ======== */
.price-tag {
  display: inline-flex;
  align-items: center;
  margin-top: 15px;
  background-color: #f0f7ff;
  border: 2px dashed rgb(12, 100, 201);
  border-radius: 40px;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s ease;
}

.price-tag-currency {
  background-color: rgb(12, 100, 201);
  color: white;
  padding: 8px 15px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 40px 0 0 40px;
}

.price-tag-text {
  color: rgb(12, 100, 201);
  padding: 8px 15px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.price-tag-icon {
  color: rgb(12, 100, 201);
  padding: 8px 15px 8px 0;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.price-tag:hover {
  background-color: rgb(12, 100, 201);
  border-color: transparent;
}

.price-tag:hover .price-tag-currency {
  background-color: white;
  color: rgb(12, 100, 201);
}

.price-tag:hover .price-tag-text,
.price-tag:hover .price-tag-icon {
  color: white;
}

.price-tag:hover .price-tag-icon {
  transform: translateX(5px);
}

/* Адаптивность для мобильных */
@media screen and (max-width: 768px) {
  .price-tag {
    width: 100%;
    justify-content: center;
  }
}
