/*
  Rajastars Company Profile - components.css
  Version: 1.2.0 (2026-10-10)
  Features: Project gallery (filter chips, tiles with icon badges,
  lightbox), WhatsApp floating button, scroll reveal.
  Changelog: 1.2.0 UI/UX review fixes: 44px filter chips, 13px tags.
  1.1.0 removed team cards; added project icon badge.
*/

/* Project filters and gallery */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -24px 0 28px; }
.chip {
  font-family: inherit; font-weight: 500; font-size: 15px; min-height: 44px; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tile {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s;
}
.tile:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.tile .ph { position: relative; aspect-ratio: 4 / 3; border: 0; padding: 0; background: var(--bg); cursor: zoom-in; overflow: hidden; }
.tile .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tile:hover .ph img { transform: scale(1.04); }
.tag {
  position: absolute; left: 14px; top: 14px; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; background: rgba(10, 28, 51, .82); color: #fff;
}
.tile figcaption { position: relative; padding: 38px 22px 24px; }
.p-icon {
  position: absolute; right: 22px; top: -26px; width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 24px -8px rgba(27, 117, 188, .6); border: 3px solid var(--surface);
}
.tile h3 { font-size: 18px; margin-bottom: 6px; }
.tile p { color: var(--muted); font-size: 15px; }
.tile small { display: block; margin-top: 8px; color: var(--blue); font-size: 13px; font-weight: 600; }
/* First tile spans two columns on wide screens for visual rhythm */
@media (min-width: 1025px) {
  .gal.all .tile:first-child { grid-column: span 2; flex-direction: row; }
  .gal.all .tile:first-child .ph { flex: 1.3; aspect-ratio: auto; min-height: 320px; }
  .gal.all .tile:first-child figcaption { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 32px; }
  .gal.all .tile:first-child h3 { font-size: 24px; }
  .gal.all .tile:first-child .p-icon { position: static; margin-bottom: 18px; }
}

/* Lightbox */
#lb { border: 0; border-radius: 16px; padding: 0; max-width: min(1000px, 94vw); background: var(--surface); color: var(--ink); }
#lb::backdrop { background: rgba(5, 14, 26, .82); }
#lb img { max-height: 72vh; margin: 0 auto; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; }
.lb-btns { display: flex; gap: 8px; }
#lb .btn { padding: 10px 16px; font-size: 15px; }

/* WhatsApp floating button */
.fab {
  position: fixed; right: 20px; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); z-index: 25;
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 18px 0 14px; border-radius: 28px;
  background: var(--wa); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); transition: transform .2s;
}
.fab:hover { transform: translateY(-2px); }

/* Scroll reveal (only active when JS adds .js to <html>) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .gal { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .gal { grid-template-columns: 1fr; }
  .fab span { display: none; }
  .fab { width: 56px; padding: 0; justify-content: center; }
  .lb-bar { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}
