/* =====================================================
   HOME PAGE — Modern skin (scoped under .home-page)
===================================================== */

:root {
  --accent:  #00bcd4;
  --accent2: #00e6b8;
  --violet:  #8a5cff;
  --magenta: #ff5fab;
  --ink:     #1b1b1f;
  --muted:   #61646b;
  --card:    #ffffff;
  --bg:      #f6f8ff;
}

.home-page { background: var(--bg); }

/* ---------- HERO ---------- */
.home-page .hero {
  position: relative;
  height: 38vh;
  background: url('https://images.unsplash.com/photo-1581090700227-1e37b190418e?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-page .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.35));
}
.home-page .hero .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 1.2rem;
  transform: translateY(-25px); /* lift text slightly upward */
}
.home-page .hero .hero-content h1 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 800;
  letter-spacing: .3px;
}
.home-page .hero .hero-content p {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  opacity: .95;
  margin: .9rem 0 0;
}
/* hide old button */
.home-page .hero .hero-btn { display: none !important; }
   
   @media (max-width: 768px) {
  .home-page .hero .hero-content {
    transform: translateY(-85px); /* lifts higher on mobile */
  }
}


/* ---------- SEO INTRO (Glass) ---------- */
.home-page .seo-intro {
  position: relative;
  z-index: 3;
  margin-top: 10px; /* overlap hero more */
  padding: 2.4rem 1rem 3.5rem;
  display: flex;
  justify-content: center;
}
.home-page .seo-glass {
  position: relative;
  width: 100%;
  max-width: 980px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 26px;
  box-shadow: 0 22px 54px rgba(20, 20, 60, 0.14), 0 -6px 24px rgba(20, 20, 60, 0.08) inset;
  padding: 2.6rem 2.2rem 2.2rem;
  overflow: hidden;
  text-align: center;
}
.home-page .seo-glass::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 86px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(138, 92, 255, 0.55) 0%, rgba(255, 95, 171, 0.45) 42%, rgba(255, 255, 255, 0) 100%);
}
.home-page .seo-glass::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
  pointer-events: none;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
}
.home-page .seo-title {
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.home-page .seo-text {
  color: #2d2e36;
  line-height: 1.65;
  font-size: clamp(.95rem, 1.2vw, 1.1rem);
}
.home-page .seo-chips {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .8rem;
}
.home-page .seo-chips span {
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  padding: .6rem 1.2rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(140, 90, 255, .25);
  transition: transform .25s ease, box-shadow .25s ease;
}
.home-page .seo-chips span:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(140, 90, 255, .35);
}

/* ---------- DUO LAYOUT ---------- */
.home-page .home-duo {
  display: grid;
  grid-template-columns: 1.8fr .9fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 0;
}
.home-page .section-title {
  font-size: 1.6rem;
  font-weight: 900;
  margin: .2rem 0 1rem;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* post cards */
.home-page .posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.home-page .post-card {
  background: var(--card);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 10px 24px rgba(138, 92, 255, .08);
  transition: transform .22s ease, box-shadow .22s ease;
}
.home-page .post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(138, 92, 255, .18);
}
.home-page .post-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: .8rem;
}
.home-page .post-info h3 a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.home-page .post-info p {
  color: #42454d;
  margin: .4rem 0 .7rem;
}
.home-page .post-info .read-more {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  transition: color .25s ease, transform .25s ease;
}
.home-page .post-info .read-more:hover {
  color: var(--accent2);
  transform: translateY(-2px);
}

/* categories */
.home-page .duo-right .home-cats-grid {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.home-page .home-cat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 14px;
  padding: .9rem 1rem;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(20, 20, 40, .06);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.home-page .home-cat-name { color: #2b2d42; font-weight: 700; }
.home-page .home-cat-count { color: var(--accent); font-weight: 700; }
.home-page .home-cat-card:hover {
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  transform: translateY(-3px);
}
.home-page .home-cat-card:hover .home-cat-name,
.home-page .home-cat-card:hover .home-cat-count { color: #fff; }

/* ---------- QUICK CLASSES ---------- */
.home-page .quick-classes {
  background: linear-gradient(180deg, #f9fbff 0%, #faf7ff 100%);
  padding: 2.4rem 0;
  margin-top: 1.4rem;
}
.home-page .class-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.home-page .class-pill {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 14px;
  padding: .9rem 1.1rem;
  text-decoration: none;
  text-align: center;
  font-weight: 800;
  color: #2b2d42;
  box-shadow: 0 6px 18px rgba(20, 20, 40, .06);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.home-page .class-pill:hover {
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(138, 92, 255, .20);
}

/* ---------- Responsive overlap tuning ---------- */
@media (max-width: 768px) {
  .home-page .hero .hero-content { transform: translateY(-10px); }
  .home-page .seo-intro { margin-top: -80px; }
  .home-page .home-duo { grid-template-columns: 1fr; }
}
/* ===== Mobile & tablet safety for hero text ===== */
@media (max-width: 1024px){
  .home-page .hero{
    height: 54vh; /* give a bit more room than desktop when narrower */
  }
  .home-page .hero .hero-content{
    transform: translateY(-28px);
    padding-top: calc(env(safe-area-inset-top, 0px) + 8px);
  }
  .home-page .hero .hero-content h1{
    /* scale down earlier on tablets */
    font-size: clamp(1.8rem, 5.8vw, 2.6rem);
    line-height: 1.15;
    text-wrap: balance;
  }
  .home-page .hero .hero-content p{
    font-size: clamp(.95rem, 2.6vw, 1.1rem);
  }
}

@media (max-width: 768px){
  .home-page .hero{
    height: 58vh;            /* more vertical room on phones */
  }
  .home-page .hero .hero-content{
    transform: translateY(-24px); /* lift but not too much */
    padding: clamp(.6rem, 2.5vw, 1rem);
  }
  .home-page .hero .hero-content h1{
    /* smaller minimum + steeper vw scaling for narrow phones */
    font-size: clamp(1.6rem, 8.2vw, 2.3rem);
    line-height: 1.15;
  }
  .home-page .hero .hero-content p{
    font-size: clamp(.9rem, 3.6vw, 1rem);
  }
}

@media (max-width: 400px){
  .home-page .hero{
    height: 40vh;            /* extra space for very small screens */
  }
  .home-page .hero .hero-content{
    transform: translateY(-36px);
  }
  .home-page .hero .hero-content h1{
    font-size: clamp(1.45rem, 8.8vw, 2rem);
  }
}
/* View Details pill – force white text and tidy hover */
.home-page .post-info .read-more{
  color:#fff !important;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  padding:.9rem 1.4rem;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  text-decoration:none;
  font-weight:800;
  box-shadow:0 10px 24px rgba(138,92,255,.25);
  transition:transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.home-page .post-info .read-more:hover{
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:0 14px 32px rgba(138,92,255,.33);
}
/* Fix column alignment: remove the gap from the empty in-feed ad slot */
.home-page .adsense-infeed{ margin:0; padding:0; min-height:0; }
.home-page .adsense-infeed:empty{ display:none; }

/* Ensure the posts grid starts right under the heading */
.home-page .duo-left .posts-grid{ margin-top:0; }

/* Keep both columns aligned at the top */
.home-page .home-duo{ align-items:start; }
.home-page .duo-left .section-title,
.home-page .duo-right .section-title{ margin-bottom:1rem; }
/* ==== FIX 1: "View Details" text must be white ==== */
/* cover all cases & states */
.home-page .read-more,
.home-page .read-more:link,
.home-page .read-more:visited,
.home-page .post-info .read-more,
.home-page .post-card .read-more {
  color: #fff !important;            /* force white text */
  text-decoration: none;
  font-weight: 800;
}

/* If your pill is applied to the link itself, keep gradient readable */
.home-page .post-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .9rem 1.4rem;
  border-radius: 999px;
  /* Do NOT change background here if you already have the gradient;
     only uncomment if you lost the pill styles.
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  box-shadow: 0 10px 24px rgba(138,92,255,.25);
  */
}

/* ==== FIX 2: Left column pushed down – kill any top gap ==== */
/* 1) If an ad slot sits above the posts grid, hide its space when empty */
.home-page .adsense-infeed { margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
.home-page .adsense-infeed:empty { display: none !important; }

/* 2) Make both columns start at the same baseline */
.home-page .home-duo { align-items: start !important; }

/* 3) Remove stray top margins so headings align perfectly */
.home-page .duo-left .section-title,
.home-page .duo-right .section-title,
.home-page .duo-left h2.section-title,
.home-page .duo-right h2.section-title {
  margin-top: 0 !important;
  margin-bottom: 1rem; /* consistent spacing under both headings */
}

/* 4) Ensure the posts grid doesn't add extra top spacing */
.home-page .duo-left .posts-grid { margin-top: 0 !important; padding-top: 0 !important; }

/* 5) Nuke any accidental top padding on the left column wrapper */
.home-page .duo-left { padding-top: 0 !important; margin-top: 0 !important; }
/* ========= FORCE WHITE TEXT ON "View Details" ========= */
a.read-more,
.read-more,
.post-info .read-more,
.post-card .read-more,
.latest-card .read-more,
.latest-body .soft-link,
.latest-body a.soft-link,
.latest-card a.soft-link,
a.soft-link {
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

/* Optional: keep a modern gradient background if it lost it */
.read-more,
.soft-link {
  background: linear-gradient(90deg, #9b5fff, #ff4fab) !important;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(155, 95, 255, 0.25);
}

/* Hover: brighter glow */
.read-more:hover,
.soft-link:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 79, 171, 0.35);
}
/* FINAL OVERRIDE: force white on the "View Details" pill and everything inside it */
.home-page a.read-more,
.home-page .read-more,
.home-page .post-info a.read-more,
.home-page .post-card a.read-more,
.home-page .latest-body a.read-more,
.home-page .latest-body a.soft-link,
.home-page a.soft-link {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important; /* Safari */
  text-decoration: none !important;
  font-weight: 800 !important;
}

/* Also force all children (spans, icons, svgs) to white */
.home-page a.read-more *,
.home-page .read-more *,
.home-page a.soft-link *,
.home-page .soft-link * {
  color: #fff !important;
  fill: #fff !important;          /* for SVG icons */
  stroke: #fff !important;        /* if the arrow is stroked */
  -webkit-text-fill-color: #fff !important;
}

/* If your pill background is applied to the link itself, keep it */
.home-page a.read-more,
.home-page a.soft-link {
  background: linear-gradient(90deg, #9b5fff, #ff4fab) !important;
  padding: 0.9rem 1.4rem !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: .4rem !important;
  box-shadow: 0 10px 24px rgba(155,95,255,.25) !important;
}

.home-page a.read-more:hover,
.home-page a.soft-link:hover {
  filter: brightness(1.06) !important;
  transform: translateY(-2px) !important;
}

/* ===== CTA BUTTON FIX ===== */
.cta .cta-btn {
  background: #ffffff !important;      /* white button */
  color: #007bff !important;           /* nice bright blue text */
  font-weight: 700 !important;
  border-radius: 12px;
  padding: 0.95rem 2rem;
  display: inline-block;
  box-shadow: 0 6px 20px rgba(255,255,255,0.2);
  transition: all 0.25s ease;
}

.cta .cta-btn:hover {
  background: #f2f2f2 !important;      /* slight grey tint on hover */
  color: #005ad6 !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
