/* Layout: header + footer (WMSProApp Header & Footer) */
/* Page styles: public/assets/css/{page}.css + components.css */

body.site-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  color: #0f172a;
}

.site-container {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 640px) { .site-container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .site-container { padding: 0 2rem; } }

/* Header — WMSProApp (fixed к viewport; не внутри transform-анимированного блока) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s, padding 0.3s, backdrop-filter 0.3s;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0;
}

.site-header.header-scrolled {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226,232,240,.6);
  box-shadow: 0 1px 2px 0 rgba(15,23,42,.05);
  padding: 0.25rem 0;
}

@media (min-width: 1024px) {
  .site-header:not(.header-scrolled) {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
  }
}

.site-header-inner {
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  border-radius: 1rem;
  min-width: 0;
}

.site-logo-icon {
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: #2563eb;
  box-shadow: 0 10px 15px -3px rgba(37,99,235,.2);
  color: #fff;
}

.site-logo-icon .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.site-logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #020617;
  white-space: nowrap;
}

.site-logo-text span { color: #2563eb; }

.site-nav-desktop {
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  border: 1px solid rgba(226,232,240,.7);
  background: rgba(255,255,255,.75);
  padding: 0.25rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
  backdrop-filter: blur(8px);
}

@media (min-width: 1024px) {
  .site-nav-desktop { display: flex; }
}

.site-nav-link {
  position: relative;
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 800;
  text-decoration: none;
  color: #475569;
  transition: all 0.2s;
}

.site-nav-link:hover {
  background: #f8fafc;
  color: #1d4ed8;
}

.site-nav-link.is-active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(37,99,235,.2);
}

.site-header-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .site-header-actions { display: flex; }
}

.btn-wms {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-wms-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-wms-primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(37,99,235,.3);
}

.btn-wms-primary:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
}

.btn-wms-ghost {
  background: transparent;
  color: #475569;
}

.btn-wms-ghost:hover {
  background: #fff;
  color: #2563eb;
}

.btn-wms-secondary {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #1e293b;
}

.btn-wms-secondary:hover {
  background: #f8fafc;
}

.btn-wms-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-wms-light {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 10px 15px -3px rgba(255,255,255,.2);
}

.btn-wms-light:hover {
  background: #eff6ff;
}

.home-hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.home-hero-actions .btn-wms {
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .home-hero-actions {
    flex-direction: row;
    align-items: center;
    width: auto;
  }

  .home-hero-actions .btn-wms {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .home-hero-actions { justify-content: flex-start; }
}

.home-highlight-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: #dbeafe;
  color: #2563eb;
}

.home-highlight-icon .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.integration-layout {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .integration-layout { grid-template-columns: 0.9fr 1.1fr; }
}


.integration-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .integration-actions { flex-direction: row; }
}

.btn-wms-on-dark {
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: #fff;
}

.btn-wms-on-dark:hover {
  background: rgba(255,255,255,.1);
}

.site-mobile-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 1024px) {
  .site-mobile-toggle { display: none; }
}

#mobile-menu-button {
  display: inline-flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
  cursor: pointer;
}

#mobile-menu {
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 100%;
  z-index: 50;
  margin-top: 0.75rem;
  border-radius: 2rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 25px 50px -12px rgba(15,23,42,.25);
}

#mobile-menu-overlay {
  position: fixed;
  inset-inline: 0;
  top: 74px;
  z-index: 40;
  height: 100vh;
  background: rgba(2,6,23,.3);
  backdrop-filter: blur(4px);
}

.mobile-nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  text-align: right;
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  color: #334155;
  border: none;
  background: transparent;
  cursor: pointer;
}

.mobile-nav-item.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.site-main {
  flex: 1;
  margin-top: 5rem;
}

/* Article pages: full-width section backgrounds; .site-container limits content only */
.cms-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.cms-content--boxed {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.cms-page-title {
  font-size: 2rem;
  font-weight: 900;
  margin: 0 0 1rem;
  color: #020617;
}

.cms-module { }
.cms-module-title { font-size: 1.4rem; font-weight: 900; margin: 0 0 0.75rem; }

.cms-hero {
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  padding: 2rem;
}

.cms-hero h1 { margin: 0 0 0.75rem; font-size: 2.2rem; line-height: 1.2; font-weight: 900; }
.cms-btn {
  display: inline-block;
  margin-top: 0.75rem;
  background: #2563eb;
  color: #fff;
  padding: 0.75rem 1.125rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 800;
}

.cms-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
}

/* Footer — WMSProApp */
.site-footer {
  margin-top: auto;
  border-top: 1px solid #1e293b;
  background: #0b1120;
  padding: 4rem 0;
  color: #94a3b8;
}

.site-footer-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 768px) {
  .site-footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

.site-footer-brand p {
  max-width: 24rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.6;
  margin: 0;
}

.site-footer-tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-footer-tags span {
  border-radius: 9999px;
  background: rgba(255,255,255,.05);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 900;
  color: #cbd5e1;
}

.site-footer h3 {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li { margin-bottom: 1rem; }

.site-footer a, .site-footer button.footer-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.site-footer a:hover, .site-footer button.footer-link:hover {
  color: #60a5fa;
}

.site-footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(30,41,59,.6);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .site-footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.site-footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.hidden { display: none !important; }

@media (min-width: 1024px) {
  #mobile-menu,
  #mobile-menu-overlay {
    display: none !important;
  }
}
