/* ============================================================
   index.css — стили только для главной страницы
   ============================================================ */

/* --- Переменные из макета --- */
:root {
    --clr-primary: hsl(60, 5%, 11%);
    --clr-wood-accent: #6F4E37;
    --clr-gold: #C8A46A;
    --clr-bg-light: #F5F1EA;
    --clr-text-main: #2C2B28;
    --clr-white: #FFFFFF;

    --font-headings: 'Playfair Display', serif;
    --font-subheadings: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
}

/* --- Базовые сбросы --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /*scroll-behavior: smooth;*/
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--clr-text-main);
    background-color: var(--clr-bg-light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 70px;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 60px;
    width: 100%;
    box-sizing: border-box;
}

/* Минимальная ширина страницы — 320 пикселей */
body {
    min-width: 320px;
    overflow-x: hidden; /* скрываем горизонтальную прокрутку, если контент вылезает */
}

/* Также можно зафиксировать минимальную ширину у основного контейнера */
.container {
    min-width: 280px; /* или 320px, но с учётом padding — 280px достаточно */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}
a:hover { color: var(--clr-gold); }

ul { list-style: none; }

/* --- ХЕДЕР --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #202020;
    color: var(--clr-white);
    padding: 0;
    width: 100%;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 10px;
}

.logo {
    display: flex;
    align-items: center;
}
.logo img {
    display: block;
    max-height: 60px;   /* подстраивается под высоту хедера */
    width: auto;
    height: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 14px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switch {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
.lang-switch .arrow { font-size: 10px; }

.btn {
    padding: 14px 24px;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    transition: opacity 0.3s ease;
    display: inline-block;
    text-align: center;
}
.btn:hover { opacity: 0.85; }

.btn-primary {
    background-color: var(--clr-gold);
    color: var(--clr-white);
}

.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}
.burger-menu span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--clr-white);
}

/* --- HERO --- */
.hero {
    position: relative;
    background-color: var(--clr-primary);
    padding: 280px 0;
    /*background-image: url('images/hero-bg.jpeg');*/
	background-image: url('images/hero-9sept.jpeg');
    background-size: cover;
    background-position: center 40%;
    width: 100%;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(30, 30, 27, 0.6);
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
}
.hero-content {
    max-width: 600px;
    color: var(--clr-white);
}

.hero-subtitle {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--clr-gold);
    margin-bottom: 20px;
    display: block;
}

.hero-title {
    font-family: var(--font-headings);
    font-size: 68px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 40px;
    margin-top: 20px;
    opacity: 0.9;
}

.hero-buttons { display: flex; gap: 20px; }
.hero-buttons .btn-primary { color: #2e2b28; }
.hero-buttons .btn-outline { border: 1px solid #c9a46a; color: #c9a46a; background-color: transparent; }

/* --- FEATURES --- */
.features {
    background-color: #202020;
    color: var(--clr-white);
    padding: 60px 0;
    border-top: 1px solid #333;
    width: 100%;
}
.features-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: center;          /* вертикальное центрирование иконки и текста */
    justify-content: center;
    text-align: center; 
}
.feature-icon {
    width: 40px;
    height: 40px;
    background-color: #202020;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.features .feature-item h4 { color: #c9a46a; margin-bottom: 4px; }
.feature-text p { font-size: 12px; opacity: 0.7; text-align: center; flex: 1;}
.features .icon-svg { color: #c9a46a; }

/* --- SPACES --- */
.spaces {
    padding: 40px 0;
    background-color: var(--clr-bg-light);
    width: 100%;
}
.spaces-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.space-card {
    background-color: var(--clr-white);
    padding: 20px;
    border-radius: 4px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.space-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.space-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 4px;
}
.space-card h3,
.space-card p {
    color: #2e2b28;
}
.card-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
}
.space-link { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #c9a46a; }

/* --- AMENITIES --- */
.amenities {
    background-color: #202020;
    color: var(--clr-white);
    padding: 30px 0;
    width: 100%;
}
.amenities .section-title { color: var(--clr-white); }
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.amenity-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #202020;
    padding: 0 10px;
    position: relative;
}
.amenity-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 100px;
    background-color: #c9a46a;
    opacity: 0.2;
}
.amenity-icon {
    width: 40px;
    height: 40px;
    background-color: #202020;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 15px;
}
.amenity-icon svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    color: #c9a46a;
}
.amenity-item h4 { font-size: 14px; margin-bottom: 5px; margin-top: 5px; }
.amenity-item p { font-size: 12px; opacity: 0.7; }

/* --- ФОРМА --- */
.form-section {
    width: 100%;
    background-color: #1E1E1B;
    background-image: url('images/form-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 40px 0;
    position: relative;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
}
.form-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(30, 30, 27, 0.75);
    z-index: 1;
}
.form-inner-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 60px;
    box-sizing: border-box;
}

.form-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}
.form-text {
    flex: 0 0 20%;
    text-align: left;
    color: var(--clr-white);
}
.form-text h3 {
    font-family: var(--font-headings);
    font-size: 28px;
    margin-bottom: 10px;
}
.form-text p {
    font-size: 14px;
    opacity: 0.8;
}
.form-inputs-group {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}
.form-item-stacked {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 220px;
}
.form-item-stacked input {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    box-sizing: border-box;
    background: var(--clr-white);
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
}
.form-item-stacked .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--clr-white);
    opacity: 0.9;
}
.form-item-stacked .form-check input {
    width: auto;
    padding: 0;
    margin: 0;
    height: auto;
    accent-color: var(--clr-gold);
}
.form-inputs-group > input[type="tel"] {
    width: 220px;
    height: 44px;
    padding: 0 15px;
    box-sizing: border-box;
    background: var(--clr-white);
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
}
.form-inputs-group .btn-primary {
    width: 220px;
    height: 44px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--clr-gold);
    color: #2e2b28;
    border-radius: 4px;
    border: none;
    font-family: var(--font-body);
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.form-inputs-group .btn-primary:hover { opacity: 0.85; }

/* --- ФУТЕР --- */
.footer {
    background-color: #202020;
    color: var(--clr-white);
    padding: 60px 0;
    border-top: 1px solid #333;
    width: 100%;
}
.footer-logo img {
    max-height: 60px;   /* подберите нужную высоту */
    width: auto;
    height: auto;
    display: block;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    font-family: var(--font-headings);
    font-size: 18px;
    margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li { font-size: 14px; opacity: 0.7; }
.footer-col ul li:hover { opacity: 1; color: var(--clr-gold); }
.contact-list li { white-space: nowrap; }
.footer-desc { font-size: 12px; opacity: 0.6; line-height: 1.5; margin-top: 20px; }
.social-links { margin-top: 15px; display: flex; gap: 15px; }
.social-links a { opacity: 0.7; display: inline-flex; align-items: center; justify-content: center; }
.social-links a:hover { opacity: 1; color: var(--clr-gold); }

/* --- Иконки --- */
.icon-svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon-svg-sm {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon-svg-lg {
    width: 64px;
    height: 64px;
    max-width: 64px;
    flex-shrink: 0;
    aspect-ratio: 1/1;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
    margin: 0 auto 15px;
    color: #c9a46a;
}

/* --- Анимация --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Заголовки секций --- */
.section-title {
    text-align: center;
    font-family: var(--font-headings);
    font-size: 36px;
    margin-bottom: 25px;
    color: var(--clr-primary);
}
.feature-item h4,
.amenity-item h4,
.footer-col h4 {
    font-family: var(--font-subheadings);
    font-size: 20px;
}

/* Подсветка ошибок */
input.error {
  border-color: #e74c3c !important;
}
.form-check.error {
  outline: 2px solid #e74c3c;
  border-radius: 4px;
  padding: 4px 8px;
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 1024px) {
    .container {
        padding: 10px 30px;
    }
    .features-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .spaces-grid {
        grid-template-columns: 1fr 1fr;
    }
    .amenities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== БУРГЕР-МЕНЮ ВКЛЮЧАЕТСЯ ПРИ 950px ===== */
@media (max-width: 950px) {
    .burger-menu {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 85px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: #202020; /* или var(--clr-primary) */
        padding: 20px;
        text-align: center;
        z-index: 1001;
    }
    .nav-links.active {
        display: flex;
    }

    .header .nav-actions .btn-primary {
        display: none !important;
    }

    .header-inner {
        padding: 16px 8px; /* чуть уже, чтобы хедер был шире */
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 50px;
    }
    .logo img {
        padding-left: 11px;
    }
    .container {
        padding: 0 20px;
    }
    .header-inner {
        padding: 16px 4px;
    }
    .header .nav-actions .btn-primary {
        display: none !important;
    }
    .nav-links {
        display: none;
        position: fixed;
        top: 85px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--clr-primary);
        padding: 20px;
        text-align: center;
        z-index: 1001;
    }
    .nav-links.active {
        display: flex;
    }
    .burger-menu {
        display: flex;
    }
    .hero {
        padding: 140px 0;
        text-align: left;
    }
    .hero-content {
        text-align: left;
    }
    .hero-title {
        font-size: 28px;
    }
    .hero-desc {
        font-size: 12px;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        max-width: 300px;
        margin-top: 20px;
    }
    .hero-buttons .btn {
        width: 80%;
        text-align: center;
        box-sizing: border-box;
        font-size: 12px;
    }
    .hero-apartments__buttons .btn {
        font-size: 12px;
    }

    .features {
        padding: 12px 0;;
    }
    .features-inner {
        grid-template-columns: 2fr;
        gap: 10px;
    }
    .feature-item {
        text-align: center;
        align-items: center;
        flex-direction: column; /* чтобы иконка и текст были по центру вертикально */
    }
    .feature-item h4 {
        font-size: 14px; /* было 20px */
        margin-top: 8px;
    }
    .feature-text p {
        font-size: 10px; /* было 12px */
    }
    
    /* ====== УМЕНЬШАЕМ ЗАГОЛОВОК "Выберите пространство для себя" ====== */
    .section-title {
        font-size: 20px; /* было 36px */
    }
    .spaces { padding: 40px 0; }
    .spaces-grid {
        grid-template-columns: 1fr;
    }
    .space-card h3{
        font-size: 16px;
    }
    .space-card p {
        font-size: 12px;
    }
    .space-link {
        font-size: 14px;
    }
    
    .amenities { padding: 40px 0; }
    .amenities-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 0;
    }
    .amenity-item:not(:last-child)::after {
        display: none;
    }
    .amenity-icon img{
        width: 50px;
        height: 50px;
    }
    .amenity-item h4{
        font-size: 16px;
    }

    .form-container {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    .form-text { flex: none; text-align: center; }
    .form-text h3 { font-size: 20px; }
    .form-text p { font-size: 12px; }
    .form-inputs-group {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .form-item-stacked input,
    .form-inputs-group > input[type="tel"] {
        width: 100%;
        font-size: 10px;
    }
    .form-item-stacked {
        align-items: center;
        width: 100%;
    }
    .form-inputs-group .btn-primary {
        width: 100%;
        height: 44px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .form-inner-wrapper {
        padding: 0 20px;
    }
    .form-item-stacked input,
    .form-item-stacked .btn-primary {
        width: 60%;
        max-width: 300px; /* или любое другое значение, например, 320px */
    }
    .form-check {
        justify-content: center;
    }
    .form-item-stacked .form-check {
        font-size: 12px;
    }

    .footer {
        padding: 40px 0;
    }
    .footer-logo {
        display: flex;
        justify-content: center;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    .contact-list li {
        white-space: normal;
    }
    .social-links {
        justify-content: center;
    }
}

/* ===== Увеличение ширины контента на больших экранах ===== */
@media (min-width: 1600px) {
  body {
    padding-top: 60px;  
  } 

  .container {
    max-width: 100%;
    padding: 10px 5%; /* гибкие отступы, пропорциональные ширине экрана */
  }

  /* Для hero-блоков — делаем текст шире */
  .hero-content,
  .hero-apartments__content,
  .hero-offices__content,
  .hero-coworking__content {
    max-width: 70%; /* было 600px → теперь занимает 70% от ширины контейнера */
  }

  /* Для amenity сетки — увеличиваем расстояние между элементами */
  .amenities-grid {
    gap: 30px; /* было 20px */
  }

  /* Можно также увеличить размер шрифта заголовков, если нужно */
  .hero-title,
  .hero-apartments__title,
  .hero-offices__title,
  .hero-coworking__title {
    font-size: 76px; /* было 68px */
  }
}

/* --- Поддержка prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .reveal.active {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- Базовые стили для плавного появления --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition-property: opacity, transform;
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* transition-duration теперь задаётся через JS */
    transition-delay: 0s;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Переключатель языка ----- */
.lang-switch {
    position: relative;
    cursor: pointer;
    user-select: none;
}
.lang-switch .lang-current {
    display: inline-block;
}
.lang-switch .arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s;
}
.lang-switch.open .arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #202020;
    border: 1px solid #333;
    border-radius: 4px;
    list-style: none;
    padding: 5px 0;
    margin: 5px 0 0;
    min-width: 60px;
    z-index: 1002;
}
.lang-dropdown li {
    padding: 8px 15px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
    text-align: center;
}
.lang-dropdown li:hover {
    background: #333;
}
.lang-switch.open .lang-dropdown {
    display: block;
}