/*
  Дистанційна школа Акцент — components.css
  Site-wide reusable UI: buttons, header/nav, checklist, contact form, footer, floating phone.
  Loaded on every page (inner pages + index.html). The header here is the SINGLE source of
  truth — index.html no longer carries its own inline copy. v3.0 — 2026 CSS split.
  Requires base.css (CSS variables).
*/

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 28px;
  background: var(--orange);
  color: var(--white) !important;
  border: none;
  border-radius: var(--radius-btn);
  font-size: .98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 26px -10px rgba(247,148,29,.7);
  transition: background .2s, transform .15s;
}
.btn:hover { background: var(--orange-dk); transform: translateY(-1px); }

.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--navy);
  color: var(--white) !important;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-btn);
  font-size: .98rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-dark:hover { background: #0d1448; transform: translateY(-1px); }

/* ===== HEADER (shared — single source for all pages incl. landing) ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,241,225,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 6px 22px -14px rgba(17,22,74,.4); }
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 13px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo img { height: 44px; width: auto; display: block; }

.main-nav { display: flex; gap: 4px; flex-shrink: 1; min-width: 0; align-items: center; }
.nav-link {
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
  white-space: nowrap;
  transition: color .15s;
}
.nav-link:hover { color: var(--orange); }
.nav-link.active { color: var(--orange); font-weight: 600; }
.nav-item { position: relative; }
.nav-item > .nav-link::after { content: ' ▾'; font-size: 11px; }
.nav-dd { position: absolute; top: 100%; left: 0; padding-top: 8px; display: none; z-index: 200; }
.nav-dd-inner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 252px;
  box-shadow: 0 20px 44px -20px rgba(17,22,74,.45);
  padding: 7px;
}
.nav-dd a {
  display: block;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  border-radius: 9px;
  transition: background .15s, color .15s;
}
.nav-dd a:hover { background: #f6f1e1; color: var(--orange); }
.nav-item:hover .nav-dd { display: block; }

.header-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.hdr-phone { font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.hdr-phone:hover { color: var(--navy); }
.hdr-btn {
  background: var(--orange);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 8px 18px -8px rgba(247,148,29,.7);
  transition: background .2s;
}
.hdr-btn:hover { background: var(--orange-dk); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.menu-toggle span { display: block; width: 24px; height: 3px; background: var(--navy); border-radius: 2px; }

/* Header responsive (co-located with header) */
@media (max-width: 1080px) { .hdr-phone { display: none; } }
@media (max-width: 980px)  { .nav-link { padding: 8px 9px; font-size: 13px; } }
@media (max-width: 880px) {
  .menu-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 20px 32px -18px rgba(17,22,74,.4);
    padding: 8px 0 14px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .nav-link { padding: 12px 24px; border-radius: 0; font-size: 15px; }
  .nav-item { position: static; }
  .nav-dd { position: static; display: block; padding-top: 0; }
  .nav-dd-inner {
    box-shadow: none;
    border: none;
    border-radius: 0;
    border-left: 3px solid var(--orange);
    margin: 0 24px 6px;
    padding: 2px 0;
    background: transparent;
    min-width: 0;
  }
  .nav-dd a { padding: 8px 14px; }
}
@media (max-width: 560px) { .hdr-btn { display: none; } }

/* ===== CHECKLIST ===== */
.checklist { list-style: none; padding: 0; }
.checklist li {
  padding-left: 38px;
  margin-bottom: 14px;
  position: relative;
  line-height: 1.55;
}
.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 3px;
  width: 24px; height: 24px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

/* ===== CONTACT FORM (WebView-safe — DO NOT convert to grid/CSS-vars; see CLAUDE.md §13) ===== */
.contact-form {
  display: block;
  padding: 28px;
  background: #ffffff;
  border-top: 4px solid #f7941d;
  border-radius: 16px;
  box-shadow: 0 14px 34px -24px rgba(17, 32, 74, 0.5);
  box-sizing: border-box;
  max-width: 100%;
}
.contact-form-title { color: #11164a; margin: 0 0 6px; font-size: 1.4rem; }
.contact-form-lead { margin: 0 0 18px; color: #5d6270; }
.contact-form label {
  display: block;
  margin-bottom: 16px;
  font-weight: 600;
  color: #1a237e;
  font-size: 0.95rem;
}
.contact-form label > span { display: block; margin-bottom: 6px; }
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  border: 1px solid #d7dde6;
  border-radius: 10px;
  padding: 11px 13px;
  font: inherit;
  font-weight: 400;
  color: #333;
  background: #ffffff;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(247, 148, 29, 0.25);
  border-color: #f7941d;
}
.contact-form .form-hp { display: none !important; }
.contact-form .cf-turnstile { display: block; margin: 4px 0 16px; max-width: 100%; overflow: hidden; }
.contact-form .form-status { display: block; min-height: 22px; margin: 0 0 14px; font-weight: 600; color: #2d6a3f; }
.contact-form .form-status.error { color: #c03030; }
.contact-form .form-submit {
  display: inline-block;
  background: #f7941d;
  color: #ffffff;
  border: none;
  border-radius: 11px;
  padding: 13px 30px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form .form-submit:hover { background: #e07d00; }
.contact-form .form-submit:disabled { opacity: 0.6; cursor: wait; }

/* ===== FOOTER ===== */
footer { background: var(--white); border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 14px;
  color: var(--gray);
  flex-wrap: wrap;
}
.footer-inner a { color: var(--orange); font-weight: 600; }
footer .container { padding: 0; max-width: none; }

/* ===== FLOATING PHONE BUTTON ===== */
.phone-fab {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 54px; height: 54px;
  background: #5c6bc0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(17,22,74,.4);
  z-index: 60;
  transition: background .2s, transform .2s;
}
.phone-fab:hover { background: #3949ab; transform: scale(1.08); }
.phone-fab svg { width: 26px; height: 26px; fill: white; }

/* ===== SITE FOOTER (rich, dark) ===== */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 52px 0 26px; border: none; }
.site-footer .container { padding: 0 28px; max-width: var(--max-w); }
.site-footer a { color: rgba(255,255,255,.72); font-weight: 500; transition: color .15s; }
.site-footer a:hover { color: #ffb454; }
.site-footer a:focus-visible { outline: 2px solid #ffb454; outline-offset: 3px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand img { height: 38px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: .92; }
.footer-brand p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.55); margin: 0 0 18px; max-width: 290px; }
.footer-contacts { display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.footer-contacts a { color: #fff; font-weight: 700; }
.footer-contacts span { color: rgba(255,255,255,.55); }
.footer-col h4 { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #ffb454; margin: 2px 0 15px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col li { margin: 0; }
.footer-col a { font-size: 14px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.45); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; } }
