/*
 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
*/

/* Base footer styling */
.site-footer {
    background-color: #f5f5f5;
    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;
}

/* 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;
    }
}

/* ===== Homepage, featured, category, and card styles ===== */

/* Container & General Setup */
.hero-section, 
.featured-section, 
.category-section {
  width: 90vw;
  max-width: 90vw;
  margin: 0 auto 40px auto;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

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

@media (max-width: 480px) {
  .hero-section .custom-post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* 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%;
}

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

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

/* 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%; 
  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;
  font-family: 'Inter', sans-serif;
  width: 100%;
}

/* Responsive Typography & Spacing */
@media (max-width: 480px) {
  .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;
  }
}


