/* ============================================================
   Adinath Gold — style.css
   Mobile-first, responsive. Theme: black + gold like reference.
   ============================================================ */

:root {
  --gold: #E8B923;
  --gold-bright: #F6D34A;
  --gold-dark: #C9931B;
  --gold-grad: linear-gradient(135deg, #F6D34A 0%, #E8B923 45%, #C9931B 100%);
  --bg: #f3f1ec;
  --bg-dark: #0d0d0d;
  --card: #ffffff;
  --ink: #1b1b1b;
  --muted: #77716a;
  --line: #e9e4da;
  --green: #1e9e4a;
  --red: #d43a2f;
  --shadow: 0 2px 10px rgba(0, 0, 0, .07);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .18);
  --nav-h: 64px;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 46px);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ================= HEADER ================= */
.app-header {
  background: var(--bg-dark);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brand { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.brand-logo {
  width: 84px; height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #2a2210, #0b0a07 75%);
  box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(232, 185, 35, .45);
}

.brand-logo img { width: 100%; height: 100%; object-fit: cover; }

.brand-name {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ================= SOCIAL BAR ================= */
.social-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #fff;
  padding: 10px 8px;
  box-shadow: var(--shadow);
}

.social { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; transition: transform .15s ease; }
.social:hover { transform: translateY(-2px); }
.social svg { width: 27px; height: 27px; }
.social.instagram { color: #d6249f; }
.social.instagram svg { color: #d6249f; }
.social.call { filter: none; }

/* ================= OFFERS RIBBON ================= */
.offers-ribbon {
  background: linear-gradient(90deg, #7e0e17, #a3121f, #7e0e17);
  color: #fff;
  font-weight: 700;
  letter-spacing: .6px;
  padding: 11px 0;
  overflow: hidden;
  white-space: nowrap;
}

.ribbon-track { display: inline-block; padding-left: 100%; animation: ribbon-scroll 18s linear infinite; }
@keyframes ribbon-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ================= MAIN / VIEWS ================= */
.app-main { padding: 14px 14px 22px; max-width: 980px; margin: 0 auto; }

.view { display: none; animation: fade-in .28s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ================= RATE CARDS ================= */
.rates-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (min-width: 640px) { .rates-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }

.rate-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
}

.rate-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rate-name { font-size: .92rem; color: var(--ink); font-weight: 600; }
.rate-sub { font-size: .78rem; color: var(--muted); font-weight: 500; }
.rate-icon { width: 46px; height: 46px; flex: none; border-radius: 10px; background: #fdf7e3; display: grid; place-items: center; overflow: hidden; }
.rate-icon img { width: 38px; height: 38px; object-fit: contain; }

.rate-price { font-size: 1.55rem; font-weight: 800; letter-spacing: .3px; color: var(--ink); }
.rate-price .rupee { color: var(--ink); font-weight: 700; }
.rate-price .paise { color: #b9b2a6; font-weight: 700; }
.rate-price .sup { font-size: .8rem; }

.rate-hl { display: flex; gap: 16px; font-size: .78rem; color: var(--muted); }
.rate-hl b { color: var(--ink); font-weight: 700; }
.rate-updated { font-size: .72rem; color: #a39c90; }

.rate-card.flash-up { animation: flashUp 1.1s ease; }
.rate-card.flash-down { animation: flashDown 1.1s ease; }
@keyframes flashUp { 0% { box-shadow: 0 0 0 3px rgba(30, 158, 74, .55); } 100% { box-shadow: var(--shadow); } }
@keyframes flashDown { 0% { box-shadow: 0 0 0 3px rgba(212, 58, 47, .55); } 100% { box-shadow: var(--shadow); } }

/* ================= MCX SECTION ================= */
.mcx-section { margin-top: 18px; }

.mcx-row { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.mcx-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px 12px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mcx-icon { width: 54px; height: 34px; }
.mcx-icon img { width: 100%; height: 100%; object-fit: contain; }

.mcx-title { font-weight: 700; font-size: 1.02rem; }

.mcx-price { font-size: 1.45rem; font-weight: 800; }
.mcx-price .paise { color: #b9b2a6; }

.mcx-delta { font-size: .95rem; font-weight: 700; color: var(--green); }
.mcx-delta.down { color: var(--red); }

.mcx-live-bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #f5c6d0;
  color: #8c2233;
  font-weight: 800;
  font-size: .95rem;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
  z-index: 2;
  letter-spacing: .5px;
}

/* ================= DISCLAIMER / LIVE LINE ================= */
.disclaimer {
  margin-top: 18px;
  background: #efece5;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .74rem;
  line-height: 1.5;
  color: #6e675c;
}

.live-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: .78rem;
  color: var(--muted);
  justify-content: center;
}

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); transition: background .3s; }
.live-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(30, 158, 74, .18); }

.refresh-btn {
  border: none;
  background: var(--gold-grad);
  color: #231a02;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  transition: transform .3s ease;
}
.refresh-btn:active { transform: rotate(360deg); }

/* ================= GALLERY ================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 960px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

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

.gallery-thumb { aspect-ratio: 1 / 1; background: linear-gradient(160deg, #f8f4ea, #efe8d8); display: grid; place-items: center; overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-card:hover .gallery-thumb img { transform: scale(1.06); }

.gallery-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, .92);
  padding: 8px 10px;
  font-weight: 700;
  font-size: .92rem;
  text-align: center;
}

/* gallery modal grid */
.gallery-modal-body { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; overflow-y: auto; max-height: 68vh; }
.gallery-modal-body .g-item { position: relative; }
.gallery-modal-body .g-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
@media (min-width: 640px) { .gallery-modal-body { grid-template-columns: repeat(3, 1fr); } }

/* ================= VIDEO ================= */
.video-grid { display: grid; gap: 18px; max-width: 640px; margin: 0 auto; }

.video-tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #3a3a3a;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: none;
  padding: 0;
  width: 100%;
}

.video-tile img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-tile:hover img { opacity: 1; }

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.video-play span {
  width: 64px; height: 64px;
  background: rgba(255, 255, 255, .92);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
  transition: transform .15s ease;
}
.video-tile:hover .video-play span { transform: scale(1.08); }

.video-play svg { width: 30px; height: 30px; margin-left: 4px; fill: #1b1b1b; }

.video-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75));
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  text-align: left;
}

/* ================= MENU ================= */
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { .menu-grid { grid-template-columns: repeat(3, 1fr); } }

.menu-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}

.menu-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.menu-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(160deg, #fdf7e3, #f6ecd2); font-size: 1.5rem; }
.menu-item .arrow { color: var(--gold-dark); font-weight: 700; }

/* ================= MODALS ================= */
.modal { position: fixed; inset: 0; display: none; z-index: 60; }
.modal.open { display: block; }

.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 8, 4, .6); backdrop-filter: blur(2px); }

.modal-card {
  position: relative;
  z-index: 2;
  background: #fff;
  width: min(92vw, 720px);
  margin: 7vh auto 0;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop-in .22s ease;
}

@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-dark);
  color: #fff;
}

.modal-head h3 { font-size: 1.05rem; letter-spacing: .5px; }

.modal-close {
  border: none;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
}

.modal-body { padding: 16px; }

.lightbox-figure { position: relative; z-index: 2; width: min(94vw, 860px); margin: 6vh auto 0; }
.lightbox-figure img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: 12px; background: #111; }
.lightbox-figure figcaption { color: #fff; text-align: center; padding: 10px; font-weight: 600; }
.lightbox-close { position: absolute; top: -14px; right: 0; background: var(--gold); color: #231a02; }

.video-modal-card { width: min(94vw, 900px); margin-top: 8vh; padding: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-modal-card .modal-close { position: absolute; top: 8px; right: 8px; z-index: 3; background: rgba(0, 0, 0, .55); }

/* ================= BOTTOM NAV ================= */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-dark);
  border-top: 2px solid var(--gold);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 50;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #cfc9bd;
  font-size: .72rem;
  font-weight: 600;
  transition: color .2s ease, background .2s ease;
}

.nav-item svg { width: 23px; height: 23px; }

.nav-item.active { background: var(--gold-grad); color: #231a02; }
.nav-item:not(.active):hover { color: var(--gold-bright); }

/* ================= FOOTER ================= */
.app-footer {
  position: fixed;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 5px 12px;
  font-size: .72rem;
  color: var(--muted);
  z-index: 49;
}

.app-footer .heart { color: #d43a2f; }

/* admin portal entry (discreet) */
.admin-link { opacity: .55; font-size: .68rem; }
.admin-link:hover { opacity: 1; }

/* ================= UTILITIES ================= */
.empty-note { text-align: center; color: var(--muted); font-size: .9rem; padding: 24px 10px; grid-column: 1 / -1; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Larger screens: header becomes a row */
@media (min-width: 700px) {
  .app-header { flex-direction: row; justify-content: center; padding: 22px 16px 18px; }
  .brand { flex-direction: row; gap: 16px; }
  .brand-logo { width: 64px; height: 64px; }
  .brand-name { font-size: 1.7rem; }
}
