:root {
  --blue: #0b5fff;
  --blue-dark: #083d99;
  --blue-light: #4fa3ff;
  --blue-pale: #eaf2ff;
  --white: #ffffff;
  --text: #10233f;
  --text-muted: #5c7290;
  --border: #dbe6f7;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(11, 95, 255, 0.12);
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
.site-main { min-height: 60vh; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.nav { display: flex; gap: 28px; align-items: center; }
.nav-left { justify-content: flex-end; }
.nav-right { justify-content: flex-start; }
.nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover, .nav a.active { color: var(--blue); border-bottom-color: var(--blue); }
.nav-instagram { color: var(--blue) !important; }
.logo-link { display: flex; justify-content: center; }
.logo-img { height: 64px; width: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--blue-dark); margin: 0 7px; }
.nav-mobile {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding: 8px 20px 16px;
}
.nav-mobile a { padding: 12px 0; font-weight: 600; border-bottom: 1px solid var(--border); }
.nav-mobile.open { display: flex; }

@media (max-width: 760px) {
  .nav-left, .nav-right { display: none; }
  .nav-toggle { display: flex; }
  .header-inner { grid-template-columns: 1fr auto 1fr; }
  .logo-img { height: 48px; }
}

/* ---------- Hero / Video grid ---------- */
.page-section { max-width: var(--max-width); margin: 0 auto; padding: 40px 20px; }
.section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 22px;
}
.hero-video { margin-bottom: 40px; }
.hero-video .video-card { max-width: none; }
.hero-video .thumb-wrap { padding-top: 42%; }
.hero-video .video-title { font-size: 22px; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; } }

.video-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  display: block;
}
.video-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(11,95,255,.2); }
.thumb-wrap { position: relative; width: 100%; padding-top: 56.25%; background: var(--blue-pale); }
.thumb-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.duration-badge {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(8,20,40,.85); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 2px 6px; border-radius: 5px;
}
.video-card .video-body { padding: 14px 16px; }
.video-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.video-meta { font-size: 13px; color: var(--text-muted); }
.new-badge {
  display: inline-block; background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px; margin-bottom: 8px;
}

.load-more-wrap { text-align: center; margin-top: 32px; }
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 15px;
}
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn-secondary { background: var(--white); color: var(--blue); border: 2px solid var(--blue); }
.btn-secondary:hover { background: var(--blue-pale); color: var(--blue-dark); }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
  background: var(--blue-pale); border-radius: var(--radius);
}

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 700px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.blog-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-card .video-body { padding: 16px; }
.blog-excerpt { color: var(--text-muted); font-size: 14px; }
.post-content { max-width: 780px; margin: 0 auto; padding: 20px; }
.post-content img, .post-content video { border-radius: var(--radius); margin: 16px 0; }
.post-content iframe { max-width: 100%; border-radius: var(--radius); }
.post-content h2, .post-content h3 { color: var(--blue-dark); }
.post-meta { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

/* ---------- Legal pages ---------- */
.legal-content { max-width: 780px; margin: 0 auto; padding: 40px 20px 70px; }
.legal-content h2 { color: var(--blue-dark); margin-top: 1.4em; }

/* ---------- Footer / Coaster ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--blue-pale) 0%, #ffffff 55%);
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.coaster-wrap {
  position: relative;
  width: 100%;
  height: 130px;
  overflow: hidden;
}
.coaster-track { position: absolute; inset: 0; width: 100%; height: 100%; }
.coaster-silhouette { fill: var(--blue-dark); opacity: .16; }
.coaster-rail { stroke: var(--blue); stroke-width: 4; opacity: .55; }
.coaster-train {
  position: absolute;
  top: 8px;
  left: -140px;
  width: 120px;
  animation: coasterMove 13s linear infinite;
}
.train-car rect { fill: var(--blue); }
.train-car circle { fill: var(--blue-dark); }
@keyframes coasterMove {
  0%   { left: -140px; top: 60px; }
  10%  { top: 4px; }
  25%  { top: 90px; }
  40%  { top: 20px; }
  55%  { top: 70px; }
  70%  { top: 0; }
  85%  { top: 55px; }
  100% { left: 100%; top: 30px; }
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 20px 34px;
  text-align: center;
}
.footer-logo { height: 44px; margin: 0 auto 16px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-bottom: 14px; }
.footer-nav a { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.footer-nav a:hover { color: var(--blue); }
.footer-copy { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ---------- Forms (admin + contact-like) ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.form-field input[type=text],
.form-field input[type=email],
.form-field input[type=password],
.form-field input[type=number],
.form-field input[type=url],
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.form-field textarea { min-height: 120px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.checkbox-field { display: flex; align-items: center; gap: 8px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #e7f8ee; color: #14804a; border: 1px solid #b9ecce; }
.alert-error { background: #fdeceb; color: #b3261e; border: 1px solid #f6c2be; }
