/*
Theme Name: Standard Blog
Theme URI: https://example.com/standard-blog
Description: A modern, clean WordPress blog theme with a responsive grid layout, featuring category filtering, pagination, and elegant post cards.
Version: 1.0.0
Author: Manus AI
Author URI: https://example.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: standard-blog
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
*/

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background-color: #f8fafc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #1d4ed8;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', 'Garamond', serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #0f172a;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.5rem;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-title {
  font-family: 'Georgia', 'Garamond', serif;
  font-size: 1.875rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  font-style: italic;
  text-transform: uppercase;
}

.site-title a {
  color: #0f172a;
  transition: color 0.3s ease;
}

.site-title a:hover {
  color: #2563eb;
}

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

.site-navigation {
  display: none;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .site-navigation {
    display: flex;
  }
}

.site-navigation a {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #64748b;
  transition: color 0.3s ease;
}

.site-navigation a:hover {
  color: #2563eb;
}

.site-navigation a.active {
  color: #2563eb;
}

/* ============================================
   SEARCH BUTTON
   ============================================ */

.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: color 0.3s ease;
}

.search-toggle:hover {
  color: #2563eb;
}

.search-toggle svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.site-main {
  flex: 1;
}

/* ============================================
   POSTS GRID
   ============================================ */

.posts-section {
  padding: 4rem 0;
}

.section-title {
  font-family: 'Georgia', 'Garamond', serif;
  font-size: 1.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .posts-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   POST CARD
   ============================================ */

.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease;
}

.post-card:hover {
  transform: translateY(-4px);
}

.post-card a {
  color: inherit;
}

.post-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  background-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease-out;
}

.post-card:hover .post-image img {
  transform: scale(1.1);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.post-category {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #2563eb;
}

.post-date {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.post-separator {
  color: #cbd5e1;
  margin: 0 0.25rem;
}

.post-title {
  font-family: 'Georgia', 'Garamond', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.post-card:hover .post-title {
  color: #2563eb;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e2e8f0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination a {
  border: 1px solid #e2e8f0;
  color: #64748b;
  background-color: transparent;
}

.pagination a:hover {
  border-color: #2563eb;
  color: #2563eb;
  background-color: #f0f9ff;
}

.pagination .current {
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 1rem;
  border-radius: 0.375rem;
}

.pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   SINGLE POST PAGE
   ============================================ */

.single-post {
  padding: 4rem 0 6rem;
}

.post-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

@media (min-width: 1024px) {
  .post-header {
    grid-template-columns: 1fr 1fr;
  }
}

.post-featured-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.post-content-header h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .post-content-header h1 {
    font-size: 2.5rem;
  }
}

.post-meta-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.post-category-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #ffffff;
  background-color: #2563eb;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
}

.post-date-header {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.post-excerpt {
  font-size: 1.125rem;
  color: #475569;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 2rem;
  border-left: 4px solid #2563eb;
  padding-left: 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-style: italic;
}

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

.post-body {
  max-width: 100%;
  margin-bottom: 3rem;
  line-height: 1.8;
  color: #475569;
}

.post-body p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.post-body h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.post-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.5rem;
  margin-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body blockquote {
  border-left: 4px solid #2563eb;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #64748b;
}

.post-body img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
}

/* ============================================
   POST INTERACTIONS
   ============================================ */

.post-interactions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.post-interactions button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background-color: transparent;
  color: #475569;
  cursor: pointer;
  transition: all 0.3s ease;
}

.post-interactions button:hover {
  border-color: #2563eb;
  color: #2563eb;
  background-color: #f0f9ff;
}

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

.post-navigation {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid #e2e8f0;
}

@media (min-width: 768px) {
  .post-navigation {
    grid-template-columns: 1fr 1fr;
  }
}

.nav-post {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.nav-post:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.nav-post-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #f1f5f9;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

.nav-post:hover .nav-post-icon {
  background-color: #f0f9ff;
}

.nav-post-icon svg {
  width: 24px;
  height: 24px;
  color: #94a3b8;
  transition: color 0.3s ease;
}

.nav-post:hover .nav-post-icon svg {
  color: #2563eb;
}

.nav-post-content {
  flex: 1;
}

.nav-post-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.nav-post-title {
  font-family: 'Georgia', 'Garamond', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-post:hover .nav-post-title {
  color: #2563eb;
}

.nav-post.next {
  flex-direction: row-reverse;
  text-align: right;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 3rem 0;
  margin-top: auto;
}

.footer-content {
  text-align: center;
}

.footer-logo {
  font-family: 'Georgia', 'Garamond', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  font-style: italic;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #2563eb;
}

.footer-copyright {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #94a3b8;
}

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

@media (max-width: 768px) {
  h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-header {
    grid-template-columns: 1fr;
  }

  .post-content-header h1 {
    font-size: 1.5rem;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .nav-post {
    flex-direction: column;
    text-align: center;
  }

  .nav-post.next {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}
