/* Homepage = feed + events in one (index.html). Three columns on desktop,
   single column with a greeting + stat cards on phones. The feed cards and
   composer themselves are styled in feed-page.css; this file only lays out
   the page and restyles the composer/cards to the new look. */
:root { --hp-purple: #4B3FD1; --hp-lav: #F3F1FD; --hp-lav-2: #EDEAFB; --hp-line: #E7E4F5; --hp-ink: #1F1B3A; --hp-muted: #6B6786; }
body { background: #F7F6FC; }
.home-grid { max-width: 1240px; margin: 0 auto; padding: 22px 16px 60px; display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.home-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hp-card { background: #fff; border: 1px solid var(--hp-line); border-radius: 16px; padding: 16px; }
.hp-card h3 { margin: 0; font-size: 15px; color: var(--hp-ink); }
.hp-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hp-see-all { font-size: 12.5px; font-weight: 600; color: var(--hp-purple); text-decoration: none; }
.hp-see-all:hover { text-decoration: underline; }
.hp-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #DDD9F2; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--hp-purple); }

/* Mobile-only header (greeting + stat cards) */
.hp-mobile-only, .hp-only-m { display: none; }
.hp-greet { display: flex; align-items: flex-start; justify-content: space-between; }
.hp-greet h1 { margin: 0; font-size: 22px; color: var(--hp-ink); }
.hp-greet .loc { font-size: 13px; color: var(--hp-muted); margin-top: 3px; }
.hp-greet .loc:empty { display: none; }
.hp-greet .loc::before { content: "\1F4CD"; margin-right: 4px; font-size: 12px; }
.hp-search-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--hp-line); background: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 18px; color: var(--hp-purple); }
.hp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.hp-stat { background: #fff; border: 1px solid var(--hp-line); border-radius: 16px; padding: 12px; display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.hp-stat .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--hp-lav-2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.hp-stat .lbl { font-size: 12px; color: var(--hp-muted); }
.hp-stat .val { font-size: 15px; font-weight: 700; color: var(--hp-ink); }
.hp-stat .go { font-size: 12.5px; font-weight: 700; color: var(--hp-purple); }

/* Left column */
.hp-profile-top { display: flex; align-items: center; gap: 12px; }
.hp-profile .hi { font-weight: 700; color: var(--hp-ink); font-size: 15px; }
.hp-profile .sub { font-size: 12.5px; color: var(--hp-muted); }
.hp-profile a.view { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--hp-purple); text-decoration: none; }
.hp-nav { padding: 12px; }
.hp-nav h3 { padding: 4px 8px 8px; }
.hp-nav a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; color: var(--hp-ink); font-size: 14px; font-weight: 500; text-decoration: none; }
.hp-nav a:hover { background: var(--hp-lav); }
.hp-nav a.active { background: var(--hp-lav-2); color: var(--hp-purple); font-weight: 700; }
.hp-nav a span.i { width: 20px; text-align: center; }
.hp-welcome { background: linear-gradient(180deg, #F3F1FD, #fff); }
.hp-welcome .official { display: inline-block; background: var(--hp-purple); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; margin-bottom: 8px; }
.hp-welcome h3 { font-size: 17px; }
.hp-welcome p { font-size: 13px; color: var(--hp-muted); margin: 6px 0 12px; line-height: 1.45; }
.hp-welcome img { display: block; width: 84px; height: 84px; margin: 6px auto 10px; }
.hp-welcome .tag { font-family: "Fraunces", Georgia, serif; font-style: italic; color: var(--hp-purple); font-size: 15px; margin-top: 8px; line-height: 1.25; }
.hp-guest p { font-size: 13.5px; color: var(--hp-muted); margin: 6px 0 12px; line-height: 1.45; }
.hp-guest a.btn { display: block; text-align: center; background: var(--hp-purple); color: #fff; border-radius: 999px; padding: 10px; font-weight: 700; font-size: 14px; text-decoration: none; }

/* Center: banner + tabs */
.hp-banner { position: relative; overflow: hidden; border-radius: 16px; padding: 20px 22px; background: linear-gradient(120deg, #F1EEFC 0%, #E4E0F8 100%); border: 1px solid var(--hp-line); }
.hp-banner::after { content: ""; position: absolute; right: -10px; top: -10px; width: 260px; height: 160px; background-image: radial-gradient(#B9AFEA 1.6px, transparent 1.7px); background-size: 11px 11px; opacity: .55; -webkit-mask-image: linear-gradient(270deg, #000, transparent); mask-image: linear-gradient(270deg, #000, transparent); }
.hp-banner h2 { margin: 0 0 12px; font-size: 20px; color: var(--hp-ink); position: relative; z-index: 1; }
.hp-banner .tagline { position: absolute; right: 24px; top: 18px; text-align: right; font-size: 12px; color: var(--hp-muted); line-height: 1.45; z-index: 1; }
.hp-banner .tagline b { display: block; color: var(--hp-purple); font-weight: 600; }
.hp-tabs { display: flex; gap: 6px; flex-wrap: wrap; position: relative; z-index: 1; }
.hp-tab { border: 1px solid var(--hp-line); background: #fff; color: var(--hp-ink); border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.hp-tab.active { background: var(--hp-purple); border-color: var(--hp-purple); color: #fff; }
.hp-tab:disabled { opacity: .5; cursor: not-allowed; }
.hp-feed-head-m { display: none; align-items: center; justify-content: space-between; }
.hp-feed-head-m h2 { margin: 0; font-size: 20px; color: var(--hp-ink); }
.hp-feed-head-m select { border: 1px solid var(--hp-line); background: #fff; border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 600; font-family: inherit; color: var(--hp-ink); }

/* Composer restyle */
.home-feed .feed-composer { border: 1px solid var(--hp-line); border-radius: 16px; padding: 14px; margin-bottom: 16px; }
.hp-composer-top { display: flex; align-items: flex-start; gap: 12px; }
.hp-composer-top .hp-avatar { width: 40px; height: 40px; font-size: 14px; }
.home-feed .feed-composer textarea { flex: 1; min-width: 0; min-height: 44px; border-radius: 12px; border-color: var(--hp-line); padding: 12px 14px; font-size: 14px; }
.home-feed .feed-composer-row { margin-top: 12px; flex-wrap: wrap; justify-content: flex-start; }
.home-feed .feed-btn-outline { border-color: var(--hp-line); color: var(--hp-ink); border-radius: 12px; padding: 8px 14px; }
.home-feed .feed-btn-outline:hover { background: var(--hp-lav); }
.home-feed #feedComposerPostBtn { background: var(--hp-purple); color: #fff; border: 0; border-radius: 999px; padding: 10px 26px; font-weight: 700; cursor: pointer; }
.hp-audience { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--hp-muted); }
.hp-audience select { border-radius: 999px !important; border-color: var(--hp-line) !important; padding: 7px 12px !important; font-weight: 600; }
.home-feed .hp-audience + #feedComposerPostBtn { margin-left: 0 !important; }

/* Feed cards restyle */
.home-feed .feed-card { border-color: var(--hp-line); border-radius: 16px; }
.home-feed .feed-card-platform { background: #F8F7FE; border-color: #D8D3F3; }
.home-feed .feed-card-name { color: var(--hp-ink); }

/* Right column */
.hp-person { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.hp-person .hp-avatar { width: 46px; height: 46px; font-size: 15px; text-decoration: none; }
.hp-person .nm { font-size: 14px; font-weight: 700; color: var(--hp-ink); text-decoration: none; display: block; }
.hp-person .ds { font-size: 12px; color: var(--hp-muted); }
.hp-person .grow { flex: 1; min-width: 0; }
.hp-person .grow > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-connect { border: 1px solid var(--hp-purple); color: var(--hp-purple); background: #fff; border-radius: 10px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.hp-connect:hover { background: var(--hp-lav); }
.hp-connect:disabled { border-color: var(--hp-line); color: var(--hp-muted); cursor: default; background: #fff; }
.hp-event { display: flex; gap: 10px; align-items: center; padding: 8px 0; text-decoration: none; color: inherit; }
.hp-event .dt { width: 48px; height: 52px; border-radius: 10px; background: var(--hp-lav-2); color: var(--hp-purple); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.hp-event .dt .mo { font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.hp-event .dt .dy { font-size: 18px; font-weight: 800; line-height: 1; }
.hp-event .tt { font-size: 13.5px; font-weight: 700; color: var(--hp-ink); line-height: 1.25; }
.hp-event .ds { font-size: 12px; color: var(--hp-muted); margin-top: 2px; }
.hp-event .grow { flex: 1; min-width: 0; }
.hp-event .chev { color: var(--hp-muted); }
.hp-news { display: flex; gap: 10px; align-items: center; padding: 8px 0; text-decoration: none; color: inherit; }
.hp-news .n { width: 26px; height: 26px; border-radius: 50%; background: #E3DEFA; color: var(--hp-purple); font-weight: 700; font-size: 12.5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hp-news .tt { font-size: 13.5px; font-weight: 600; color: var(--hp-ink); line-height: 1.3; }
.hp-empty { font-size: 13px; color: var(--hp-muted); padding: 4px 0; }
.hp-promo { background: linear-gradient(135deg, #F3F1FD, #DCD6F7); padding: 22px 18px; }
.hp-promo b { display: block; font-size: 14px; color: var(--hp-ink); }
.hp-promo span { font-family: "Fraunces", Georgia, serif; font-style: italic; color: var(--hp-purple); font-size: 15px; }

/* Tab filter — pure CSS over the cards feed-page.js renders */
#feedList[data-filter="following"] .feed-card-platform { display: none; }

@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 240px minmax(0, 1fr); }
  .home-right { display: none; }
}
@media (max-width: 930px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); padding: 14px 12px 24px; gap: 14px; }
  .home-left { display: none; }
  .hp-mobile-only { display: block; }
  .hp-banner { display: none; }
  .hp-feed-head-m { display: flex; }
  .home-feed .feed-composer-row { gap: 8px; }
  .home-feed .feed-composer-row > * { order: 6; }
  .home-feed #feedComposerPhotoBtn { order: 1; }
  .home-feed #feedComposerVideoBtn { order: 2; }
  .home-feed #feedTagPlaceToggleBtn { order: 3; }
  .home-feed #feedComposerPostBtn { order: 4; margin-left: auto !important; padding: 9px 20px; }
  .hp-audience { margin-left: 0; }
  .home-feed .feed-btn-outline { padding: 7px 9px; font-size: 12px; }
  .hp-hide-m { display: none; }
  .hp-only-m { display: inline; }
}

/* Phone shortcut pills under the greeting */
.hp-quick { display: flex; gap: 10px; margin-top: 14px; }
.hp-quick a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; background: #fff; border: 1px solid var(--hp-line); border-radius: 14px; font-weight: 700; font-size: 14px; color: var(--hp-ink); text-decoration: none; }
.hp-quick a span { font-size: 18px; }

/* Follow pill on news / business feed cards */
.feed-follow-btn { margin-left: auto; align-self: flex-start; border: 1px solid var(--hp-purple); background: #fff; color: var(--hp-purple); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; flex-shrink: 0; }
.feed-follow-btn:hover { background: var(--hp-lav); }
.feed-follow-btn.following { background: var(--hp-lav-2); border-color: transparent; }
.feed-follow-btn:disabled { opacity: .6; cursor: default; }
