/* =====================================================================
   SRK Honda – Directory UI (Theme Matched: Red + Premium Cards)
   ===================================================================== */

:root{
  --red: #d50000;
  --red-soft: #ffebee;
  --red-dark: #a50000;

  --dark: #0a0a0a;
  --gray-900: #0a0a0a;
  --gray-700: #2e2e2e;
  --gray-600: #424242;
  --gray-500: #616161;
  --gray-200: #e5e7eb;
  --bg: #f5f5f7;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --shadow-soft: 0 12px 36px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-strong: 0 20px 50px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.5);
}

/* Page bg */
body{
  background: var(--bg);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal scroll */
html, body{
  width: 100%;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------
   Header (if you ever use .directory-header)
   --------------------------------------------------------------------- */
.directory-header{
  background: linear-gradient(45deg, var(--red), var(--red-dark));
  color:#fff;
  text-align:center;
  padding: 14px 14px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .02em;
  box-shadow: 0 10px 24px rgba(213,0,0,0.25);
}

/* ---------------------------------------------------------------------
   Top Bar (search + filters) – optional (kept for future)
   --------------------------------------------------------------------- */
.topbar{
  display:flex;
  gap:10px;
  padding: 12px;
  max-width: 1280px;
  margin: 0 auto;
}

.topbar input,
.topbar select{
  flex:1;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  background: #fff;
  outline: none;
  font-size: 0.95rem;
  min-width: 0;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.topbar input:focus,
.topbar select:focus{
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(213,0,0,0.12);
}

/* Stack filters on small screens */
@media (max-width: 640px){
  .topbar{
    flex-direction: column;
    padding: 10px 12px;
  }
}

/* ---------------------------------------------------------------------
   Grid padding (main wrapper)
   --------------------------------------------------------------------- */
.grid{
  padding: 10px 12px 22px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------------
   Department Section
   --------------------------------------------------------------------- */
.dept-section{
  margin: 18px 0;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(255,255,255,0.65);
  overflow:hidden;
}

.dept-title{
  background: linear-gradient(145deg, #ffffff, #f6f7f9);
  padding: 12px 14px;
  font-weight: 800;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  color: var(--gray-900);
  font-size: 16px; /* ✅ slightly clearer */
}

.dept-count{
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 700;
}

/* Cards grid */
.dept-grid{
  padding: 14px;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

/* Slightly tighter on small screens */
@media (max-width: 420px){
  .dept-grid{
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 12px;
  }
}

/* ---------------------------------------------------------------------
   Person Card
   --------------------------------------------------------------------- */
.card{
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: var(--radius-md);
  padding: 12px 12px 14px;
  text-align:center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform .18s ease, box-shadow .18s ease;
  min-width: 0;
}

.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.10);
}

/* Avatar */
.avatar{
  width: 86px;
  height: 86px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--red);
  margin: 2px auto 10px;
  display:block;
  box-shadow: 0 10px 20px rgba(213,0,0,0.18);
  background: #fff;
}

/* Text */
.name{
  font-weight: 800;
  font-size: 14px;
  color: var(--gray-900);
  line-height: 1.25;
  word-break: break-word;
}

.role{
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  word-break: break-word;
}

.number{
  display:inline-block;
  font-size: 13px;
  margin-top: 6px;
  color: var(--gray-700);
  font-weight: 700;
  text-decoration: none;
}

.number:hover{
  text-decoration: underline;
}

/* ---------------------------------------------------------------------
   Buttons (Call / WhatsApp icons)
   --------------------------------------------------------------------- */
.btns{
  margin-top: 10px;
  display:flex;
  gap: 16px;
  justify-content:center;
  align-items:center;
}

/* Base icon wrapper */
.icon-only{
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  transition: transform .12s ease, filter .12s ease;
  will-change: transform;
}

.icon-only:hover{
  transform: scale(1.07);
  filter: brightness(1.02);
}

/* CALL icon – bigger */
.icon-only.call img{
  width: 44px;
  height: 44px;
  display:block;
}

/* WHATSAPP icon – slightly larger */
.icon-only.wa img{
  width: 56px;
  height: 56px;
  display:block;
}

/* ---------------------------------------------------------------------
   Loading visibility (controlled by JS)
   --------------------------------------------------------------------- */
#cards{ visibility:hidden; }
#cards.ready{ visibility:visible; }

/* ---------------------------------------------------------------------
   Image Viewer Modal
   --------------------------------------------------------------------- */
.photo-modal{ display:none; position:fixed; inset:0; z-index:9999; }
.photo-modal.active{ display:block; }

.photo-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.65); }

.photo-box{
  position:relative;
  max-width:92vw;
  max-height:92vh;
  margin:6vh auto 0;
  display:flex;
  justify-content:center;
  align-items:center;
}

.photo-box img{
  max-width:92vw;
  max-height:92vh;
  border-radius:12px;
  background:#fff;
}

.photo-close{
  position:absolute;
  top:-14px;
  right:-14px;
  width:36px;
  height:36px;
  border-radius:50%;
  border:0;
  cursor:pointer;
  font-size:22px;
  line-height:36px;
  background:#fff;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.photo-modal img{
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 18px;
  background:#fff;
  box-shadow: 0 18px 45px rgba(0,0,0,0.45);
  animation: zoomIn .18s ease-out;
  object-fit: contain;
}

@keyframes zoomIn{
  from{ transform:scale(.86); opacity:0; }
  to{ transform:scale(1); opacity:1; }
}

.view-photo{ cursor: zoom-in; }

/* ============================================================
   Compatibility mapping for our Laravel Blade markup (staff page)
   ============================================================ */

/* Container wrappers used in our Blade */
.staff-page { padding: 0; }
.staff-container { max-width: 1280px; margin: 0 auto; padding: 0 0 18px; }

/* Heading spacing */
.staff-head{
  padding: 14px 12px 0;
  max-width: 1280px;
  margin: 0 auto;
}
.staff-head h1{
  margin: 0;
  font-weight: 900;
  letter-spacing: .01em;
}

/* Muted helper text */
.muted { color: var(--gray-500); }

/* If Blade uses these classes, map to same look */
.staff-name { font-weight: 800; font-size: 14px; color: var(--gray-900); line-height: 1.25; }
.staff-role { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.staff-phone { font-size: 13px; margin-top: 6px; color: var(--gray-700); font-weight: 700; text-decoration:none; }
.staff-phone:hover{ text-decoration: underline; }

/* If Blade uses .staff-img instead of .avatar */
.staff-img{
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--red);
  box-shadow: 0 10px 20px rgba(213,0,0,0.18);
  background:#fff;
}