/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Fonts */
  --body-font: 'PT Sans Narrow', sans-serif;
  --header-font: 'Bardolatry', serif;

  /* Colors */
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --text-dark: #2c3e50;
  --text-medium: #34495e;
  --text-light: #555;
  --text-lighter: #666;
  --text-muted: #888;
  --bg-cream: #f9f7f4;
  --bg-white: #fff;
  --bg-light-gray: #f9f9f9;
  --accent-red: #e74c3c;
  --header-text: rgb(39, 39, 39);

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

  /* Shadows */
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--body-font);
  line-height: 1.6;
  color: #333;
  background-color: var(--bg-cream);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h2,
h3 {
  font-family: var(--header-font);
  font-weight: 400;
}

/* ============================================
   HEADER
   ============================================ */
header {
  font-family: var(--header-font);
  background: url('images/pexels-karola-g-4705843.jpg') center/cover no-repeat;
  color: var(--header-text);
  padding: var(--spacing-lg) 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.header-logo img {
  height: 6rem;
}

.header-text {
  text-align: left;
  flex: 0 0 auto;
}

.header-text h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-xs);
  font-weight: 300;
  letter-spacing: 2px;
}

.header-text .tagline {
  font-size: 1.1rem;
  font-style: italic;
  opacity: 0.9;
}

/* Header Social Links */
.header-social {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  margin-left: auto;
}

.header-social .social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--header-text);
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: rgba(39, 39, 39, 0.25);
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.header-social .social-link:hover {
  background-color: rgb(41, 128, 185, 0.75);
  transform: translateY(-2px);
}

.header-social .social-link svg {
  width: 20px;
  height: 20px;
  fill: var(--header-text);
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  text-transform: uppercase;
}

nav ul li {
  margin: 0;
}

nav ul li a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
  padding: var(--spacing-xl) 0;
  min-height: calc(100vh - 400px);
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.content-section {
  background-color: var(--bg-white);
  padding: var(--spacing-lg);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-lg);
}

.content-section h2 {
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
  font-size: 2rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: var(--spacing-xs);
}

.content-section h3 {
  color: var(--text-medium);
  margin-top: var(--spacing-md);
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}

.content-section p {
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
  text-align: left;
}

.content-section ul {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

.content-section ul li {
  margin-bottom: var(--spacing-xs);
  color: var(--text-light);
}

/* Featured Book Section */
.featured-book {
  background-color: var(--bg-white);
  padding: var(--spacing-lg);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-xl);
}

.featured-book h2 {
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
  font-size: 2rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: var(--spacing-xs);
}

/* Welcome Section */
.welcome {
  background-color: var(--bg-white);
  padding: var(--spacing-lg);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.welcome h2 {
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
  font-size: 1.8rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: var(--spacing-xs);
}

.welcome p {
  color: var(--text-light);
  text-align: left;
}

/* ============================================
   BOOK COMPONENTS
   ============================================ */
.book-showcase {
  display: grid;
  grid-template-columns: minmax(250px, 300px) 1fr;
  gap: var(--spacing-lg);
  align-items: start;
  margin-bottom: 3rem;
}

.review-quote {
  font-style: italic;
  color: #666;
  margin-bottom: 1.5rem;
}

.book-cover {
  text-align: center;
}

.book-cover img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
}

.book-details h3 {
  color: var(--text-dark);
  font-size: 1.8rem;
  margin-bottom: var(--spacing-sm);
}

.book-showcase h3:not(.book-details h3) {
  margin-top: 0;
}

.book-blurb {
  margin-bottom: var(--spacing-sm);
  color: var(--text-light);
  text-align: left;
}

/* Book Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.book-item {
  text-align: center;
}

.book-item img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  margin-bottom: var(--spacing-sm);
}

.book-item h3 {
  color: var(--text-dark);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-xs);
}

.book-item p {
  color: var(--text-lighter);
  font-size: 0.95rem;
}

/* ============================================
   STORIES COMPONENTS
   ============================================ */
.stories-grid {
  display: grid;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.story-item {
  border-left: 4px solid var(--primary-color);
  padding-left: var(--spacing-md);
}

.story-item h3 {
  color: var(--text-dark);
  font-size: 1.3rem;
  margin-bottom: var(--spacing-xs);
}

.story-item .story-meta {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.story-item p {
  color: var(--text-light);
}

/* ============================================
   PROJECTS COMPONENTS
   ============================================ */
.projects-grid {
  display: grid;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
}

.project-item {
  background-color: var(--bg-light-gray);
  padding: var(--spacing-md);
  border-radius: 4px;
  border-left: 4px solid var(--accent-red);
}

.project-item h3 {
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.project-item p {
  color: var(--text-light);
  margin-bottom: var(--spacing-xs);
}

/* ============================================
   WORKS LIST COMPONENTS
   ============================================ */
#more-list > ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

#more-list > ul > li {
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid #ddd;
}

#more-list > ul > li:last-child {
  border-bottom: none;
}

#more-list .more-entry {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-md);
  align-items: flex-start;
}

#more-list .more-entry-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

#more-list .more-entry .media-links {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  gap: var(--spacing-xs);
  margin-top: 0;
}

#content-list ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

#content-list li {
  padding-left: 0;
  margin-left: 0;
}

#content-list > ul > li {
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid #ddd;
}

#content-list > ul > li:last-child {
  border-bottom: none;
}

#content-list .work-entry {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-md);
  align-items: flex-start;
}

#content-list .work-entry-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.media-links {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  gap: var(--spacing-xs);
  margin-top: 0;
}

#purchase-links {
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0;
}

#content-list .work-entry .title {
  display: inline;
  margin: 0;
  font-size: 1.3rem;
}

#content-list .work-entry .published {
  display: inline;
  color: var(--text-muted);
  /* font-style: italic; */
  font-size: 1.3rem;
  margin-left: var(--spacing-sm);
}

.media-links li {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.media-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.media-links a:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

.media-links a[data-link-type='read']::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.25rem;
  vertical-align: middle;
  background-image: url('images/icon-read.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

#content-list a[data-link-type='listen']::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.25rem;
  vertical-align: middle;
  background-image: url('images/icon-listen.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.media-links a[data-link-type='facebook']::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.25rem;
  vertical-align: middle;
  background-image: url('images/social-facebook-white.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.media-links a[data-link-type='instagram']::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.25rem;
  vertical-align: middle;
  background-image: url('images/social-instagram-white.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.media-links a[data-link-type='youtube']::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.25rem;
  vertical-align: middle;
  background-image: url('images/social-youtube-white.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.media-links a[data-link-type='amazon']::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 0.25rem;
  vertical-align: middle;
  background-image: url('images/amazon.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.75rem var(--spacing-md);
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  margin-top: var(--spacing-sm);
}

.btn:hover {
  background-color: var(--primary-dark);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.paragraph-separator {
  margin: var(--spacing-sm) 0;
}

[data-hidden-by-cms='true'] {
  display: none !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .book-showcase {
    grid-template-columns: 1fr;
  }

  nav ul {
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 var(--spacing-sm);
    gap: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  nav ul::-webkit-scrollbar {
    display: none;
  }

  nav ul li {
    flex-shrink: 0;
  }

  nav ul li a {
    text-align: center;
    padding: 0.75rem var(--spacing-sm);
    white-space: nowrap;
    font-size: 0.9rem;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-xs);
  }

  .header-text {
    text-align: center;
  }

  .header-text h1 {
    font-size: 2rem;
  }

  .header-social {
    justify-content: center;
    margin-left: 0;
  }

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

  #content-list .work-entry,
  #more-list .more-entry {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  #content-list .work-entry .title {
    display: block;
    font-size: 1.2rem;
  }

  #content-list .work-entry .published {
    display: block;
    margin-left: 0;
    font-size: 1rem;
  }

  .media-links {
    justify-content: center;
    margin-top: var(--spacing-xs);
  }
}
