/* BCM Guide Template - Styles */

:root {
  /* Colours - BCM Brand */
  --color-bcm-blue: #17479e;
  --color-dark: #17479e;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-text-muted: #999999;
  --color-white: #ffffff;
  --color-background: #ffffff;
  --color-border: #e5e5e5;
  --color-tip-bg: #e8f0fb;
  --color-tip-border: #17479e;
  --color-primary: #17479e;

  /* Card accent colours */
  --accent-green: #d4edda;
  --accent-blue: #cce5ff;
  --accent-pink: #f8d7da;
  --accent-yellow: #fff3cd;
  --accent-purple: #e2d5f1;
  --accent-teal: #d1ecf1;

  /* Typography */
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-size-base: 16px;
  --line-height: 1.6;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;

  /* Layout */
  --max-width: 1200px;
  --sidebar-width: 250px;
  --border-radius: 12px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-background);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ================================
   HEADER / NAVIGATION
   ================================ */

.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-sm) var(--spacing-lg);
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark);
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-text {
  margin-left: 15px;
  font-size: 1.125rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 500;
}

/* Breadcrumb */
.breadcrumb {
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  background: var(--color-white);
}

.breadcrumb-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb span {
  margin: 0 0.5rem;
}

/* ================================
   HERO SECTIONS
   ================================ */

/* Index page hero */
.hero-index {
  background: var(--color-dark);
  color: var(--color-white);
  padding: var(--spacing-xxl) var(--spacing-lg);
}

.hero-index-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-index h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

.hero-index p {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* Guide page hero - split design */
.hero-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 300px;
}

.hero-guide-text {
  background: var(--color-dark);
  color: var(--color-white);
  padding: var(--spacing-xxl) var(--spacing-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-guide-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-lg);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  opacity: 0.9;
}

.hero-meta .author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

.hero-guide-visual {
  background: linear-gradient(135deg, #f8b4d9 0%, #7dd3fc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Geometric shapes for visual interest */
.geometric-shapes {
  position: relative;
  width: 200px;
  height: 200px;
}

.shape {
  position: absolute;
  border-radius: 8px;
}

.shape-1 {
  width: 80px;
  height: 80px;
  background: #f472b6;
  top: 20px;
  left: 60px;
  transform: rotate(-10deg);
}

.shape-2 {
  width: 70px;
  height: 70px;
  background: #fbbf24;
  top: 60px;
  left: 100px;
  transform: rotate(5deg);
}

.shape-3 {
  width: 60px;
  height: 60px;
  background: #3b82f6;
  top: 100px;
  left: 130px;
  transform: rotate(15deg);
}

/* ================================
   MAIN LAYOUT
   ================================ */

.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-lg);
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--spacing-xl);
}

/* ================================
   SIDEBAR
   ================================ */

.sidebar {
  border-right: 1px solid var(--color-border);
  padding-right: var(--spacing-lg);
}

.sidebar-section {
  margin-bottom: var(--spacing-lg);
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: var(--spacing-xs);
}

.sidebar-nav a {
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) 0;
}

.sidebar-nav a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.sidebar-nav a.active {
  font-weight: 600;
}

/* Share buttons */
.share-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

.share-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

/* Back link */
.back-link {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--color-text);
  margin-top: var(--spacing-xs);
}

.back-link:hover {
  background: var(--color-border);
  text-decoration: none;
}

/* ================================
   GUIDE CARDS (Index page)
   ================================ */

.guides-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.guide-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s, transform 0.2s;
}

.guide-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.card-visual {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-visual.green { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.card-visual.blue { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.card-visual.pink { background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%); }
.card-visual.yellow { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }
.card-visual.purple { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); }
.card-visual.teal { background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%); }

.card-content {
  padding: var(--spacing-md);
}

.card-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.card-meta .icon {
  color: var(--color-primary);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text);
}

.card-description {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

/* ================================
   GUIDE CONTENT
   ================================ */

.guide-body {
  max-width: 700px;
}

.guide-body h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text);
}

.guide-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.guide-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.guide-body p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.guide-body ul, .guide-body ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
}

.guide-body li {
  margin-bottom: var(--spacing-xs);
}

/* Numbered steps */
.step {
  margin-bottom: var(--spacing-lg);
}

.step-number {
  font-weight: 700;
  color: var(--color-text);
}

/* Tip box */
.tip-box {
  background: var(--color-tip-bg);
  border-left: 4px solid var(--color-tip-border);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.tip-box-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.tip-box-header .icon {
  font-size: 1.25rem;
}

.tip-box p {
  margin-bottom: 0;
  font-size: 0.9375rem;
}

/* Featured guide (on category page) */
.featured-guide {
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: var(--spacing-xl);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.featured-guide-content {
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-guide-content .meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-sm);
}

.featured-guide-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.featured-guide-content p {
  color: var(--color-text-light);
  margin-bottom: var(--spacing-md);
}

.featured-guide-visual {
  background: linear-gradient(135deg, #fce7f3 0%, #7dd3fc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

/* Button */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
}

.btn:hover {
  background: #1d4ed8;
  text-decoration: none;
}

.read-time {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-left: var(--spacing-sm);
}

/* ================================
   FOOTER
   ================================ */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-lg);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: var(--spacing-xxl);
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 968px) {
  .hero-index-content {
    grid-template-columns: 1fr;
  }

  .hero-guide {
    grid-template-columns: 1fr;
  }

  .hero-guide-visual {
    min-height: 200px;
  }

  .main-content {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding-right: 0;
    padding-bottom: var(--spacing-lg);
  }

  .guides-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-guide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-index h1 {
    font-size: 2rem;
  }

  .hero-guide-text h1 {
    font-size: 1.75rem;
  }

  .guides-grid {
    grid-template-columns: 1fr;
  }
}

/* Guide List Styles */
.guide-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
}

.guide-list li {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.guide-list li:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.guide-list li a {
  display: block;
  padding: 1rem 1.25rem;
  color: #1f2937;
  text-decoration: none;
  font-weight: 500;
}

.guide-list li a:hover {
  color: #3b82f6;
}
