/* =========================
   Design System
   ========================= */

:root {
  --purple-main: #7c6cf6;
  --purple-soft: #f4f1ff;
  --text-dark: #1c1c1c;
  --text-muted: #5f5f6b;
  --white: #ffffff;
  --beige: #faf7f2;
}

/* =========================
   Reset & Base
   ========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, var(--purple-soft), #ffffff 70%);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 64px; /* space for fixed header */
}

/* =========================
   Site Header & Navigation
   ========================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: linear-gradient(
    180deg,
    rgba(124,108,246,0.95),
    rgba(124,108,246,0.85)
  );
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.25);
  z-index: 10000;
}

.nav {
  max-width: 1100px;
  margin: auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-left strong {
  color: white;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* Desktop links */
.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: white;
}

/* Menu toggle (hidden on desktop) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
}

/* =========================
   Mobile Navigation
   ========================= */

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 64px; /* EXACTLY header height */
    left: 0;
    right: 0;

    background: linear-gradient(
      180deg,
      rgba(124,108,246,0.98),
      rgba(124,108,246,0.92)
    );

    flex-direction: column;
    padding: 0.5rem 1.5rem 0.8rem;

    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    z-index: 9999;

    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      transform 0.25s ease;
  }

  .nav-links a {
    padding: 0.5rem 0;
    font-size: 0.95rem;
  }

  .nav-links.open {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Main Layout
   ========================= */

main {
  max-width: 900px;
  margin: auto;
  padding: 4rem 2rem;
}

/* =========================
   Typography
   ========================= */

h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}

p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 1.5rem;
}

blockquote {
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--purple-main);
  font-size: 1.15rem;
  color: var(--text-dark);
}

/* =========================
   Home Page
   ========================= */

.hero {
  margin-bottom: 5rem;
}

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

.card {
  padding: 2.5rem;
  background: rgba(255,255,255,0.75);
  border-radius: 24px;
  border: 1px solid rgba(124,108,246,0.15);
  box-shadow: 0 20px 40px rgba(124,108,246,0.1);
}

.link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--purple-main);
  text-decoration: none;
  font-size: 0.95rem;
}

/* =========================
   About Page
   ========================= */

.about-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
}

.about-photo img {
  width: 100%;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 30px 60px rgba(124,108,246,0.25);
}

/* =========================
   Blogs Page
   ========================= */

.intro {
  margin-bottom: 3rem;
  max-width: 680px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.post-card {
  background: var(--beige);
  border-radius: 20px;
  border: 1px solid rgba(124,108,246,0.12);
  box-shadow: 0 20px 40px rgba(124,108,246,0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.post-card a {
  display: block;
  padding: 2.2rem;
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 30px 60px rgba(124,108,246,0.18);
}

.meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

/* =========================
   Blog Post Page
   ========================= */

.post {
  max-width: 720px;
  margin: auto;
}

.post-header {
  margin-bottom: 3.5rem;
}

.post-header h1 {
  line-height: 1.15;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.post-content p {
  margin-bottom: 1.8rem;
}

.post-content h2 {
  margin-top: 4rem;
  margin-bottom: 1.2rem;
}

/* =========================
   Post Footer Navigation
   ========================= */

.post-footer {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(124,108,246,0.15);
}

.back-to-writing {
  margin-bottom: 2.5rem;
}

.back-to-writing a {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: rgba(124,108,246,0.1);
  color: var(--purple-main);
  font-size: 0.9rem;
  text-decoration: none;
}

.back-to-writing a:hover {
  background: rgba(124,108,246,0.18);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.post-nav a {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 14px;
  background: var(--beige);
  border: 1px solid rgba(124,108,246,0.15);
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--text-dark);
  max-width: 45%;
}

.post-nav a:hover {
  border-color: var(--purple-main);
  color: var(--purple-main);
}

/* =========================
   Site Footer
   ========================= */

.site-footer {
  margin-top: 6rem;
  padding: 3rem 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--purple-soft);
}

/* =========================
   Mobile General
   ========================= */

@media (max-width: 768px) {
  .about-hero {
    grid-template-columns: 1fr;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav a {
    max-width: 100%;
  }
}

/* =========================
   Consultancy Page (Final)
   ========================= */

.consultancy {
  max-width: 1000px;
  margin: auto;
}

/* -------------------------
   Action cards (Taxation / Personal Finance)
   ------------------------- */

.consultancy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 3.5rem 0 4.5rem;
}

.consultancy-card {
  display: block;
  padding: 2.4rem;
  background: #fff1f6; /* baby pink */
  border-radius: 22px;
  border: 1px solid rgba(124,108,246,0.12);
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: 0 16px 32px rgba(124,108,246,0.08);

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.consultancy-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 24px 48px rgba(124,108,246,0.16);
}

.consultancy-card h2 {
  margin-bottom: 0.8rem;
}

.consultancy-card p {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}

/* CTA text inside card */
.consultancy-card .cta {
  font-size: 0.9rem;
  color: var(--purple-main);
  text-decoration: none;
}

/* -------------------------
   How it works (centered)
   ------------------------- */

.how-it-works {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.how-it-works h2 {
  margin-bottom: 1.2rem;
}

/* Center the bullet list properly */
.how-it-works ul {
  display: inline-block;       /* THIS is the key */
  text-align: left;            /* bullets stay readable */
  padding-left: 1.2rem;
  margin-top: 1rem;
}

.how-it-works li {
  margin-bottom: 0.5rem;
}

/* -------------------------
   Fit columns
   ------------------------- */

.fit-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.fit h2 {
  margin-bottom: 1rem;
}

.fit ul {
  padding-left: 1.2rem;
}

.fit li {
  margin-bottom: 0.5rem;
}

/* -------------------------
   CTA (centered)
   ------------------------- */

.consultancy-cta {
  text-align: center;
  padding-top: 3rem;
  border-top: 1px solid rgba(124,108,246,0.15);
}

.consultancy-cta p {
  margin-bottom: 1.6rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Button */
.primary-button {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  background: rgba(124,108,246,0.15);
  color: var(--purple-main);
  text-decoration: none;
  font-size: 0.95rem;

  transition: background 0.25s ease, transform 0.25s ease;
}

.primary-button:hover {
  background: rgba(124,108,246,0.25);
  transform: translateY(-1px);
}

/* -------------------------
   Mobile
   ------------------------- */

@media (max-width: 768px) {
  .consultancy-actions {
    grid-template-columns: 1fr;
  }

  .fit-columns {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .how-it-works ul {
    text-align: left;
  }
}

/* this is for search bar */
.search-wrapper {
  margin-bottom: 2.5rem;
}

.search-wrapper input {
  width: 100%;
  max-width: 420px;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  font-size: 0.95rem;
}

.search-wrapper {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.search-wrapper input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  font-size: 0.95rem;
}

.search-wrapper button {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  background: rgba(124,108,246,0.2);
  color: #4b3cf0;
  font-size: 0.9rem;
  cursor: pointer;
}

.search-wrapper button:hover {
  background: rgba(124,108,246,0.3);
}

/* =========================
   Contact page buttons
   ========================= */

.contact-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 3rem 0;
}

.contact-card h2 {
  margin-bottom: 0.6rem;
}

.contact-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  background: rgba(124,108,246,0.15);
  color: var(--purple-main);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-link:hover {
  background: rgba(124,108,246,0.25);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124,108,246,0.15);
}

/* Contact note */
.contact-note {
  max-width: 720px;
  margin-top: 3rem;
  color: var(--text-muted);
}

/* Mobile */
@media (max-width: 768px) {
  .contact-methods {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* =========================
   Books Page
   ========================= */

/* Page container */
.books {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* =========================
   Your Book (Hero)
   ========================= */

.book-hero {
  margin-bottom: 5rem;
}

.book-hero-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3.5rem;
  align-items: center;
}

.book-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.book-info h1 {
  margin-bottom: 1rem;
}

.book-description {
  max-width: 520px;
  margin-bottom: 1.8rem;
  color: var(--text-muted);
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.7;
}

/* Book purchase buttons */
.book-links {
  display: flex;
  gap: 1rem;
}

.book-links a {
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-links a:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(124,108,246,0.25);
}

/* Unified book purchase buttons */
.book-links a {
  background: rgba(124,108,246,0.15);
  color: var(--purple-main);
  border: none;
  font-weight: 500;
}

/* Hover remains same for both */
.book-links a:hover {
  background: rgba(124,108,246,0.25);
}


/* =========================
   Book Reviews Section
   ========================= */

.book-reviews {
  margin-top: 3rem;
}

.book-reviews h2 {
  margin-bottom: 0.6rem;
}

.section-intro {
  max-width: 560px;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

/* =========================
   Book Review Grid
   ========================= */

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 2.2rem;
  margin-top: 2.5rem;
}

/* Individual book tile */
.book-tile a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.book-tile-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #f4f4f8;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Hover magnify (same language as blog tiles) */
.book-tile:hover .book-tile-cover {
  transform: scale(1.06);
  box-shadow: 0 20px 45px rgba(124,108,246,0.25);
}

/* Book title */
.book-title {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 768px) {
  .book-hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .book-cover {
    max-width: 220px;
    margin: 0 auto;
  }

  .book-info {
    text-align: center;
  }

  .book-links {
    justify-content: center;
  }
}

/* =========================
   Book Review Page
   ========================= */

.book-review {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* =========================
   Header section
   ========================= */

.book-review-header {
  margin-bottom: 4rem;
}

.book-review-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3.5rem;
  align-items: center;
}

/* Book cover */
.book-review-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

/* Meta text */
.book-review-meta h1 {
  margin-bottom: 0.4rem;
}

.book-author {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* =========================
   Rating
   ========================= */

.book-rating {
  font-size: 1.2rem;
  letter-spacing: 0.15rem;
  color: #c6c6d4;
}

.book-rating .filled {
  color: #7c6cf6; /* soft purple */
}

/* =========================
   Review content
   ========================= */

.book-review-content {
  line-height: 1.75;
}

.book-review-content h2 {
  margin-top: 2.8rem;
  margin-bottom: 1rem;
}

.book-review-content p {
  margin-bottom: 1.4rem;
}

.book-review-content ul {
  margin-bottom: 1.6rem;
}

.book-review-content li {
  margin-bottom: 0.4rem;
}

/* =========================
   Back link
   ========================= */

.book-review-back {
  margin-top: 4rem;
}

.book-review-back a {
  text-decoration: none;
  color: var(--purple-main);
  font-size: 0.95rem;
}

.book-review-back a:hover {
  text-decoration: underline;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 768px) {
  .book-review-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .book-review-cover {
    max-width: 200px;
    margin: 0 auto;
  }

  .book-rating {
    justify-content: center;
  }
}

/* Table styling for posts */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: 0.95rem;
}

.post-content th,
.post-content td {
  border: 1px solid #e0e0ef;
  padding: 0.75rem 1rem;
  vertical-align: top;
}

.post-content th {
  background: #f6f5ff;
  font-weight: 600;
}

.post-content tr:nth-child(even) {
  background: #fafaff;
}

