:root {
    --bg-dark: #121212;
    --bg-matte: #1a1a1a;
    --gold: #C5A059;
    --gold-hover: #e0bc7a;
    --text-muted: #a0a0a0;
}

body {
    background-color: var(--bg-dark);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1, h2, .navbar-brand, .preloader-text {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 800; /* Очень жирный, как на картинке */
    text-transform: uppercase;
    letter-spacing: 5px; /* Создает элитный вид */
}



.py-100 { padding: 100px 0; }

.gold-text { color: var(--gold); }

/* Навигация */
.navbar {
    padding: 25px 0;
    transition: all 0.4s;
    background: transparent;
}

.navbar-scroll {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.navbar-brand {
    font-size: 24px;
    color: var(--gold) !important;
}

.nav-link {
    color: #fff !important;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 15px;
    opacity: 0.8;
}

.text-muted {
    color: var(--gold) !important;
}

.nav-link:hover { opacity: 1; color: var(--gold) !important; }

/* Кнопки */
.btn-outline-gold {
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 0;
    padding: 10px 25px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    transition: 0.3s;
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: #000;
}

.btn-gold {
    background: var(--gold);
    color: #000;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
    url('/assets/img/main.png') center/cover;
    position: relative;
}

.tracking-widest { letter-spacing: 8px; }

/* Карточки форматов */
.format-card {
    background: var(--bg-matte);
    padding: 40px;
    height: 100%;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.format-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: 0.5s;
}

.format-card:hover {
    transform: translateY(-10px);
    border-color: rgba(197, 160, 89, 0.3);
    background: #222;
}

.format-card:hover::before { transform: scaleX(1); }

.format-card.active {
    background: linear-gradient(145deg, #1a1a1a, #252525);
    border-color: var(--gold);
}

/* Привилегии */
.privilege-item {
    padding: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.privilege-item span {
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
}

/* Формы */
.form-control {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    border-radius: 0;
    color: #fff;
    padding: 15px 0;
}

.form-control:focus {
    background: transparent;
    box-shadow: none;
    border-bottom-color: var(--gold);
    color: #fff;
}

.contact-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

/* Адаптивность */
@media (max-width: 768px) {
    .display-1 { font-size: 3.5rem; }
    .hero-section { height: auto; padding: 150px 0; }
    .navbar { background: var(--bg-dark); }
}
/* Стили для блока Резидентов */
.resident-card {
    transition: all 0.4s ease;
    height: 100%;
    border-bottom: 2px solid transparent;
}

.resident-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    margin-bottom: 20px;
    background-color: #000; /* Фон для глубины */
    border: 1px solid rgba(197, 160, 89, 0.1); /* Тонкая золотистая рамка */
}

.resident-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* ДОБАВЬ ЭТУ СТРОКУ НИЖЕ */
    object-position: top center; 
    
    filter: grayscale(0%) brightness(0.85) sepia(5%);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: scale(1);
}

.industry-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    background: rgba(26, 26, 26, 0.9); /* Темная подложка */
    color: var(--gold);
    padding: 8px 15px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.resident-info h5 {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 22px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.resident-info p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
}

/* Добавим легкое золотистое свечение снизу при наведении */
.resident-card:hover .resident-img-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(197, 160, 89, 0.2), transparent);
    pointer-events: none;
    transition: 0.6s;
}

/* Подчеркивание имени при наведении */
.resident-card .resident-info h5 {
    position: relative;
    display: inline-block;
    transition: 0.3s;
}

.resident-card:hover .resident-info h5 {
    color: #C5A059; /* Золотой цвет имени */
}

/* Адаптивность для мобилок */
@media (max-width: 576px) {
    .resident-img-container {
        /* Меняем 1/1 на 4/5 — это идеальный портретный формат для мобилы */
        aspect-ratio: 4 / 5; 
    }
}


/* Контейнер мозаики */
.republic-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
    cursor: pointer;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: brightness(0.9);
}

/* Настройки размеров для эффекта мозаики */
.mosaic-item.large { grid-column: span 2; grid-row: span 2; }
.mosaic-item.wide { grid-column: span 2; }
.mosaic-item.tall { grid-row: span 2; }

/* Элегантный оверлей */
.mosaic-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mosaic-title {
    color: #C5A059;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

/* Ховер эффекты */
.mosaic-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.mosaic-item:hover .mosaic-overlay {
    opacity: 1;
}

.mosaic-item:hover .mosaic-title {
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 992px) {
    .republic-mosaic {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .republic-mosaic {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
    }
    .mosaic-item.large, .mosaic-item.wide, .mosaic-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

.btn-link-gold {
    color: #C5A059;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.btn-link-gold:hover {
    border-bottom-color: #C5A059;
    padding-left: 10px;
}

/* Стили Lightbox */
.lightbox {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px); /* Эффект размытия фона */
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    max-width: 85%;
    max-height: 80%;
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.2); /* Тонкое золотистое свечение */
    transform: scale(0.9);
    transition: transform 0.4s ease;
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #C5A059;
    font-size: 50px;
    font-weight: 200;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

#lightbox-caption {
    margin-top: 20px;
    color: #C5A059;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Inter', sans-serif;
}

/* About Hero */
.about-hero {
    height: 70vh;
    background: linear-gradient(to right, rgba(0,0,0,0.9), rgba(0,0,0,0.4)), url('/assets/img/main.png') center/cover;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

/* Principle Cards */
.principle-card {
    padding: 40px 30px;
    border: 1px solid rgba(255,255,255,0.05);
    background: #111;
    height: 100%;
    transition: 0.4s;
}
.principle-card:hover {
    border-color: #C5A059;
    background: #161616;
    transform: translateY(-5px);
}

/* Luxury List */
.luxury-list {
    list-style: none;
    padding: 0;
}
.luxury-list li {
    padding: 15px 0;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    font-size: 18px;
    position: relative;
    padding-left: 30px;
}
.luxury-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #C5A059;
}

.mission-image-box {
    position: relative;
    border: 1px solid #C5A059;
    padding: 0; /* Убираем внутренний отступ */
    line-height: 0; /* Убираем зазоры под фото */
}

.mission-image-box img {
    width: 100%;
    height: 450px; /* Фиксируем высоту для красоты */
    object-fit: cover;
}

.mission-overlay-text {
    position: absolute;
    bottom: 20px;
    right: -20px; /* Оставляем небольшой вылет вправо для стиля */
    background: #C5A059;
    color: #000;
    padding: 20px;
    min-width: 160px;
    text-align: center;
    z-index: 2;
}
.mission-overlay-text h2 { font-weight: 900; margin: 0; }
.mission-overlay-text p { font-size: 12px; text-transform: uppercase; margin: 0; font-weight: 700; }

.italic { font-style: italic; }

#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.preloader-frame {
    position: relative;
    padding: 30px 60px;
    border: 1px solid rgba(197, 160, 89, 0.1); /* Тонкая фоновая рамка */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Бегающий луч */
.preloader-frame .line {
    position: absolute;
    display: block;
}

/* Верхняя линия */
.preloader-frame .line {
    top: 0; left: -100%;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #C5A059);
    animation: btn-anim1 2s linear infinite;
}

@keyframes btn-anim1 {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* Текст */
.preloader-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 32px;
    letter-spacing: 12px;
    color: #fff;
    text-transform: uppercase;
    animation: text-pulse 2s ease-in-out infinite;
}

@keyframes text-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Плавное исчезновение */
.preloader-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Apple-like toggle (strong selectors for navbar) */
.navbar .lang-toggle{
  position: relative;
  width: 96px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 3px;
  overflow: hidden;
}

.navbar .lang-toggle .lang-opt{
  position: relative;
  z-index: 2;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-decoration: none !important;
  color: rgba(255,255,255,0.70) !important;
  user-select: none;
  padding: 6px 0;
  display: block;
  transition: color 0.2s ease;
}

.navbar .lang-toggle .lang-opt:hover{
  color: rgba(255,255,255,0.92) !important;
}

.navbar .lang-toggle .lang-opt.is-active{
  color: #121212 !important;
}

.navbar .lang-toggle .lang-knob{
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: #d4af37;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transform: translateX(0);
  transition: transform 0.22s ease;
}

/* when UZ active */
.navbar .lang-toggle.is-uz .lang-knob{
  transform: translateX(100%);
}