/*
Theme Name: Happy Wishe
Theme URI: https://ringtone.trendnut.com/
Author: Happy Wishe Team
Description: A fast, lightweight WordPress theme for festival greetings, quotes, and celebration posts.
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: happywishe
Tags: light, responsive, custom-logo, blog, festival
*/

/* =========================================================
   1. BASE GLOBAL STYLES
========================================================= */
body {
  font-family: "Verdana", Geneva, Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background: #fff;
  color: #222;
}
img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}
a {
  color: #0073aa;
  text-decoration: none;
  transition: 0.3s;
}
a:hover {
  color: #ff9800;
  text-decoration: underline;
}
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}


/* =========================================================
   4. Adsense Ads (Friendliness)
========================================================= */
/* Fix header/footer overflow */
header::after,
footer::before {
  width: 100%;
  max-width: 942px;
  margin: 0 auto;
}

/* Make image boxes flexible for ads */
.featured-image-box img,
.latest-post-item img {
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Allow more flexible grids on mobile */
@media (max-width: 480px) {
  .latest-posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
  }
  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 4px;
  }
}

/* Add spacing for ad units */
.adsense-container {
  margin: 20px 0;
  text-align: center;
  min-height: 90px; /* prevents CLS issues for horizontal ads */
}

/* =========================================================
   4. MAIN CONTENT (Default & Pages)
========================================================= */
main {
  max-width: 900px;
  margin: 0px auto;
  padding: 0 20px;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
}
main h1, main h2, main h3, main h4, main h5, main h6 {
  color: #000;
  margin-bottom: 6px;
  line-height: 1.3;
}

main h1 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 24px;
}

main h2 {
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 20px;
}

main h3 {
  line-height: 1.2;
  font-size: 20px;
}

main h4 {
  line-height: 1.2;
  font-size: 20px;
}

main h5 {
  line-height: 1.2;
  font-size: 20px;
}

main h6 {
  line-height: 1.2;
  font-size: 20px;
}

main p {
  margin-bottom: 0.8em;
  margin-top: 4px;
}

/* =========================================================
   2. HEADER
========================================================= */
header {
  background: #fff;
  text-align: center;
  padding: 0px;
  margin: 0px;
  position: relative;
}

/* Limit border-bottom width to match site/container width */
header::after {
  content: "";
  display: block;
  width: 942px; /* same as .container max-width */
  max-width: 100%;
  margin: 0 auto;
  border-bottom: 1px solid #eee;
}

.site-logo {
  font-size: 20px;
  font-weight: bold;
  background: #ffeb3b;
  color: #000;
  padding: 0px 10px;
  margin: 0px;
  margin-top: -10px;
  margin-bottom: -10px;
  border: 2px solid #000;
  border-radius: 10px;
  display: inline-block;
}

/* =========================================================
   3. NAVIGATION MENU
========================================================= */
nav.topnav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0px auto 0;
  margin-bottom: 10px;
  padding: 0;
  gap: 10px;
  row-gap: 10px; /* Add vertical gap between wrapped rows */
  max-width: 900px;
}
nav.topnav a {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}
nav.topnav a:hover {
  background: #ffeb3b;
  text-decoration: none;
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */
@media (max-width: 768px) {
  nav.topnav ul {
    justify-content: center;
    gap: 8px;
    row-gap: 10px;
    padding: 0 10px;
  }

  nav.topnav a {
    font-size: 0.95rem;
    padding: 7px 14px;
  }
}

@media (max-width: 480px) {
  nav.topnav ul {
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    row-gap: 10px; /* more vertical space for 2-line menus */
    max-width: 100%;
  }

  nav.topnav a {
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px;
  }
}

/* =========================================================
   5. HOME PAGE / FRONT-PAGE
========================================================= */
.hero-section {
  background: #fff8e1;
  text-align: center;
  padding: 5px;
  margin: 0px;
  border-radius: 12px;
}

.hero-section h1 {
  color: #d35400;
  font-size: 28px;
  margin-top: 10px;
  margin-bottom: 5px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* space between buttons */
  flex-wrap: wrap; /* allows wrapping if needed */
  margin-top: 15px;
}

.hero-section .btn-primary,
.hero-section .btn-secondary {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap; /* prevents text from breaking */
}

.btn-primary {
  background: #0073aa;
  color: #fff;
}
.btn-primary:hover {
  background: #005c88;
}
.btn-secondary {
  background: #f9a825;
  color: #fff;
}
.btn-secondary:hover {
  background: #e68900;
}

/* ===============================
   💻 Large Tablets (≤1024px)
=============================== */
@media (max-width: 1024px) {
  .hero-buttons {
    gap: 10px;
  }
  .hero-section .btn-primary,
  .hero-section .btn-secondary {
    font-size: 15px;
    padding: 7px 18px;
  }
}

/* ===============================
   📱 Tablets & Medium Phones (≤768px)
=============================== */
@media (max-width: 768px) {
  .hero-buttons {
    gap: 8px;
    flex-wrap: wrap; /* wrap for medium devices */
  }
  .hero-section .btn-primary,
  .hero-section .btn-secondary {
    font-size: 14px;
    padding: 6px 14px;
  }
}

/* ===============================
   📱 Small Phones (≤480px)
=============================== */
@media (max-width: 480px) {
  .hero-buttons {
    gap: 6px;
    flex-wrap: wrap; /* allow wrapping to prevent overflow */
  }
  .hero-section .btn-primary,
  .hero-section .btn-secondary {
    font-size: 12px;
    padding: 5px 10px;
  }
}

/* ===============================
   📱 Extra Small Devices (≤360px)
=============================== */
@media (max-width: 360px) {
  .hero-buttons {
    flex-direction: column; /* stack buttons vertically */
    gap: 8px;
  }
  .hero-section .btn-primary,
  .hero-section .btn-secondary {
    width: 100%;
    font-size: 11px;
    padding: 6px 0;
  }
}

/* =========================================================
   SINGLE POST / PAGE FEATURED IMAGE CENTERING
========================================================= */

.single .happywishe-post,
.single-post .happywishe-post {
  border: none !important;
  margin-left: -1px;
}

/* Center featured image on single posts */
.single-post .happywishe-post-thumbnail {
    text-align: center;      /* Center the div content */
    margin: 10px 0;          /* Add spacing above/below */
    margin-bottom: -3px
}

.single-post .happywishe-post-thumbnail img {
    display: inline-block;   /* Allows centering */
    max-width: 100%;         /* Responsive */
    height: auto;
    border-radius: 10px;     /* Matches theme style */
    object-fit: cover;
}

.single-post .happywishe-post-title {
    font-size: 20px;      /* Change to desired size */
    font-weight: 700;     /* Bold */
    line-height: 1.2;     /* Tighten spacing */
    margin-bottom: 10px;  /* Space below title */
    text-align: left;   /* Center the title */
}



/* =========================================================
   6. FEATURED IMAGES SECTION (Full-Width Edge-to-Edge Layout)
========================================================= */
.featured-images {
  background: #fff;
  padding: 10px 0;
  margin-top: 10px;
  border-radius: 12px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.featured-images .section-title {
  color: #d35400;
  font-size: 28px;
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 15px;
  text-transform: capitalize;
}

/* ✅ Grid layout: fills full width and reduces gap */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px; /* smaller gap between boxes */
  width: 100%;
  margin: 0;
  padding: 0 8px; /* slight inner padding so boxes don’t stick to screen edge */
  box-sizing: border-box;
}

/* Each item */
.featured-item {
  text-align: center;
  width: 100%;
}

.featured-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
}

/* Box styling */
.featured-image-box {
  border: 2px solid #000;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-image-box img {
  width: 100%;
  height: 200px; /* fixed height — won’t increase */
  object-fit: cover;
}

/* Hover effect */
.featured-item:hover .featured-image-box {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Featured below image title */
.featured-title {
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  margin-top: 6px;
}

/* =========================================================
   Responsive Tweaks
========================================================= */

/* Tablets & Medium Devices */
@media (max-width: 900px) {
  .featured-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
  }
}

/* Mobile Devices */
@media (max-width: 600px) {
  .featured-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    padding: 0 4px;
  }
  .featured-image-box img {
    height: 140px;
  }
}

/* Extra Small Phones */
@media (max-width: 360px) {
  .featured-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 6px;
  }
  .featured-image-box img {
    height: 120px;
  }
  .featured-title {
    font-size: 0.85rem;
  }
}



/* ================================
   📰 Latest Posts Section (4 Boxes Edge-to-Edge)
================================ */
.latest-posts-section {
  width: 100%;
  padding: 0;
  margin: 0;
  background: #fff8e1;
  border-radius: 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* Container */
.latest-posts-container {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* Section Title */
.latest-posts-section .section-title {
  text-align: center;
  color: #d35400;
  font-size: 28px;
  font-weight: 700;
  margin: 20px 0 20px 15px;
}

/* 4-Box Grid (always 4 columns, edge-to-edge) */
.latest-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0; /* flush layout */
  width: 100%;
}


/* Each Post Item */
.latest-post-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.latest-post-item:hover {
  transform: scale(1.02);
}

/* Post Image */
.latest-post-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: none;
  border-radius: 0;
  transition: transform 0.3s ease;
}

.latest-post-item:hover img {
  transform: scale(1.05);
}

/* Post Title */
.latest-post-item span {
  display: block;
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  position: absolute;
  bottom: 0;
  left: 0;
  line-height: 1.2; /* tighter spacing between lines */
  padding: 2px 0; /* less vertical space */
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;
}

/* 📱 Responsive Font Scaling - Keep 4 Columns */
@media (max-width: 1024px) {
  .latest-post-item span {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .latest-post-item span {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .latest-post-item span {
    font-size: 14px;
  }
}





/* ===============================
   🧩 Homepage Categories - Fixed 4 Boxes Per Row (Edge-to-Edge)
================================= */
.categories {
  width: 100%;
  background: #fff8e1;
  padding: 0;
  margin: 0;
  border-radius: 0;
}

/* Section Title */
.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #d35400;
  margin: 30px 0 20px;
  text-transform: capitalize;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #ff9800;
  margin: 8px auto 0;
  border-radius: 2px;
}

/* ✅ Perfect 4 Columns Grid on All Devices */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  justify-items: stretch;
  align-items: start;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Category Item */
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #000;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  transition: transform 0.3s ease, color 0.3s ease;
  border-right: 1px solid #ccc; /* vertical line */
  padding-right: 10px; /* optional spacing */
  box-sizing: border-box;
}

.category-item:nth-child(4n) { /* last item in each row */
  border-right: none; /* remove line on last item */
}

.category-item:hover {
  transform: translateY(-5px);
  color: #ff9800;
}

/* Category Image */
.category-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  margin-bottom: 6px;
  border: 2px solid #000;
  display: block;
}

/* ✅ Responsive Scaling */
@media (max-width: 1024px) {
  .category-item {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .category-item {
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .category-item {
    font-size: 12px;
  }
  .category-item img {
    border-width: 1.5px;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .category-item {
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .category-item {
    font-size: 10px;
  }
}


/* ==========================
   Category Pagination Style
   ========================== */
.category-pagination {
  text-align: center;
  margin: 10px auto;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

.category-pagination a,
.category-pagination span {
  display: inline-block;
  padding: 8px 14px;
  margin: 3px;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  background-color: #fff;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
}

/* Hover Effect */
.category-pagination a:hover {
  background-color: #ff9800;
  color: #fff;
  border-color: #ff9800;
}

/* Active Page */
.category-pagination .current {
  background-color: #ff9800;
  color: #fff;
  border-color: #ff9800;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 480px) {
  .category-pagination a,
  .category-pagination span {
    padding: 6px 10px;
    font-size: 13px;
  }
}


/* =========================================================
   7. SINGLE POST
========================================================= */
.post-header {
  text-align: center;
  margin-bottom: 15px;
}
.post-meta {
  color: #777;
  font-size: 0.9em;
  margin-bottom: 10px;
}
.share-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.share-buttons button {
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  font-weight: bold;
  cursor: pointer;
}
.share-buttons button:hover {
  background: #e68900;
}
.quote-box {
  background: #fff9e6;
  border: 1px solid #ffc107;
  border-radius: 10px;
  padding: 12px;
  margin: 20px auto;
  max-width: 700px;
  box-shadow: 0 0 6px rgba(255,165,0,0.2);
}
.quote-box p { color: #444; font-weight: bold; }


/* =========================================================
   SINGLE POST – PREVIOUS / NEXT NAVIGATION
========================================================= */
.post-navigation {
  margin: 25px auto;
  max-width: 500px;
}

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.post-navigation a {
  display: block;
  padding: 6px 10px;
  border: 2px solid #000;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.post-navigation a:hover {
  background: #fff8e1;
  border-color: #ff9800;
  transform: translateY(-3px);
}

/* Labels */
.post-navigation .nav-subtitle {
  font-size: 16px;
  color: #777;
  display: block;
  margin-bottom: 0px;
}

.post-navigation .nav-title {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  line-height: 1.3;
  margin-bottom: 0px;
  
  display: -webkit-box;
  -webkit-line-clamp: 1;      /* max lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Alignment */
.post-navigation .nav-previous {
  text-align: left;
}

.post-navigation .nav-next {
  text-align: right;
}

/* =========================================================
   Compact Prev / Next Buttons – Mobile Friendly
========================================================= */
@media (max-width: 768px) {
  .post-navigation .nav-links {
    grid-template-columns: 1fr 1fr; /* KEEP side by side */
    gap: 8px;
  }

  .post-navigation a {
    padding: 2px 10px;

    border: 2px solid #000;
    border-radius: 8px;
  }

  .post-navigation .nav-subtitle {
    font-size: 15px;
    margin-bottom: 0px;
  }

  .post-navigation .nav-title {
    font-size: 15px;
    line-height: 1.3;
    
   display: -webkit-box;
  -webkit-line-clamp: 1;      /* max lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  }
}

/* ---------------------------
   Comments Section Container
--------------------------- */
.comments-area {
  max-width: 760px;
  margin: 20px auto;
  padding: 15px;
  padding-top: 0px;
  background: #fffdf6;
  border: 1px solid #ffe08a;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.15);
  box-sizing: border-box;
}

/* Title */
.comments-title {
  font-size: 1.2em;
  font-weight: 600;
  color: #000;
  margin-bottom: 12px;
  margin-top: 10px;
  text-align: center;
}

/* ---------------------------
   Comment List
--------------------------- */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment {
  padding: 10px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.comment:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.comment .comment-author {
  font-size: 0.95em;
  font-weight: 600;
  color: #333;
}

.comment .comment-meta {
  font-size: 0.8em;
  color: #777;
  margin-bottom: 4px;
}

.comment-content {
  margin-top: 6px;
  font-size: 0.95em;
  line-height: 1.5;
  color: #444;
}

/* Reply Button */
.comment-reply-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.8em;
  padding: 4px 8px;
  background: #ff9800;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.comment-reply-link:hover {
  background: #e68900;
}

/* ---------------------------
   Comment Form
--------------------------- */
.comment-respond {
  margin-top: 20px;
  padding: 15px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-sizing: border-box;
}

.comment-reply-title {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 10px;
  margin-top: 5px;
  color: #000;
  text-align: center;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95em;
  box-sizing: border-box;
}

.comment-form textarea {
  min-height: 100px;
  resize: vertical;
}

.comment-form input[type="submit"] {
  width: 100%;
  padding: 10px 0;
  font-size: 0.95em;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.comment-form input[type="submit"]:hover {
  background: #005c88;
}

/* ---------------------------
   Mobile Responsive Tweaks
--------------------------- */
@media (max-width: 600px) {
  .comments-area {
    padding: 12px;
    padding-top: 0px;
  }
}

@media (max-width: 480px) {
  .comment-respond,
  .comment-respond form {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    margin: 0 auto;
  }

  .comment-form input[type="text"],
  .comment-form input[type="email"],
  .comment-form input[type="url"],
  .comment-form textarea,
  .comment-form input[type="submit"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}


/* =========================================================
   8. ARCHIVE / SEARCH / PAGINATION
========================================================= */
.page-header {
  text-align: center;
  margin-bottom: 0px;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.pagination {
  text-align: center;
  margin: 40px 0;
}
.pagination a, .pagination span {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
  color: #333;
  text-decoration: none;
}
.pagination .current {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* =========================================================
   9. archive.php - Category / Archive Grid
========================================================= */
.happywishe-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Category & archive pages ONLY */
.category .happywishe-post,
.archive .happywishe-post {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 12px;
  box-sizing: border-box;
}


/* Post card */
.happywishe-post {
  padding: 10px;
  padding-top: 0px;
  box-sizing: border-box;
  border-radius: 12px;
  font-size: 15px;
  margin: 0px;
  margin-top: 0px;
}

/* Post title in category */
.happywishe-archive-grid .happywishe-post-title {
  margin-bottom: 4px; /* ↓ reduce gap below title */
  font-size: 20px;
}

/* Remove underline from post title links */
.happywishe-post-title a {
  text-decoration: none;
}

/* On hover & focus */
.happywishe-post-title a:hover,
.happywishe-post-title a:focus {
  text-decoration: none;
}

/* Meta info (date, author, category) */
.happywishe-archive-grid .happywishe-post-meta {
  margin-bottom: 6px; /* ↓ reduce gap below meta */
  font-size: 15px;
}

/* Each meta item spacing */
.happywishe-archive-grid .happywishe-post-meta span {
  margin-right: 6px;
}

/* Paragraph / excerpt */
.happywishe-archive-grid .happywishe-post-body p {
  margin-top: 4px;    /* ↓ reduce gap above paragraph */
  margin-bottom: 5px;
}

/* Read more link */
.happywishe-archive-grid .happywishe-readmore {
  margin-top: 2px;
  display: inline-block;
}



/* Remove right border for last in row (desktop) */
@media (min-width: 1025px) {
  .happywishe-post:nth-child(4n) {
    border-right: none;
  }
}

/* Tablets: 2 columns */
@media (max-width: 1024px) and (min-width: 769px) {
  .happywishe-post:nth-child(2n) {
    border-right: none;
  }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
  .happywishe-post {
    border-right: none;
    padding-right: 0;
  }
}

/* Remove bottom border for last row */
.happywishe-post:last-child,
.happywishe-post:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}




/* =========================================================
   9. 404 PAGE
========================================================= */
.happywishe-404-main {
  text-align: center;
  max-width: 800px;
  margin: 60px auto;
  padding: 40px 20px;
}
.happywishe-404-main h1 { font-size: 2em; margin-bottom: 15px; }
.happywishe-home-btn {
  background: #ff9800;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}
.happywishe-home-btn:hover { background: #e68900; }




/* =========================================================
   10. FOOTER (Same Style as Header)
========================================================= */
footer {
  background: #fff;
  text-align: center;
  padding: 0;
  margin: 0px;
  position: relative;
}

/* Match headerâ€™s border style & width */
footer::before {
  content: "";
  display: block;
  width: 942px; /* same as .container max-width */
  max-width: 100%;
  margin: 0 auto;
  border-top: 1px solid #eee;
}


/* Footer Categories Section */
.footer-categories {
  padding: 0px;
}

.footer-categories h2 {
  font-size: 20px;
  font-weight: 700;
  color: #d35400;
  margin-bottom: 10px;
  border-bottom: 2px solid #ffeb3b;
  display: inline-block;
  padding-bottom: 4px;
}

/* Footer Menu */
footer ul.footer-menu {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 10px auto;
  padding: 0;
  gap: 10px;
  row-gap: 10px;
  max-width: 900px;
}

footer ul.footer-menu li a {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

footer ul.footer-menu li a:hover {
  background: #ffeb3b;
  text-decoration: none;
}

/* Footer Text */
footer p {
  margin: 8px 0 20px;
  color: #555;
  font-size: 0.95rem;
}

/* ===========================
   RESPONSIVE DESIGN (Same as Header)
=========================== */
@media (max-width: 768px) {
  footer ul.footer-menu {
    justify-content: center;
    gap: 8px;
    row-gap: 10px;
    padding: 0 10px;
  }

  footer ul.footer-menu li a {
    font-size: 0.95rem;
    padding: 7px 14px;
  }
}

@media (max-width: 480px) {
  footer ul.footer-menu {
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    row-gap: 10px; /* vertical gap for 2-line menus */
    max-width: 100%;
  }

  footer ul.footer-menu li a {
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px;
  }
}

