/*
Theme Name: My Custom Theme
Theme URI: https://example.com/my-custom-theme
Author: AI Assistant
Author URI: https://example.com
Description: A modern starter theme for WordPress.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: my-custom-theme
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* Reset & Basic Styles */
:root {
  --primary-color: #333333;
  --text-color: #000000;
  --bg-color: #ffffff;
  --brand-color: #d1111a; 
  --border-color: #e5e5e5;
  --meta-color: #888888;
  --font-family: Arial, Helvetica, sans-serif;
  --font-family-serif: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.5;
}

.site-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header & Navigation */
.site-header {
  background: var(--brand-color);
}

.site-nav {
  display: flex;
  align-items: center;
  padding: 10px 0;
}

.home-icon {
  margin-right: 15px;
}

.home-icon svg {
  fill: var(--bg-color);
}

.home-icon a {
  display: flex;
  align-items: center;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  flex: 1;
}

.site-nav a {
  text-decoration: none;
  color: var(--bg-color);
  font-size: 15px;
  font-weight: bold;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.site-nav a:hover, .site-nav li.current-menu-item > a {
  opacity: 0.8;
  text-decoration: underline;
}

.search-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--bg-color);
}

/* Main Content Area */
.main-news-area {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
}

/* Featured Top Post */
.featured-post {
  display: grid;
  grid-template-columns: 65% 32%;
  gap: 3%;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.featured-post-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.featured-post-content {
  display: flex;
  flex-direction: column;
}

.featured-post-title {
  margin: 0 0 10px 0;
  font-size: 32px;
  font-family: var(--font-family-serif);
  font-weight: bold;
  line-height: 1.3;
}

.featured-post-title a {
  text-decoration: none;
  color: #000000;
}

.featured-post-title a:hover {
  color: var(--brand-color);
}

.featured-post-excerpt {
  font-size: 16px;
  color: #444;
  margin: 0;
}

/* 3 Column Grid Posts */
.grid-posts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.grid-post {
  display: flex;
  flex-direction: column;
}

.grid-post-thumb {
  margin-bottom: 10px;
}

.grid-post-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.grid-post-title {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.3;
}

.grid-post-title a {
  text-decoration: none;
  color: #000000;
}

.grid-post-title a:hover {
  color: var(--brand-color);
}

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

.category-header {
  border-bottom: 2px solid var(--brand-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.category-title {
  background-color: var(--brand-color);
  color: var(--bg-color);
  margin: 0;
  padding: 5px 15px;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
}

.category-title a {
  color: var(--bg-color);
  text-decoration: none;
}

.category-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cat-post {
  display: flex;
  flex-direction: column;
}

.cat-post-thumb {
  margin-bottom: 10px;
}

.cat-post-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.cat-post-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
  line-height: 1.3;
}

.cat-post-title a {
  color: #000000;
  text-decoration: none;
}

.cat-post-title a:hover {
  color: var(--brand-color);
}

/* Single Post Layout */
.single-layout-wrapper {
  display: grid;
  grid-template-columns: 74% 23%;
  gap: 3%;
  margin-top: 40px;
  margin-bottom: 60px;
}

.single-main-content {
  display: flex;
  flex-direction: column;
}

.single-main-content .entry-title {
  font-size: 32px;
  margin-bottom: 15px;
  font-weight: bold;
}

.single-main-content .entry-meta {
  font-size: 14px;
  color: var(--meta-color);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.single-sidebar .widget-title {
  font-size: 20px;
  border-bottom: 2px solid var(--brand-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.sidebar-latest-posts {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sidebar-latest-post {
  display: flex;
  gap: 15px;
  align-items: center;
  border-bottom: 1px dotted var(--border-color);
  padding-bottom: 15px;
}

.sidebar-latest-post:last-child {
  border-bottom: none;
}

.sidebar-thumb {
  width: 80px;
  flex-shrink: 0;
}

.sidebar-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.sidebar-info .sidebar-post-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.sidebar-info .sidebar-post-title a {
  text-decoration: none;
  color: var(--text-color);
}

.sidebar-info .sidebar-post-title a:hover {
  color: var(--brand-color);
}

/* Article Action Bar */
.article-action-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 50px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
  height: max-content;
}

.action-btn-group, .action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #e0e0e0;
  border-radius: 30px;
  background: white;
  width: 44px;
  color: #555;
  cursor: pointer;
}

.action-btn {
  height: 44px;
  border-radius: 50%;
  transition: all 0.2s;
  padding: 0;
}

.action-btn:hover {
  border-color: var(--brand-color);
  color: var(--brand-color);
}

.font-zoom-group {
  padding: 10px 0;
  gap: 8px;
}

.font-zoom-group button {
  background: none;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.font-zoom-group .zoom-indicator {
  font-size: 14px;
  font-weight: bold;
}

.comment-anchor-group {
  border-radius: 20px;
  padding-top: 2px;
  padding-bottom: 5px;
}

.comment-anchor-group .action-btn {
  border: none;
}

.comment-count-indicator {
  font-size: 12px;
  color: #888;
}

.action-divider {
  border: 0;
  border-top: 1px solid #e0e0e0;
  width: 30px;
  margin: 0;
}

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

.comments-header-wrapper {
  margin-bottom: 30px;
}

.comments-title {
  font-size: 24px;
  font-weight: bold;
  margin: 0;
}

.comments-title .red-bar {
  color: var(--brand-color);
  font-weight: 900;
  margin-right: 5px;
}

.comment-input-wrapper {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  padding: 10px;
  border-radius: 5px;
  background: #fdfdfd;
}

.comment-avatar {
  flex-shrink: 0;
}

.comment-avatar img {
  border-radius: 50%;
}

.comment-form-field {
  flex: 1;
}

.comment-form-field textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
}

.form-submit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-limit {
  font-size: 13px;
  color: #666;
  font-weight: bold;
}

.submit-btn.red-btn {
  background-color: var(--brand-color);
  color: white;
  border: none;
  padding: 10px 25px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
}

.submit-btn.red-btn:hover {
  opacity: 0.9;
}

.comment-form-author, .comment-form-email {
  margin-bottom: 10px;
}
.comment-form-author input, .comment-form-email input {
  padding: 10px;
  width: 100%;
  max-width: 300px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 992px) {
  .article-body-wrapper {
    flex-direction: column;
  }
  .article-action-bar {
    flex-direction: row;
    width: 100%;
    position: static;
    justify-content: center;
    margin-bottom: 20px;
  }
  .action-divider {
    transform: rotate(90deg);
  }
  .single-layout-wrapper {
    grid-template-columns: 100%;
  }
  .featured-post {
    grid-template-columns: 100%;
  }
  .featured-post-thumb { margin-bottom: 15px; }
  .category-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .grid-posts-row {
    grid-template-columns: 100%;
  }
  .category-posts-grid {
    grid-template-columns: 100%;
  }
  .site-nav ul {
    display: none; 
  }
}

/* General Layout Fallbacks */
.site-content {
  padding: 40px 0;
}
.post-item {
  margin-bottom: 40px;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 20px;
}
.site-footer {
  padding: 20px 0;
  border-top: 1px solid #eeeeee;
  text-align: center;
  font-size: 14px;
  color: #666666;
}

