/* ==========================================================================
   DOCTOR24 UGC STORIES HUB & SYSTEM COLOR ADAPTIVE STYLES
   Design System Compliance: default.css, ugc-story.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Custom Properties (Light Mode Default & System Dark Mode)
   -------------------------------------------------------------------------- */

:root {
  /* Light Theme (Default) */
  --hub-bg: #f8fafc;
  --hub-header-bg: rgba(255, 255, 255, 0.92);
  --hub-header-border: #e2e8f0;
  --hub-text-title: #0f172a;
  --hub-text-main: #334155;
  --hub-text-muted: #64748b;
  --hub-card-bg: #ffffff;
  --hub-card-border: #e2e8f0;
  --hub-card-border-hover: #00f2fe;
  --hub-card-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  --hub-card-shadow-hover: 0 20px 45px rgba(0, 242, 254, 0.2);
  --hub-quote-bg: #f1f5f9;
  --hub-quote-border: #845cff;
  --hub-quote-text: #1e293b;
  --hub-stat-bg: #ffffff;
  --hub-stat-border: #e2e8f0;
  --hub-badge-bg: rgba(132, 92, 255, 0.08);
  --hub-badge-border: rgba(132, 92, 255, 0.25);
  --hub-badge-text: #7c3aed;
  --hub-banner-bg: linear-gradient(135deg, #e0f2fe 0%, #f3e8ff 100%);
  --hub-banner-border: #bae6fd;
  --hub-banner-title: #0f172a;
  --hub-banner-text: #475569;
  --hub-footer-bg: #0f172a;
  --hub-footer-text: #94a3b8;
  --hub-hero-gradient: linear-gradient(135deg, #0f172a 30%, #4338ca 70%, #0284c7 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark Theme (Auto System Adaptive) */
    --hub-bg: #090d16;
    --hub-header-bg: rgba(9, 13, 22, 0.88);
    --hub-header-border: rgba(255, 255, 255, 0.08);
    --hub-text-title: #ffffff;
    --hub-text-main: #cbd5e1;
    --hub-text-muted: #94a3b8;
    --hub-card-bg: rgba(15, 23, 42, 0.85);
    --hub-card-border: rgba(255, 255, 255, 0.1);
    --hub-card-border-hover: rgba(0, 242, 254, 0.4);
    --hub-card-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --hub-card-shadow-hover: 0 20px 45px rgba(0, 242, 254, 0.25);
    --hub-quote-bg: rgba(255, 255, 255, 0.04);
    --hub-quote-border: #00f2fe;
    --hub-quote-text: #cbd5e1;
    --hub-stat-bg: rgba(255, 255, 255, 0.03);
    --hub-stat-border: rgba(255, 255, 255, 0.08);
    --hub-badge-bg: rgba(0, 242, 254, 0.1);
    --hub-badge-border: rgba(0, 242, 254, 0.3);
    --hub-badge-text: #38bdf8;
    --hub-banner-bg: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(127, 0, 255, 0.15) 100%);
    --hub-banner-border: rgba(0, 242, 254, 0.25);
    --hub-banner-title: #ffffff;
    --hub-banner-text: #cbd5e1;
    --hub-footer-bg: #04070d;
    --hub-footer-text: #64748b;
    --hub-hero-gradient: linear-gradient(135deg, #ffffff 30%, #a5f3fc 70%, #38bdf8 100%);
  }
}

/* --------------------------------------------------------------------------
   2. Page Base Layout
   -------------------------------------------------------------------------- */

body.page-ugc-hub {
  background-color: var(--hub-bg);
  color: var(--hub-text-main);
  font-family: 'Muring Text', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --------------------------------------------------------------------------
   3. Header (Consistent with Story Header)
   -------------------------------------------------------------------------- */

.hub-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: var(--hub-header-bg);
  border-bottom: 1px solid var(--hub-header-border);
  padding: 14px 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.hub-header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hub-header__logo {
  height: 38px;
  width: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   4. Hero Section
   -------------------------------------------------------------------------- */

.hub-hero {
  padding: 72px 24px 48px;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.hub-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--hub-badge-bg);
  border: 1px solid var(--hub-badge-border);
  color: var(--hub-badge-text);
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.hub-hero__title {
  font-family: 'Muring Display', 'Inter', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 20px;
  color: var(--hub-text-title);
  letter-spacing: -0.02em;
}

@media (prefers-color-scheme: dark) {
  .hub-hero__title {
    background: var(--hub-hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.hub-hero__subtitle {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--hub-text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hub-hero__stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 36px;
}

.hub-hero__stat-item {
  background-color: var(--hub-stat-bg);
  border: 1px solid var(--hub-stat-border);
  border-radius: 16px;
  padding: 16px 24px;
  min-width: 170px;
  box-shadow: var(--hub-card-shadow);
  transition: all 0.3s ease;
}

.hub-hero__stat-num {
  font-family: 'Muring Display', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #845cff;
  display: block;
}

@media (prefers-color-scheme: dark) {
  .hub-hero__stat-num {
    color: #00f2fe;
  }
}

.hub-hero__stat-label {
  font-size: 0.85rem;
  color: var(--hub-text-muted);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   5. Stories Cards Grid
   -------------------------------------------------------------------------- */

.hub-stories-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 72px;
}

.hub-section-title {
  text-align: center;
  margin-bottom: 48px;
}

.hub-section-title h2 {
  font-family: 'Muring Display', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--hub-text-title);
}

.hub-section-title p {
  color: var(--hub-text-muted);
  font-size: 1.05rem;
  margin: 0;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

/* --------------------------------------------------------------------------
   6. Story Card Component
   -------------------------------------------------------------------------- */

.story-card {
  background-color: var(--hub-card-bg);
  border: 1px solid var(--hub-card-border);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--hub-card-shadow);
  position: relative;
}

.story-card:hover {
  transform: translateY(-8px);
  border-color: var(--hub-card-border-hover);
  box-shadow: var(--hub-card-shadow-hover);
}

.story-card__image-box {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.story-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.story-card:hover .story-card__image {
  transform: scale(1.06);
}

.story-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.story-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.story-card__title {
  font-family: 'Muring Display', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--hub-text-title);
  line-height: 1.3;
}

.story-card__quote {
  font-style: italic;
  color: var(--hub-quote-text);
  background-color: var(--hub-quote-bg);
  border-left: 4px solid var(--hub-quote-border);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
  margin: 0 0 20px;
  line-height: 1.5;
}

.story-card__highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story-card__highlights li {
  font-size: 0.9rem;
  color: var(--hub-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-card__highlights li span {
  color: #10b981;
  font-weight: bold;
}

.story-card__btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--hub-badge-bg);
  border: 1px solid var(--hub-badge-border);
  color: #845cff;
  padding: 14px 20px;
  border-radius: 14px;
  font-family: 'Muring Display', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .story-card__btn {
    color: #00f2fe;
  }
}

.story-card:hover .story-card__btn {
  background: linear-gradient(135deg, #845cff 0%, #57d4ff 100%);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(132, 92, 255, 0.35);
}

/* --------------------------------------------------------------------------
   7. Final CTA Banner
   -------------------------------------------------------------------------- */

.hub-banner {
  max-width: 1200px;
  margin: 0 auto 72px;
  padding: 0 24px;
}

.hub-banner__card {
  background: var(--hub-banner-bg);
  border: 1px solid var(--hub-banner-border);
  border-radius: 32px;
  padding: 56px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--hub-card-shadow);
}

.hub-banner__title {
  font-family: 'Muring Display', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--hub-banner-title);
}

.hub-banner__text {
  font-size: 1.1rem;
  color: var(--hub-banner-text);
  max-width: 650px;
  margin: 0 auto 32px;
}

.hub-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #845cff 0%, #57d4ff 100%);
  color: #ffffff !important;
  font-family: 'Muring Display', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 36px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(132, 92, 255, 0.35);
  border: none;
  cursor: pointer;
}

.hub-banner__btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 36px rgba(132, 92, 255, 0.55);
  background: linear-gradient(135deg, #7346ff 0%, #38bdf8 100%);
}

/* --------------------------------------------------------------------------
   8. Responsive Adjustments
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .hub-hero {
    padding: 40px 16px 32px;
  }
  .hub-grid {
    grid-template-columns: 1fr;
  }
  .hub-banner__card {
    padding: 40px 20px;
    border-radius: 24px;
  }
}
