/* ═══════════════════════════════════════════════════════════════
   CATALOG.CSS — Enterprise Interactive Accordion Catalog
   Production quality · Zoho 4-color brand system
   ═══════════════════════════════════════════════════════════════ */

/* ─── Page ─── */
.cat-page {
  min-height: 100vh;
  background: #f7f8fa;
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════ */
.cat-ph {
  background: white;
  border-bottom: 1px solid var(--z-border);
  position: relative;
  overflow: hidden;
}

.cat-ph::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--zr) 25%, var(--zg) 25% 50%, var(--zb) 50% 75%, var(--zy) 75%);
}

/* Zoho logo watermark */
.cat-ph::before {
  content: '';
  position: absolute;
  top: 50%; right: 40px;
  transform: translateY(-50%);
  width: 180px; height: 140px;
  background: url('../img/zoho-logo.png') center/contain no-repeat;
  opacity: .035;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.cat-ph-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 40px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cat-ph-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.cat-ph-logo { height: 56px; width: auto; }

.cat-ph-divider {
  width: 1px; height: 48px;
  background: var(--z-border);
  flex-shrink: 0;
}

.cat-ph-company {
  font-size: 9px; font-weight: 800;
  letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--z-muted); margin-bottom: 4px;
}

.cat-ph-title {
  font-size: 23px; font-weight: 800;
  color: var(--z-text); letter-spacing: -0.5px;
  line-height: 1.1; margin: 0 0 4px;
}

.cat-ph-title span { color: var(--zr); }

.cat-ph-sub {
  font-size: 11.5px; color: var(--z-muted);
  font-weight: 500; line-height: 1.4;
}

/* Stats — right side (badges removed) */
.cat-ph-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Stats badges row: hidden per spec (remove badges) */
.cat-ph-badges { display: none; }

.cat-ph-stats {
  display: flex;
  gap: 24px;
  align-items: center;
}

.cat-ph-stat { text-align: center; }

.cat-ph-stat-n {
  font-size: 24px; font-weight: 800;
  line-height: 1; letter-spacing: -1px;
}

.cat-ph-stat-l {
  font-size: 9px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--z-muted); margin-top: 3px;
}

/* ══════════════════════════════════════
   CATALOG TABLE WRAPPER
══════════════════════════════════════ */
.cat-catalog {
  max-width: 1280px;
  width: 100%;
  margin: 32px auto 60px;
  padding: 0 40px;
  flex: 1;
}

/* ── Table header (3-col — Explore column removed) ── */
.cat-tbl-head {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  background: white;
  border: 1px solid var(--z-border);
  border-radius: 12px 12px 0 0;
  position: sticky;
  top: 62px;
  z-index: 20;
  box-shadow: 0 1px 0 var(--z-border);
}

/* Hide the Explore column header entirely */
.cat-th-toggle { display: none !important; }

.cat-tbl-head > div {
  padding: 11px 18px;
  font-size: 9px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--z-muted);
}

.cat-tbl-head > div:not(:last-child) {
  border-right: 1px solid var(--z-border);
}

/* ══════════════════════════════════════
   CATEGORY ROWS
══════════════════════════════════════ */
.cat-row {
  border: 1px solid var(--z-border);
  border-top: none;
  background: white;
  transition: box-shadow 0.2s ease;
}

.cat-row:last-child {
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.cat-row.expanded {
  box-shadow: 0 4px 32px rgba(0,0,0,.07);
  position: relative;
  z-index: 5;
}

/* ── Row trigger (3-col, chevron absolutely positioned) ── */
.cat-row-trigger {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease;
  user-select: none;
  min-height: 72px;
}

.cat-row-trigger:hover { background: #fafafa; }

.cat-row.expanded .cat-row-trigger { background: #fafafa; }

/* Left accent bar on hover */
.cat-row-trigger::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.2s ease;
  border-radius: 0 0 0 0;
}

.cat-row:hover .cat-row-trigger::before { background: var(--zr); }
.cat-row.expanded .cat-row-trigger::before { background: var(--zr); }

/* ── Category cell ── */
.cat-cell {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px 14px 20px;
  border-right: 1px solid var(--z-border);
  min-height: 72px;
}

.cat-ico {
  width: 40px; height: 40px;
  border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.cat-lbl {
  font-size: 10px; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--z-text); line-height: 1.2;
}

.cat-cnt {
  font-size: 10.5px; color: var(--z-muted);
  margin-top: 2px; font-weight: 500;
}

/* ── Apps cell ── */
.apps-cell {
  padding: 12px 16px;
  border-right: 1px solid var(--z-border);
  min-height: 72px;
  display: flex;
  align-items: center;
}

/* Text list hidden — horizontal pills below already show full names */
.apps-names { display: none; }

.apps-icons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }

/* ── Horizontal pill chip: [icon] App Name ── */
.app-ico-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 6px;
  background: white;
  border: 1px solid var(--z-border);
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.18s;
}

.app-ico-btn:hover {
  border-color: var(--zr);
  background: var(--zr-bg);
  box-shadow: 0 3px 10px rgba(228,37,39,.12);
  transform: translateY(-1px);
}

.aib-ico-wrap {
  width: 22px; height: 22px;
  border-radius: 5px;
  overflow: hidden;
  background: transparent;
  border: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.aib-ico { width: 20px; height: 20px; object-fit: contain; }

/* Full name — no truncation, fully readable */
.aib-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--z-text);
  letter-spacing: -0.1px;
}

/* ── Department cell ── */
.dept-cell {
  padding: 10px 52px 10px 16px;
  display: flex; align-items: center;
  min-height: 72px;
}

.dept-text {
  font-size: 11.5px; color: var(--z-body);
  font-weight: 500; line-height: 1.4;
}

/* ── Chevron (absolutely positioned, out of grid flow) ── */
.cat-chevron-wrap {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--z-bg);
  border: 1px solid var(--z-border);
  transition: background 0.18s, border-color 0.18s;
}

.cat-row:hover .cat-chevron-wrap { background: white; border-color: var(--z-border); }
.cat-row.expanded .cat-chevron-wrap { background: var(--zr-bg); border-color: rgba(228,37,39,.2); }

.cat-chevron {
  color: var(--z-muted); font-size: 12px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s;
}

.cat-row.expanded .cat-chevron {
  transform: rotate(180deg);
  color: var(--zr);
}

/* ══════════════════════════════════════
   ACCORDION PANEL
══════════════════════════════════════ */
.cat-acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f7f8fa;
  /* No border-top here — avoids 1px jump when closing animation runs */
}

/* ── Accordion inner ── */
.acc-inner { padding: 0; }

/* ── Hero banner ── */
.acc-hero {
  padding: 24px 32px 20px;
  display: flex; align-items: flex-start; gap: 18px;
  position: relative; overflow: hidden;
}

/* Subtle diagonal overlay */
.acc-hero::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}

.acc-hero-ico {
  width: 48px; height: 48px;
  border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}

.acc-hero-text { flex: 1; min-width: 0; }

.acc-hero-label {
  font-size: 9px; font-weight: 800;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(255,255,255,.6); margin-bottom: 5px;
}

.acc-hero-title {
  font-size: 18px; font-weight: 800; color: white;
  margin: 0 0 6px; letter-spacing: -0.3px; line-height: 1.2;
}

.acc-hero-desc {
  font-size: 12.5px; color: rgba(255,255,255,.78);
  line-height: 1.6; max-width: 560px;
}

/* ── Body ── */
.acc-body {
  padding: 24px 32px 28px;
  background: #f7f8fa;
  border-top: 1px solid var(--z-border);
}

.acc-section-title {
  font-size: 9px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--z-muted);
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 10px;
}

.acc-section-title::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--z-border);
}

/* ── App cards grid (premium vertical cards) ── */
.acc-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.acc-app-card {
  display: flex;
  flex-direction: column;
  padding: 18px 16px 14px;
  background: white;
  border: 1px solid var(--z-border);
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

/* Top accent line that slides in on hover */
.acc-app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--zr);
  transform: scaleX(0);
  transition: transform 0.22s ease;
  transform-origin: left;
}

.acc-app-card:hover {
  border-color: rgba(228,37,39,.3);
  box-shadow: 0 8px 28px rgba(0,0,0,.08), 0 2px 8px rgba(228,37,39,.06);
  transform: translateY(-4px);
}

.acc-app-card:hover::before { transform: scaleX(1); }

/* App icon */
.acc-app-img {
  width: 44px; height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--z-bg);
  border: 1px solid var(--z-border);
  padding: 4px;
  flex-shrink: 0;
  margin-bottom: 12px;
  transition: transform 0.22s ease;
}

.acc-app-card:hover .acc-app-img { transform: scale(1.05); }

/* App text info */
.acc-app-info { flex: 1; margin-bottom: 12px; }

.acc-app-name {
  font-size: 13.5px; font-weight: 700;
  color: var(--z-text); display: block;
  letter-spacing: -0.15px; line-height: 1.2;
}

.acc-app-role {
  font-size: 11px; color: var(--z-muted);
  display: block; margin-top: 4px;
  line-height: 1.4;
}

/* App explore link (appears on hover) */
.acc-app-link {
  font-size: 11.5px; font-weight: 700;
  color: var(--zr);
  display: flex; align-items: center; gap: 5px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.acc-app-link i { font-size: 10px; }

.acc-app-card:hover .acc-app-link {
  opacity: 1;
  transform: translateY(0);
}

/* ── Two-column: Use Cases + Problems ── */
.acc-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.acc-col {
  background: white;
  border: 1px solid var(--z-border);
  border-radius: 12px;
  padding: 16px 18px;
}

.acc-col-head {
  font-size: 9px; font-weight: 800;
  letter-spacing: 1.8px; text-transform: uppercase;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 7px;
}

.acc-col-head.green { color: var(--zg); }
.acc-col-head.red   { color: var(--zr); }

.acc-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}

.acc-col li {
  font-size: 12px; color: var(--z-body);
  line-height: 1.5; padding-left: 16px;
  position: relative;
}

.acc-col li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 6px; height: 6px; border-radius: 50%;
}

.acc-col.uc-col li::before { background: var(--zg); }
.acc-col.pb-col li::before { background: var(--zr); }

/* ── Industry chips ── */
.acc-ind-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}

.acc-ind-chip {
  font-size: 11px; font-weight: 600;
  border-radius: 20px; padding: 4px 13px;
  border: 1px solid;
  transition: opacity 0.15s;
}

.acc-ind-chip:hover { opacity: .75; }

/* ── CTA bar ── */
.acc-cta-bar {
  display: flex; align-items: center;
  justify-content: space-between;
  background: white; border: 1px solid var(--z-border);
  border-radius: 12px; padding: 16px 20px;
  gap: 16px;
}

.acc-cta-text {
  font-size: 13px; font-weight: 700; color: var(--z-text);
}

.acc-cta-sub {
  font-size: 11px; color: var(--z-muted); margin-top: 2px;
}

.acc-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--zr); color: white;
  border: none; border-radius: 9px;
  padding: 10px 20px; font-size: 13px; font-weight: 700;
  text-decoration: none; cursor: pointer; flex-shrink: 0;
  transition: opacity 0.18s, transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(228,37,39,.3);
}

.acc-cta-btn:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(228,37,39,.35);
}

/* site-footer styles are in shared.css */

/* ══════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════ */
@media print {
  .sitenav { display: none !important; }
  body.has-nav { padding-top: 0 !important; }
  .cat-tbl-head { position: static; box-shadow: none; }
  .cat-acc-panel,
  .cat-chevron-wrap { display: none !important; }
  .cat-ph::before { display: none; }
  .cat-ph-inner  { padding: 16px 24px 12px; }
  .cat-catalog   { padding: 12px 24px; margin: 0; }
  .site-footer   { page-break-inside: avoid; }
  .cat-row-trigger::before { display: none; }
}

/* ══════════════════════════════════════
   RESPONSIVE — Tablet (960px)
══════════════════════════════════════ */
@media (max-width: 960px) {
  .cat-ph-inner { padding: 18px 20px 14px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .cat-ph-right { align-self: flex-start; }
  .cat-ph-stats { gap: 18px; }

  .cat-catalog { padding: 0 16px 40px; margin-top: 20px; }

  /* 2-col table: hide Department column */
  .cat-tbl-head { grid-template-columns: 200px 1fr; border-radius: 10px 10px 0 0; }
  .cat-th-dept  { display: none; }

  .cat-row-trigger { grid-template-columns: 200px 1fr; }
  .dept-cell { display: none; }

  .acc-two-col { grid-template-columns: 1fr; }
  .acc-apps-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .acc-hero { padding: 18px 18px 14px; }
  .acc-body { padding: 18px 18px 20px; }
  .acc-cta-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ══════════════════════════════════════
   RESPONSIVE — Mobile (600px)
══════════════════════════════════════ */
@media (max-width: 600px) {
  .cat-ph-brand { gap: 12px; }
  .cat-ph-logo { height: 44px; }
  .cat-ph-title { font-size: 19px; }
  .cat-ph-stats { gap: 14px; }
  .cat-ph-stat-n { font-size: 20px; }

  /* 1-col table on mobile */
  .cat-tbl-head { grid-template-columns: 1fr; }
  .cat-th-apps  { display: none; }
  .cat-th-dept  { display: none; }

  .cat-row-trigger { grid-template-columns: 1fr; }
  .apps-cell { display: none; }
  .dept-cell { display: none; }

  .cat-cell { border-right: none; }

  .acc-apps-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .acc-hero { padding: 14px 14px 12px; }
  .acc-hero-title { font-size: 16px; }
  .acc-body { padding: 14px 14px 16px; }

  .site-footer { padding: 14px 20px; flex-direction: column; align-items: flex-start; }
}
