/* ==========================================================================
   SOHO GRAND HOTEL — BASE STYLES
   Базовые стили для всех страниц
   Версия: 20260328
   ========================================================================== */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #111;
  color: #fff;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === CSS VARIABLES === */
:root {
  --color-black: #000;
  --color-dark: #111;
  --color-white: #fff;
  --color-gray: #aaa;
  --color-light-gray: #e0e0e0;
  --color-red: #f00;
  --color-green: #0c6;
  --color-blue: #007bff;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s ease;
  --card-border-radius: 12px;
  --gap-between-cards: 10px;
}

/* === HEADER === */
.header {
  padding: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  position: relative;
  z-index: 100;
}

.logo {
  height: 100px;
  width: auto;
  filter: brightness(1.2);
}

.lang-switcher {
  position: absolute;
  top: 15px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 101;
}

.lang-switcher a {
  color: #fff;
  font-size: 0.9rem;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  transition: background 0.2s;
  text-decoration: none;
}

.lang-switcher a:hover {
  background: rgba(0, 123, 255, 0.2);
}

/* === CONTAINER & BLOCKS === */
.container {
  display: flex;
  width: 100%;
  height: 70vh;
  gap: var(--gap-between-cards);
  padding: 0 20px;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: auto 70vh;
  padding-top: 10px;
  padding-bottom: 10px;
}

.block {
  flex: 1;
  position: relative;
  height: calc(100% - 20px);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  padding: 20px 30px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  border-radius: var(--card-border-radius);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, z-index 0.4s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.863)), var(--bg-image-url);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin: auto 0;
}

.block.dyagilev:hover {
  cursor: pointer;
}

.block h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  line-height: 1.2;
  position: relative;
  z-index: 10;
}

.block.soho.main-photo {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.block.soho.main-photo h3 {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.block picture {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.block picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.block.soho picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === BACKGROUND IMAGES (DEFINED IN CRITICAL CSS) === */
/* Эти классы определены в critical CSS для быстрой отрисовки */

/* === RIBBONS === */
.ribbon {
  position: absolute;
  top: var(--ribbon-top, 30px);
  left: var(--ribbon-left, -30px);
  width: var(--ribbon-width, 160px);
  height: var(--ribbon-height, 26px);
  font-size: var(--ribbon-font-size, 0.8rem);
  padding: var(--ribbon-padding, 5px 30px);
  transform: rotate(var(--ribbon-transform-angle, -40deg));
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--ribbon-border-radius, 2px);
  box-shadow: var(--ribbon-box-shadow, 0 2px 6px rgba(0, 0, 0, 0.5));
  z-index: var(--ribbon-z-index, 20);
  text-align: var(--ribbon-text-align, center);
  display: var(--ribbon-display, block);
}

.ribbon-red {
  background: var(--ribbon-bg-red, #f00);
}

.ribbon-green {
  background: var(--ribbon-bg-green, #0c6);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .container {
    flex-wrap: wrap;
    height: auto;
    padding: 0 10px;
  }

  .block {
    flex: 1 1 50%;
    height: 25vh !important;
    margin-bottom: var(--gap-between-cards);
  }

  .logo {
    height: 80px;
  }

  .block h3 {
    font-size: 1.5rem;
  }

  .ribbon {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .block {
    flex: 1 1 100%;
    height: 15vh !important;
    padding: 20px 15px;
    margin-bottom: var(--gap-between-cards);
  }

  .block h3 {
    font-size: 0.8rem;
  }

  .header {
    padding: 10px 0;
  }

  .logo {
    height: 70px;
  }

  .container {
    padding: 0 8px;
    gap: 6px;
  }
}

@media (max-width: 400px) {
  .lang-switcher {
    top: 10px;
    right: 12px;
  }

  .lang-switcher a {
    font-size: 0.85rem;
    padding: 3px 6px;
  }
}
