/*
Theme Name: Savings Pro Child
Template: savings-pro
Version: 1.0
Author: Custom
Description: Blog-focused custom homepage for client (UI locked, content dynamic)
*/

/* =========================================================
   CSS RESET (LIGHT, SAFE)
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}
/* =========================================================
   DESIGN TOKENS
========================================================= */

:root {
  --color-bg: #ffffff;
  --color-soft-bg: #faf7f4;

  --color-text-main: #111111;
  --color-text-muted: #6b7280;

  --color-accent: #000000;

  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;

  --container-width: 1320px;
  --container-padding: 20px;
}
body{
    background: var(--color-bg);
}
/* =========================================================
   GLOBAL TYPOGRAPHY (HOMEPAGE ONLY)
========================================================= */

#custom-home {
  background: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-serif);
}

#custom-home h1,
#custom-home h2,
#custom-home h3 {
  font-weight: 500;
  letter-spacing: -0.02em;
}

#custom-home p {
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* =========================================================
   CONTAINER
========================================================= */

.home-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* =========================================================
   FEATURED SLIDER (SECTION 1)
========================================================= */


/* =========================================================
   FEATURED SLIDER (SECTION 1) — FLEX ONLY
========================================================= */

.home-featured {
  margin: 60px auto 100px;
  position: relative;
}

.featured-slider {
  display: flex;
  gap: 32px;
  overflow: hidden;
  scroll-behavior: smooth;
  flex-wrap: nowrap;
}

.featured-card {
  flex: 0 0 calc((100% - 64px) / 3); /* 3 cards visible */
  border-radius: 4px;
  overflow: hidden;
}

.featured-card img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

/* Hide scrollbar */
.featured-slider::-webkit-scrollbar {
  display: none;
}
.featured-slider {
  scrollbar-width: none;
}

/* Content styling */
.featured-content,
.featured-content h2,
.featured-content span,
.featured-content a {
  color: #000;
}

.featured-content .featured-category {
  color: #b56b3b;
  display: block;
  text-align: center;
  padding-top: 10px;
  font-size: 19px;
}

.featured-content a:hover {
  opacity: 0.9;
}

/* Slider arrows */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-52%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #000;
  font-size: 33px;
  cursor: pointer;
  box-shadow: 5px 5px 15px 2px rgba(0, 0, 0, 0.4);
}

.slider-nav.prev { left: 15px; }
.slider-nav.next { right: 15px; }



/* =========================================================
   BLOG GRID (USED BY MULTIPLE SECTIONS)
========================================================= */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 32px;
}

.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-thumb img {
  border-radius: 10px;
  margin-bottom: 18px;
}

.blog-title {
  font-size: 20px;
  line-height: 1.35;
}

.blog-date {
  margin-top: 6px;
  font-size: 14px;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
}

/* =========================================================
   SECTION HEADERS
========================================================= */

.section-title {
  font-size: 34px;
  margin-bottom: 40px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

/* =========================================================
   FEATURED SLIDER — RESPONSIVE (FLEX)
========================================================= */

@media (max-width: 1024px) {
  .featured-card {
    flex: 0 0 calc((100% - 32px) / 2); /* 2 cards visible */
  }

  .featured-card img {
    height: 380px;
  }
}

@media (max-width: 640px) {
  .featured-card {
    flex: 0 0 100%; /* 1 card visible */
  }

  .featured-card img {
    height: 320px;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
}











/* =========================================================
   NEW SECTION — TWO EDITORIAL CARDS (ISOLATED)
========================================================= */

.new-section {
  padding: 80px 0;
  background: #ffffff;
}

.new-section-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.new-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #faf7f4;
  border-radius: 4px;
  overflow: hidden;
}

.new-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.new-card-content {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.new-card-content h3 {
  font-size: 28px;
  margin-bottom: 16px;
}

.new-card-content p {
  font-size: 16px;
  margin-bottom: 24px;
  color: #444;
}

.new-card-content a {
  font-size: 15px;
  color: #c46a2b;
  font-family: var(--font-sans);
}

.new-card-content a:hover {
  text-decoration: underline;
}

/* ======================
   RESPONSIVE
====================== */

@media (max-width: 1024px) {
  .new-section-container {
    grid-template-columns: 1fr;
  }

  .new-card {
    grid-template-columns: 1fr;
  }

  .new-card-image img {
    height: 320px;
  }
}














/* =========================================================
   CATEGORY HIGHLIGHT SECTION (ISOLATED)
========================================================= */

.category-highlight {
  padding: 80px 0;
}

.category-highlight-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
}

/* LEFT */
.category-highlight-main .category-label {
  display: block;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}

.category-highlight-main .main-image img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 20px;
}

.category-highlight-main .meta {
  font-size: 14px;
  color: #b56b3b;
  margin-bottom: 10px;
}

.category-highlight-main .main-title {
  font-size: 30px;
  line-height: 1.25;
  margin-bottom: 12px;
}
.category-highlight-main .main-title a{
  color: #000 !important;
}

.category-highlight-main .main-excerpt {
  font-size: 16px;
  color: #555;
}

/* RIGHT LIST */
.category-highlight-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.category-highlight .list-item {
  display: flex;
  gap: 16px;
  align-items: center;
}

.category-highlight .list-thumb img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
}

.category-highlight .list-content .meta {
  font-size: 13px;
  color: #b56b3b;
  margin-bottom: 6px;
}

.category-highlight .list-title {
  font-size: 17px;
  line-height: 1.3;
}
.category-highlight .list-title a{
    color: #000 !important;
}
.category-highlight .list-thumb img{
    min-width: 90px;
    
}
/* RESPONSIVE */
@media (max-width: 1024px) {
  .category-highlight-container {
    grid-template-columns: 1fr;
  }
}

















/* =========================================================
   CATEGORY SLIDER SECTION (ISOLATED)
========================================================= */

.category-slider-section {
  background: #faf6f1; /* subtle background change */
  padding: 90px 0;
}

.category-slider-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* Title */
.category-slider-title {
  font-size: 32px;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-slider-title .dot {
  width: 10px;
  height: 10px;
  background: #c47a4b;
  display: inline-block;
}

/* Slider track */
.category-slider-track {
  display: flex;
  gap: 40px;
  overflow: hidden;
  scroll-behavior: smooth;
  flex-wrap: nowrap;
}

/* Slides */
.category-slide {
  flex: 0 0 calc((100% - 80px) / 3);
}

.slide-thumb img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  margin-bottom: 18px;
}

.slide-content .meta {
  font-size: 14px;
  color: #c47a4b;
  margin-bottom: 8px;
}

.slide-title {
  font-size: 20px;
  line-height: 1.3;
}

/* Arrows */
.category-slider-nav {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.category-slider-nav button {
  width: 44px;
  height: 44px;
  border: 1px solid #ddd;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

/* Hide scrollbar */
.category-slider-track::-webkit-scrollbar {
  display: none;
}
.category-slider-track {
  scrollbar-width: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .category-slide {
    flex: 0 0 calc((100% - 40px) / 2);
  }
}

@media (max-width: 640px) {
  .category-slide {
    flex: 0 0 100%;
  }
}






















/* =========================================================
   DUAL CATEGORY LIST SECTION (ISOLATED)
========================================================= */

.dual-category-list {
  padding: 90px 0;
}

.dual-category-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

/* Column */
.dual-category-list .dual-category-column {
  display: flex;
  flex-direction: column;
}

.dual-category-list .column-title {
  font-size: 28px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dual-category-list .column-title .dot {
  width: 8px;
  height: 8px;
  background: #c47a4b;
}

/* Posts */
.dual-category-list .column-posts {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.dual-category-list .column-post {
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.dual-category-list .column-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dual-category-list .column-post .title a{
    color: #000 !important;
    font-size: 15px;
}
.dual-category-list .column-post .thumb img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  min-width: 90px;
}

.dual-category-list .column-post .meta {
  font-size: 13px;
  color: #c47a4b;
  margin-bottom: 6px;
}

.dual-category-list .column-post .title {
  font-size: 18px;
  line-height: 1.3;
}

/* Responsive */
@media (max-width: 1024px) {
  .dual-category-list .dual-category-container {
    grid-template-columns: 1fr;
  }
}




























/* =========================================================
   LATEST ARTICLES + POPULAR SIDEBAR (ISOLATED)
========================================================= */

.latest-with-popular {
  padding: 100px 0;
}

.latest-with-popular-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
}

/* Section title */
.latest-with-popular .section-title {
  font-size: 32px;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.latest-with-popular .section-title .dot {
  width: 8px;
  height: 8px;
  background: #c47a4b;
}

/* LEFT ARTICLES */
.latest-with-popular .latest-article {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  margin-bottom: 60px;
}

.latest-with-popular .article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.latest-with-popular .article-content .meta {
  font-size: 14px;
  color: #c47a4b;
  margin-bottom: 10px;
}

.latest-with-popular .article-title {
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 12px;
}
.latest-with-popular .article-title a{
    color: #000 !important;
    font-size: 20px !important;
}

.latest-with-popular .article-excerpt {
  font-size: 16px;
  color: #555;
}

/* RIGHT SIDEBAR */
.latest-with-popular .popular-sidebar {
  border: 1px solid #eee;
  padding: 30px;
  position: sticky;
  top: 120px; /* 🔥 this makes it NOT scroll */
  height: fit-content;
}

.latest-with-popular .popular-title {
  font-size: 20px;
  margin-bottom: 30px;
}

/* Popular items */
.latest-with-popular .popular-item {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.latest-with-popular .popular-item:last-child {
  margin-bottom: 0;
}

.latest-with-popular .rank {
  font-size: 34px;
  color: #c47a4b;
  line-height: 1;
}

.latest-with-popular .popular-content h4 {
  font-size: 16px;
  line-height: 1.3;
}
.latest-with-popular .popular-content h4 a{
  color: #000 !important;
}

.latest-with-popular .popular-content .time {
  font-size: 13px;
  color: #888;
}

/* Responsive */
@media (max-width: 1024px) {
  .latest-with-popular-container {
    grid-template-columns: 1fr;
  }

  .latest-with-popular .popular-sidebar {
    position: static;
    margin-top: 60px;
  }

  .latest-with-popular .latest-article {
    grid-template-columns: 1fr;
  }
}
