/* motori.css - layout + sticky nav + responsive fixes */

/* CSS variables for header/nav sizing (adjust here if you change HTML sizes) */
:root{
  --header-h: 140px;
  --nav-h: 56px;
  --page-pad: 24px;
  --max-content-width: 1100px;
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #222;
  font-size: 16px; /* base size (desktop) */
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* ---------- Header (logo + audio) ---------- */
.site-header {
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #666, #bfbfbf, #666);
  background-size: 200% 100%;
  animation: metallic 6s linear infinite;
  display: flex;
  align-items: center;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.15);
}
@keyframes metallic {
  0% { background-position: 200% 0; }
  50% { background-position: 50% 0; }
  100% { background-position: -200% 0; }
}

.header-inner {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* logo + audio cluster */
.logo-and-player {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo img {
  height: calc(var(--header-h) - 20px); /* keep some padding */
  width: auto;
  display: block;
  object-fit: contain;
  -webkit-backface-visibility: hidden;
}

/* audio player */
.audio-player { display: flex; align-items: center; gap: 8px; }
#bg-music { display: none; }
#toggleBtn {
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}
#toggleBtn:hover { background: rgba(0,0,0,0.8); }

/* ---------- Navigation ---------- */
.navbar {
  position: sticky;
  top: var(--header-h);
  z-index: 999;
  background: linear-gradient(180deg,#2b2b2b,#1f1f1f);
  padding: 8px 18px;
  border-bottom: 3px solid #c33;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-h);
}

.navbar .header-nav-inner {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.nav-links li { white-space: nowrap; }
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 6px;
  display: inline-block;
}
.nav-links a:hover { color: #ffd600; text-decoration: underline; }

/* hamburger (hidden on desktop) */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  padding: 6px;
}

/* ---------- Main content ---------- */
/* main content needs top padding so sticky header+nav don't overlap content */
#main-content { padding-top: calc(var(--header-h) + var(--nav-h) + 16px); }
.content { flex: 1; padding: var(--page-pad); background: #fff; max-width: var(--max-content-width); margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: #111;
  color: #ddd;
  padding: 14px 18px;
  text-align: center;
  font-size: 14px;
}

/* ---------- Forms / Cards ---------- */
.bike-list { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; justify-content: center; }
.bike-card {
  border: 1px solid #e0e0e0;
  padding: 12px;
  border-radius: 8px;
  width: calc(33% - 32px);
  box-shadow: 1px 1px 8px rgba(0,0,0,0.05);
  background: #fff;
}
.bike-card img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 4px; }
.bike-card strong { display: block; margin: 8px 0; }
.bike-form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; width: 100%; }
.bike-form label { display: flex; flex-direction: column; font-weight: 600; font-size: 15px; gap:6px; }
.bike-form input, .bike-form select, .bike-form textarea {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #bbb;
  font-size: 15px;
  width: 100%;
}
.bike-form textarea { min-height: 110px; }
.bike-form button { padding: 12px 16px; border: none; border-radius: 8px; background: #c33; color: #fff; font-weight: 700; cursor: pointer; }
.bike-form button:hover { background: #a00; }

.errors { color: #c33; margin: 8px 0; }
.success { color: #0a0; margin: 8px 0; }

/* Responsive adjustments */
@media (max-width: 900px) {
  :root { --header-h: 100px; --nav-h: 56px; }
  .logo img { height: 80px; }
  .nav-links { gap: 18px; font-size: 15px; }
  .bike-card { width: calc(50% - 24px); }
}

@media (max-width: 700px) {
  :root { --header-h: 80px; --nav-h: 56px; }
  body { font-size: 17px; }
  .logo img { height: 56px; }

  /* hamburger visible, hide inline links */
  .hamburger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    right: 12px;
    top: calc(var(--header-h) + var(--nav-h)); /* place under header+nav */
    background: #222;
    flex-direction: column;
    min-width: 220px;
    padding: 8px 0;
    border-radius: 6px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.45);
  }
  .nav-links.show { display: flex; }

  .nav-links a { display: block; padding: 10px 14px; font-size: 17px; }
  #main-content { padding-top: calc(var(--header-h) + var(--nav-h) + 12px); }

  .bike-form input, .bike-form select, .bike-form textarea { font-size: 16px; padding: 12px; }
  .bike-card { width: 100%; }
}

/* final small screens */
@media (max-width: 480px) {
  body { font-size: 17px; }
  :root { --header-h: 72px; --nav_h: 52px; }
  .bike-form { padding: 0 6px; }
}

