/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* ===== FORCE PURE WHITE BACKGROUND ON ABOUT US TEMPLATE ===== */
body.page-template-about-us,
body.page-template-about-us .site,
body.page-template-about-us .site-content,
body.page-template-about-us .content-area,
body.page-template-about-us .inside-article,
body.page-template-about-us .page,
body.page-template-about-us #page {
  background-color: #ffffff !important;
}

body.page-template-about-us main,
body.page-template-about-us .container,
body.page-template-about-us .wp-block-group,
body.page-template-about-us .entry-content {
  background-color: #ffffff !important;
}

/* ===== FOOTER STYLES ===== */

/* Base footer styling */
.site-footer {
    background-color: #ffffff;
    padding: 20px 0;
    font-family: system-ui, sans-serif;
    color: #000;
}


/* Use consistent 90vw width on desktop/tablet */
.footer-top,
.footer-bottom,
.footer-logo {
    width: 90vw !important;
    max-width: 90vw !important;
    margin: 0 auto 30px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* TOP MENU */
.footer-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    margin-bottom: 30px !important;
    padding: 0 !important;
}

.footer-top-left,
.footer-top-right {
    display: flex !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.footer-top-left {
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

.footer-top-right {
    justify-content: flex-end !important;
    align-items: flex-start !important;
}

.footer-top a {
    text-decoration: none !important;
    color: #000 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* SVG LOGO ROW */
.footer-logo {
    margin: 0 auto 30px !important;
    padding: 0 !important;
    display: block !important;
}

.footer-logo-img {
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    object-fit: contain !important;
    padding: 0 !important;
}

/* BOTTOM MENU */
.footer-bottom {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 14px !important;
    flex-wrap: nowrap !important;
    margin: 0 auto 0 auto !important;
    padding: 0 !important;
    width: 90vw !important;
    max-width: 90vw !important;
    box-sizing: border-box !important;
}

.footer-bottom-left,
.footer-bottom-right {
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.footer-bottom-left {
    text-align: left !important;
    flex-grow: 1 !important;
}

.footer-bottom-right {
    text-align: right !important;
}

/* Footer Responsive Tweaks */
@media (max-width: 768px) {
    .footer-top,
    .footer-bottom,
    .footer-logo {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .footer-top-left,
    .footer-top-right {
        width: 50vw !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin: 0 !important;
        padding: 0 10px !important;
        align-items: flex-start !important;
        box-sizing: border-box !important;
        white-space: normal !important;
    }

    .footer-bottom-left,
    .footer-bottom-right {
        white-space: normal !important;
        width: 50vw !important;
        margin: 0 !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    .footer-logo-img {
        width: 100% !important;
        padding: 0 !important;
    }
}

/* ===== SINGLE POST TEMPLATE STYLES ===== */

/* Layout Container */
.single-container {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

/* TOP SECTION */
.single-top {
    width: 90vw;
    max-width: 90vw;
    margin: 40px auto 0 auto;
    box-sizing: border-box;
}

.single-title-wrapper {
    width: 100%;
    text-align: center;
    padding: 0 20px;
    box-sizing: border-box;
    max-width: 720px;
    margin: 0 auto;
}

.single-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #222;
    line-height: 1.2;
}

.single-meta {
    font-size: 0.95rem;
    color: #777;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin-bottom: 0;
}

/* FEATURED IMAGE */
.featured-post-image {
    margin-top: 30px !important;
    text-align: center !important;
    max-width: 720px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 20px;
    box-sizing: border-box;
}

.featured-post-image img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 0.35em !important;
    display: block;
    margin: 0 auto;
}

/* POST CONTENT */
.single-content {
    max-width: 720px;
    margin: 40px auto 80px auto;
    padding: 0 20px;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #333;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.single-content p {
    margin-bottom: 1.5em;
}

.single-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.75em;
    color: #222;
}

.single-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 1.75em;
    margin-bottom: 0.75em;
    color: #333;
}

.single-content a {
    color: #0066cc;
    text-decoration: underline;
}

.single-content ul,
.single-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.single-content li {
    margin-bottom: 0.5em;
}

/* Single Post Responsive Styles */

/* Mobile (up to 480px) */
@media (max-width: 480px) {
    .single-top {
        margin: 20px auto 0 auto;
    }
    
    .single-title {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .single-title-wrapper {
        text-align: left;
        padding: 0 15px;
    }
    
    .single-title,
    .single-meta {
        text-align: left;
    }
    
    .single-meta {
        font-size: 0.875rem;
    }
    
    .featured-post-image {
        padding: 0 15px;
        margin-top: 20px !important;
    }
    
    .single-content {
        padding: 0 15px;
        font-size: 1rem;
        line-height: 1.7;
        margin: 30px auto 60px auto;
    }
    
    .single-content h2 {
        font-size: 1.5rem;
    }
    
    .single-content h3 {
        font-size: 1.25rem;
    }
}

/* Small Tablet (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .single-title {
        font-size: 2.25rem;
    }
    
    .single-content {
        font-size: 1.0625rem;
    }
}

/* Tablet (769px to 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .single-title {
        font-size: 2.5rem;
    }
}

/* Desktop (993px and up) */
@media (min-width: 993px) {
    .single-title {
        font-size: 2.75rem;
    }
}

/* ===== HOMEPAGE STYLES ===== */

/* Container & General Setup */
.single-container, 
.hero-section, 
.featured-section, 
.category-section {
  width: 90vw;
  max-width: 90vw;
  margin: 0 auto 40px auto;
  box-sizing: border-box;
}

/* Hero Section */
.hero-section .custom-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
}

/* Featured Section */
.featured-section {
  max-width: 720px;
  margin: 0 auto 60px auto;
  text-align: center;
  font-weight: 700;
  font-size: 2rem;
  text-transform: uppercase;
  color: #333;
}

.featured-section .custom-post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
  margin-top: 20px;
}

/* Category Sections */
.category-section {
  margin-bottom: 60px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 15px;
}

.category-header .latest-from {
  font-size: 1rem;
  font-weight: 400;
  color: #555;
  text-transform: none;
}

.category-header .category-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222;
  margin-left: 5px;
}

.category-header .view-all {
  font-size: 1rem;
  font-weight: 600;
  color: black;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.category-header .view-all:hover {
  border-color: black;
}

.category-posts .custom-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
}

/* Post Card Consistency */
.custom-post-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.custom-post-thumbnail {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  width: 100%;
  height: 0;
  padding-top: 150%; /* 2:3 aspect ratio */
  background-color: #f0f0f0;
}

.custom-post-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 15px;
  transition: filter 0.3s ease;
  display: block;
}

.custom-post-card:hover .custom-post-thumbnail img {
  filter: brightness(80%);
}

.custom-post-title {
  font-weight: 600;
  padding: 10px 5px;
  margin-top: 10px;
  font-size: 1rem;
  color: #333;
  width: 100%;
}

/* Homepage Responsive Styles */

@media (max-width: 992px) {
  .category-posts .custom-post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-section .custom-post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .category-posts .custom-post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .category-header {
    flex-direction: column;
    align-items: center;
  }
  
  .category-header .latest-from,
  .category-header .category-name {
    text-align: center;
    display: block;
    width: 100%;
  }
  
  .category-header .latest-from {
    font-size: 0.8rem;
    margin-bottom: 0;
  }
  
  .category-header .category-name {
    font-size: 1.1rem;
    margin-bottom: 5px;
  }
  
  .category-header .view-all {
    align-self: flex-end;
    margin-top: 5px;
    width: auto;
  }
}















/* ===========================================================
   RELATED POSTS SECTION (SINGLE POST TEMPLATE) — UPDATED
=========================================================== */

.related-posts-section {
    width: 75vw;
    max-width: 75vw;
    margin: 0 auto 60px auto;
    padding: 0 10px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.related-header {
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 25px;
    text-align: left;
    color: #222;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Grid Layout */
.related-post-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Tablet */
@media (max-width: 992px) {
    .related-post-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .related-post-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .related-header {
        font-size: 1.4rem;
        text-align: left;
    }
}

/* Card Style (reduced border-radius & Inter font) */
.related-card {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Thumbnail — LESS rounded */
.related-card .custom-post-thumbnail {
    padding-top: 66.66%;
    border-radius: 10px !important;
    overflow: hidden;
}

.related-card .custom-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter .3s ease;
    border-radius: 10px !important;
}

.related-card:hover .custom-post-thumbnail img {
    filter: brightness(80%);
}

/* Title — Inter, not bold, matching your site */
.related-card .custom-post-title {
    font-size: 1.1rem;
    font-weight: 400 !important; /* no bold */
    margin-top: 10px;
    color: #333;
    text-align: left;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.related-card .custom-post-title a {
    text-decoration: none !important;
    color: #000 !important;
    font-weight: 400 !important;
}

