
html, body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}
:root {
  --ink: #111827;
  --muted: #6b7280;
  --paper: #fbf9f4; /* кремовый фон */
  --white: #ffffff;
  --sea: #1e3a8a; /* тёмно-синий для акцентов */
  --sun: #d4af37; /* золото */
  --line: #e5e7eb;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --chat-bg: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
a { color: inherit; }
.shell { width: min(1160px, calc(100% - 44px)); margin: auto; }

header { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { font-size: 13px; letter-spacing: .19em; font-weight: 700; text-decoration: none;}
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .17em; }
.nav { display: flex; gap: 28px; align-items: center; font-size: 13px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.lang { border: 1px solid var(--line); background: transparent; border-radius: 30px; padding: 8px 13px; font: inherit; color: var(--ink); cursor: pointer; transition: 0.2s ease; }
.lang:hover { background: #f3f4f6; }

/* Тёмно-синий hero с крупным белым текстом */
.hero { position: relative; overflow: hidden; min-height: 100vh; margin: 0; border-radius: 0; background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.8) 50%, rgba(15, 23, 42, 0.4) 100%), var(--hero-bg) center/cover no-repeat; display: flex; align-items: center; color: var(--white); }
.hero-copy { position: relative; z-index: 1; max-width: 760px; padding: 64px 8.5%; }
.eyebrow { color: var(--sun); text-transform: uppercase; font-size: 12px; letter-spacing: .2em; font-weight: 700; }
.hero h1 { font: clamp(52px, 8vw, 92px)/1.05 var(--serif); letter-spacing: -.03em; margin: 24px 0; font-weight: 400; }
.hero p { max-width: 580px; font-size: 18px; color: #e2e8f0; margin: 0 0 40px; }

/* Золотые кнопки */
.button { display: inline-flex; align-items: center; gap: 22px; text-decoration: none; background: var(--sun); color: var(--white); padding: 16px 24px; border-radius: 6px; font-size: 14px; font-weight: 600; transition: transform 0.2s, background 0.2s, box-shadow 0.2s; cursor: pointer; border: none; box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3); }
.button:hover { background: #c5a02c; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4); }
.button span { font-size: 18px; }
.hero-note { position: absolute; z-index: 2; right: 28px; bottom: 25px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,0.6); }

/* Белые карточки в facts */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border: 1px solid var(--line); margin-top: -1px; }
.fact { padding: 24px 30px; border-right: 1px solid var(--line); }
.fact:last-child { border: 0; }
.fact b { display: block; font: 24px var(--serif); margin-bottom: 6px; }
.fact span { font-size: 12px; color: var(--muted); letter-spacing: .02em; }

section { padding: 100px 0; }
.section-head { display: grid; grid-template-columns: 1fr 1.1fr; gap: 55px; align-items: end; margin-bottom: 48px; }
.kicker { color: var(--sun); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; margin-bottom: 12px; }
.section-head h2 { font: clamp(38px, 5vw, 56px)/1.1 var(--serif); letter-spacing: -.02em; margin: 0; font-weight: 400; }
.section-head p { color: var(--muted); max-width: 500px; margin: 0; font-size: 16px; }

/* Белые карточки */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--white); border: 1px solid var(--line); padding: 36px 32px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); transition: transform 0.2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.04); }
.card .num { color: var(--sun); font: 32px var(--serif); margin-bottom: 20px; display: inline-block; border-bottom: 2px solid var(--sun); }
.card h3 { font: 26px var(--serif); margin: 0 0 16px; font-weight: 400; }
.card p { font-size: 15px; color: var(--muted); margin: 0; }

/* Properties Section */
.properties-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.property-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; }
.property-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,0,0,0.06); }
.property-image { height: 260px; background: #e3e8e5 url('/assets/feature.jpg') center/cover no-repeat; position: relative; }
.property-image.mock-1 { background-image: url('/assets/alanya.jpg'); }
.property-image.mock-2 { background-image: url('/assets/antalya.jpg'); }
.property-image.mock-3 { background-image: url('/assets/feature.jpg'); }
.property-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.property-price { font: 30px var(--serif); color: var(--ink); margin: 0 0 12px; }
.property-title { font-size: 18px; font-weight: 600; margin: 0 0 16px; }
.property-meta { display: flex; gap: 10px; font-size: 13px; color: var(--ink); margin-bottom: 20px; flex-wrap: wrap; }
.property-meta span { background: var(--paper); padding: 6px 12px; border-radius: 20px; font-weight: 500; border: 1px solid #eee; }
.property-desc { font-size: 14px; color: var(--muted); margin: auto 0 0; }

.properties-status { text-align: center; padding: 60px 0; color: var(--muted); font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--sun); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.feature { background: #1e293b; color: white; border-radius: 12px; padding: 70px; margin: 80px 0;}
.feature-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: center; }
.feature-art { min-height: 400px; border-radius: 8px; background: url('/assets/feature.jpg') center/cover no-repeat; position: relative; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.feature h2 { font: clamp(38px, 5vw, 62px)/1.05 var(--serif); margin: 16px 0 24px; font-weight: 400; }
.feature p { font-size: 16px; color: #cbd5e1; max-width: 480px; }
.feature .kicker { color: var(--sun); }
.link { display: inline-block; margin-top: 24px; text-decoration: none; border-bottom: 1px solid var(--sun); padding-bottom: 4px; color: var(--sun); font-size: 14px; font-weight: 600; transition: opacity 0.2s; }
.link:hover { opacity: 0.8; }
.profile { display: flex; align-items: center; gap: 20px; margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: white; font: 22px var(--serif); }
.profile b { display: block; font-size: 15px; }
.profile span { color: #94a3b8; font-size: 13px; }

/* FAQ Section */
.faq-grid { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 24px 30px; cursor: pointer; transition: background 0.2s; }
.faq-item:hover { background: #fafafa; }
.faq-q { font: 20px var(--serif); margin: 0; display: flex; justify-content: space-between; align-items: center; font-weight: 400; }
.faq-q::after { content: '+'; font-size: 24px; color: var(--sun); font-family: var(--sans); }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { display: none; margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; padding-top: 16px; border-top: 1px solid var(--line); }
.faq-item.open .faq-a { display: block; }

.end { padding: 40px 0 100px; }
.endbox { background: var(--sea); color: white; padding: 60px 70px; display: flex; align-items: center; justify-content: space-between; gap: 40px; border-radius: 12px; box-shadow: 0 20px 40px rgba(30, 58, 138, 0.2); }
.endbox h2 { font: clamp(32px, 4vw, 46px)/1.1 var(--serif); margin: 0; max-width: 620px; font-weight: 400; }
.endbox p { color: #bfdbfe; font-size: 16px; margin: 16px 0 0; }
.foot { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 20px; }

/* AI Chat Widget */
.chat-fab { position: fixed; bottom: 30px; right: 30px; padding: 0 24px; height: 56px; border-radius: 28px; background: var(--sea); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px rgba(30, 58, 138, 0.3); z-index: 99; transition: transform 0.3s; font-size: 14px; font-weight: 600; letter-spacing: 1px; }
.chat-fab:hover { transform: scale(1.02); }
.chat-widget { position: fixed; bottom: 110px; right: 30px; width: 400px; height: 560px; background: var(--chat-bg); border-radius: 16px; box-shadow: 0 20px 45px rgba(0,0,0,0.15); display: flex; flex-direction: column; z-index: 100; transform: translateY(20px); opacity: 0; pointer-events: none; transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1); border: 1px solid var(--line); overflow: hidden; }
.chat-widget.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.chat-header { background: var(--sea); color: white; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.chat-header .status { font-size: 12px; color: #bfdbfe; display: block; margin-top: 4px; }
.chat-close { background: transparent; border: none; color: white; font-size: 24px; cursor: pointer; opacity: 0.7; }
.chat-close:hover { opacity: 1; }
.chat-body { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; background: #f8fafc; }
.message { padding: 14px 18px; border-radius: 12px; font-size: 15px; max-width: 85%; line-height: 1.5; }
.message.assistant { background: var(--white); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.message.user { background: var(--sun); color: white; align-self: flex-end; border-bottom-right-radius: 4px; box-shadow: 0 2px 4px rgba(212, 175, 55, 0.2); }
.chat-scenarios { padding: 12px 24px; border-top: 1px solid var(--line); background: var(--white); display: flex; gap: 8px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.chat-scenarios::-webkit-scrollbar { display: none; }
.scenario-btn { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 20px; padding: 8px 16px; font-size: 13px; color: var(--ink); cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.scenario-btn:hover { background: #e2e8f0; }
.chat-input-area { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 12px; background: var(--white); }
.chat-input-area input { flex: 1; padding: 14px 18px; border: 1px solid #cbd5e1; border-radius: 30px; font: inherit; font-size: 15px; outline: none; transition: border-color 0.2s; }
.chat-input-area input:focus { border-color: var(--sea); }
.chat-input-area button { width: 48px; height: 48px; border-radius: 50%; background: var(--sea); color: white; border: none; font-size: 20px; cursor: pointer; display: grid; place-items: center; transition: background 0.2s; }
.chat-input-area button:hover { background: #1e40af; }

/* Language switching */
/* Hide all language-specific content by default */
[data-lang="ru"], [data-lang="en"], [data-lang="tr"] {
  display: none !important;
}

/* Show only the active language content */
body[data-language="ru"] [data-lang="ru"] { display: block !important; }
body[data-language="en"] [data-lang="en"] { display: block !important; }
body[data-language="tr"] [data-lang="tr"] { display: block !important; }

/* Inline elements exceptions */
body[data-language="ru"] span[data-lang="ru"],
body[data-language="ru"] a[data-lang="ru"],
body[data-language="ru"] button[data-lang="ru"],
body[data-language="ru"] strong[data-lang="ru"],
body[data-language="ru"] em[data-lang="ru"],
body[data-language="ru"] i[data-lang="ru"] { display: inline-block !important; }

body[data-language="en"] span[data-lang="en"],
body[data-language="en"] a[data-lang="en"],
body[data-language="en"] button[data-lang="en"],
body[data-language="en"] strong[data-lang="en"],
body[data-language="en"] em[data-lang="en"],
body[data-language="en"] i[data-lang="en"] { display: inline-block !important; }

body[data-language="tr"] span[data-lang="tr"],
body[data-language="tr"] a[data-lang="tr"],
body[data-language="tr"] button[data-lang="tr"],
body[data-language="tr"] strong[data-lang="tr"],
body[data-language="tr"] em[data-lang="tr"],
body[data-language="tr"] i[data-lang="tr"] { display: inline-block !important; }

/* Specific flex container exceptions */
body[data-language="ru"] div.section-head[data-lang="ru"],
body[data-language="ru"] div.endbox[data-lang="ru"],
body[data-language="ru"] a.nav-link[data-lang="ru"],
body[data-language="ru"] div.hero-copy[data-lang="ru"] { display: flex !important; }

body[data-language="en"] div.section-head[data-lang="en"],
body[data-language="en"] div.endbox[data-lang="en"],
body[data-language="en"] a.nav-link[data-lang="en"],
body[data-language="en"] div.hero-copy[data-lang="en"] { display: flex !important; }

body[data-language="tr"] div.section-head[data-lang="tr"],
body[data-language="tr"] div.endbox[data-lang="tr"],
body[data-language="tr"] a.nav-link[data-lang="tr"],
body[data-language="tr"] div.hero-copy[data-lang="tr"] { display: flex !important; }

/* Remove any remaining English body classes if present (legacy) */
body.en [data-lang="ru"] { display: none !important; }


/* =========================================================
   RESTORATION OF LOST RESPONSIVE & FOOTER STYLES
   ========================================================= */

/* Mobile Layout Overrides & Constraints */
html, body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Ensure images don't break layout */
img {
  max-width: 100%;
  height: auto;
}

/* 1. HEADER (Two-row grid on mobile) */
@media (max-width: 480px) {
  header.shell {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(180deg, rgba(11,32,44,0.95) 0%, rgba(11,32,44,0) 100%);
  }
  .brand {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  .nav {
    display: contents !important; /* Unbox so children join header grid */
  }
  .lang-switcher {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    display: flex;
    justify-content: flex-end;
  }
  .nav > a[href="#properties"] {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    width: 100%;
    justify-content: center;
    display: flex;
  }
}

/* 2. HERO (Left Column strictly constrained) */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 40px;
}
.hero-slider {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
}
.hero-slider::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(90deg, rgba(11,32,44,0.85) 0%, rgba(11,32,44,0.2) 100%);
  z-index: 1;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 650px;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-copy h1 {
  font: clamp(36px, 6vw, 72px)/1.1 var(--serif);
  margin: 0;
}
.hero-copy p {
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.5;
  margin: 0;
  opacity: 0.9;
  max-width: 100%;
}
@media (max-width: 480px) {
  .hero {
    padding: 120px 20px 40px; /* offset for 2-row header */
  }
  .hero-slider::after {
    background: linear-gradient(180deg, rgba(11,32,44,0.8) 0%, rgba(11,32,44,0.6) 100%);
  }
}

/* 3. HERO SLIDER CSS ANIMATION */
.slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 24s infinite linear;
  transform: scale(1.05);
}
.slide-1 { animation-delay: -1s; }
.slide-2 { animation-delay: 7s; }
.slide-3 { animation-delay: 15s; }

@keyframes heroFade {
  0% { opacity: 0; transform: scale(1.05); }
  4.16% { opacity: 1; transform: scale(1.05); }
  33.33% { opacity: 1; transform: scale(1.1); }
  37.5% { opacity: 0; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .slide { animation: none; transform: none; }
  .slide-1 { opacity: 1; }
}

/* 4. MOBILE BLOCKS (Strictly 1 column) */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; gap: 30px; }
  .feature-grid { grid-template-columns: 1fr; gap: 40px; }
  .properties-grid { grid-template-columns: 1fr; }
  .feature { padding: 40px 20px; margin: 40px 0; }
  .endbox { flex-direction: column; text-align: center; padding: 40px 20px; }
}

/* 5. FOOTER */
.official-footer {
  background: #0f172a; /* Dark footer */
  color: #94a3b8;
  padding: 60px 0 40px;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.footer-contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.footer-group h4 {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
}
.footer-link {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-link:hover {
  color: white;
}
.footer-group p {
  margin: 0;
  line-height: 1.6;
}
.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 6px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 10px;
  width: 100%;
  transition: opacity 0.2s;
}
.footer-social-btn:hover {
  opacity: 0.9;
}
.whatsapp-btn {
  background: #25D366;
}
.telegram-btn {
  background: #229ED9;
}
.footer-copyright {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
}
@media (max-width: 768px) {
  .footer-contacts {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}


/* =========================================================
   FINAL STRICT UX REVISIONS FOR MOBILE
   ========================================================= */

@media (max-width: 480px) {
  /* 1. Reset all grids to 1 column */
  .facts,
  .section-head,
  .cards,
  .steps-grid,
  .feature-grid,
  .properties-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    width: 100% !important;
  }

  /* Reset specific fact layout */
  .fact {
    border-right: none !important;
    border-bottom: 1px solid var(--line);
    padding: 20px 0 !important;
  }
  .fact:last-child {
    border-bottom: none;
  }
  .facts {
    padding: 0 20px !important;
  }

  /* 2. Feature Block (Важно понять...) - Full width edge-to-edge */
  .feature {
    margin-left: -20px !important;
    margin-right: -20px !important;
    border-radius: 0 !important;
    padding: 0 20px 40px 20px !important;
    background: #1e293b !important;
    width: auto !important; /* overrides any max-width */
  }
  .feature-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
  .feature-art {
    order: -1 !important;
    width: calc(100% + 40px) !important; /* expand into padding */
    margin-left: -20px !important;
    margin-right: -20px !important;
    min-height: 250px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  
  /* 3. Section head tweaks for left alignment and no overflow */
  body[data-language="ru"] div.section-head[data-lang="ru"],
  body[data-language="en"] div.section-head[data-lang="en"],
  body[data-language="tr"] div.section-head[data-lang="tr"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  
  /* 4. Fix any lingering fixed widths or paddings */
  .hero-copy, .section-head h2, .section-head p, .card, .endbox, .footer-group {
    max-width: 100% !important;
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .hero-overlay {
    background: linear-gradient(180deg, rgba(11,32,44,0.6) 0%, rgba(11,32,44,0.2) 100%) !important;
  }
}
