/* =====================================================
   گالری تصاویر — استایل یکپارچه‌ی سایت
   بر اساس فرمت طراحی صفحه‌ی milo-robot.php (تم تیره/فیروزه‌ای)
   این فایل توسط تمام صفحات سایت (خانه، ورود، ثبت‌نام، بارگذاری،
   تصاویر من، پنل مدیریت و صفحه‌ی MILO) استفاده می‌شود.
   ===================================================== */

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #14b8a6;
  --accent: #f59e0b;
  --accent-soft: #fbbf24;
  --gold: #d4a017;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --success: #22c55e;
  --bg-dark: #0c1222;
  --bg-card: #141c2e;
  --bg-elevated: #1a2438;
  --text: #e8eef7;
  --text-muted: #94a3b8;
  --border: rgba(20, 184, 166, 0.25);
  --glow: rgba(20, 184, 166, 0.4);
  --gradient-tech: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #6366f1 100%);
  --gradient-gold: linear-gradient(135deg, #d4a017 0%, #f59e0b 50%, #fbbf24 100%);
  --gradient-dark: linear-gradient(180deg, #0c1222 0%, #141c2e 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; }
::selection { background: var(--primary); color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.muted { color: var(--text-muted); }

/* ─── Background Effects (shared on every page) ─── */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(20, 184, 166, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 184, 166, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; animation: float 20s ease-in-out infinite; }
.orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, #0d9488, transparent 70%); top: -10%; right: -5%; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, #6366f1, transparent 70%); bottom: 20%; left: -8%; animation-delay: -7s; }
.orb-3 { width: 350px; height: 350px; background: radial-gradient(circle, #f59e0b, transparent 70%); top: 50%; right: 20%; animation-delay: -14s; opacity: 0.2; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Navigation (shared header.php) ─── */
nav#navbar {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: all 0.4s ease;
  background: transparent;
}

nav#navbar.scrolled {
  background: rgba(12, 18, 34, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.logo { display: flex; align-items: center; gap: 0.75rem; color: var(--text); }
.logo-icon {
  width: 48px; height: 48px;
  background: var(--gradient-tech);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 0 25px var(--glow);
  position: relative; overflow: hidden;
}
.logo-icon::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
  animation: shine 3s ease-in-out infinite;
}
@keyframes shine { 0%, 100% { transform: translateX(-100%); } 50% { transform: translateX(100%); } }

.logo-text { font-weight: 800; font-size: 1.4rem; letter-spacing: -0.5px; }
.logo-text span { background: var(--gradient-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary-light); background: rgba(20, 184, 166, 0.1); }

.nav-divider { width: 1px; height: 22px; background: var(--border); margin: 0 0.35rem; }
.nav-user { font-size: 0.88rem; color: var(--text-muted); white-space: nowrap; padding: 0 0.25rem; }

.nav-cta { background: var(--gradient-tech) !important; color: white !important; padding: 0.55rem 1.3rem !important; border-radius: 12px !important; font-weight: 600 !important; box-shadow: 0 4px 20px var(--glow); }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 30px var(--glow); }

.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: absolute; top: 100%; right: 0; left: 0;
    background: rgba(12, 18, 34, 0.98);
    flex-direction: column; align-items: stretch;
    padding: 1.5rem; gap: 0.4rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links .nav-cta { width: 100%; text-align: center; }
  .nav-divider { display: none; }
  .nav-user { text-align: center; padding: 0.5rem 0; }
  .menu-toggle { display: block; }
}

/* ─── Flash / Alerts ─── */
.flash-wrap { position: relative; z-index: 1; padding: 6.5rem 2rem 0; }
.alert {
  position: relative;
  margin: 0 0 1.25rem;
  padding: 0.9rem 2.75rem 0.9rem 1rem;
  border-radius: 14px;
  font-size: 0.92rem;
  border: 1px solid;
  backdrop-filter: blur(10px);
}
.alert-success { background: rgba(34, 197, 94, 0.12); color: #86efac; border-color: rgba(34, 197, 94, 0.35); }
.alert-error { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.alert-close { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 1.2rem; line-height: 1; color: inherit; cursor: pointer; opacity: 0.7; }
.alert-close:hover { opacity: 1; }
.error-list { margin: 0; padding-inline-start: 1.2rem; }
.error-list li { margin-bottom: 0.25rem; }

/* ─── Buttons (shared everywhere) ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 14px;
  font-weight: 600; font-size: 1rem;
  border: none; cursor: pointer;
  transition: all 0.35s ease;
  font-family: inherit;
}
.btn-primary { background: var(--gradient-tech); color: #fff; box-shadow: 0 6px 30px var(--glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 40px var(--glow); }
.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(20, 184, 166, 0.1); border-color: var(--primary); transform: translateY(-3px); }
.btn-success { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(34, 197, 94, 0.35); }
.btn-warning { background: linear-gradient(135deg, var(--gold), var(--accent-soft)); color: #1c1200; }
.btn-warning:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(245, 158, 11, 0.35); }
.btn-danger { background: linear-gradient(135deg, var(--danger-dark), var(--danger)); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(239, 68, 68, 0.35); }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.85rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ─── Generic content sections (for functional pages without a full hero) ─── */
.content-section { position: relative; z-index: 1; padding: 8.5rem 2rem 5rem; }
.content-section.tight { padding-top: 7rem; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
  display: inline-block;
  background: rgba(20, 184, 166, 0.12);
  color: var(--primary-light);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem; font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: 1rem; }
.section-title .highlight { background: var(--gradient-tech); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-desc { color: var(--text-muted); max-width: 620px; margin: 0 auto; font-size: 1.05rem; }
.section-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.75rem; }

.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; }

/* ─── Auth cards (login / register / upload) ─── */
.auth-wrap { display: flex; justify-content: center; }
.auth-card {
  width: 100%; max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.auth-sub { color: var(--text-muted); margin-bottom: 1.75rem; font-size: 0.94rem; }
.auth-switch { margin-top: 1.5rem; text-align: center; font-size: 0.9rem; color: var(--text-muted); }
.auth-switch a { color: var(--primary-light); font-weight: 700; }
.auth-switch a:hover { text-decoration: underline; }

/* ─── Forms ─── */
.form-group { margin-bottom: 1.15rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 0.45rem; color: var(--text); }
input[type="text"], input[type="email"], input[type="password"], input[type="file"] {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: inherit; font-size: 0.94rem;
  background: var(--bg-elevated);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input[type="file"] { padding: 0.65rem 1rem; cursor: pointer; }
input::placeholder { color: var(--text-muted); }
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18); outline: none; }
.field-hint { display: block; margin-top: 0.4rem; font-size: 0.78rem; color: var(--text-muted); }

.upload-preview { margin: 1.1rem 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); max-height: 280px; }
.upload-preview img { width: 100%; object-fit: cover; max-height: 280px; }

@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ─── Gallery grid (index / my-uploads / customer club / static gallery) ─── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.5rem; }

.gallery-item { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; border: 1px solid var(--border); transition: all 0.4s ease; background: var(--bg-card); }
.gallery-item:hover { transform: scale(1.03); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4); }
.gallery-item img, .gallery-item .placeholder-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img, .gallery-item:hover .placeholder-img { transform: scale(1.08); }

.placeholder-img { display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(145deg, #1a2438 0%, #0f172a 100%); color: var(--text-muted); font-size: 0.95rem; gap: 0.75rem; }
.placeholder-img svg { width: 64px; height: 64px; opacity: 0.4; }

.gallery-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(12, 18, 34, 0.92)); display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 0.5rem; padding: 1.1rem; opacity: 0; transition: opacity 0.3s ease; }
.gallery-item:hover .gallery-overlay, .gallery-item.always-on .gallery-overlay { opacity: 1; }
.gallery-overlay > span { font-weight: 600; font-size: 0.95rem; }
.gcard-meta { font-size: 0.78rem; color: var(--text-muted); }

.status-badge { position: absolute; top: 0.75rem; inset-inline-end: 0.75rem; z-index: 2; padding: 0.3rem 0.8rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; backdrop-filter: blur(6px); border: 1px solid; }
.status-pending { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4); }
.status-approved { background: rgba(34, 197, 94, 0.18); color: #86efac; border-color: rgba(34, 197, 94, 0.4); }
.status-rejected { background: rgba(239, 68, 68, 0.18); color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); }

/* ---- like button ---- */
.like-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer; font-size: 0.85rem; font-weight: 600;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .15s ease;
}
.like-btn .heart { fill: none; stroke: currentColor; stroke-width: 1.6; transition: fill .25s ease, stroke .25s ease, transform .25s ease; }
.like-btn:hover { border-color: var(--accent); color: var(--accent-soft); }
.like-btn.liked { background: rgba(245, 158, 11, 0.18); border-color: var(--accent); color: var(--accent-soft); }
.like-btn.liked .heart { fill: var(--accent-soft); stroke: var(--accent-soft); }
.like-btn.pulse .heart { animation: heartPulse .35s ease; }
.like-btn.like-btn-static { cursor: default; }
@keyframes heartPulse { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---- generic bordered card body under an image (my-uploads / index list mode) ---- */
.gcard { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: all .35s ease; }
.gcard:hover { transform: translateY(-6px); box-shadow: 0 15px 40px rgba(0,0,0,0.3); border-color: var(--primary); }
.gcard-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-elevated); }
.gcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gcard:hover .gcard-media img { transform: scale(1.06); }
.gcard-body { padding: 1.1rem 1.2rem 1.3rem; }
.gcard-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }

/* ─── Empty state ─── */
.empty-state { text-align: center; padding: 4.5rem 1.5rem; background: var(--bg-card); border: 1px dashed var(--border); border-radius: 22px; color: var(--text-muted); }

/* ─── Tabs (admin) ─── */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 2.25rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tab { padding: 0.75rem 1.1rem; border-radius: 12px 12px 0 0; font-size: 0.92rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; transform: translateY(1px); border: 1px solid transparent; }
.tab:hover { color: var(--primary-light); }
.tab.active { color: var(--primary-light); background: var(--bg-card); border: 1px solid var(--border); border-bottom-color: var(--bg-card); font-weight: 700; }
.tab-count { background: rgba(20, 184, 166, 0.18); color: var(--primary-light); padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.tab.active .tab-count { background: var(--gradient-tech); color: #fff; }

/* ─── Admin grid ─── */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.admin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; transition: all .35s ease; }
.admin-card:hover { border-color: var(--primary); box-shadow: 0 15px 40px rgba(0,0,0,0.3); }
.admin-card-media { aspect-ratio: 4/3; background: var(--bg-elevated); }
.admin-card-media img { width: 100%; height: 100%; object-fit: cover; }
.admin-card-body { padding: 1.2rem 1.3rem 1.4rem; }
.admin-card-body h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.4rem; }
.admin-actions { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.admin-actions form { display: inline-flex; }

/* ─── Sections common (used by every page incl. milo-robot.php) ─── */
section { position: relative; z-index: 1; padding: 6rem 2rem; }

/* ─── Hero (marketing hero on milo-robot.php) ─── */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 8rem 2rem 4rem; z-index: 1; }
.hero-content { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(20, 184, 166, 0.15); border: 1px solid var(--border); padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.85rem; color: var(--primary-light); margin-bottom: 1.5rem; animation: fadeInUp 0.8s ease; }
.hero-badge .dot { width: 8px; height: 8px; background: var(--primary-light); border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }
.hero h1 { font-size: clamp(2.5rem, 5vw, 3.8rem); font-weight: 900; line-height: 1.25; margin-bottom: 1.5rem; animation: fadeInUp 0.8s ease 0.1s both; }
.hero h1 .highlight { background: var(--gradient-tech); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 540px; margin-bottom: 2.5rem; animation: fadeInUp 0.8s ease 0.2s both; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; animation: fadeInUp 0.8s ease 0.3s both; }
.hero-visual { position: relative; animation: fadeInUp 0.8s ease 0.4s both; }
.hero-image-wrapper { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 1; background: var(--bg-card); border: 1px solid var(--border); box-shadow: 0 0 60px rgba(20, 184, 166, 0.15); }
.hero-image-wrapper img, .hero-image-wrapper .placeholder-img { width: 100%; height: 100%; object-fit: cover; }
.hero-float-card { position: absolute; background: rgba(20, 28, 46, 0.9); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.25rem; box-shadow: 0 10px 40px rgba(0,0,0,0.4); animation: floatCard 4s ease-in-out infinite; }
.hero-float-card.card-1 { bottom: 15%; right: -10%; animation-delay: 0s; }
.hero-float-card.card-2 { top: 10%; left: -8%; animation-delay: -2s; }
@keyframes floatCard { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.float-card-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; font-size: 1.1rem; }
.float-card-icon.teal { background: rgba(20, 184, 166, 0.2); }
.float-card-icon.gold { background: rgba(245, 158, 11, 0.2); }
.float-card-title { font-weight: 700; font-size: 0.9rem; }
.float-card-sub { font-size: 0.75rem; color: var(--text-muted); }

/* ─── Problem & Solution ─── */
.problem-solution { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.ps-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 2.5rem; position: relative; overflow: hidden; transition: all 0.4s ease; }
.ps-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.ps-card.problem { border-color: rgba(239, 68, 68, 0.3); }
.ps-card.solution { border-color: rgba(20, 184, 166, 0.4); }
.ps-card::before { content: ''; position: absolute; top: 0; right: 0; left: 0; height: 4px; }
.ps-card.problem::before { background: linear-gradient(90deg, #ef4444, #f97316); }
.ps-card.solution::before { background: var(--gradient-tech); }
.ps-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.5rem; }
.ps-card.problem .ps-icon { background: rgba(239, 68, 68, 0.15); }
.ps-card.solution .ps-icon { background: rgba(20, 184, 166, 0.15); }
.ps-card h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; }
.ps-card p { color: var(--text-muted); margin-bottom: 0.75rem; }
.solution-list { list-style: none; margin-top: 1.25rem; }
.solution-list li { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.85rem; color: var(--text-muted); }
.solution-list li::before { content: '✦'; color: var(--primary-light); font-size: 0.85rem; margin-top: 0.15rem; }

/* ─── Hardware ─── */
.hardware-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.hw-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 2rem 1.5rem; text-align: center; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; overflow: hidden; }
.hw-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(20, 184, 166, 0.12), transparent 60%); opacity: 0; transition: opacity 0.4s; }
.hw-card:hover { transform: translateY(-10px) scale(1.02); border-color: var(--primary); box-shadow: 0 20px 50px rgba(20, 184, 166, 0.2); }
.hw-card:hover::after { opacity: 1; }
.hw-number { position: absolute; top: 1rem; left: 1rem; font-size: 2.5rem; font-weight: 900; color: rgba(20, 184, 166, 0.1); line-height: 1; }
.hw-icon { width: 72px; height: 72px; margin: 0 auto 1.5rem; background: linear-gradient(145deg, rgba(20, 184, 166, 0.2), rgba(99, 102, 241, 0.15)); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 2rem; position: relative; z-index: 1; }
.hw-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.75rem; position: relative; z-index: 1; }
.hw-card p { font-size: 0.9rem; color: var(--text-muted); position: relative; z-index: 1; }

/* ─── Timeline ─── */
.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; right: 28px; width: 3px; background: linear-gradient(180deg, var(--primary), var(--accent), transparent); border-radius: 3px; }
.timeline-item { display: flex; gap: 2rem; margin-bottom: 2.5rem; position: relative; opacity: 0; transform: translateX(30px); transition: all 0.6s ease; }
.timeline-item.visible { opacity: 1; transform: translateX(0); }
.timeline-dot { width: 58px; height: 58px; min-width: 58px; background: var(--bg-elevated); border: 3px solid var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; color: var(--primary-light); box-shadow: 0 0 20px var(--glow); z-index: 2; }
.timeline-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 1.5rem 2rem; flex: 1; transition: all 0.3s ease; }
.timeline-content:hover { border-color: var(--primary); box-shadow: 0 8px 30px rgba(20, 184, 166, 0.15); }
.timeline-content h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--primary-light); }
.timeline-content p { color: var(--text-muted); font-size: 0.95rem; }

/* ─── Gallery filters (static gallery on milo-robot.php) ─── */
.gallery-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }
.filter-btn { padding: 0.55rem 1.4rem; border-radius: 50px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.3s ease; }
.filter-btn:hover, .filter-btn.active { background: var(--gradient-tech); color: white; border-color: transparent; box-shadow: 0 4px 20px var(--glow); }

/* ─── Lightbox (shared across every gallery on every page) ─── */
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.92); z-index: 2000; display: none; align-items: center; justify-content: center; flex-direction: column; backdrop-filter: blur(10px); }
.lightbox.active { display: flex; }
.lightbox-placeholder { width: 70vw; max-width: 800px; height: 50vh; background: var(--bg-card); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); border: 1px solid var(--border); text-align: center; padding: 1rem; }
.lightbox-controls { display: flex; gap: 1rem; margin-top: 1.5rem; align-items: center; }
.lightbox-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,0.08); color: white; font-size: 1.2rem; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; }
.lightbox-btn:hover { background: var(--primary); border-color: var(--primary); }
.lightbox-close { position: absolute; top: 1.5rem; left: 1.5rem; width: 48px; height: 48px; }
.lightbox-caption { color: var(--text-muted); margin-top: 0.75rem; font-size: 0.95rem; }
.autoplay-indicator { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.85rem; }

/* ─── Videos ─── */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 2rem; }
.video-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; transition: all 0.4s ease; }
.video-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.3); border-color: var(--primary); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: var(--bg-elevated); overflow: hidden; }
.video-thumb .placeholder-img { width: 100%; height: 100%; }
.video-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); transition: background 0.3s; }
.video-card:hover .video-play { background: rgba(0,0,0,0.5); }
.play-btn { width: 64px; height: 64px; background: var(--gradient-tech); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 30px var(--glow); transition: transform 0.3s; }
.video-card:hover .play-btn { transform: scale(1.1); }
.play-btn svg { width: 24px; height: 24px; fill: white; margin-right: -3px; }
.video-info { padding: 1.5rem; }
.video-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.video-info p { color: var(--text-muted); font-size: 0.9rem; }

/* ─── PDFs ─── */
.pdf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.pdf-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 1.75rem; display: flex; align-items: center; gap: 1.25rem; transition: all 0.35s ease; text-decoration: none; color: inherit; }
.pdf-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 35px rgba(245, 158, 11, 0.15); }
.pdf-icon { width: 56px; height: 56px; min-width: 56px; background: linear-gradient(145deg, rgba(245, 158, 11, 0.2), rgba(212, 160, 23, 0.15)); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.pdf-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.pdf-info p { font-size: 0.8rem; color: var(--text-muted); }

/* ─── About / features ─── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-image { border-radius: 24px; overflow: hidden; aspect-ratio: 4/3; border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.about-features { display: grid; gap: 1.25rem; }
.feature-item { display: flex; gap: 1rem; padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; transition: all 0.3s ease; }
.feature-item:hover { border-color: var(--primary); background: rgba(20, 184, 166, 0.05); }
.feature-icon { width: 44px; height: 44px; min-width: 44px; background: rgba(20, 184, 166, 0.15); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.feature-text h4 { font-weight: 700; margin-bottom: 0.25rem; }
.feature-text p { font-size: 0.9rem; color: var(--text-muted); }

/* ─── CTA ─── */
.cta-section { text-align: center; }
.cta-box { background: linear-gradient(145deg, rgba(20, 184, 166, 0.12), rgba(99, 102, 241, 0.1)); border: 1px solid var(--border); border-radius: 28px; padding: 4rem 3rem; position: relative; overflow: hidden; }
.cta-box::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(20, 184, 166, 0.08), transparent 50%); animation: rotate 20s linear infinite; }
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.cta-box h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 1rem; position: relative; }
.cta-box p { color: var(--text-muted); max-width: 500px; margin: 0 auto 2rem; position: relative; }
.cta-box .btn { position: relative; }

/* ─── Site footer (footer.php) ─── */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 3rem 2rem; text-align: center; margin-top: auto; }
.site-footer p { color: var(--text-muted); font-size: 0.9rem; }
.site-footer .logo { justify-content: center; margin-bottom: 1rem; }

.site-main { flex: 1; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-right: auto; margin-left: auto; }
  .hero-actions { justify-content: center; }
  .hero-float-card { display: none; }
  .hardware-grid { grid-template-columns: repeat(2, 1fr); }
  .problem-solution { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hardware-grid { grid-template-columns: 1fr; }
  .timeline::before { right: 20px; }
  .timeline-dot { width: 42px; height: 42px; min-width: 42px; font-size: 0.9rem; }
  section { padding: 4rem 1.25rem; }
  .content-section { padding: 7.5rem 1.25rem 3.5rem; }
}

@media (max-width: 560px) {
  .gallery-grid, .admin-grid { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .auth-card { padding: 1.75rem 1.35rem; }
}

@media (max-width: 420px) {
  .gallery-grid, .admin-grid { grid-template-columns: 1fr; }
}
