/*
Theme Name: 1eyeguy
Theme URI: https://example.com/1eyeguy
Author: Jeff
Author URI: https://example.com
Description: A bold, symmetrical WordPress theme with dual sidebars, dynamic post grid, and strong personal branding.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oneeyeguy
*/

/* Reset & Base */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #fff;
  color: #333;
}

a {
  color: #c00;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  width: 100%;
  background: #000;
  color: #fff;
  padding: 20px 0;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.header-image {
  margin-bottom: 20px;
}

.header-image img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

.site-title {
  font-size: 2em;
  margin: 0;
}

.site-title a {
  color: #fff;
  text-decoration: none;
}

.site-description {
  font-size: 1em;
  margin-top: 5px;
  color: #ccc;
}

.primary-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
  justify-content: center;
}

/* Layout - FIXED WIDTH */
.layout {
  display: flex;
  gap: 20px;
  width: 100%;
  padding: 20px;
  max-width: 1400px; /* REDUCED from 1600px */
  margin: 0 auto;
}

.site-main {
  flex: 1;
  min-width: 0; /* Allow main to shrink */
  max-width: calc(100% - 400px); /* Account for both sidebars + gaps */
}

/* Sidebars optimized for skyscraper ads */
.sidebar {
  width: 180px; /* Perfect for 120x600 and 160x600 ads */
  flex-shrink: 0; /* Don't let sidebars shrink */
}

.sidebar-left {
  order: -1;
}

.widget {
  margin-bottom: 30px;
}

.widget-title {
  font-size: 1.2em;
  margin-bottom: 10px;
}

/* Ad Widget Styling */
.widget-ad {
  text-align: center;
  margin-bottom: 30px;
  max-width: 160px;
  margin-left: auto;
  margin-right: auto;
}

.widget-ad .eyeguy-ad-widget {
  margin: 0 auto;
}

/* Specific sizing for skyscraper formats */
.widget-ad .eyeguy-format-skyscraper {
  max-width: 120px;
}

.widget-ad .eyeguy-format-wide_skyscraper {
  max-width: 160px;
}

/* Latest Post with First Image */
.latest-post {
  margin-bottom: 40px;
  overflow: hidden;
  clear: both;
}

.latest-post-wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* First Image from Content - Controlled Size */
.post-first-image {
  flex: 0 0 auto;
  max-width: 250px; /* Maximum width */
  max-height: 200px; /* Maximum height */
  overflow: hidden;
}

.post-first-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Crops image to fit without distortion */
  display: block;
}

/* Content Section */
.post-content-preview {
  flex: 1;
  min-width: 0; /* Allows text to wrap */
}

.latest-post .post-title {
  font-size: 2.2em;
  margin-bottom: 15px;
}

.latest-post .post-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

.latest-post .entry-content {
  font-size: 1.05em;
  line-height: 1.6;
}

.latest-post .read-more {
  display: inline-block;
  margin-top: 10px;
  color: #c00;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .latest-post-wrapper {
    flex-direction: column;
  }
  
  .post-first-image {
    max-width: 100%;
    max-height: 250px;
  }
}

/* Post Grid - Keep this the same */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  clear: both;
}
/* Post Grid - FORCE 3 COLUMNS */
.post-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important; /* Force exactly 3 equal columns */
  gap: 15px !important; /* Reduced gap */
  margin-top: 40px;
  clear: both;
  width: 100%;
  max-width: 100%;
}

.grid-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.grid-item {
  border: 1px solid #ccc;
  padding: 15px;
  background: #f9f9f9;
  transition: box-shadow 0.3s ease;
  min-width: 0; /* Allow items to shrink */
}

.grid-item:hover {
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.grid-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
}

.grid-item h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
  word-wrap: break-word;
}

/* Single Post */
.float-image-left {
  float: left;
  margin: 0 20px 20px 0;
  max-width: 40%;
}

.float-image-right {
  float: right;
  margin: 0 0 20px 20px;
  max-width: 40%;
}

.image-full {
  display: block;
  margin: 20px auto;
  max-width: 100%;
}

.post-title {
  font-size: 2em;
  margin-bottom: 10px;
}

.post-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 20px;
}

.post-content {
  margin-bottom: 30px;
}

.post-tags {
  margin-top: 20px;
  font-style: italic;
}

/* Post Categories */
.post-categories {
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid #eee;
  font-size: 14px;
}

.post-categories a {
  color: #c00;
  text-decoration: none;
  margin-right: 5px;
}

.post-categories a:hover {
  text-decoration: underline;
}

.post-categories a:after {
  content: ",";
  margin-right: 5px;
}

.post-categories a:last-child:after {
  content: "";
}

/* Page */
.page-title {
  font-size: 2em;
  margin-bottom: 20px;
}

.page-content {
  margin-bottom: 30px;
}

/* Archive & Search */
.archive-title,
.search-title {
  font-size: 2em;
  margin-bottom: 20px;
}

.archive-description {
  margin-bottom: 30px;
}

.post-excerpt {
  margin-bottom: 20px;
}

/* Pagination */
.pagination {
  margin-top: 40px;
  text-align: center;
}

.pagination .page-numbers {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 12px;
  background: #eee;
  color: #333;
}

.pagination .current {
  background: #c00;
  color: #fff;
}

/* 404 */
.error-title {
  font-size: 2em;
  margin-bottom: 10px;
}

.error-message {
  margin-bottom: 20px;
}

/* Footer */
.site-footer {
  background: #f0f0f0;
  text-align: center;
  padding: 20px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Restaurant Info Box */
.restaurant-info-box {
  background: #f8f8f8;
  border: 2px solid #e0e0e0;
  padding: 25px;
  margin: 30px 0;
  border-radius: 10px;
}

.restaurant-info-box h3 {
  margin-top: 0;
  color: #333;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.info-item {
  padding: 10px;
  background: white;
  border-radius: 5px;
}

.restaurant-features {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.feature-tag {
  display: inline-block;
  background: #c00;
  color: white;
  padding: 5px 12px;
  margin: 5px 5px 5px 0;
  border-radius: 20px;
  font-size: 14px;
}

/* Signature Dishes */
.signature-dishes-box {
  background: #fff;
  border: 2px solid #c00;
  padding: 25px;
  margin: 30px 0;
  border-radius: 10px;
}

.dishes-list {
  margin-top: 15px;
}

.dish-item {
  padding: 15px;
  background: #f8f8f8;
  border-radius: 5px;
  border-left: 4px solid #c00;
  margin-bottom: 15px;
}

.dish-item:last-child {
  margin-bottom: 0;
}

.dish-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.dish-price {
  color: #c00;
  font-weight: bold;
}

.dish-description {
  margin: 0;
  color: #666;
  font-size: 14px;
}

/* Directory Pages */
.directory-listings {
  margin-top: 30px;
}

.directory-item {
  border-bottom: 1px solid #eee;
  padding: 20px 0;
}

.directory-item:last-child {
  border-bottom: none;
}

.directory-item h3 {
  margin: 0 0 10px 0;
  font-size: 1.4em;
}

.directory-item h3 a {
  color: #333;
  text-decoration: none;
}

.directory-item h3 a:hover {
  color: #c00;
}

.directory-item p {
  margin: 0;
  color: #666;
}

/* Homepage Ad Banner */
.homepage-ad-banner {
  margin: 40px auto;
  text-align: center;
  max-width: 100%;
}

.homepage-ad-banner .eyeguy-ad-widget {
  display: inline-block;
}

/* Post Content Ad */
.post-content-ad {
  margin: 30px auto;
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.post-content-ad .eyeguy-ad-widget {
  display: inline-block;
}

/* Page Content Ad */
.page-content-ad {
  margin: 30px auto;
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

/* Comments */
.comments-area {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #eee;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}

/* Search Form */
.search-form {
  margin: 20px 0;
}

.search-form input[type="search"] {
  padding: 10px;
  width: 70%;
  border: 1px solid #ddd;
}

.search-form input[type="submit"] {
  padding: 10px 20px;
  background: #c00;
  color: white;
  border: none;
  cursor: pointer;
}

/* Responsive Design */
@media (min-width: 1400px) {
  .layout {
    max-width: 1400px; /* Keep at 1400px max */
  }
  
  .sidebar {
    width: 200px; /* Slightly wider for large screens */
  }
}

@media (max-width: 1200px) {
  .layout {
    max-width: 1200px;
  }
  
  .sidebar {
    width: 180px;
  }
  
  .post-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    order: 2;
  }
  
  .sidebar-left {
    order: 2;
  }
  
  .site-main {
    order: 1;
    max-width: 100%;
  }
  
  .post-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Center skyscraper ads on mobile */
  .widget-ad {
    max-width: 100%;
  }
  
  /* Stack latest post on mobile */
  .latest-post-wrapper {
    flex-direction: column !important;
  }
  
  .latest-post-wrapper .post-thumbnail {
    flex: 1 1 auto !important;
    max-width: 100% !important;
    min-width: 100% !important;
    width: 100% !important;
  }
  
  /* Mobile menu */
  .primary-menu {
    flex-direction: column;
    gap: 10px;
  }
  
  /* Mobile homepage ad */
  .homepage-ad-banner {
    margin: 20px auto;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 10px;
  }
  
  .layout {
    padding: 10px;
  }
  
  .site-title {
    font-size: 1.5em;
  }
}