/* ============================================================
   GARBA SELFIE – Theme colour #DC3F47 (light VBN red)
   ============================================================ */

:root {
  --primary: #dc3f47;
  --primary-dark: #c22f37;
  --primary-deep: #9a2229;
  --primary-soft: #fbe6e7;
  --primary-tint: #fff7f7;
  --ink: #1e1418;
  --muted: #6b5a60;
  --border: #efdcdd;
  --bg: #fcf9fa;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 18px 48px rgba(122, 10, 18, .08);
  --font-display: "Noto Sans Gujarati", "Mukta", system-ui, sans-serif;
  --font-body: "Mukta", "Noto Sans Gujarati", system-ui, sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }

.icon { flex-shrink: 0; vertical-align: middle; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 900; letter-spacing: .04em; color: var(--ink); font-size: 1.05rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.nav { display: flex; gap: 6px; }
.nav a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 7px 12px; border-radius: 8px; color: var(--muted); }
.nav a:hover { color: var(--primary); background: var(--primary-tint); }
.nav a.active { color: var(--primary); background: var(--primary-soft); }

/* ---------- Hero ---------- */
.hero-banner {
  position: relative;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--primary-soft);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-banner.no-image {
  background:
    radial-gradient(circle at 85% 15%, rgba(220, 63, 71, .12), transparent 34%),
    radial-gradient(circle at 8% 90%, rgba(220, 63, 71, .08), transparent 30%),
    linear-gradient(135deg, #fff7f7, #fbe4e5);
}
.hero-banner.no-image::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(220, 63, 71, .14) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 760px; margin: 0 16px; color: var(--ink); }
.hero-sub { font-weight: 700; letter-spacing: .18em; font-size: .85rem; text-transform: uppercase; color: var(--primary); }
.hero-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; line-height: 1.1; margin: 6px 0; text-wrap: balance; color: var(--primary-deep); }
.hero-tag { font-weight: 600; font-size: 1.1rem; color: var(--muted); }

@media (max-width: 1024px) { .hero-banner { height: 290px; } }
@media (max-width: 768px)  { .hero-banner { height: 240px; } }
@media (max-width: 600px)  { .hero-banner { height: 200px; } }

/* ---------- Section headers ---------- */
.section-header { text-align: center; margin-bottom: 36px; }
.kicker { display: inline-block; margin-bottom: 10px; font-size: .8rem; font-weight: 800; color: var(--primary); letter-spacing: .16em; text-transform: uppercase; }
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 900; line-height: 1.2; margin-bottom: 10px; text-wrap: balance; }
.section-desc { color: var(--muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ---------- Form ---------- */
.form-section { padding: 55px 0 75px; }
.card {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 18px;
  padding: 44px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow);
}
@media (max-width: 600px) { .card { padding: 30px 20px; } }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.mb { margin-bottom: 24px; }
.form-group label, .photo-label { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.req { color: var(--primary); }

.form-group input, .form-group select {
  width: 100%;
  min-height: 50px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(220, 63, 71, .12); }

/* ---------- Photo ---------- */
.photo-section { margin-bottom: 32px; }
.photo-label { display: block; margin-bottom: 12px; }
.photo-tabs { display: flex; gap: 6px; background: var(--primary-tint); border: 1px solid var(--border); border-radius: 12px; padding: 5px; }
.tab-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 15px; border: none; border-radius: 9px;
  font-size: .92rem; font-weight: 700; cursor: pointer; background: transparent; color: var(--muted);
  transition: background .2s, color .2s;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: #fff; background: var(--primary); box-shadow: 0 6px 16px rgba(220, 63, 71, .2); }

.photo-box { margin-top: 18px; text-align: center; }
.photo-box img, .photo-box video {
  width: 100%; max-height: 380px; object-fit: cover; border-radius: 14px;
  background: #1e1418; border: 1px solid var(--border);
}
.photo-box video { transform: scaleX(-1); } /* mirror like a selfie camera */

.controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.btn-pill {
  border: 1px solid transparent; border-radius: 10px; padding: 10px 18px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #3a2a30; }
.btn-light { background: var(--white); color: var(--primary); border-color: var(--border); }
.btn-light:hover { background: var(--primary-soft); border-color: var(--primary-soft); }

.btn-submit {
  width: 100%;
  background: var(--primary);
  color: #fff; border: none; padding: 17px 30px; border-radius: 12px;
  font-size: 1.06rem; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 26px rgba(220, 63, 71, .22);
  transition: background .2s, transform .2s;
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }

button:focus-visible, a:focus-visible { outline: 3px solid rgba(220, 63, 71, .35); outline-offset: 2px; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: .95rem; }
.alert-error { background: var(--primary-tint); border: 1px solid #f3c2c5; color: var(--primary-deep); }
.alert-success { background: #eefaf2; border: 1px solid #bfe6cb; color: #1c6b3a; }

/* ---------- Result ---------- */
.result-img { border-radius: 14px; box-shadow: 0 14px 40px rgba(30, 20, 24, .18); margin: 0 auto 26px; }
.result-actions { display: grid; gap: 12px; }
.btn-block {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px; border-radius: 12px; font-weight: 800; font-size: 1rem; cursor: pointer; width: 100%;
  border: 1.5px solid var(--primary); background: var(--white); color: var(--primary);
  transition: background .2s;
}
.btn-block:hover { background: var(--primary-tint); }

/* ---------- Gallery ---------- */
.recent-section { padding: 65px 0; background: var(--white); border-top: 1px solid var(--border); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.gallery-card {
  overflow: hidden; background: var(--white); border-radius: 14px;
  border: 1px solid var(--border); transition: transform .25s, box-shadow .25s;
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gallery-card p { padding: 10px 12px; font-weight: 800; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-card small { display: block; color: var(--muted); font-weight: 600; }
.center { text-align: center; margin-top: 30px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 650px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 35px; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: 10px; font-weight: 700; border: 1px solid var(--border); background: var(--white);
}
.pagination a:hover, .pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: .45; }

/* ---------- Footer ---------- */
.footer { background: var(--primary-tint); color: var(--muted); text-align: center; padding: 20px 16px; font-size: .9rem; border-top: 1px solid var(--border); }

@media (max-width: 768px) {
  .container { padding: 0 18px; }
  .form-section { padding: 40px 0 55px; }
}
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .photo-tabs { flex-direction: column; }
  .nav a span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Banner image (assets/images/banner.jpg) ---------- */
.hero-image { background: var(--primary-tint); border-bottom: 1px solid var(--border); }
.hero-image img { width: 100%; height: auto; max-width: 1984px; margin: 0 auto; }

/* ---------- Footer credit ---------- */
.footer { display: grid; gap: 4px; }
.footer .credit { font-size: .85rem; }
.footer .credit strong { color: var(--ink); font-weight: 700; }
.footer .credit a { color: var(--primary); font-weight: 700; }
.footer .credit a:hover { text-decoration: underline; }
.footer .sep { margin: 0 6px; opacity: .5; }

/* ---------- Small screens: compact top bar ---------- */
@media (max-width: 600px) {
  .brand { font-size: .92rem; min-width: 0; }
  .nav a { padding: 7px 9px; }
  .nav a span { display: none; }
  .footer .sep { display: none; }
  .footer .credit a { display: block; }
}
