/**
 * Global Variables and Base Styles
 * Core styling for FixHerFast website
 */

:root {
  /* Color Palette */
  --primary-color: #333;
  --secondary-color: #555;
  --accent-color: #666;
  --light-gray: #f8f8f8;
  --dark-gray: #333;
  --text-color: #444;
  --border-color: #eee;

  /* Spacing */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 20px;
  --spacing-lg: 30px;
  --spacing-xl: 40px;

  /* Typography */
  --font-family-base: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Shadows */
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  /* Missing site tokens used elsewhere */
  --border-radius: 10px;
  --box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  --text-light: #8a8a8a;
  --panel-bg: #ffffff;
}

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Document Body */
body {
  font-family: var(--font-family-base);
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Link Styles */
a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

header {
  padding: 30px 0;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--light-gray);
}

.site-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: -1px;
}

.site-title a {
  color: var(--primary-color);
  position: relative;
  padding-bottom: 3px;
}

.site-title a:after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #eee;
}

.site-description {
  font-size: 1.2rem;
  color: var(--dark-gray);
  margin-bottom: 20px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav li a {
  color: var(--primary-color);
  font-weight: 600;
}

/**
 * Layout Components
 */

/* Main Content Grid */
main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--spacing-xl);
}

/* Category Layout */
.category-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "header"
    "sidebar"
    "content";
  gap: var(--spacing-lg);
}

.category-layout .category-header {
  grid-area: header;
}

.category-layout .sidebar-container {
  grid-area: sidebar;
}

.category-layout .blog-list {
  grid-area: content;
}

@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
  }

  .category-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "sidebar"
      "content";
  }

  .sidebar-container {
    width: 100%;
  }

  .blog-list {
    width: 100%;
  }
}

/* Blog List Container */
.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

/* Blog Card Component */
.blog-card {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.blog-card:hover {
  border-color: #ddd;
  box-shadow: var(--shadow-sm);
}

.blog-card-wrapper {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .blog-card-wrapper {
    flex-direction: row;
    height: 100%;
  }
}

.blog-card-image-container {
  position: relative;
  overflow: hidden;
  max-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .blog-card-image-container {
    flex: 0 0 40%;
    max-width: 40%;
    max-height: none;
    height: 300px;
  }
}

.blog-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image {
  transform: scale(1.05);
}

.blog-number {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 12px;
  font-weight: 600;
  z-index: 1;
}

.blog-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-overlay {
  opacity: 1;
}

.read-overlay {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 10px 20px;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.blog-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.blog-card-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 12px;
}

.blog-card-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
}

.blog-card-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card-title a:hover {
  color: var(--accent-color);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #777;
}

.blog-card-meta span {
  margin-right: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #777;
}

.blog-card-meta span {
  margin-right: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-date {
  display: inline-flex;
  align-items: center;
}

.blog-card-excerpt {
  margin-bottom: 15px;
  flex: 1;
  line-height: 1.6;
  color: #555;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  margin-bottom: 15px;
}

.category-tag {
  background-color: var(--light-gray);
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-tag:hover {
  background-color: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.sidebar {
  padding: 20px;
  background-color: var(--light-gray);
  border-radius: 8px;
  height: fit-content;
  box-shadow: var(--shadow-sm);
}

.sidebar-container {
  width: 100%;
}

.sidebar h2 {
  margin-bottom: 15px;
  color: var(--primary-color);
  font-size: 1.3rem;
  position: relative;
}

.sidebar h2:after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent-color);
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
}

.sidebar li {
  margin-bottom: 10px;
}

.blog-detail {
  max-width: 850px;
  margin: 0 auto;
  background-color: white;
  padding: 30px;
  margin-top: 20px;
}

.blog-header {
  margin-bottom: 40px;
  text-align: center;
}

.blog-featured-image {
  margin: -30px -30px 30px;
  /* use a responsive hero height but cap it so very tall screens don't explode */
  height: 60vh;
  max-height: 500px;
  min-height: 260px;
  overflow: hidden;
  position: relative;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

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


.blog-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
  position: relative;
  padding-bottom: 15px;
  display: inline-block;
}

.blog-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--secondary-color);
}

.blog-meta {
  color: #777;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.blog-description {
  font-size: 1.2rem;
  color: #555;
  max-width: 700px;
  margin: 0 auto 30px;
  line-height: 1.6;
  padding: 20px;
  background-color: #f7f7f7;
  border: 1px solid #eee;
  font-style: italic;
}

.blog-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

.blog-content h2 {
  margin: 40px 0 20px;
  color: var(--primary-color);
  font-size: 1.8rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.blog-content h3 {
  margin: 30px 0 15px;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.blog-content p {
  margin-bottom: 20px;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  display: block;
  border: 1px solid #eee;
}

.blog-content blockquote {
  border-left: 4px solid var(--secondary-color);
  padding: 15px 20px;
  margin: 20px 0;
  font-style: italic;
  color: #555;
  background-color: #f7f7f7;
}

.blog-content ul,
.blog-content ol {
  margin: 20px 0 20px 20px;
}

.blog-content li {
  margin-bottom: 10px;
}


.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-tag {
  background-color: #f7f7f7;
  color: var(--dark-gray);
  padding: 5px 10px;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.keyword-tag:hover {
  color: var(--primary-color);
}

/* footer styles consolidated into additional.css to avoid duplication */

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--secondary-color);
  color: white;
  padding: 10px 18px;
  font-weight: 600;
  margin-top: 10px;
  transition: background-color 0.2s ease;
}

.read-more:hover {
  background-color: var(--primary-color);
  color: white;
}

.read-more-links {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.read-more.alt {
  background-color: var(--primary-color);
}

.read-more.alt:hover {
  background-color: var(--accent-color);
}

.blog-number {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 12px;
}