/* Literature Hub Theme - Books, Reading & Educational Content */

/* ===== Theme Section Layout ===== */
.theme-section {
  min-height: calc(100vh - 160px); /* Adjust for header + breadcrumb height */
  background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
  position: relative;
  overflow: hidden;
}

.theme-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* ===== Main Content Layout ===== */
.main-content {
  display: none; /* Hidden by default, shown when React components load */
}

/* ===== Literature Content Area ===== */
.lit-content-area {
  width: 100%;
  animation: fadeInUp 0.8s ease-out;
}

/* ===== Literature Hero Section ===== */
.lit-hero {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--gradient-lit);
  border-radius: 2rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  color: white;
}

.lit-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23DAA520' fill-opacity='0.08'%3E%3Cpath d='M20 20h60v60H20V20zm10 10v40h40V30H30zm5 5h30v30H35V35z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: page-turn 25s linear infinite;
}

.lit-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.lit-hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-bottom: 1rem;
  opacity: 0.9;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.lit-hero-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

/* ===== Category Grid ===== */
.lit-categories {
  margin-top: 3rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.category-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.1);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-bookmark);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(139, 69, 19, 0.2);
  border-color: var(--color-lit-accent);
}

.category-card:hover::before {
  transform: scaleX(1);
}

.category-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
  animation: float 3s ease-in-out infinite;
}

.category-card:nth-child(2) .category-icon {
  animation-delay: 0.5s;
}

.category-card:nth-child(3) .category-icon {
  animation-delay: 1s;
}

.category-card:nth-child(4) .category-icon {
  animation-delay: 1.5s;
}

.category-card h3 {
  font-size: 1.8rem;
  color: var(--color-lit-text);
  margin-bottom: 1rem;
  font-weight: 700;
}

.category-card p {
  color: var(--color-lit-text);
  opacity: 0.8;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.category-count {
  display: inline-block;
  background: var(--gradient-bookmark);
  color: var(--color-lit-text);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===== Literature Color Variables ===== */
:root {
  /* Literary Colors */
  --color-lit-primary: #8B4513;        /* Rich Book Brown */
  --color-lit-secondary: #DEB887;      /* Aged Paper */
  --color-lit-accent: #DAA520;         /* Golden Bookmark */
  --color-lit-text: #2F1B14;          /* Deep Reading Text */
  --color-lit-parchment: #F5F5DC;     /* Parchment Background */

  /* Genre Colors */
  --color-fiction: #9370DB;           /* Medium Slate Blue */
  --color-comedy: #FF6347;            /* Tomato Red */
  --color-mystery: #2F4F4F;           /* Dark Slate Gray */
  --color-romance: #DC143C;           /* Crimson */
  --color-scifi: #4169E1;             /* Royal Blue */
  --color-informational: #228B22;     /* Forest Green */

  /* Literary Gradients */
  --gradient-lit: linear-gradient(135deg, #8B4513, #DEB887);
  --gradient-parchment: linear-gradient(135deg, #F5F5DC, #FAEBD7);
  --gradient-bookmark: linear-gradient(135deg, #DAA520, #FFD700);
  --gradient-shelf: linear-gradient(180deg, #8B4513, #A0522D, #8B4513);
}

/* ===== Literary Hero Section ===== */
.hero {
  background: var(--gradient-lit);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23DAA520' fill-opacity='0.08'%3E%3Cpath d='M20 20h60v60H20V20zm10 10v40h40V30H30zm5 5h30v30H35V35z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: page-turn 25s linear infinite;
}

@keyframes page-turn {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

/* ===== Floating Book Icons ===== */
.hero::after {
  content: '📚📖📝✏️📑📋';
  position: absolute;
  top: 20px;
  left: -200px;
  font-size: 2rem;
  opacity: 0.1;
  animation: book-float 20s linear infinite;
  letter-spacing: 3rem;
}

@keyframes book-float {
  0% { transform: translateX(-200px) rotate(0deg); }
  100% { transform: translateX(calc(100vw + 200px)) rotate(360deg); }
}

/* ===== Book Collection Cards ===== */
.lit-card {
  background: var(--gradient-parchment);
  border: 2px solid var(--color-lit-secondary);
  border-radius: 1rem;
  padding: 2rem;
  margin: 1rem;
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.lit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--gradient-bookmark);
  opacity: 0;
  transition: opacity 0.3s;
}

.lit-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(139, 69, 19, 0.25);
  border-color: var(--color-lit-accent);
}

.lit-card:hover::before {
  opacity: 1;
}

/* ===== Book Spine Design ===== */
.book-spine {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 200px;
  background: var(--gradient-shelf);
  border-radius: 8px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 1rem 0.5rem;
  margin: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.book-spine:hover {
  transform: translateX(10px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* ===== Genre Categories ===== */
.genre-section {
  margin: 2rem 0;
  padding: 2rem;
  border-radius: 1.5rem;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.genres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.genre-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  text-align: center;
}

.genre-fiction {
  background: linear-gradient(135deg, rgba(147, 112, 219, 0.1), rgba(147, 112, 219, 0.05));
  border: 1px solid rgba(147, 112, 219, 0.2);
}

.genre-comedy {
  background: linear-gradient(135deg, rgba(255, 99, 71, 0.1), rgba(255, 99, 71, 0.05));
  border: 1px solid rgba(255, 99, 71, 0.2);
}

.genre-informational {
  background: linear-gradient(135deg, rgba(34, 139, 34, 0.1), rgba(34, 139, 34, 0.05));
  border: 1px solid rgba(34, 139, 34, 0.2);
}

/* ===== Book Grid Layout ===== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.book-item {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.book-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.2);
}

.book-cover {
  width: 100%;
  height: 300px;
  background: var(--gradient-lit);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  font-weight: bold;
  text-align: center;
  padding: 1rem;
}

.book-info {
  padding: 1.5rem;
}

.book-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-lit-text);
  margin-bottom: 0.5rem;
}

.book-genre {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* ===== Reading Progress ===== */
.reading-progress {
  width: 100%;
  height: 6px;
  background: rgba(139, 69, 19, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-bookmark);
  border-radius: 3px;
  transition: width 0.8s ease;
}

/* ===== Literary Buttons ===== */
.lit-button {
  background: var(--gradient-lit);
  border: none;
  border-radius: 8px;
  padding: 1rem 2rem;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}

.lit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
  background: var(--gradient-bookmark);
  color: var(--color-lit-text);
}

.lit-button.download {
  background: var(--gradient-bookmark);
  color: var(--color-lit-text);
}

.lit-button.download:hover {
  background: var(--gradient-lit);
  color: white;
}

/* ===== Bookshelf Display ===== */
.bookshelf {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(139, 69, 19, 0.1) 100%);
  border-radius: 1rem;
  overflow-x: auto;
}

/* ===== Search & Filter ===== */
.search-section {
  background: var(--gradient-parchment);
  padding: 2rem;
  border-radius: 1.5rem;
  margin: 2rem 0;
  border: 1px solid var(--color-lit-secondary);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .theme-container {
    padding: 1rem;
  }

  .lit-hero {
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .category-card {
    padding: 2rem;
  }

  .category-icon {
    font-size: 3rem;
  }

  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  .lit-card {
    margin: 0.5rem;
    padding: 1.5rem;
  }

  .bookshelf {
    padding: 1rem;
  }

  .book-spine {
    width: 45px;
    height: 150px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .theme-section {
    min-height: calc(100vh - 140px);
  }

  .lit-hero {
    padding: 2rem 1rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .category-card {
    padding: 1.5rem;
  }
}

/* ===== Accessibility ===== */
.lit-card:focus,
.book-item:focus,
.lit-button:focus,
.book-spine:focus {
  outline: 3px solid var(--color-lit-accent);
  outline-offset: 2px;
}

/* ===== Reading Animations ===== */
@keyframes page-flip {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(-90deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

.animate-page-flip {
  animation: page-flip 0.8s ease-in-out;
}

/* ===== Quote Section ===== */
.literary-quote {
  background: var(--gradient-parchment);
  border-left: 6px solid var(--color-lit-accent);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 0 1rem 1rem 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-lit-text);
  position: relative;
}

.literary-quote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 4rem;
  color: var(--color-lit-accent);
  opacity: 0.3;
}

/* ===== Alberta Tradesman Fun Styles ===== */

/* Welcome Banner with Coffee Stains */
.tradesman-welcome-banner {
  background: linear-gradient(135deg, #f4e4c1 0%, #e8d4a0 100%);
  border: 3px solid #8B4513;
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 800px;
  position: relative;
  transform: rotate(-1deg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tradesman-welcome-banner:hover {
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

/* Coffee Stain Effects */
.coffee-stain-left {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(ellipse at center,
    rgba(139, 69, 19, 0.3) 0%,
    rgba(139, 69, 19, 0.2) 40%,
    rgba(139, 69, 19, 0.1) 60%,
    transparent 80%);
  border-radius: 50%;
  transform: rotate(45deg) skew(10deg);
}

.coffee-stain-right {
  position: absolute;
  bottom: -15px;
  right: -25px;
  width: 80px;
  height: 80px;
  background: radial-gradient(ellipse at center,
    rgba(160, 82, 45, 0.3) 0%,
    rgba(160, 82, 45, 0.2) 30%,
    rgba(160, 82, 45, 0.1) 50%,
    transparent 70%);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.welcome-message {
  color: #2F1B14;
  font-size: 1.2rem;
  line-height: 1.8;
  font-family: 'Courier New', monospace;
  position: relative;
  z-index: 1;
}

.greeting {
  font-size: 1.6rem;
  font-weight: bold;
  color: #DD6B20;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.tagline {
  font-style: italic;
  color: #8B4513;
  font-weight: 600;
}

/* Reading Zones */
.reading-zones {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.zone-card {
  background: rgba(255, 255, 255, 0.9);
  border: 2px dashed #DD6B20;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.zone-card:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 1);
  border-style: solid;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.zone-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.zone-text {
  font-weight: bold;
  color: #2F1B14;
  margin-bottom: 0.25rem;
}

.zone-time {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

/* Tradesman's Promise */
.tradesman-promise {
  background: linear-gradient(135deg, #2B6CB0 0%, #1a4a7a 100%);
  color: white;
  padding: 2rem;
  border-radius: 15px;
  margin: 2rem auto;
  max-width: 700px;
  position: relative;
  overflow: hidden;
}

.tradesman-promise::before {
  content: '🔧';
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 150px;
  opacity: 0.1;
  transform: rotate(-15deg);
}

.promise-text {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  line-height: 1.8;
  color: white !important;
}

.promise-text strong {
  font-size: 1.3rem;
  color: #FFD700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  display: block;
  margin-bottom: 1rem;
}

/* Warning Label */
.warning-label {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
  color: #000;
  padding: 1.5rem;
  border: 3px solid #000;
  border-radius: 10px;
  margin: 2rem auto;
  max-width: 800px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.warning-label::before,
.warning-label::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  background: repeating-linear-gradient(
    45deg,
    #000,
    #000 10px,
    #FFD700 10px,
    #FFD700 20px
  );
}

.warning-label::before {
  top: -25px;
  left: -25px;
  transform: rotate(45deg);
}

.warning-label::after {
  bottom: -25px;
  right: -25px;
  transform: rotate(45deg);
}

.warning-label strong {
  font-size: 1.2rem;
  color: #D00;
  text-shadow: 1px 1px 0px #FFD700;
}

/* Mobile Responsive for Fun Elements */
@media (max-width: 768px) {
  .tradesman-welcome-banner {
    transform: rotate(0deg);
    margin: 1rem auto;
    padding: 1.5rem;
  }

  .welcome-message {
    font-size: 1rem;
  }

  .greeting {
    font-size: 1.3rem;
  }

  .reading-zones {
    gap: 1rem;
  }

  .zone-card {
    padding: 0.8rem 1.2rem;
  }

  .warning-label {
    font-size: 0.85rem;
    padding: 1rem;
  }

  .coffee-stain-left,
  .coffee-stain-right {
    display: none;
  }
}

/* Easter Egg: Spinning hard hat on hover */
@keyframes hardhat-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.lit-hero-title:hover {
  animation: hardhat-spin 2s ease-in-out;
  cursor: pointer;
}