/* Color Palette from your book cover */
:root {
  --primary: #D4A574;    /* Warm peach/tan from background */
  --secondary: #8B4513;  /* Rich brown from hair/clothing */
  --accent: #E8C39E;     /* Lighter peach accent */
  --light: #FFF9F0;      /* Cream/off-white */
  --dark: #333333;       /* Dark text */
  --card-bg: #FFFFFF;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  border-radius: 0 0 20px 20px;
  margin-bottom: 2rem;
}

.favicon-header {
  margin-bottom: 1rem;
}

.favicon-header img {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.favicon-header img:hover {
  transform: scale(1.05);
}

.header-badge {
  background: rgba(255,255,255,0.2);
  color: #FFD700;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-block;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

header h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
}

header p {
  margin: 0.5rem 0 1.5rem;
  font-size: 1.1rem;
  opacity: 0.9;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin: 3rem 0;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .hero {
    flex-direction: row;
    align-items: center;
  }
}

.hero-content {
  flex: 1;
}

.hero-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.hero-content .subtitle {
  font-size: 1.3rem;
  color: var(--primary);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #666;
}

.hero-cover {
  width: 100%;
  max-width: 350px;
  height: auto;
  border: 10px solid white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.hero-cover-container {
  flex-shrink: 0;
}

/* CTA Buttons */
.cta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.cta-button {
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(139, 69, 19, 0.2);
}

.cta-button.secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.cta-button.secondary:hover {
  background: var(--primary);
  color: white;
}

.review-button {
  background: #FF6B35;
  color: white;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.review-button:hover {
  background: #e05a2b;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255,107,53,0.3);
}

/* Main Content Layout */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .main-content {
    flex-direction: row;
  }
}

.book-text {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  flex: 2;
}

.book-text h3 {
  font-family: 'Playfair Display', serif;
  color: var(--secondary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.book-text p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

/* Sidebar Cards */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

.card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.card h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.card.accent {
  border-left-color: #FF6B35;
}

.card.accent h3 {
  color: #FF6B35;
}

.format-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.format-links li {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
}

.format-links li:before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
  margin-right: 10px;
}

.format-links a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.format-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.social-links a {
  transition: transform 0.3s ease;
  display: inline-block;
}

.social-links a:hover {
  transform: translateY(-3px);
}

/* Newsletter Section */
.newsletter-section {
  background: var(--card-bg);
  color: var(--dark);
  padding: 2.5rem;
  border-radius: 15px;
  margin: 3rem 0;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

.newsletter-section h2 {
  font-family: 'Playfair Display', serif;
  color: var(--secondary);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  width: 100%;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
}

.newsletter-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

.newsletter-form button:hover:not(:disabled) {
  background: var(--secondary);
  transform: translateY(-2px);
}

.newsletter-form button:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
}

.newsletter-message {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  display: none;
  font-weight: 500;
}

.newsletter-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.newsletter-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 2.5rem 1rem;
  text-align: center;
  border-radius: 20px 20px 0 0;
  margin-top: 3rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.copyright {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  .main-nav {
    gap: 1rem;
  }
  
  .nav-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .cta-grid {
    flex-direction: column;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Book Detail Page Styles */
.book-detail-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

/* Book Header */
.book-header {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .book-header {
    flex-direction: row;
    align-items: flex-start;
  }
}

.book-cover-large {
  flex-shrink: 0;
  text-align: center;
}

.book-detail-cover {
  width: 100%;
  max-width: 350px;
  height: auto;
  border: 10px solid white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.book-header-info {
  flex: 1;
}

.book-header-info h1 {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.book-subtitle {
  font-size: 1.3rem;
  color: var(--primary);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.meta-item {
  background: rgba(212, 165, 116, 0.1);
  color: var(--secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.purchase-options {
  margin-top: 2rem;
}

.purchase-options h3 {
  margin-bottom: 1rem;
  color: var(--secondary);
}

.purchase-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.purchase-links .cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 160px;
}

/* Book Sections */
.book-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.book-section h2 {
  color: var(--secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.book-description {
  font-size: 1.1rem;
  line-height: 1.8;
}

.book-description p {
  margin-bottom: 1.5rem;
}

/* Excerpt */
.excerpt-container {
  padding: 1.5rem;
  background: rgba(232, 195, 158, 0.1);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
}

.book-excerpt {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #555;
  margin: 0;
  quotes: "“" "”" "‘" "’";
}

.book-excerpt:before {
  content: open-quote;
  font-size: 3rem;
  color: var(--primary);
  line-height: 0;
  vertical-align: -0.4em;
  margin-right: 0.1em;
}

.book-excerpt:after {
  content: close-quote;
  font-size: 3rem;
  color: var(--primary);
  line-height: 0;
  vertical-align: -0.4em;
  margin-left: 0.1em;
}

/* Reviews */
.reviews-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.review-card {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(212, 165, 116, 0.2);
}

.review-text {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.review-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 165, 116, 0.3);
}

.stars {
  color: #FFD700;
  font-size: 1.2rem;
}

/* CTA Section */
.book-cta-section {
  text-align: center;
  padding: 3rem 2rem;
  margin: 3rem 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 15px;
}

.book-cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.book-cta-section p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.cta-button.large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  min-width: 200px;
}

.cta-note {
  margin-top: 1.5rem;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .book-header {
    padding: 1.5rem;
  }
  
  .book-header-info h1 {
    font-size: 2rem;
  }
  
  .book-section {
    padding: 1.5rem;
  }
  
  .purchase-links {
    flex-direction: column;
  }
  
  .purchase-links .cta-button {
    width: 100%;
    justify-content: center;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-button.large {
    width: 100%;
  }
  
  .review-author {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}

/* Announcement Banner */
.announcement-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 0.8rem 1rem;
  text-align: center;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.5s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.announcement-banner.show {
  transform: translateY(0);
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.announcement-text {
  font-weight: 500;
  font-size: 0.95rem;
}

.announcement-text strong {
  color: #FFD700;
}

.announcement-button {
  background: white;
  color: var(--secondary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.announcement-button:hover {
  background: #FFD700;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-announcement {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.close-announcement:hover {
  opacity: 1;
}

/* Add padding to body when banner is visible */
body.has-banner {
  padding-top: 50px;
}

/* Adjust header position when banner is visible */
body.has-banner header {
  margin-top: 50px;
}