/* Root theme variables */
:root {
  --color-bg-primary: #ffffff;
  --color-text-primary: #333333;
  --color-accent: #2962ff;
  --color-nav-bg: #f8f9fa;
  --color-card-bg: #ffffff;
  --color-card-border: #ddd;
  --color-header-bg: #2962ff;
  --color-nav-text: #ffffff;
  --color-btn-bg: #2962ff;    /* Button color in light mode */
  --color-btn-text: #ffffff;
}

[data-theme="dark"] {
  --color-bg-primary: #1a1a1a;
  --color-text-primary: #eeeeee;
  --color-accent: #528fe4;
  --color-nav-bg: #2d2d2d;
  --color-card-bg: #2d2d2d;
  --color-card-border: #404040;
  --color-header-bg: #2d2d2d;  /* Changed from #1a1a1a to #2d2d2d for better contrast */
  --color-nav-text: #ffffff;
  --color-btn-bg: #528fe4;    /* Different color for dark theme */
  --color-btn-text: #ffffff;
}

/* General Styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  transition: all 0.3s ease;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header styles */
header {
  background: var(--color-header-bg);
  color: #fff;
  padding: 1rem 0;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
}

header p {
  font-size: 1.2rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

/* Logo styles */
.logo-container {
  width: 200px;
  height: 50px;
  overflow: hidden;
  border-radius: 12px; /* Add curved edges to logo container */
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Change from cover to contain */
  display: none; /* Hide both logos by default */
  border-radius: 12px; /* Add curved edges to actual image */
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05); /* Add subtle zoom effect on hover */
}

[data-theme="light"] .light-logo {
  display: block;
}

[data-theme="dark"] .dark-logo {
  display: block;
}

.logo-text {
  fill: #fff;
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  font-size: 20px; /* Increased from 16px */
}

/* Book Cards */
.books {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin: 2rem 0;
}

/* Book cards */
.book-card {
  flex: 1;
  max-width: calc(50% - 1rem);
  min-width: 300px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.book-card h2 {
  margin-top: 0;
  font-size: 1.8rem;
  color: #007BFF;
  border-bottom: 2px solid #007BFF;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.book-card p {
  font-size: 1rem;
  color: #555;
}

/* Button styling */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin: 0 1rem;
  min-width: 200px;
  font-weight: 600;
  background: var(--color-btn-bg);
  color: var(--color-btn-text) !important;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);  /* Added shadow for better visibility */
}

.btn:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);  /* Enhanced shadow on hover */
}

/* Ensure visibility in both themes */
[data-theme="light"] .btn,
[data-theme="dark"] .btn {
  opacity: 1;
  visibility: visible;
}

/* Navigation section specific styling */
section.navigation {
  background: var(--color-bg-primary); /* Use theme background instead of transparent */
  padding: 2rem 0;
  margin: 2rem 0;
  text-align: center;
}

section.navigation .btn {
  margin: 0 1rem;
  min-width: 200px;
  font-weight: 600;
  background: var(--color-btn-bg); /* Explicitly set button background */
  color: var(--color-btn-text) !important;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

section.navigation .btn:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Ensure button visibility in both themes */
[data-theme="light"] section.navigation .btn {
  background: var(--color-btn-bg);
  color: var(--color-btn-text) !important;
}

[data-theme="dark"] section.navigation .btn {
  background: var(--color-btn-bg);
  color: var(--color-btn-text) !important;
}

/* Navigation styles */
.navigation {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
  text-align: center;
  margin: 2rem 0;
  padding: 1rem;
}

.nav-link {
  color: var(--color-nav-text) !important; /* Force white text in both themes */
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500; /* Make text more visible */
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-nav-text) !important;
}

.navigation .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.2);
}

.navigation .btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Theme toggle button */
.theme-toggle {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .books {
    flex-direction: column;
  }

  .book-card {
    max-width: 100%;
    width: 100%;
  }
}

.book-features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.book-features li {
  margin: 0.8rem 0;
  padding: 0.5rem 1rem;
  background: rgba(0, 123, 255, 0.1);
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.book-features li:hover {
  transform: translateX(5px);
  background: rgba(0, 123, 255, 0.15);
}