/* =========================================================
   БАЗОВЫЙ CSS-ФАЙЛ САЙТА
   ========================================================= */

/* =========================================
   1. ПЕРЕМЕННЫЕ
   ========================================= */
:root {
  --primary: #1A365D;
  --primary-light: #2B6CB0;
  --accent: #A97E39;
  --bg-body: #F7FAFC;
  --bg-card: #FFFFFF;
  --text-main: #2D3748;
  --text-muted: #718096;
  --border: #E2E8F0;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* =========================================
   2. БАЗА
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* =========================================
   ПРЕЛОАДЕР
   ========================================= */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.hidden { opacity: 0; visibility: hidden; }

.preloader-content { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.preloader-logo {
  width: 150px;
  height: auto;
  opacity: 0;
  transform: scale(0.8);
  animation: fadeInScale 1.2s ease-out forwards;
}

@keyframes fadeInScale {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================
   3. ТИПОГРАФИКА
   ========================================= */
h1, h2, h3 { font-family: 'Playfair Display', serif; }
h1 { font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 24px; }
h2 { font-size: 2.25rem; font-weight: 700; margin-bottom: 40px; text-align: center; color: var(--primary); }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 12px; }
p { margin-bottom: 16px; }

/* =========================================
   4. ШАПКА
   ========================================= */
.site-header { background: #ffffff; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.brand { font-size: 1.25rem; font-weight: 800; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 12px; font-family: 'Playfair Display', serif; }

.nav-links { display: flex; gap: 32px; }
.nav-links a { text-decoration: none; color: var(--text-main); font-weight: 500; font-size: 0.95rem; position: relative; padding-bottom: 5px; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--accent); }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 50%; background-color: var(--accent); transition: all 0.3s ease; transform: translateX(-50%); }
.nav-links a:hover::after { width: 100%; }

/* =========================================
   5. КНОПКИ
   ========================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 15px 32px; text-decoration: none; border-radius: 14px; font-weight: 600; font-size: 1rem; border: none; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; }
.btn-header { background: linear-gradient(135deg, #A97E39 0%, #DFB87A 100%); color: #ffffff; box-shadow: 0 4px 10px rgba(169, 126, 57, 0.3); }
.btn-header:hover { background: #0A2463; transform: translateY(-2px); }
.btn-hover-gold { background: #0A2463; color: #ffffff; }
.btn-hover-gold:hover { background: linear-gradient(135deg, #A97E39 0%, #DFB87A 100%); transform: translateY(-2px); }
.btn-hero { font-size: 1.3rem !important; padding: 20px 60px !important; border-radius: 16px !important; position: relative; overflow: hidden; }
.btn:disabled { background: #CBD5E0; cursor: not-allowed; transform: none; box-shadow: none; }

/* Блики */
.btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%); transition: all 0.6s ease; }
.btn:hover::before { left: 100%; }
@keyframes constantShine { 0% { left: -100%; } 40% { left: 100%; } 100% { left: 100%; } }
.btn-hero::before { animation: constantShine 2s infinite; }

/* =========================================
   6. ПЕРВЫЙ ЭКРАН (HERO)
   ========================================= */
.hero { background-image: url('../img/hero.png'); background-size: cover; background-position: center; background-repeat: no-repeat; height: calc(100vh - 80px); min-height: 600px; position: relative; }
.hero .container { padding-top: 120px; padding-left: 50px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.hero h1 { font-size: 4.5rem; color: #1A2B4C; text-transform: uppercase; margin-bottom: 24px; }
.hero p { font-size: 1.1rem; color: #4A5568; max-width: 500px; margin-bottom: 40px; text-transform: uppercase; letter-spacing: 0.05em; }

/* =========================================
   7. BENTO GRID (О НАС И КАК МЫ РАБОТАЕМ)
   ========================================= */
.bento-section { padding: 80px 0; background-color: #F8FAFC; }
.bento-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.bento-item { background: #ffffff; border-radius: 24px; padding: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); border: 1px solid var(--border); display: flex; flex-direction: column; }
.bento-about { height: 360.2px !important; max-height: 450px !important; overflow: hidden !important; }
.bento-badge { display: inline-block; padding: 8px 24px; background: #F0F4F8; color: var(--accent); border-radius: 20px; font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px; align-self: flex-start; }

.about-scroll-box { color: var(--text-muted); font-size: 1rem; flex: 1 1 auto; overflow-y: auto; padding-right: 10px; }
.about-scroll-box::-webkit-scrollbar { width: 6px; }
.about-scroll-box::-webkit-scrollbar-track { background: #F0F4F8; border-radius: 10px; }
.about-scroll-box::-webkit-scrollbar-thumb { background: #CBD5E0; border-radius: 10px; }

.work-steps { display: flex; flex-direction: column; gap: 20px; margin-top: 10px; }
.work-step { display: flex; gap: 20px; align-items: flex-start; }
.work-step .step-num { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.work-step h4 { font-family: 'Inter', sans-serif; font-size: 1.1rem; margin-bottom: 4px; color: var(--primary); }
.work-step p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }

/* =========================================
   8. НАПРАВЛЕНИЯ
   ========================================= */
.bento-directions-wrapper { grid-column: span 2; margin-top: 24px; }
.bento-directions-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; width: 100%; }
.direction-mini-card { width: 100%; height: auto; background: #ffffff; border-radius: 16px; transition: all 0.3s; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid var(--border); }
.direction-mini-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.direction-img { width: 100%; height: 320px; background-size: cover; background-position: center; background-repeat: no-repeat; }
.direction-content { width: 100%; padding: 24px 20px; display: flex; align-items: center; justify-content: center; flex-direction: column; background: #ffffff; text-align: center; flex-grow: 1; }
.direction-mini-title { color: var(--primary); font-family: 'Montserrat', sans-serif; font-size: 0.96rem; font-weight: 600; line-height: 1.4; margin: 0; word-wrap: break-word; }

/* =========================================
   9. РЕКВИЗИТЫ
   ========================================= */
.section { padding: 100px 0; }
.section.bg-white { background: #ffffff; }
.requisites-container { max-width: 1100px; margin: 0 auto; }
.requisites-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-bottom: 24px; }
.req-card-white { background: #ffffff; border-radius: 16px; padding: 40px; border: 1px solid var(--border); box-shadow: 0 4px 6px rgba(0,0,0,0.02); position: relative; z-index: 2; }
.req-title { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--primary); margin-bottom: 30px; }
.req-item { margin-bottom: 24px; }
.req-item strong { display: block; font-size: 1.05rem; color: var(--primary); margin-bottom: 4px; }
.req-item p { font-size: 1rem; color: var(--text-main); margin-bottom: 0; }
.req-row { display: flex; gap: 40px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.req-row .req-item { margin-bottom: 0; }
.req-card-logo { background: transparent !important; border: none !important; box-shadow: none !important; padding: 40px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; overflow: hidden !important; }
.req-logo-img { margin-top: 40px; width: 100%; max-width: 380px; height: auto; object-fit: contain; margin-left: 70px; transform: translateX(-150%); opacity: 0; transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out; }
.req-card-logo.active .req-logo-img { transform: translateX(0); opacity: 1; }
.req-documents { display: flex; flex-direction: column; gap: 16px; }
.doc-item { background: #ffffff; border-radius: 16px; padding: 24px 32px; border: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.doc-info { display: flex; align-items: center; gap: 20px; }
.doc-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: #F8FAFC; border-radius: 12px; }
.doc-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--primary); margin-bottom: 4px; }
.doc-badge { display: inline-block; padding: 2px 8px; border: 1px solid var(--accent); color: var(--accent); border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.doc-actions { display: flex; gap: 16px; }
.doc-btn { display: inline-block; padding: 10px 24px; border: 1px solid var(--primary); border-radius: 8px; color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: all 0.3s; }
.doc-btn:hover { background: var(--primary); color: #ffffff; }

/* =========================================
   10. КОНТАКТЫ
   ========================================= */
.contacts-container { max-width: 1100px; margin: 0 auto; border-radius: 24px; padding: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: 1px solid var(--border); background-color: #ffffff; background-image: none; }
.contacts-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; position: relative; z-index: 2; }
.contacts-info { display: flex; flex-direction: column; gap: 24px; background: rgba(255, 255, 255, 0.9); padding: 30px; border-radius: 16px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.contact-item { display: flex; align-items: flex-start; gap: 16px; }
.contact-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: #F8FAFC; border-radius: 12px; flex-shrink: 0; }
.contact-item h4 { font-family: 'Inter', sans-serif; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; }
.contact-item p, .contact-item a { font-size: 1.1rem; color: var(--primary); font-weight: 600; text-decoration: none; margin-bottom: 0; line-height: 1.4; }
.contact-item a:hover { color: var(--accent); text-decoration: underline; }
.contact-socials { margin-top: 16px; }
.contact-socials h4 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; }
.social-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: #F0F4F8; color: var(--primary); border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: all 0.3s; }
.social-btn:hover { background: var(--primary); color: #ffffff; }
.contacts-map-wrapper { height: 100%; min-height: 400px; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.contacts-map { width: 100%; height: 100%; border: none; display: block; }
.contacts-map-placeholder { width: 100%; height: 100%; background: #F8FAFC; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #A0AEC0; gap: 16px; border: 2px dashed #CBD5E0; }

/* =========================================
   11. ФОРМА
   ========================================= */
.form-wrapper { max-width: 900px; margin: 0 auto; background: #ffffff; padding: 40px 50px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full-width { grid-column: span 2; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.95rem; color: var(--primary); }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="tel"], .form-group textarea { width: 100%; resize: none; padding: 12px 16px; border: 1px solid #CBD5E0 !important; border-radius: 8px; font-family: inherit; font-size: 1rem; transition: all 0.2s; background: #F7FAFC !important; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent) !important; background: #fff !important; box-shadow: 0 0 0 3px rgba(169, 126, 57, 0.15); }

.custom-file-upload { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.custom-file-upload input[type="file"] { display: none; }
.file-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: #F0F4F8; color: var(--primary); border: 1px dashed var(--primary-light); border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.95rem; transition: all 0.2s; }
.file-btn:hover { background: #E2E8F0; border-color: var(--primary); }
.file-name { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.consent-group { display: flex; align-items: flex-start; gap: 12px; margin: 24px 0; font-size: 0.85rem; color: var(--text-muted); background: #F8FAFC; padding: 16px; border-radius: 8px; border: 1px solid var(--border); }
.consent-group input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); }
.consent-group label { cursor: pointer; margin-bottom: 0; font-weight: normal; color: var(--text-main); }
.form-group .errorlist, .form-group div[style*="color: #E53E3E"] { color: #E53E3E !important; font-size: 0.85rem; margin-top: 6px; font-weight: 500; }

/* =========================================
   12. ПОДВАЛ
   ========================================= */
.site-footer { background: var(--primary); color: #A0AEC0; padding: 60px 0 30px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; }

/* =========================================
   13. МОДАЛЬНОЕ ОКНО
   ========================================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-window { background: #ffffff; width: 100%; max-width: 800px; max-height: 90vh; border-radius: 12px; padding: 40px; position: relative; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; }
.modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 32px; line-height: 1; color: #A0AEC0; cursor: pointer; transition: color 0.2s; }
.modal-close:hover { color: var(--primary); }
.modal-content { overflow-y: auto; padding-right: 10px; }
.reveal-step { opacity: 0; transform: translateX(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal-step.visible { opacity: 1; transform: translateX(0); }

/* =========================================
   14. COOKIE-БАННЕР (ДЕСКТОП)
   ========================================= */
#cookie-banner { display: none; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 900px; background: #ffffff; padding: 20px 30px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); z-index: 9998; flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--border); }
.cookie-text { font-size: 0.95rem; color: #2D3748; line-height: 1.5; }
.cookie-link { color: var(--primary-light); font-weight: 600; text-decoration: underline; }
.btn-cookie { padding: 10px 24px; white-space: nowrap; font-size: 0.95rem; border-radius: 8px; }

/* =========================================================
   АДАПТИВНОСТЬ (ПЛАНШЕТЫ И ТЕЛЕФОНЫ до 1200px)
   ========================================================= */
@media (max-width: 1200px) {
  .nav-links { display: none !important; }
  .header-inner > .btn { display: none !important; }
  .header-inner { flex-direction: column; height: auto; padding: 15px 0; gap: 15px; justify-content: center; }
  .brand { justify-content: center; font-size: 1.1rem; }

  .mobile-bottom-nav { display: flex !important; position: fixed; bottom: 0; left: 0; width: 100%; background: #ffffff; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 1000; justify-content: space-around; padding: 8px 0; border-top: 1px solid var(--border); }
  .mobile-nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text-muted); font-size: 0.65rem; gap: 4px; transition: color 0.3s; }
  .mobile-nav-item.active, .mobile-nav-item:hover { color: var(--primary); }

  .section { padding: 40px 0; }
  .container { max-width: 100%; padding: 0 20px; }
  .bento-grid { grid-template-columns: 1fr; gap: 20px; }
  .requisites-grid, .contacts-grid { grid-template-columns: 1fr; }
  .bento-directions-row { grid-template-columns: repeat(3, 1fr); gap: 16px; }

  .hero { height: auto !important; min-height: 80vh !important; padding: 80px 0 !important; background-position: 70% center !important; }
  .hero .container { padding-left: 20px !important; padding-right: 20px !important; padding-top: 40px !important; }
  .hero h1 { font-size: 3rem !important; text-align: center !important; }
  .hero p { font-size: 1rem !important; text-align: center !important; margin-left: auto !important; margin-right: auto !important; }
  .hero .btn { display: block !important; margin: 0 auto !important; width: 100% !important; max-width: 400px !important; text-align: center !important; }

  .form-grid { grid-template-columns: 1fr !important; }
  .form-grid .full-width { grid-column: span 1 !important; }

  body { padding-bottom: 70px; }
}

/* =========================================
   МОБИЛЬНЫЕ ТЕЛЕФОНЫ (до 768px)
   ========================================= */
@media (max-width: 768px) {
  .hero { background-image: url('../img/hero.mob.png') !important; background-position: 80% center !important; min-height: calc(100svh - 70px) !important; padding: 60px 0 40px 0 !important; display: flex !important; flex-direction: column !important; justify-content: space-between !important; }
  .hero .container { position: relative !important; z-index: 2 !important; display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; padding: 0 20px !important; margin-top: auto !important; padding-bottom: 60px !important; }
  .hero h1 { font-size: 2rem !important; color: #1A2B4C !important; text-shadow: none !important; margin-bottom: 16px !important; text-align: left !important; line-height: 1.2 !important; }
  .hero p { font-size: 0.95rem !important; color: #4A5568 !important; text-shadow: none !important; margin-bottom: 30px !important; text-align: left !important; line-height: 1.4 !important; }
  .hero .btn { width: 100% !important; max-width: 100% !important; font-size: 1rem !important; padding: 16px !important; display: flex !important; justify-content: center !important; align-items: center !important; text-align: center !important; white-space: nowrap !important; border-radius: 14px !important; }

  .bento-grid { display: flex !important; flex-direction: column !important; gap: 20px !important; }
  .bento-about { width: 100% !important; height: auto !important; max-height: 400px !important; overflow: hidden !important; }
  .about-scroll-box { max-height: 280px !important; overflow-y: auto !important; }

  .bento-directions-row { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
  .direction-mini-card { width: 100% !important; height: auto !important; }
  .direction-img { height: 140px !important; background-size: cover !important; background-position: center !important; }
  .direction-content { padding: 12px 10px !important; }
  .direction-mini-title { font-size: 0.85rem !important; line-height: 1.3 !important; }

  .req-row { flex-direction: column; gap: 16px; border-bottom: none; }
  .req-card-white { padding: 24px; }
  .req-title { font-size: 1.5rem; }
  .req-card-logo { display: none !important; }
  .doc-item { flex-direction: column; align-items: flex-start; gap: 20px; padding: 20px; }
  .doc-actions { width: 100%; }
  .doc-btn { flex: 1; text-align: center; }

  .contacts-container { padding: 24px; }
  .contacts-map-wrapper { min-height: 300px; }

  .form-wrapper { padding: 24px; }
  .form-group input, .form-group textarea { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }

  #cookie-banner { flex-direction: column !important; align-items: stretch !important; gap: 16px !important; padding: 20px !important; bottom: 80px !important; width: calc(100% - 32px) !important; left: 16px !important; transform: none !important; }
  .btn-cookie { width: 100% !important; padding: 14px !important; font-size: 1.1rem !important; margin: 0 !important; }
}

/* =========================================
   СКРЫВАЕМ НИЖНЕЕ МЕНЮ НА ПК (шире 1201px)
   ========================================= */
@media (min-width: 1201px) {
  .mobile-bottom-nav { display: none !important; }
}