/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Open+Sans:wght@400;600&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --blue: #3B9EE0;
  --teal: #2EC4B6;
  --green: #5BBF72;
  --pink: #F4A7C0;
  --bg: #FAFBFF;
  --text: #222222;
  --text-light: #555555;
  --white: #ffffff;
  --shadow: 0 4px 16px rgba(0,0,0,0.10);
  --radius: 12px;
}

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-primary {
  background: var(--white);
  color: var(--blue);
}

.btn-download {
  background: var(--green);
  color: var(--white);
  width: 100%;
  text-align: center;
  font-size: 1rem;
}

/* ===== SECTION LAYOUT ===== */
section {
  padding: 72px 24px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text);
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--blue);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  color: var(--text);
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--blue);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none;
  min-width: 240px;
  padding: 8px 0;
  z-index: 200;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 20px;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  transition: background 0.1s, color 0.1s;
}

.dropdown-menu li a:hover {
  background: var(--bg);
  color: var(--blue);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  display: block;
}

/* Hamburger (hidden on desktop) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* Offset fixed navbar height */
body {
  padding-top: 64px;
}

/* ===== MOBILE NAV ===== */
@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 16px 24px 24px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    padding: 8px 0 0 16px;
  }

  .nav-dropdown:hover .dropdown-menu {
    display: none;
  }

  .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .nav-hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: var(--white);
  text-align: center;
  padding: 96px 24px 80px;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin-bottom: 40px;
  opacity: 0.92;
}

.hero-btn {
  font-size: 1.15rem;
  padding: 18px 40px;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: 0.95rem;
  opacity: 0.80;
}

/* ===== BOOKS SECTION ===== */
.books-section {
  background: var(--white);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.book-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

.book-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.book-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--blue);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 50px;
}

.book-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.book-info .btn-download {
  margin-top: auto;
}

.book-title {
  font-size: 1.2rem;
  color: var(--blue);
}

.book-desc {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.6;
}

.book-age {
  font-size: 0.88rem;
  color: var(--text-light);
}

/* ===== RESPONSIVE: BOOKS ===== */
@media (max-width: 900px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .books-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== AMAZON SECTION ===== */
.amazon-section {
  background: linear-gradient(135deg, #fff8f0 0%, #fff0f5 100%);
  text-align: center;
}

.amazon-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.amazon-badge {
  background: var(--pink);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 6px 20px;
  border-radius: 50px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.amazon-title {
  font-size: 2rem;
  color: var(--text);
}

.amazon-text {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.8;
}

.amazon-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.btn-amazon {
  background: #FF9900;
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 50px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-amazon:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,153,0,0.35);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  background: var(--white);
}

.contact-intro {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 40px;
  font-size: 1.05rem;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius);
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.btn-submit {
  background: var(--blue);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  align-self: flex-start;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,158,224,0.35);
}

.form-success {
  display: none;
  color: var(--green);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--text);
  color: var(--white);
  padding: 32px 24px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.9rem;
  opacity: 0.75;
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.75;
  transition: opacity 0.15s;
}

.footer-nav a:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== ABOUT PAGE ===== */
.about-section {
  min-height: calc(100vh - 64px - 80px);
  display: flex;
  align-items: center;
}

.about-content {
  display: flex;
  align-items: flex-start;
  gap: 56px;
}

.author-portrait {
  width: 280px;
  flex-shrink: 0;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.about-heading {
  font-size: 2.2rem;
  color: var(--blue);
  margin-bottom: 20px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.8;
}

.btn-back {
  background: var(--blue);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 50px;
  align-self: flex-start;
  margin-top: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,158,224,0.30);
}

@media (max-width: 700px) {
  .about-content {
    flex-direction: column;
    align-items: center;
  }

  .author-portrait {
    width: 200px;
  }

  .about-heading {
    font-size: 1.6rem;
  }
}
