/* Base Styles & Typography */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap");
:root {
  --primary-color: #4f46e5; /* Indigo-600 */
  --primary-dark: #4338ca; /* Indigo-700 */
  --accent-color: #fde047; /* Yellow-300 */
  --text-primary: #1f2937; /* Gray-900 */
  --text-secondary: #4b5563; /* Gray-600 */
  --bg-light: #f9fafb; /* Gray-50 */
  --bg-white: #ffffff;
  --border-radius: 8px;
}

body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Responsive Container - Increased side padding for better margin (Responsive) */
.container {
  max-width: 1280px;
  margin: 0 auto;
  /* **Updated:** Increased side padding for better margin on all devices */
  padding: 0 1.5rem;
}

/* Utility Classes */
.section-padding {
  padding: 5rem 0;
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Header / Navigation */
header {
  background-color: var(--bg-white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
}
.logo span {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}
/* Desktop Navigation */
.nav-links {
  display: none;
  gap: 2rem;
  font-weight: 500;
}

.nav-links button {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links button:hover {
  color: var(--primary-color);
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.cta-button {
    text-decoration: none;
  background-color: var(--primary-color);
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 9999px; /* Rounded-full */
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
  background-color: var(--primary-dark);
  transform: scale(1.03);
}

.cta-button-dsk {
  display: none;
}

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
}

.mobile-menu {
  display: none;
  background-color: var(--bg-white);
  padding: 1rem 1.5rem; /* Padding matches container padding */
  border-top: 1px solid #e5e7eb;
}

.mobile-menu a,
.mobile-menu button {
  display: block;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: background-color 0.2s;
  text-align: center;
  width: 100%;
  border: none;
  background: none;
  font-weight: 500;
}

.mobile-menu a:hover {
  background-color: var(--bg-light);
}

.mobile-menu .cta-button {
  margin-top: 1rem;
  width: 100%;
}
.mobile-menu .cta-button:hover {
  color: white;
}

.md-header {
  background-color: #eef2ff;
  padding-top: 3rem;
  padding-bottom: 3rem;
  text-align: center;
}
/* End Header / Navigation */

/* Hero Section */
#hero {
  background-color: #eef2ff; /* Indigo-50 */
  padding: 6rem 0 8rem 0;
  text-align: center;
}

#hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

#hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 56rem;
  margin: 0 auto 2.5rem auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-primary,
.btn-secondary {
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-white);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 15px 20px -5px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background-color: var(--bg-white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background-color: #eef2ff;
  transform: translateY(-1px);
}

/* Catalog Section (Styles from previous step) */
#catalog {
  background-color: var(--bg-white);
}
#catalog h2 {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
}
#catalog > p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 3rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}
.search-filter-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.search-filter-area input,
.search-filter-area select {
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-filter-area input:focus,
.search-filter-area select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.reset-btn {
  background-color: #e5e7eb;
  color: var(--text-primary);
  font-weight: 600;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.2s;
}
.reset-btn:hover {
  background-color: #d1d5db;
}
#book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.book-card {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--primary-color);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.book-cover {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}
.book-card:hover .book-cover {
  transform: scale(1.05);
}
.book-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.book-author {
  font-size: 0.875rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
.book-rating {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.book-rating svg {
  width: 16px;
  height: 16px;
  color: #f59e0b; /* Yellow-500 */
}
.book-rating span {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}
.book-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #10b981; /* Green-600 */
  margin-bottom: 1rem;
}
.buy-now-btn {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s;
}
.buy-now-btn:hover {
  background-color: var(--primary-dark);
}
#no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.25rem;
}

/* Features, Testimonials, CTA Footer, Footer (Styles from previous step - abbreviated) */
#features {
  background-color: #f3f4f6;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}
.feature-card {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s, box-shadow 0.3s;
}
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  width: 3rem;
  border-radius: 9999px;
  background-color: #e0e7ff;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}
.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--text-secondary);
}
#testimonials {
  background-color: var(--bg-white);
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.testimonial-card {
  background-color: #eef2ff;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--primary-color);
}
.testimonial-card p {
  font-size: 1.125rem;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.testimonial-user {
  display: flex;
  align-items: center;
}
.user-avatar {
  width: 3rem;
  height: 3rem;
  background-color: #c7d2fe;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1.25rem;
  margin-right: 1rem;
}
.user-info p:first-child {
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  font-style: normal;
}
.user-info p:last-child {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  font-style: normal;
}
/* Download Section styles */
#download {
  background-color: var(--bg-light);
  padding: 6rem 0;
}

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

.download-card {
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.download-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.download-card p {
  color: var(--text-secondary);
}
.download-img {
  width: 100%;
  height: auto;
  overflow: hidden;
}
.download-img img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s;
}

/* Membership section styles */
#membership {
  background-color: var(--bg-white);
  padding: 6rem 0;
}
.membership-grid {
  padding: 4rem 0;
  border-radius: var(--border-radius);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

/* From Uiverse.io by Yaya12085 */
.membership-grid .membership-card {
  border-radius: 16px;
  padding: 10px;
  color: #697e91;
  border: #4338ca 2px solid;
  max-width: 450px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

/* Highlighted Middle Card */
.membership-card.featured {
  background: linear-gradient(135deg, #f3f3f4cb, #fafafac0);
  border: none;
  transform: scale(1.08);
  color: #697e91;
  z-index: 2;
  box-shadow: 0 20px 40px rgba(56, 62, 240, 0.151);
  transition: all 0.3s ease;
}

/* Inner card adjust */
.membership-card.featured .inner {
  background: rgba(255, 255, 255, 0.1);
}

/* Title and text white */
.membership-card.featured .title,
.membership-card.featured .info,
.membership-card.featured strong {
  color: #697e91;
}

.membership-grid .membership-card strong {
  font-weight: 600;
  color: #425275;
}
.membership-grid .membership-card .inner {
  align-items: center;
  padding: 40px 20px;
  background-color: #ecf0ff;
  border-radius: 12px;
  position: relative;
  height: 100%; /* equal height cards */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* keeps button bottom aligned */
}

.membership-grid .membership-card .pricing {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #bed6fb;
  border-radius: 99em 0 0 99em;
  display: flex;
  align-items: center;
  padding: 0.625em 0.75em;
  font-size: 1.25rem;
  font-weight: 600;
  color: #425475;
}

.membership-grid .membership-card .pricing small {
  color: #707a91;
  font-size: 0.75em;
  margin-left: 0.25em;
}

.membership-grid .membership-card .title {
  font-weight: 600;
  font-size: 1.25rem;
  color: #425675;
}

.membership-grid .membership-card .title + * {
  margin-top: 0.75rem;
}

.membership-grid .membership-card .info + * {
  margin-top: 1rem;
}

.membership-grid .membership-card .features {
  display: flex;
  flex-direction: column;
}

.membership-grid .membership-card .features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.membership-grid .membership-card .features li + * {
  margin-top: 0.75rem;
}

.membership-grid .membership-card .features .icon {
  background-color: #1fcac5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
}

.membership-grid .membership-card .features .icon svg {
  width: 14px;
  height: 14px;
}

.membership-grid .membership-card .features + * {
  margin-top: 1.25rem;
}

.membership-grid .membership-card .action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: end;
}

.membership-grid .membership-card .button {
  background-color: #4f46e5;
  border-radius: 6px;
  color: #fff;
  font-weight: 500;
  font-size: 1.125rem;
  text-align: center;
  border: 0;
  outline: 0;
  width: 100%;
  padding: 0.625em 0.75em;
  text-decoration: none;
}

.membership-grid .membership-card .button:hover,
.membership-grid .membership-card .button:focus {
  background-color: #4338ca;
}
/* End of Membership section styles */
/* CTA Footer Styles */
.cta-footer h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
}
.cta-footer p {
  font-size: 1.25rem;
  color: #c7d2fe;
  margin-bottom: 2rem;
}
.cta-footer .btn-accent {
  background-color: var(--accent-color);
  color: var(--primary-dark);
  font-weight: 800;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 15px -3px rgba(253, 224, 71, 0.4);
}
footer {
  background-color: var(--text-primary);
  color: white;
  padding: 3rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
footer h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}
footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
footer ul a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #374151;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}

/* --- UPDATED: Contact Section Styles --- */
#contact {
  background-color: var(--bg-light);
  padding: 60px 20px;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info {
  flex: 1 1 400px;
  min-width: 300px;
}

.contact-info h2 {
  color: #4f46e5;
  font-size: 2rem;
  margin-bottom: 15px;
}

.contact-info p {
  color: #555;
  margin-bottom: 25px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 20px;
}

.info-item h4 {
  color: #4f46e5;
  font-size: 1rem;
  margin-bottom: 5px;
}

.info-item p {
  margin: 0;
  color: #333;
  line-height: 1.5;
}

.contact-form-card {
  background-color: #fff;
  flex: 1 1 450px;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-form-card h3 {
  font-size: 1.4rem;
  color: #111827;
  margin-bottom: 20px;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
  border-color: #4f46e5;
  outline: none;
}

textarea {
  resize: none;
  height: 100px;
}

button {
  background-color: #4f46e5;
  color: white;
  border: none;
  padding: 12px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #4338ca;
}

/* Success message popup */
.success-message {
  display: none;
  background-color: #4ade80;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
/* ✅ Responsive Fix */
@media (max-width: 900px) {
  .contact-container {
    flex-direction: column;
    align-items: center;
  }

  .contact-info {
    width: 100%;
    text-align: center;
  }

  .contact-form-card {
    max-width: 100%;
    width: 90%;
    margin: 0 auto;
  }
}
/* --- END Contact Section Styles --- */

/* Media Queries for Responsiveness */
@media (min-width: 768px) {
  .cta-button {
    display: block;
  }
  .mobile-menu-btn {
    display: none;
  }
  .nav-links {
    display: flex;
  }
  .search-filter-area {
    flex-direction: row;
  }
  .search-filter-area input {
    flex-grow: 1;
  }
  .search-filter-area select,
  .search-filter-area .reset-btn {
    width: auto;
  }
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .container {
    /* Even more side margin on very large screens */
    padding: 0 2rem;
  }
  #hero h1 {
    font-size: 4.5rem;
  }
}

/* Small mobile optimization for extremely narrow screens */
@media (max-width: 400px) {
  .hero-actions {
    flex-direction: column;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    margin-bottom: 1rem;
  }
}
