/* ==========================================================
   Silva Construction Services — Service Hubs
   Minimal construction-themed styling for quick repair hubs
   March 2026
   ========================================================== */

#olc-explore-hubs {
  /* Silva Construction Color Theme */
  --silva-primary: #2563eb;
  --silva-primary-light: #3b82f6;
  --silva-gray-50: #f9fafb;
  --silva-gray-100: #f3f4f6;
  --silva-gray-200: #e5e7eb;
  --silva-gray-300: #d1d5db;
  --silva-gray-400: #9ca3af;
  --silva-gray-600: #4b5563;
  --silva-gray-700: #374151;
  --silva-gray-900: #111827;

  /* Layout */
  --silva-radius-md: 8px;
  --silva-radius-lg: 12px;
  --silva-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --silva-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--silva-gray-900);
}

/* ==========================================================
   ANTI THEME INTRUSION
   ========================================================== */

#olc-explore-hubs,
#olc-explore-hubs * {
  box-sizing: border-box;
}

#olc-explore-hubs a {
  color: inherit;
  text-decoration: none;
}

#olc-explore-hubs button,
#olc-explore-hubs input {
  font-family: inherit;
}

/* ==========================================================
   HUB CARD (Construction Services)
   Clean white cards with light borders and subtle shadows
   ========================================================== */

#olc-explore-hubs .hub-card {
  background: #ffffff;
  border-radius: var(--silva-radius-lg);
  overflow: hidden;
  border: 1px solid var(--silva-gray-200);
  box-shadow: var(--silva-shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s ease;
}

#olc-explore-hubs .hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--silva-shadow-md);
  border-color: var(--silva-gray-300);
}

#olc-explore-hubs .hub-card:active {
  transform: translateY(0);
  box-shadow: var(--silva-shadow-sm);
}

#olc-explore-hubs .hub-img {
  aspect-ratio: 4/3;
  background: var(--silva-gray-100);
  position: relative;
  overflow: hidden;
}

#olc-explore-hubs .hub-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#olc-explore-hubs .hub-bottom {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* NAME BLOCK — centered, 2-line clamp */
#olc-explore-hubs .hub-main-name {
  background: #ffffff;
  color: var(--silva-gray-900);
  padding: 16px 12px;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--silva-gray-200);
}

#olc-explore-hubs .hub-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--silva-gray-900);

  /* 2-line clamp */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
}

#olc-explore-hubs .hub-name.is-long {
  font-size: 14px;
  letter-spacing: -0.1px;
}

/* TAGLINE/HOURS — subtle gray text */
#olc-explore-hubs .hub-main-hours {
  background: var(--silva-gray-50);
  color: var(--silva-gray-600);
  text-align: center;
  padding: 12px;
}

#olc-explore-hubs .hub-hours {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--silva-gray-600);
}

/* ==========================================================
   GRID LAYOUT SYSTEM
   ========================================================== */

#olc-explore-hubs .hub-strip-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

#olc-explore-hubs .hub-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
  width: 100%;
  justify-content: center;
  max-width: 640px;
  margin: 0 auto;
}

/* When multiple cards exist, expand container */
#olc-explore-hubs .hub-strip:has(.hub-card:nth-child(2)) {
  max-width: 960px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
}

/* ==========================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================== */

@media (max-width: 768px) {
  #olc-explore-hubs .hub-strip-wrap {
    padding: 0 16px;
  }

  #olc-explore-hubs .hub-strip {
    max-width: 400px;
    gap: 16px;
  }

  #olc-explore-hubs .hub-strip:has(.hub-card:nth-child(2)) {
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  #olc-explore-hubs .hub-card {
    min-height: auto;
  }
  
  #olc-explore-hubs .hub-name {
    font-size: 14px;
  }
  
  #olc-explore-hubs .hub-hours {
    font-size: 12px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  #olc-explore-hubs .hub-strip {
    max-width: 680px;
  }

  #olc-explore-hubs .hub-strip:has(.hub-card:nth-child(2)) {
    max-width: 680px;
    grid-template-columns: repeat(2, 1fr);
  }
}
