/* ── RankoChanko ── Fast Loading Kids Books Website ── */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --coral: #FF7B54;
  --sand: #FFD07B;
  --green: #A8D8B9;
  --sky: #B5D8EB;
  --clay: #F4A29E;
  --paper: #FCFBF7;
  --ink: #2C3E50;
  --grey: #95A5A6;
  --white: #FFFFFF;
  --shadow: 0 2px 12px rgba(44,62,80,0.08);
  --shadow-lg: 0 8px 32px rgba(44,62,80,0.12);
  --radius: 16px;
  --radius-lg: 24px;
  --font-heading: 'Fredoka', 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
  --font-body: 'Quicksand', 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── AdSense Slots ── */
.adsense-slot {
  min-height: 90px;
  background: repeating-linear-gradient(
    45deg,
    #f0f0f0,
    #f0f0f0 10px,
    #e8e8e8 10px,
    #e8e8e8 20px
  );
  border: 1px dashed var(--grey);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey);
  font-size: 13px;
  font-family: var(--font-body);
  margin: 24px 0;
}

.adsense-slot.sidebar {
  min-height: 250px;
  width: 300px;
}

/* ── Navigation ── */
.site-nav {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--coral);
  flex-shrink: 0;
}

.logo-icon {
  width: 36px; height: 36px;
  background: var(--coral);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.logo-icon svg { width: 20px; height: 20px; stroke: white; fill: none; stroke-width: 2; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active { background: rgba(255,123,84,0.1); color: var(--coral); }

.nav-cta {
  background: var(--coral);
  color: white !important;
  padding: 8px 20px !important;
}

.nav-cta:hover { background: #e56a44 !important; }

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #FFF9E6 0%, #E8F5E9 50%, #E3F2FD 100%);
  padding: 60px 0 50px;
}

.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
}

.hero h1 span { color: var(--coral); }

.hero p {
  font-size: 17px;
  color: rgba(44,62,80,0.75);
  margin-bottom: 28px;
  max-width: 480px;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary { background: var(--coral); color: white; }
.btn-primary:hover { background: #e56a44; transform: translateY(-1px); }

.btn-secondary {
  background: white;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: white; }

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}

.hero-image img { width: 100%; height: 100%; object-fit: cover; }

/* ── Section Headers ── */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
}

.section-header p {
  color: rgba(44,62,80,0.65);
  font-size: 16px;
  max-width: 520px;
  margin: 8px auto 0;
}

/* ── Book Cards ── */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

.book-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.book-cover {
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
}

.book-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.book-card:hover .book-cover img { transform: scale(1.05); }

.book-age {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--coral);
  color: white;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
}

.book-info { padding: 14px; }

.book-info h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.book-author {
  font-size: 13px;
  color: var(--grey);
}

.book-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.book-genre {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--green);
  color: var(--ink);
}

.book-download {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 500;
  color: var(--coral);
}

.book-download svg { width: 14px; height: 14px; }

/* ── Category Pills ── */
.age-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.age-pill {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 999px;
  transition: all 0.2s;
  cursor: pointer;
}

.age-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ── Newsletter ── */
.newsletter {
  background: linear-gradient(135deg, var(--green), var(--sky));
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.newsletter p { color: rgba(44,62,80,0.7); margin-bottom: 24px; }

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
}

/* ── Footer ── */
.site-footer {
  background: var(--ink);
  color: white;
  padding: 48px 0 24px;
  margin-top: 60px;
}

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

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--sand);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 32px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
}

.footer-copyright {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ── Stats ── */
.stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--coral);
}

.stat-label {
  font-size: 13px;
  color: var(--grey);
}

/* ── Featured Section (Hero-like blocks) ── */
.featured-section {
  padding: 60px 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.featured-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.featured-card:hover { transform: translateY(-4px); }

.featured-img {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.featured-img img { width: 100%; height: 100%; object-fit: cover; }

.featured-body { padding: 20px; }

.featured-body h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 6px;
}

.featured-body p {
  font-size: 14px;
  color: rgba(44,62,80,0.65);
  margin-bottom: 14px;
}

/* ── Page Banner ── */
.page-banner {
  background: linear-gradient(135deg, #FFF9E6, #E3F2FD);
  padding: 48px 0 40px;
  text-align: center;
}

.page-banner h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 42px);
}

.page-banner p {
  color: rgba(44,62,80,0.65);
  margin-top: 8px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Section Padding ── */
.py-5 { padding: 60px 0; }
.py-4 { padding: 48px 0; }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 13px;
  color: var(--grey);
  padding: 16px 0;
}

.breadcrumb a { color: var(--coral); }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: white;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    gap: 4px;
  }
  .nav-links.open a { padding: 10px 16px; }
  .menu-toggle { display: block; }
  
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .hero-image { order: -1; }
  
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .featured-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { gap: 20px; }
}
