/*
Theme Name: Greenblock Landscape Blog
Theme URI: https://www.greenblocklandscape.ca/blog/
Author: SearchGurus.ca
Author URI: https://www.searchgurus.ca/
Description: Custom WordPress theme for Greenblock Landscape blog that integrates seamlessly with the main Greenblock website design.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: greenblock-blog
*/

/* ================================
   BLOG LAYOUT STYLES
   ================================ */

/* Blog Container */
.blog-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 120px 20px;
}

.page-title {
  color: #fff !important;
}

/* Two-Column Layout for Single Posts */
.single-post-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 120px 20px;
}

.single-post-content {
  max-width: 100%;
}

/* ================================
   POST CONTENT STYLES
   ================================ */

.post-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.post-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #222 !important;
  margin-bottom: 10px;
  line-height: 1.2;
}

.post-meta {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.post-meta span {
  margin-right: 20px;
}

/* ================================
   IMAGE CENTERING - CLEAN & SIMPLE
   ================================ */

.post-content img,
.entry-content img,
article img {
  display: block !important;
  margin: 2em auto !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
}

.post-content figure,
.entry-content figure,
article figure {
  margin: 2em 0 !important;
  text-align: center !important;
}

.post-content figure img,
.entry-content figure img {
  margin: 0 auto !important;
}

/* ================================
   TEXT CONTENT STYLES
   ================================ */

.post-content p,
.entry-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 1.5em;
}

.post-content h1,
.entry-content h1,
article h1 {
  font-size: 2.5rem !important;
  font-weight: 800 !important;
  color: #222 !important;
  margin-top: 0 !important;
  margin-bottom: 1em !important;
  line-height: 1.2 !important;
}

.post-content h2,
.entry-content h2,
article h2 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: #222 !important;
  margin-top: 2em !important;
  margin-bottom: 1em !important;
  line-height: 1.3 !important;
}

.post-content h3,
.entry-content h3,
article h3 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: #333 !important;
  margin-top: 1.5em !important;
  margin-bottom: 0.75em !important;
  line-height: 1.4 !important;
}

.post-content h4,
.entry-content h4,
article h4 {
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  color: #333 !important;
  margin-top: 1.5em !important;
  margin-bottom: 0.75em !important;
  line-height: 1.4 !important;
}

.post-content h5,
.entry-content h5,
article h5 {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #444 !important;
  margin-top: 1.25em !important;
  margin-bottom: 0.5em !important;
  line-height: 1.4 !important;
}

.post-content h6,
.entry-content h6,
article h6 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #444 !important;
  margin-top: 1.25em !important;
  margin-bottom: 0.5em !important;
  line-height: 1.4 !important;
}

.post-content ul,
.post-content ol,
.entry-content ul,
.entry-content ol {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 1.5em;
  padding-left: 2em;
}

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

/* ================================
   SIDEBAR STYLES
   ================================ */

.blog-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
}

.sidebar-widget {
  background: #fff;
  padding: 25px;
  margin-bottom: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 3px solid #6fb60e;
}

/* Search Widget */
.sidebar-search input[type="text"] {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.sidebar-search input[type="text"]:focus {
  outline: none;
  border-color: #6fb60e;
}

.sidebar-search button {
  width: 100%;
  margin-top: 10px;
  padding: 12px 20px;
  background: #6fb60e;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.sidebar-search button:hover {
  background: #5ca00c;
}

/* CTA Widget */
.sidebar-cta {
  background: linear-gradient(135deg, #6fb60e 0%, #5ca00c 100%);
  color: #fff;
  text-align: center;
}

.sidebar-cta h3 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.3);
  font-size: 1.6rem;
}

.sidebar-cta p {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.95);
}

.sidebar-cta .cta-button {
  display: inline-block;
  padding: 14px 30px;
  background: #fff;
  color: #6fb60e;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 15px;
  transition: all 0.3s;
}

.sidebar-cta .cta-button:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sidebar-cta .cta-phone {
  display: block;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  margin-top: 15px;
}

.sidebar-cta .cta-phone:hover {
  text-decoration: underline;
}

/* Recent Posts Widget */
.recent-post-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.recent-post-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recent-post-thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 5px;
  overflow: hidden;
}

.recent-post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-info {
  flex: 1;
}

.recent-post-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 5px;
}

.recent-post-title a {
  color: #222;
  text-decoration: none;
  transition: color 0.3s;
}

.recent-post-title a:hover {
  color: #6fb60e;
}

.recent-post-date {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

/* ================================
   POST NAVIGATION
   ================================ */

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #eee;
}

.nav-previous,
.nav-next {
  padding: 20px;
  background: #f8f8f8;
  border-radius: 8px;
  transition: all 0.3s;
}

.nav-previous:hover,
.nav-next:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-previous a,
.nav-next a {
  text-decoration: none;
  color: #222;
  display: block;
}

.nav-label {
  display: block;
  font-size: 0.9rem;
  color: #6fb60e;
  font-weight: 600;
  margin-bottom: 8px;
}

.nav-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

.nav-next {
  text-align: right;
}

/* ================================
   BLOG ARCHIVE/LISTING STYLES
   ================================ */

.blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
  width: 100%;
}

.blog-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.blog-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 25px;
}

.blog-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.blog-card-title a {
  color: #222;
  text-decoration: none;
  transition: color 0.3s;
}

.blog-card-title a:hover {
  color: #4a8008;
}

.blog-card-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: #666;
  margin-bottom: 15px;
}

.blog-card-meta {
  font-size: 0.9rem;
  color: #999;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

/* Tablets */
@media (max-width: 1024px) {
  .single-post-layout {
    grid-template-columns: 1fr 300px;
    gap: 30px;
  }
  
  .post-title {
    font-size: 2rem;
  }
  
  .blog-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
  }
}

/* Mobile Landscape */
@media (max-width: 768px) {
  .header-spacer {
    display: none !important;
  }
  
  .single-post-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px 15px;
  }
  
  .blog-sidebar {
    position: static;
  }
  
  .post-content {
    padding: 20px;
  }
  
  .post-title {
    font-size: 1.75rem;
  }
  
  .post-content p,
  .entry-content p {
    font-size: 1rem;
  }
  
  .post-navigation {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .nav-next {
    text-align: left;
  }
  
  .blog-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Portrait */
@media (max-width: 600px) {
  .blog-container {
    padding: 40px 10px 20px 10px;
  }
  
  .post-title {
    font-size: 1.5rem;
  }
  
  .post-content h2,
  .entry-content h2 {
    font-size: 1.5rem;
  }
  
  .post-content h3,
  .entry-content h3 {
    font-size: 1.25rem;
  }
  
  .sidebar-widget {
    padding: 20px;
  }
  
  .sidebar-cta h3 {
    font-size: 1.4rem;
  }
  
  .sidebar-cta p {
    font-size: 1rem;
  }
  
  .recent-post-thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .recent-post-title {
    font-size: 0.95rem;
  }
}
