/*
Theme Name: Твоя Кладовка 1.1
Theme URI: https://твоякладовка.рф
Author: Твоя Кладовка
Description: Тема-лендинг для сервиса индивидуального хранения в Смоленске
Version: 1.1.0
Requires PHP: 5.6
*/

/* ===== Базовые стили (перенесены из <style> в index.php) ===== */
:root {
  --bg: #ffffff;
  --bg-card: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #ff5b26;
  --accent-hover: #e04815;
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-md); }

/* Header */
header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; }
.logo img { width: 36px; height: 36px; border-radius: 6px; }
nav { display: flex; gap: 24px; }
nav a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); transition: color 0.2s; }
nav a:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; font-weight: 600; font-size: 0.95rem; border-radius: var(--radius-sm); transition: all 0.2s; cursor: pointer; border: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-card); }

/* Hero */
.hero { padding: 60px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.badge { display: inline-block; background: #fff1eb; color: var(--accent); font-weight: 600; font-size: 0.85rem; padding: 6px 14px; border-radius: 50px; margin-bottom: 16px; }
.hero h1 { font-size: 2.75rem; font-weight: 700; line-height: 1.15; margin-bottom: 20px; }
.hero p { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 36px; }
.hero-features { display: flex; gap: 24px; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 24px; }
.hero-features span::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* Sections General */
section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 12px; }
.section-title p { color: var(--text-muted); font-size: 1.1rem; }

/* Use Cases Grid */
.grid-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-card { background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
.case-card img { width: 100%; height: 220px; object-fit: cover; border-radius: 0; }
.case-card-body { padding: 20px; }
.case-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.case-card p { font-size: 0.9rem; color: var(--text-muted); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.price-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px 28px; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.price-card.featured { border: 2px solid var(--accent); background: #fff; box-shadow: 0 10px 30px rgba(255, 91, 38, 0.08); }
.price-tag-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: 600; padding: 4px 12px; border-radius: 50px; }
.price-header h3 { font-size: 1.35rem; margin-bottom: 6px; }
.price-area { font-size: 1rem; color: var(--accent); font-weight: 600; margin-bottom: 16px; }
.price-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 24px; min-height: 48px; }
.price-sum { font-size: 1.85rem; font-weight: 700; margin-bottom: 24px; }
.price-sum span { font-size: 0.95rem; font-weight: 400; color: var(--text-muted); }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step-item { background: var(--bg-card); padding: 28px 20px; border-radius: var(--radius-md); border: 1px solid var(--border); }
.step-num { font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.step-item h3 { font-size: 1.1rem; line-height: 1.3; }

/* Safety */
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.security-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.security-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.security-list li::before { content: "🛡️"; font-size: 1.2rem; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
details { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 24px; cursor: pointer; }
summary { font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 14px; color: var(--text-muted); line-height: 1.6; }

/* Form Section */
.cta-box { background: #1e293b; color: #fff; border-radius: var(--radius-lg); padding: 60px 40px; text-align: center; max-width: 900px; margin: 0 auto; }
.cta-box h2 { font-size: 2.2rem; margin-bottom: 12px; }
.cta-box p { color: #94a3b8; margin-bottom: 32px; font-size: 1.1rem; }
.cta-form { display: flex; justify-content: center; gap: 12px; max-width: 480px; margin: 0 auto 20px; }
.cta-form input { flex: 1; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid #334155; background: #0f172a; color: #fff; font-size: 1rem; outline: none; }
.cta-form input:focus { border-color: var(--accent); }

/* Footer */
footer { background: #0f172a; color: #94a3b8; padding: 60px 0 30px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-info h3 { color: #fff; font-size: 1.25rem; margin-bottom: 16px; }
.footer-info p { margin-bottom: 12px; }
.map-container { width: 100%; height: 260px; border-radius: var(--radius-md); overflow: hidden; background: #1e293b; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 24px; text-align: center; font-size: 0.85rem; }

/* Responsive */
@media (max-width: 992px) {
  .hero-grid, .security-grid, .footer-grid { grid-template-columns: 1fr; }
  .grid-cases, .pricing-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  /* nav скрыт — см. мобильное меню ниже */
  .hero h1 { font-size: 2.2rem; }
}

/* ===== Исправления v1.1.0 ===== */

html { scroll-padding-top: 84px; scroll-behavior: smooth; }
img { max-width: 100%; height: auto; }
.nowrap { white-space: nowrap; }

/* Шапка */
.logo { min-width: 0; }
.logo span { white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-cta { white-space: nowrap; }
.cta-short { display: none; }
.nav-phone { display: none; }

/* Кнопка-гамбургер */
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; }
.menu-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 992px) {
  header { position: sticky; }
  .header-inner { position: relative; }
  .menu-toggle { display: flex; }
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 12px 24px rgba(15, 23, 42, .08); padding: 8px 20px 16px; }
  nav.open { display: flex; }
  nav a { padding: 12px 0; font-size: 1.05rem; color: var(--text); border-bottom: 1px solid var(--border); }
  nav a:last-child { border-bottom: 0; }
  .nav-phone { display: block; font-weight: 700; color: var(--accent) !important; }
}

@media (max-width: 600px) {
  .header-inner { height: 64px; gap: 10px; }
  .logo { font-size: 1.05rem; gap: 8px; }
  .logo img { width: 30px; height: 30px; }
  .header-cta { padding: 10px 14px; font-size: 0.9rem; }
  .cta-full { display: none; }
  .cta-short { display: inline; }
}
@media (max-width: 360px) {
  .header-cta { display: none; }
}

/* Форма заявки */
.cta-form { display: block; max-width: 520px; }
.cta-row { display: flex; gap: 12px; }
.cta-row input { flex: 1; min-width: 0; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid #334155; background: #0f172a; color: #fff; font-size: 1rem; outline: none; }
.cta-row input:focus { border-color: var(--accent); }
.cta-row input.is-invalid { border-color: #f87171; }
.cta-row .btn { white-space: nowrap; }
.cta-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; text-align: left; font-size: 0.85rem; line-height: 1.45; color: #94a3b8; cursor: pointer; }
.cta-consent input { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--accent); }
.cta-consent a { color: #fff; text-decoration: underline; }
.cta-consent.is-invalid span { color: #fca5a5; }
.form-message { min-height: 1.4em; margin: 12px 0 0 !important; font-size: 0.95rem !important; }
.form-message.is-success { color: #4ade80 !important; }
.form-message.is-error { color: #fca5a5 !important; }
.cta-call { font-size: 0.9rem; margin-bottom: 0 !important; }
.cta-call a { color: #fff; font-weight: 700; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) {
  .cta-box { padding: 40px 20px; border-radius: var(--radius-md); }
  .cta-box h2 { font-size: 1.6rem; }
  .cta-box p { font-size: 1rem; }
  .cta-row { flex-direction: column; }
  .cta-row input, .cta-row .btn { width: 100%; }
}

/* Подвал */
footer a { color: #fff; }
.footer-bottom a { color: #cbd5e1; text-decoration: underline; }
.requisites { margin-bottom: 8px; }

/* Закреплённая панель на телефоне */
.mobile-bar { display: none; }
@media (max-width: 768px) {
  .mobile-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--border); backdrop-filter: blur(10px); }
  .mobile-bar .btn { justify-content: center; text-align: center; padding: 12px 10px; }
  body { padding-bottom: 72px; }
}

/* Плашка предпросмотра (только для демо) */
.preview-note { background: #fff7ed; color: #9a3412; text-align: center; font-size: 0.85rem; padding: 6px 12px; }

/* Страница политики */
.legal { max-width: 820px; padding-top: 48px; padding-bottom: 80px; }
.legal h1 { font-size: 2rem; margin-bottom: 20px; }
.legal h2 { font-size: 1.25rem; margin: 28px 0 10px; }
.legal p, .legal li { color: var(--text-muted); margin-bottom: 10px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--accent); text-decoration: underline; }

/* Средние экраны (993–1180 px): меню в одну строку */
@media (min-width: 993px) and (max-width: 1180px) {
  nav { gap: 16px; }
  nav a { font-size: 0.88rem; white-space: nowrap; }
  .header-cta { padding: 10px 16px; }
}

/* Кнопка звонка вместо формы */
.cta-phone-btn { font-size: 1.1rem; padding: 16px 28px; margin-bottom: 8px; }
.cta-phone-btn { white-space: nowrap; }
@media (max-width: 600px) { .cta-phone-btn { font-size: 1rem; padding: 14px 18px; width: 100%; } }
