/*
Theme Name: Farmer Sztori
Theme URI: https://farmerstori.example.com
Author: Gépész Theme Generator
Description: Engineering-grade layout implementation. Strict 1024px container.
Version: 2.1.0
*/

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@400;600&display=swap');

:root {
  /* USER DEFINED PALETTE */
  --header-bg: #fefefe;
  --site-bg: #f5f4f0;
  --footer-bg: #e5e1d7;
  --card-bg: #fffffd;
  --btn-bg: #b47039;

  --navy: #2B4C7E;
  --text-main: #333333;
  --text-light: #666666;
  --white: #FFFFFF;

  --width: 1024px;
  --radius: 12px;
}

/* RESET */
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: #E0E0E0;
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}

img {
  max-width: 100%;
  display: block;
}

/* LAYOUT WRAPPER */
.site-wrapper {
  max-width: var(--width);
  margin: 0 auto;
  background-color: var(--site-bg);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

/* HEADER */
.site-header {
  background-color: var(--header-bg);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.logo a {
  color: var(--navy);
}

.nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  align-items: center;
}

.nav a:hover {
  color: var(--navy);
}

/* HERO */
.hero-wrap {
  padding: 2rem;
  background-color: var(--site-bg);
}

.hero {
  position: relative;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 1rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  margin: 0 0 0.5rem 0;
  font-weight: 400;
}

.hero p {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  opacity: 0.95;
  font-style: italic;
  margin-bottom: 2rem;
}

/* FORM */
.form {
  background: var(--white);
  padding: 4px;
  border-radius: 100px;
  display: flex;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.form input {
  border: none;
  background: transparent;
  padding: 12px 20px;
  flex: 1;
  outline: none;
  border-radius: 100px 0 0 100px;
}

.form button {
  background-color: var(--btn-bg);
  color: var(--white);
  border: none;
  padding: 12px 30px;
  border-radius: 100px;
  font-weight: 600;
  cursor: pointer;
}

.form button:hover {
  transform: scale(1.02);
}

/* MAIN GRID */
.main {
  padding: 0 2rem 4rem 2rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin: 2rem 0;
  color: var(--text-main);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.card-img {
  aspect-ratio: 1;
  background: #ddd;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.badge {
  background-color: var(--btn-bg);
  color: var(--white);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  align-self: flex-start;
  text-transform: uppercase;
  font-weight: 600;
}

.card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
}

.excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ARCHIVE SPLIT LAYOUT */
.archive-header {
  margin-bottom: 2rem;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badgex {
  background: #E0E0E0;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.badgex.active {
  background: var(--btn-bg);
  color: var(--white);
}

.content-wrapper-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  /* 2/3 + 1/3 */
  gap: 3rem;
  margin-top: 2rem;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* SIDEBAR & WIDGETS */
.sidebar,
.sidebar-article {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.widget-box {
  background: transparent;
}

.search-widget {
  position: relative;
}

.search-widget input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: var(--white);
}

.subscribe-widget {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.subscribe-widget h3 {
  margin-top: 0;
  font-family: 'Playfair Display', serif;
}

.subscribe-widget input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.subscribe-widget button {
  width: 100%;
  background-color: var(--btn-bg);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

.popular-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

.popular-list img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.popular-list a {
  font-weight: 600;
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

/* SINGLE POST SPECIFIC */
.split-layout-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 2rem;
}

.main-article-column {
  background: transparent;
}

.single-featured-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.article-header {
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 2rem;
}

.entry-title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  line-height: 1.1;
  margin: 0.5rem 0;
  color: var(--text-main);
}

.meta-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
}

.author-meta-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.avatar-circle {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.entry-content {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #444;
}

.entry-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.lead-paragraph {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 2rem;
  color: #222;
}

blockquote {
  border-left: 4px solid var(--btn-bg);
  margin: 2rem 0;
  padding-left: 1.5rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--text-main);
  background: #fdfdfd;
  padding: 1rem 1rem 1rem 1.5rem;
}

/* Author Box Bottom */
.author-box-bottom {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  margin-top: 4rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.author-info h3 {
  margin-top: 0;
  font-family: 'Playfair Display', serif;
}

.author-img img {
  border-radius: 50%;
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.author-social {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  font-size: 1.2rem;
}

/* Comments */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #ddd;
}

.comment-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.comment-body {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  flex: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.comment-form-styled {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: var(--radius);
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.comment-form-styled textarea {
  width: 100%;
  height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-family: inherit;
}

.comment-form-styled button {
  background: var(--btn-bg);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

/* Single Sidebar Widgets */
.widget-quote {
  background: var(--card-bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 2rem;
  border-radius: var(--radius);
  font-family: 'Playfair Display', serif;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.widget-quote blockquote {
  border: none;
  padding: 0;
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  background: transparent;
}

.widget-quote cite {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}

.toc-widget ul {
  list-style: none;
  padding: 0;
}

.toc-widget li {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.toc-widget a {
  font-weight: 600;
  font-size: 0.95rem;
}

.social-row-share {
  display: flex;
  gap: 0.5rem;
}

.share-btn {
  width: 40px;
  height: 40px;
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.2rem;
}

.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* FOOTER */
.footer {
  margin-top: auto;
  background-color: var(--footer-bg);
  padding: 3rem 2rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  gap: 2rem;
}

.footer h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.copyright {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
  color: var(--text-light);
}

/* RESPONSIVE */
@media (max-width: 768px) {

  .grid,
  .footer-cols,
  .content-wrapper-split,
  .split-layout-container,
  .grid-2col {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .sidebar-article {
    order: 2;
  }

  /* Push sidebar to bottom on mobile */
  .site-header {
    height: auto;
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}