/* assets/css/styles.css */

:root {
  --bg1: #ffffff;
  --bg2: #f5f5f7;
  --ink: #1d1d1f;       /* Основной текст (черный) */
  --muted: #86868b;     /* Серый текст */
  --line: #d2d2d7;      /* Границы */
  --blue: #0071e3;      /* Apple Blue */
  --blue2: #0077ed;     /* Hover Blue */
  --slate: #1d1d1f;     /* Темные фоны */
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(0,0,0,0.04);
  --shadow-hover: 0 18px 45px rgba(0,0,0,0.12);
  --r-lg: 24px;         /* Радиус карточек */
  --r-btn: 980px;       /* Радиус кнопок */
  --max: 1080px;        /* Ширина контейнера */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--ink);
  background: var(--bg1);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* ================= HEADER ================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 12px 0;
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
}

/* Logo */
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: #1d1d1f; z-index: 1201;
}
.brand-logo { height: 28px; width: auto; }
.brand-text { font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
@media (max-width: 370px) { .brand-text { display: none; } }

/* Desktop Nav */
.desktop-nav { display: flex; align-items: center; margin-left: auto; margin-right: 32px; }
.desktop-nav a {
  text-decoration: none; color: #1d1d1f; font-size: 14px; font-weight: 500;
  margin-left: 28px; transition: color 0.2s ease; opacity: 0.9;
}
.desktop-nav a:hover { color: var(--blue); opacity: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px; border-radius: var(--r-btn);
  font-size: 15px; font-weight: 500; border: none; cursor: pointer;
  text-decoration: none; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { transform: scale(1.02); background: var(--blue2); box-shadow: 0 4px 12px rgba(0,113,227,0.3); }

.btn-ghost { background: #e5e5ea; color: #1d1d1f; }
.btn-ghost:hover { background: #d1d1d6; }

.btn-full { width: 100%; }

/* Mobile Hiding */
@media (max-width: 900px) {
  .desktop-nav, .desktop-cta { display: none !important; }
}

/* ================= MOBILE MENU (Burger) ================= */

.mobile-toggle {
  display: none; /* Скрыто на ПК */
  width: 48px;   /* Чуть больше зона клика */
  height: 48px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  
  /* ВАЖНО: */
  position: relative;
  z-index: 9999 !important; /* Поверх всего */
  pointer-events: auto;     /* Разрешить клики */
}

@media (max-width: 900px) { 
    .mobile-toggle { display: flex; } 
}

.ham-bar {
  width: 24px; height: 2px; background-color: #1d1d1f; border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); position: absolute;
  pointer-events: none; /* Чтобы клик проходил сквозь полоску в кнопку */
}
.mobile-toggle .top-bar { transform: translateY(-6px); }
.mobile-toggle .bot-bar { transform: translateY(6px); }

/* Анимация крестика */
.mobile-toggle.is-active .top-bar { transform: translateY(0) rotate(45deg); }
.mobile-toggle.is-active .mid-bar { opacity: 0; transform: scale(0); }
.mobile-toggle.is-active .bot-bar { transform: translateY(0) rotate(-45deg); }

/* Оверлей меню */
.mobile-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  z-index: 1500;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; align-items: center; justify-content: center;
}

.mobile-overlay.is-open {
  opacity: 1; visibility: visible; pointer-events: auto;
}

.mobile-overlay-inner {
  width: 100%; text-align: center; display: flex; flex-direction: column; gap: 30px;
  transform: translateY(20px); transition: transform 0.4s ease;
}
.mobile-overlay.is-open .mobile-overlay-inner { transform: translateY(0); }

.mobile-link { font-size: 28px; font-weight: 600; color: #1d1d1f; display: block; padding: 10px; }
.mobile-phone-link { display: block; font-size: 20px; font-weight: 600; color: var(--blue); margin-top: 10px; }

/* ================= PAGE SECTIONS ================= */

/* Hero */
.hero-ios { padding: 80px 0; background: linear-gradient(180deg, #fff 0%, #f5f7fa 100%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-content h1 { font-size: clamp(40px, 5vw, 56px); font-weight: 700; line-height: 1.1; margin-bottom: 20px; letter-spacing: -0.02em; }
.hero-sub { font-size: 20px; color: var(--muted); margin-bottom: 30px; line-height: 1.4; }
.hero-img-container {
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 4/3; background: #eee;
}
.hero-img-container img { width: 100%; height: 100%; object-fit: cover; }

/* Stats Strip */
.stats-strip { background: #fafafa; padding: 30px 0; border-top: 1px solid rgba(0,0,0,0.05); border-bottom: 1px solid rgba(0,0,0,0.05); }
.stats-flex { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; text-align: center; }
.stat-item strong { display: block; font-size: 18px; color: var(--blue); margin-bottom: 4px; }
.stat-item span { font-size: 13px; color: var(--muted); }

/* Cards Grid (Services) */
.cards-grid, .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 40px; }

.ios-card, .service-card {
  background: white; border-radius: var(--r-lg); padding: 32px;
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.02);
  transition: all 0.3s ease; text-decoration: none; color: inherit; display: block;
}
.ios-card:hover, .service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.card-icon, .service-icon {
  width: 50px; height: 50px; border-radius: 12px; background: var(--bg2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--blue);
}
.ios-card h3, .service-title { margin: 0 0 10px; font-size: 22px; font-weight: 600; }
.ios-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* Service List */
.service-list { list-style: none; padding: 0; margin: 0; }
.service-list li { position: relative; padding-left: 24px; margin-bottom: 12px; font-size: 16px; color: #424245; }
.service-list li::before { content: "•"; color: var(--blue); font-weight: bold; position: absolute; left: 0; top: 0px; font-size: 18px; }

/* Page Head (About/Services/Contact) */
.page-head { padding: 80px 0 60px; text-align: center; background: linear-gradient(180deg, #fff 0%, #f5f5f7 100%); }
.page-head h1 { font-size: 48px; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.01em; }
.page-head p { font-size: 20px; color: var(--muted); max-width: 700px; margin: 0 auto; line-height: 1.4; }
.kicker { color: var(--blue); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.1em; display: block; margin-bottom: 10px; }

/* Contact Layout */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 40px 0 100px; }

/* Forms */
.ios-form-card {
  background: #fff; padding: 40px; border-radius: var(--r-lg);
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.05);
}
.form-group { margin-bottom: 24px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.ios-input {
  width: 100%; padding: 16px; font-size: 17px; background: #f5f5f7; color: #1d1d1f;
  border: 1px solid transparent; border-radius: 12px; outline: none; font-family: inherit;
  -webkit-appearance: none;
}
.ios-input:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15); }
textarea.ios-input { min-height: 120px; resize: vertical; }

.form-message { display: none; padding: 15px; border-radius: 12px; margin-top: 20px; text-align: center; }
.msg-success { background: #dcfce7; color: #166534; }
.msg-error { background: #fee2e2; color: #991b1b; }

/* Info Card (Contact & Service Area) */
.info-card, .dark-card { background: #1d1d1f; color: white; border-radius: var(--r-lg); padding: 40px; }
.info-card h2, .info-card h3, .dark-card h3 { margin-top: 0; font-size: 24px; color: white; }
.contact-link { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; font-size: 18px; font-weight: 500; margin-bottom: 16px; }

/* Map */
.map-wrapper {
  margin-top: 40px; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow); height: 450px; background: #e5e5ea;
}
.map-wrapper iframe { width: 100%; height: 100%; border: 0; filter: grayscale(10%) contrast(1.1); }

/* Area List */
.area-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding-bottom: 100px; }
.area-list { list-style: none; padding: 0; margin: 0; }
.area-list li { padding: 14px 0; border-bottom: 1px solid #f0f0f0; font-size: 17px; color: #1d1d1f; display: flex; align-items: center; gap: 12px; }
.pin-icon { color: var(--blue); flex-shrink: 0; }

/* About Layout */
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding-bottom: 100px; align-items: start; }
.about-image { border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.04); margin-bottom: 30px; background: #eee; aspect-ratio: 4/3; }
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.check-list { list-style: none; padding: 0; margin: 0 0 30px 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 15px; font-size: 17px; color: #1d1d1f; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071e3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; }

/* Policy Content */
.policy-content { max-width: 800px; margin: 0 auto; padding: 40px 0 100px; }
.policy-block { margin-bottom: 40px; }
.policy-block h2 { font-size: 24px; margin-bottom: 16px; color: #1d1d1f; }
.policy-block p { font-size: 17px; line-height: 1.6; color: #424245; margin-bottom: 16px; }
.policy-block ul { list-style: disc; padding-left: 20px; margin-bottom: 16px; }
.policy-block li { font-size: 17px; color: #424245; margin-bottom: 8px; }

/* Error Page */
.error-page { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 80px 22px; }
.error-code { font-size: 120px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; background: -webkit-linear-gradient(45deg, #0071e3, #60a5fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin: 0 0 20px; }
.error-title { font-size: 32px; margin: 0 0 16px; color: #1d1d1f; font-weight: 700; }
.error-text { font-size: 18px; color: #86868b; max-width: 400px; margin: 0 auto 40px; }
.btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.footer {
  background: #f5f5f7; padding: 60px 0; font-size: 12px; color: var(--muted);
  border-top: 1px solid rgba(0,0,0,0.05); margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; }
.footer a { color: var(--blue); text-decoration: none; }
.disclaimer-box, .footer-disclaimer { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.1); }

/* Animations */
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.in-view { opacity: 1; transform: none; }

/* Mobile Adaptations */
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .cards-grid, .footer-grid, .contact-layout, .about-layout, .area-grid, .services-grid { grid-template-columns: 1fr; }
  .about-layout { display: flex; flex-direction: column-reverse; }
  .page-head h1 { font-size: 36px; }
  .map-wrapper { height: 300px; }
  
  /* Ensure header elements hide correctly */
  .desktop-nav, .header-cta { display: none !important; }
}