/* ═══════════════════════════════════════════════════════════════
   Lost & Found Portal — Ashton School
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --blue-dark:   #0f1f3d;
  --blue-mid:    #1a3a6b;
  --blue-accent: #2563eb;
  --blue-light:  #3b82f6;
  --gold:        #f59e0b;
  --gold-light:  #fcd34d;
  --white:       #ffffff;
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-400:    #94a3b8;
  --gray-600:    #475569;
  --gray-800:    #1e293b;
  --radius:      16px;
  --shadow:      0 4px 24px rgba(0,0,0,0.12);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.25);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 3px solid var(--blue-dark);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.navbar-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.navbar-school {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 24px 100px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 50%, #1e4080 100%);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(37,99,235,0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(245,158,11,0.15) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.school-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  padding: 6px 18px;
  border-radius: 100px;
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  animation: fadeDown 0.5s ease both;
}

.badge-icon { font-size: 18px; }
.school-badge img { height: 26px; width: auto; object-fit: contain; border-radius: 4px; }

.school-logo-hero {
  margin-bottom: 20px;
  animation: fadeDown 0.4s ease both;
}

.school-logo-hero img {
  height: 110px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
  animation: fadeDown 0.5s 0.1s ease both;
}

.hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
  animation: fadeDown 0.5s 0.2s ease both;
}

.search-box {
  position: relative;
  max-width: 540px;
  margin: 0 auto 24px;
  animation: fadeDown 0.5s 0.3s ease both;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  border-radius: 100px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  color: var(--white);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.search-box input::placeholder { color: rgba(255,255,255,0.5); }
.search-box input:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.18);
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  animation: fadeDown 0.5s 0.4s ease both;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 20px;
  border-radius: 100px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
}

.stat-num {
  font-weight: 700;
  color: var(--gold-light);
  font-size: 18px;
}

/* ── MAIN CONTAINER ─────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: -40px auto 60px;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.section-header {
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 28px 32px 20px;
  border-bottom: 2px solid var(--gray-100);
}

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 4px;
}

.section-header p {
  color: var(--gray-600);
  font-size: 15px;
}

/* ── ITEMS GRID ─────────────────────────────────────────────── */
.items-grid {
  background: var(--white);
  padding: 24px;
  border-radius: 0 0 var(--radius) var(--radius);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  min-height: 200px;
}

/* ── ITEM CARD ──────────────────────────────────────────────── */
.item-card {
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  background: var(--white);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.4s ease both;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.item-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--gray-100);
}

.item-image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gray-400);
  font-size: 48px;
}

.item-image-placeholder span { font-size: 13px; font-weight: 500; }

.item-body { padding: 16px; }

.item-tag {
  display: inline-block;
  background: var(--blue-accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.item-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 10px;
  line-height: 1.3;
}

.item-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.item-detail {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--gray-600);
}

.detail-icon { font-size: 14px; flex-shrink: 0; }

.btn-claim {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--blue-accent), var(--blue-light));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-claim:hover { opacity: 0.9; transform: scale(1.02); }
.btn-claim:active { transform: scale(0.98); }

/* ── LOADING ────────────────────────────────────────────────── */
.loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px;
  color: var(--gray-400);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--blue-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  background: var(--white);
  border-radius: 0 0 var(--radius) var(--radius);
}

.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 { font-size: 22px; color: var(--gray-800); margin-bottom: 8px; }
.empty-state p  { color: var(--gray-400); }

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,31,61,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: scaleIn 0.25s ease;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 16px;
  cursor: pointer;
  color: var(--gray-600);
  transition: background 0.2s;
  z-index: 1;
}

.modal-close:hover { background: var(--gray-200); }

.modal-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  padding: 36px 32px 28px;
  text-align: center;
  border-radius: 20px 20px 0 0;
}

.modal-icon { font-size: 40px; margin-bottom: 10px; }

.modal-header h2 {
  color: var(--white);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-item-name {
  color: var(--gold-light);
  font-size: 15px;
  font-weight: 500;
}

/* ── FORM ───────────────────────────────────────────────────── */
.claim-form { padding: 28px 32px 32px; }

.form-group { margin-bottom: 18px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

input, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.2s;
  background: var(--gray-50);
}

input:focus, textarea:focus {
  border-color: var(--blue-accent);
  background: var(--white);
}

textarea { resize: vertical; }

.form-notice {
  display: flex;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.5;
}

.btn-submit {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--blue-accent), #1d4ed8);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-submit:hover { opacity: 0.92; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  padding: 12px 28px;
  background: var(--gray-100);
  color: var(--gray-800);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 16px;
  transition: background 0.2s;
}

.btn-secondary:hover { background: var(--gray-200); }

/* ── SUCCESS ────────────────────────────────────────────────── */
.success-state {
  text-align: center;
  padding: 48px 32px;
}

.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-state h3 { font-size: 24px; font-weight: 700; margin-bottom: 10px; color: var(--blue-dark); }
.success-state p  { color: var(--gray-600); line-height: 1.6; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--gray-400);
  font-size: 14px;
}

.footer-sub { margin-top: 4px; }
.footer a { color: var(--blue-light); text-decoration: none; }

/* ── UTILITIES ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .claim-form { padding: 20px; }
  .modal-header { padding: 28px 20px; }
  .items-grid { grid-template-columns: 1fr; }
}
