/*
Theme Name: ParishGrid
Theme URI: https://example.com/parishgrid
Author: Jeff
Description: Simple 3-column news layout with latest post, banner ad, and 3x3 grid of recent posts.
Version: 1.0
Text Domain: parishgrid
*/

/* ========================================
   1. RESET & BASE
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #004499;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   2. PAGE STRUCTURE
======================================== */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
  background: #fff;
}

/* 3-column layout: 200 / 960 / 200 */
.content-container {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 0;
}

/* Center content area */
.content-area {
  padding: 30px;
  background: #fff;
}

/* Sidebars */
.sidebar-left,
.sidebar-right {
  width: 200px;
  padding: 20px;
  background: #f9f9f9;
}

/* ========================================
   3. HEADER
======================================== */
.site-header {
  background: #fff;
  border-bottom: 3px solid #0066cc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0;
}

.header-image img {
  width: 100%;
  height: auto;
}

/* ========================================
   4. SIDEBARS & AD SLOTS
======================================== */
.widget-area {
  background: #f9f9f9;
  height: 100%;
}

.sidebar-title {
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #0066cc;
  color: #333;
}

/* 160x600 ad placeholder in sidebars */
.sidebar-ad-160x600 {
  width: 160px;
  height: 600px;
  margin: 0 auto;
  background: #e0e0e0;
  border: 1px dashed #999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  color: #666;
}

/* ========================================
   5. MAIN CONTENT
======================================== */
.entry-title {
  font-size: 28px;
  margin-bottom: 10px;
  color: #333;
}

.entry-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.entry-summary {
  font-size: 16px;
}

/* Latest post block */
.latest-post {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.latest-post .post-thumbnail {
  margin-bottom: 15px;
}

/* Banner ad under latest post (center column) */
.homepage-banner-ad {
  margin: 30px 0;
  text-align: center;
  padding: 20px;
  background: #f9f9f9;
  border: 1px dashed #ccc;
  color: #666;
  font-style: italic;
}

/* ========================================
   6. 3x3 GRID OF NEXT 9 POSTS
======================================== */
.post-grid-wrapper {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 20px;
}

.grid-item {
  border: 1px solid #e0e0e0;
  padding: 15px;
  background: #fafafa;
  border-radius: 4px;
}

.grid-item .entry-title {
  font-size: 20px;
  margin-bottom: 10px;
}

.grid-thumbnail {
  margin-bottom: 10px;
}

.grid-thumbnail img {
  width: 100%;
  height: auto;
}

/* ========================================
   7. FOOTER
======================================== */
.site-footer {
  background: #333;
  color: #fff;
  padding: 30px 0;
  margin-top: 40px;
}

.footer-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.site-footer a {
  color: #ccc;
}

.site-footer a:hover {
  color: #fff;
}

/* ========================================
   8. RESPONSIVE
======================================== */
@media (max-width: 1200px) {
  .content-container {
    grid-template-columns: 180px 1fr 180px;
  }
}

@media (max-width: 1024px) {
  .content-container {
    grid-template-columns: 1fr 250px;
  }
  .sidebar-left {
    display: none;
  }
}

@media (max-width: 768px) {
  .content-container {
    grid-template-columns: 1fr;
  }
  .sidebar-right {
    display: none;
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   9. UTILITIES
======================================== */
.text-center {
  text-align: center;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

