/* Gurudev Knowledge Platform - Custom Branding */

body {
  /* Responsive item sizing for large screens */
  @media screen and (min-width: 2200px) {
    --default-item-width: 342px !important;
    --default-max-item-width: 342px !important;
    --default-item-margin-right-width: 17px !important;
    --default-item-margin-bottom-width: 27px !important;
  }
}

/* Art of Living inspired colors - warm gold and deep blue */
:root {
  --brand-primary: #c9952c;
  --brand-secondary: #1a365d;
  --brand-accent: #e8b84b;
}

/* Header/navigation styling */
.header-right .nav-item a,
.header-right .nav-item button {
  font-weight: 500;
}

/* Login page styling */
.page-login .form-wrap,
.page-register .form-wrap {
  max-width: 420px;
  margin: 2rem auto;
}

/* ============================================================
   Category & Tag Browsing — Card Presentation
   ============================================================ */

.item.category-item,
.item.tag-item {
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.item.category-item:hover,
.item.tag-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  border-color: var(--brand-primary);
}

/* Thumbnail area */
.item.category-item .item-thumb,
.item.tag-item .item-thumb {
  min-height: 160px;
  background-size: cover;
  background-position: center;
}

/* Gradient fallback for missing thumbnails */
.item.category-item .item-thumb.no-thumb,
.item.tag-item .item-thumb.no-thumb {
  background: linear-gradient(135deg, var(--brand-secondary) 0%, #2d5a8e 50%, var(--brand-primary) 100%) !important;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Title styling */
.item.category-item .item-title a,
.item.tag-item .item-title a {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Description text — clamp to 2 lines */
.item.category-item .item-description,
.item.tag-item .item-description {
  font-size: 0.82rem;
  opacity: 0.65;
  line-height: 1.45;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Media count styling */
.item.category-item .item-meta,
.item.tag-item .item-meta {
  font-size: 0.78rem;
  opacity: 0.45;
}

/* ============================================================
   Categories & Tags Page — Grid Layout
   ============================================================ */

#page-categories .items-list-ver .items-list-wrap,
#page-tags .items-list-ver .items-list-wrap {
  padding: 0 8px;
}

/* ============================================================
   Homepage — Welcome Banner
   ============================================================ */

.gurudev-welcome-banner {
  background: linear-gradient(135deg, var(--brand-secondary) 0%, #2d5a8e 60%, #1a4a7d 100%);
  border-bottom: 2px solid var(--brand-primary);
  padding: 20px 24px;
  position: relative;
}

.gurudev-welcome-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gurudev-welcome-text h2 {
  color: var(--brand-accent);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 6px 0;
}

.gurudev-welcome-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.gurudev-welcome-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.gurudev-welcome-dismiss:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   Homepage — Category Showcase
   ============================================================ */

.gurudev-categories-showcase {
  padding: 20px 24px 8px;
  max-width: 1200px;
  margin: 0 auto;
}

.gurudev-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.gurudev-section-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gurudev-section-header h3 .material-icons {
  font-size: 1.3rem;
  color: var(--brand-primary);
}

.gurudev-view-all {
  font-size: 0.82rem;
  color: var(--brand-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
  transition: color 0.2s;
}

.gurudev-view-all:hover {
  color: var(--brand-accent);
}

.gurudev-view-all .material-icons {
  font-size: 1rem;
}

.gurudev-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.gurudev-category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.gurudev-category-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.07);
}

.gurudev-category-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-secondary) 0%, #2d5a8e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gurudev-category-icon .material-icons {
  font-size: 1.3rem;
  color: var(--brand-accent);
}

.gurudev-category-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gurudev-category-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gurudev-category-count {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   Search — Category Filter Chips
   ============================================================ */

.gurudev-search-filters {
  padding: 16px 24px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.gurudev-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gurudev-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
  white-space: nowrap;
}

.gurudev-chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.gurudev-chip-active {
  color: #fff;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.gurudev-chip-active:hover {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}

/* ============================================================
   Light Theme Overrides
   ============================================================ */

.light-theme .gurudev-section-header h3 {
  color: rgba(0, 0, 0, 0.85);
}

.light-theme .gurudev-category-card {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .gurudev-category-card:hover {
  background: rgba(0, 0, 0, 0.05);
}

.light-theme .gurudev-category-title {
  color: rgba(0, 0, 0, 0.85);
}

.light-theme .gurudev-category-count {
  color: rgba(0, 0, 0, 0.45);
}

.light-theme .gurudev-chip {
  color: rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .gurudev-chip:hover {
  color: rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.08);
}

.light-theme .gurudev-welcome-text p {
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .gurudev-categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }

  .gurudev-category-card {
    padding: 10px 12px;
    gap: 10px;
  }

  .gurudev-category-icon {
    width: 36px;
    height: 36px;
  }

  .gurudev-category-icon .material-icons {
    font-size: 1.1rem;
  }

  .gurudev-welcome-banner {
    padding: 16px 16px;
  }

  .gurudev-welcome-text h2 {
    font-size: 1.1rem;
  }

  .gurudev-welcome-text p {
    font-size: 0.82rem;
  }

  .gurudev-categories-showcase {
    padding: 16px 16px 8px;
  }

  .gurudev-search-filters {
    padding: 12px 16px 0;
  }
}

@media (max-width: 480px) {
  .gurudev-categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
