/* =====================================================
   SHARED STYLES — ПК Локомотив Горна Оряховица
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS Variables ===== */
:root {
  --c-bg:        #050e1f;
  --c-bg2:       #071527;
  --c-navy:      #0b2755;
  --c-blue:      #1b6f8c;
  --c-cyan:      #43A4C7;
  --c-cyan-lt:   #7dd3f0;
  --c-white:     #ffffff;
  --c-text:      #dde8f0;
  --c-muted:     rgba(221,232,240,0.55);

  --nav-h: 72px;

  --r-sm:   8px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-full: 9999px;

  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t:           0.3s var(--ease);
  --t-slow:      0.65s var(--ease);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { line-height: 1.15; }

/* ===== Utility Layout ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}
.section-pad {
  padding-top: clamp(64px, 9vw, 120px);
  padding-bottom: clamp(64px, 9vw, 120px);
}

/* ===== Utility Visuals ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--c-cyan-lt) 0%, var(--c-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: rgba(67,164,199,0.1);
  border: 1px solid rgba(67,164,199,0.2);
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-cyan);
  margin-bottom: 20px;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--c-cyan) 0%, var(--c-blue) 100%);
  color: var(--c-white);
  font-weight: 700; font-size: 16px;
  border-radius: var(--r-full);
  box-shadow: 0 6px 28px rgba(67,164,199,.35);
  transition: transform var(--t), box-shadow var(--t), filter var(--t);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(67,164,199,.5);
  filter: brightness(1.1);
}
.btn-primary:active { transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px;
  border: 2px solid rgba(255,255,255,0.18);
  color: var(--c-white);
  font-weight: 600; font-size: 15px;
  border-radius: var(--r-full);
  backdrop-filter: blur(8px);
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.btn-secondary:hover {
  border-color: var(--c-cyan);
  background: rgba(67,164,199,0.1);
  transform: translateY(-2px);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background var(--t), box-shadow var(--t);
}
.navbar--scrolled {
  background: rgba(5,14,31,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 24px rgba(0,0,0,.35);
}
.navbar--solid {
  background: rgba(5,14,31,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav-container {
  max-width: 1280px; margin: 0 auto;
  height: 100%; padding: 0 clamp(16px, 4vw, 48px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.nav-logo-group {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img {
  height: 48px; width: auto; object-fit: contain;
  transition: transform var(--t), filter var(--t);
  filter: drop-shadow(0 2px 8px rgba(67,164,199,.15));
}
.nav-logo:hover img { transform: scale(1.05); }

/* Brand text next to logo */
.nav-brand {
  display: flex; flex-direction: column; gap: 1px;
  border-left: 1px solid rgba(255,255,255,.12);
  padding-left: 12px;
}
.nav-brand__name {
  font-size: 15px; font-weight: 800;
  color: #fff; letter-spacing: .01em; line-height: 1.2;
}
.nav-brand__sub {
  font-size: 11px; font-weight: 500;
  color: var(--c-muted); letter-spacing: .05em;
}
@media (max-width: 560px) {
  .nav-brand__sub { display: none; }
}

/* Messages icon — hidden on desktop (nav-links shows text version), visible on mobile */
.nav-msg-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,.75);
  flex-shrink: 0;
  transition: color var(--t), background var(--t);
}
.nav-msg-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-msg-btn svg { width: 20px; height: 20px; }
@media (max-width: 860px) {
  .nav-msg-btn { display: flex; }
}

.nav-links {
  display: flex; align-items: center; gap: 2px;
}
.nav-link {
  padding: 8px 13px;
  font-size: 14.5px; font-weight: 500;
  color: rgba(255,255,255,.75);
  border-radius: var(--r-sm);
  position: relative;
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.nav-link::after {
  content: ''; position: absolute;
  bottom: 4px; left: 13px; right: 13px;
  height: 2px; border-radius: 2px;
  background: var(--c-cyan);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t);
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--c-cyan-lt); }

.nav-link--icon { display: flex; align-items: center; gap: 6px; }
.nav-link--icon svg { width: 15px; height: 15px; flex-shrink: 0; }

.nav-cta {
  flex-shrink: 0;
  margin-left: 6px; padding: 9px 22px;
  background: linear-gradient(135deg, var(--c-cyan) 0%, var(--c-blue) 100%);
  color: #fff !important; font-weight: 700; font-size: 14px;
  border-radius: var(--r-full);
  box-shadow: 0 4px 16px rgba(67,164,199,.3);
  transition: transform var(--t), box-shadow var(--t), filter var(--t);
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(67,164,199,.5);
  filter: brightness(1.1);
}
.nav-cta::after { display: none !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  transition: background var(--t);
  z-index: 110;
}
.hamburger:hover { background: rgba(255,255,255,.07); }
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform .35s var(--ease), opacity .25s, width .3s;
  transform-origin: center;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Mobile Nav Overlay ===== */
.mobile-nav {
  position: fixed; inset: 0;
  background: rgba(5,14,31,.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 99;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease);
}
.mobile-nav.is-open { opacity: 1; pointer-events: all; }
.mobile-nav a {
  font-size: clamp(26px, 7vw, 38px); font-weight: 800;
  color: rgba(255,255,255,.8);
  padding: 10px 32px; border-radius: var(--r-lg);
  opacity: 0; transform: translateY(20px);
  transition: color var(--t), background var(--t),
              opacity .45s var(--ease), transform .45s var(--ease);
}
.mobile-nav.is-open a:nth-child(1) { opacity: 1; transform: none; transition-delay: .05s; }
.mobile-nav.is-open a:nth-child(2) { opacity: 1; transform: none; transition-delay: .10s; }
.mobile-nav.is-open a:nth-child(3) { opacity: 1; transform: none; transition-delay: .15s; }
.mobile-nav.is-open a:nth-child(4) { opacity: 1; transform: none; transition-delay: .20s; }
.mobile-nav.is-open a:nth-child(5) { opacity: 1; transform: none; transition-delay: .25s; }
.mobile-nav.is-open a:nth-child(6) { opacity: 1; transform: none; transition-delay: .30s; }
.mobile-nav a:hover { color: var(--c-cyan); background: rgba(67,164,199,.08); }
.mobile-nav .mobile-cta {
  margin-top: 16px;
  background: linear-gradient(135deg, var(--c-cyan) 0%, var(--c-blue) 100%);
  color: #fff !important;
  border-radius: var(--r-full);
  box-shadow: 0 8px 32px rgba(67,164,199,.4);
  padding: clamp(12px,3vw,16px) clamp(32px,8vw,48px);
  font-size: clamp(18px, 4.5vw, 24px);
}
.mobile-nav .mobile-cta:hover { background: linear-gradient(135deg, var(--c-cyan) 0%, var(--c-blue) 100%); color: #fff; filter: brightness(1.1); transform: translateY(-2px); }

/* ===== Site Footer ===== */
.site-footer {
  background: #030b17;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(40px,6vw,72px) clamp(16px,4vw,48px) clamp(24px,3vw,40px);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(24px,4vw,56px);
}
.footer-brand .brand-logo { height: 52px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 13.5px; color: var(--c-muted); line-height: 1.75; max-width: 260px; }
.footer-col h5 {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--c-cyan); margin-bottom: 16px;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 14px; color: var(--c-muted); transition: color var(--t); }
.footer-col a:hover { color: #fff; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t), transform var(--t), border-color var(--t);
}
.footer-socials a:hover {
  background: rgba(67,164,199,.18);
  border-color: rgba(67,164,199,.35);
  transform: translateY(-3px);
}
.footer-socials img { width: 18px; height: 18px; object-fit: contain; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  text-align: center; padding: 20px 24px;
  font-size: 13px; color: var(--c-muted);
}
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 500px) { .footer-inner { grid-template-columns: 1fr; gap: 28px; } }

/* ===== Scroll-triggered reveal ===== */
.reveal, .reveal-left, .reveal-right, .reveal-scale {
  will-change: opacity, transform;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal        { opacity: 0; transform: translateY(40px); }
.reveal-left   { opacity: 0; transform: translateX(-48px); }
.reveal-right  { opacity: 0; transform: translateX(48px); }
.reveal-scale  { opacity: 0; transform: scale(.9); }
.reveal.in, .reveal-left.in, .reveal-right.in, .reveal-scale.in { opacity: 1; transform: none; }
.delay-100 { transition-delay: .1s; }
.delay-200 { transition-delay: .2s; }
.delay-300 { transition-delay: .3s; }
.delay-400 { transition-delay: .4s; }
.delay-500 { transition-delay: .5s; }
.delay-600 { transition-delay: .6s; }

/* ===== Wave Divider ===== */
.wave-bottom {
  position: absolute; bottom: -1px; left: 0; right: 0;
  line-height: 0; pointer-events: none; overflow: hidden;
}
.wave-bottom svg { width: 100%; display: block; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 480px) {
  .section-pad { padding-top: 56px; padding-bottom: 56px; }
}


/* ===== Mobile refinements ===== */
@media (max-width: 480px) {
  /* Compact navbar on small phones */
  .nav-logo img { height: 40px; }
  .nav-brand__name { font-size: 13px; }
  /* Buttons — avoid overflow on narrow screens */
  .btn-primary  { padding: 12px 22px; font-size: 15px; }
  .btn-secondary { padding: 11px 20px; font-size: 14px; }
}

/* ===== Accessibility ===== */
:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
