/* ── Home Page Overrides ── */

/* Make top header feel like a dashboard bar (short + subtle) */
.header {
  background: transparent !important;
  border-bottom: 1px solid #e5e7eb;
  padding: 6px 0 !important;
  box-shadow: none !important;
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 14px !important;
}
.logo-link {
  font-size: 16px !important;
  font-weight: 650 !important;
  letter-spacing: .2px;
}
.nav-link {
  font-size: 13px !important;
  padding: 6px 10px !important;
}

/* Page spacing: tighter, less "giant landing page" */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px 28px !important;
}
.page-header {
  margin: 10px 0 14px !important;
  padding: 0 !important;
}
.page-header h1 {
  font-size: 26px !important;
  margin: 0 0 6px !important;
  line-height: 1.15;
}
.page-header p {
  font-size: 14px !important;
  margin: 0 !important;
  opacity: .9;
}

/* Home tiles layout: always 3 across on desktop */
.home-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* Wrap each tile in a compact "panel" */
.tile-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  padding: 14px;
}

/* Make the icon area smaller + consistent */
.tile-icon {
  text-align: center;
  margin-bottom: 10px;
  cursor: pointer;
}
.tile-icon svg {
  width: 130px;
  height: 130px;
  display: inline-block;
}
.tile-title {
  font-size: 16px !important;
  margin: 10px 0 0 !important;
  color: #1f4e79;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .8px;
}

/* Make the card act like a big "button" area */
.tile-action {
  margin-top: 12px;
  border-top: 1px solid #eef2f7;
  padding-top: 12px;
}
.tile-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 140px;
  box-shadow: none;
  transition: transform .12s ease, box-shadow .12s ease;
  background: #fff;
}
.tile-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.tile-card h3 {
  font-size: 16px;
  margin: 0 0 6px;
}
.tile-card p {
  font-size: 13px;
  margin: 0 0 12px;
  opacity: .85;
  max-width: 320px;
}

/* Buttons slightly larger but not huge */
.card-btn {
  font-size: 13px !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
}

/* Map section tightened */
.map-section {
  margin-top: 22px !important;
}
.map-section h2 {
  font-size: 16px !important;
  margin-bottom: 10px !important;
}

/* Responsive: collapse to 2 then 1 */
@media (max-width: 1100px) {
  .home-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .home-tiles { grid-template-columns: 1fr; }
  .tile-icon svg { width: 120px; height: 120px; }
}
/* ── Popular Resources Section ─────────────────────────────── */

.popular-section {
  margin-top: 22px;
}

.popular-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.popular-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.popular-header-left h2 {
  font-size: 15px !important;
  font-weight: 700;
  color: #1f4e79;
  margin: 0 !important;
}

.popular-view-all {
  font-size: 12px;
  font-weight: 600;
  color: #1f4e79;
  text-decoration: none;
  opacity: .7;
  transition: opacity .15s;
}
.popular-view-all:hover { opacity: 1; text-decoration: underline; }

/* Two-column list */
.popular-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.pop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .1s;
  color: inherit;
}
.pop-row:hover { background: #f0f4fa; }

.pop-row-badge {
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 44px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.pop-row-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #1a2332;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pop-row-arrow {
  font-size: 12px;
  color: #9ca3af;
  flex-shrink: 0;
}
.pop-row:hover .pop-row-arrow { color: #1f4e79; }

/* Skeleton */
.pop-skel-row {
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e9ecf0 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 640px) {
  .popular-list { grid-template-columns: 1fr; }
}

/* ── Popular tile (4th card) ───────────────────────────────── */

/* The tile itself reuses .tile-panel — just need inner layout */
.pop-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f7;
}
.pop-tile-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pop-tile-title {
  font-size: 16px;
  font-weight: 800;
  color: #1f4e79;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.pop-tile-viewall {
  font-size: 11px;
  font-weight: 600;
  color: #1f4e79;
  text-decoration: none;
  opacity: .65;
  white-space: nowrap;
}
.pop-tile-viewall:hover { opacity: 1; text-decoration: underline; }

/* Scrollable list inside the card */
.pop-tile-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}

.pop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background .1s;
}
.pop-item:hover { background: #f0f4fa; }

.pop-item-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding: 3px;
}

.pop-item-text {
  flex: 1;
  min-width: 0;
}
.pop-item-name {
  font-size: 12px;
  font-weight: 600;
  color: #1a2332;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.pop-item-type {
  font-size: 10px;
  color: #9ca3af;
  display: block;
}

.pop-item-arrow {
  font-size: 11px;
  color: #d1d5db;
  flex-shrink: 0;
}
.pop-item:hover .pop-item-arrow { color: #1f4e79; }

/* Skeleton rows inside tile */
.pop-skel-item {
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e9ecf0 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  margin-bottom: 2px;
}
