/*
Theme Name: Marvbazar Personal Theme
Theme URI: https://marvbazar.ir
Author: Marvbazar
Author URI: https://marvbazar.ir
Description: A modern, minimalist WordPress theme inspired by Google's design language. Perfect for personal blogs, portfolios, and business websites.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marvbazar
Tags: one-column, two-columns, right-sidebar, custom-menu, featured-images, theme-options, threaded-comments, translation-ready
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* ===== CSS Variables ===== */
:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Google Sans', sans-serif;
  
  --color-google-blue: #1a73e8;
  --color-google-red: #ea4335;
  --color-google-yellow: #fbbc05;
  --color-google-green: #34a853;
  
  --color-g-gray-50: #f8f9fa;
  --color-g-gray-100: #f1f3f4;
  --color-g-gray-150: #e8eaed;
  --color-g-gray-200: #dadce0;
  --color-g-gray-300: #bdc1c6;
  --color-g-gray-600: #5f6368;
  --color-g-gray-700: #3c4043;
  --color-g-gray-900: #202124;
  --color-g-gray-950: #1a1a1a;
  
  --max-width: 1280px;
  --header-height: 64px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-g-gray-900);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-google-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1557b0;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-g-gray-900);
  margin-bottom: 1rem;
}

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: 1rem;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Top Announcement Bar ===== */
.top-banner {
  background-color: var(--color-g-gray-950);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.top-banner .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-google-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Header & Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-g-gray-150);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-g-gray-900);
}

.site-logo:hover {
  color: var(--color-g-gray-900);
}

.site-logo .logo-icon {
  color: var(--color-google-blue);
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.nav-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-g-gray-700);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  color: var(--color-g-gray-900);
  background-color: var(--color-g-gray-50);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-g-gray-900);
  margin: 5px 0;
  transition: 0.3s;
}

/* ===== Hero Section ===== */
.hero-section {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(180deg, var(--color-g-gray-50) 0%, #ffffff 100%);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--color-g-gray-900) 0%, var(--color-google-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-g-gray-600);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-google-blue);
  color: #ffffff;
  font-weight: 500;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.hero-button:hover {
  background-color: #1557b0;
  color: #ffffff;
}

/* ===== Promotion Ribbon ===== */
.promo-ribbon {
  background-color: var(--color-g-gray-50);
  border-bottom: 1px solid var(--color-g-gray-150);
  padding: 0.875rem 1rem;
  text-align: center;
}

.promo-ribbon p {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-g-gray-700);
  margin: 0;
}

.promo-ribbon strong {
  color: var(--color-g-gray-900);
}

/* ===== Main Content Area ===== */
.site-content {
  display: flex;
  gap: 2rem;
  padding: 2rem 0;
}

.content-area {
  flex: 1;
  min-width: 0;
}

.widget-area {
  width: 320px;
  flex-shrink: 0;
}

/* ===== Posts Grid ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ===== Post Card ===== */
.post-card {
  background: #ffffff;
  border: 1px solid var(--color-g-gray-150);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.post-card-thumbnail {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
}

.post-card-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 1.25rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-g-gray-600);
  margin-bottom: 0.75rem;
}

.post-card-category {
  color: var(--color-google-blue);
  font-weight: 500;
}

.post-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.post-card-title a {
  color: var(--color-g-gray-900);
}

.post-card-title a:hover {
  color: var(--color-google-blue);
}

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--color-g-gray-600);
  margin-bottom: 1rem;
}

.post-card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-google-blue);
}

/* ===== Single Post ===== */
.single-post {
  max-width: 800px;
  margin: 0 auto;
}

.entry-header {
  margin-bottom: 2rem;
}

.entry-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-g-gray-600);
}

.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content img {
  border-radius: 8px;
  margin: 2rem 0;
}

.entry-content blockquote {
  border-left: 4px solid var(--color-google-blue);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-g-gray-700);
}

.entry-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-g-gray-150);
}

/* ===== Sidebar Widgets ===== */
.widget {
  background: var(--color-g-gray-50);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-g-gray-150);
}

.widget ul {
  list-style: none;
}

.widget ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-g-gray-150);
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  color: var(--color-g-gray-700);
  font-size: 0.875rem;
}

.widget ul li a:hover {
  color: var(--color-google-blue);
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--color-g-gray-100);
  border-top: 1px solid var(--color-g-gray-200);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-g-gray-600);
}

.footer-info .compass-icon {
  color: var(--color-google-blue);
}

.footer-copyright {
  font-size: 0.8125rem;
  color: var(--color-g-gray-600);
}

/* ===== Comments ===== */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-g-gray-150);
}

.comment-list {
  list-style: none;
}

.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-g-gray-150);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.comment-author .avatar {
  border-radius: 50%;
}

.comment-metadata {
  font-size: 0.75rem;
  color: var(--color-g-gray-600);
}

.comment-content {
  font-size: 0.9375rem;
}

.comment-respond {
  margin-top: 2rem;
}

.comment-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-g-gray-200);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9375rem;
}

.comment-form input[type="submit"] {
  background-color: var(--color-google-blue);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.comment-form input[type="submit"]:hover {
  background-color: #1557b0;
}

/* ===== 404 Page ===== */
.error-404 {
  text-align: center;
  padding: 4rem 0;
}

.error-404 .page-title {
  font-size: 6rem;
  font-weight: 700;
  color: var(--color-g-gray-200);
  margin-bottom: 1rem;
}

.error-404 .page-content {
  max-width: 500px;
  margin: 0 auto;
}

.error-404 .error-actions {
  margin-top: 2rem;
}

/* ===== Search Form ===== */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
  margin: 2rem auto;
}

.search-form .search-field {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-g-gray-200);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9375rem;
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--color-google-blue);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.search-form .search-submit {
  padding: 0.75rem 1.25rem;
  background-color: var(--color-google-blue);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-form .search-submit:hover {
  background-color: #1557b0;
}

/* ===== Archive Header ===== */
.archive-header {
  padding: 3rem 0;
  text-align: center;
  background: linear-gradient(180deg, var(--color-g-gray-50) 0%, #ffffff 100%);
}

.archive-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.archive-description {
  font-size: 1rem;
  color: var(--color-g-gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Pagination ===== */
.pagination {
  margin-top: 3rem;
  text-align: center;
}

.pagination .nav-links {
  display: inline-flex;
  gap: 0.25rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--color-g-gray-200);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--color-g-gray-700);
  transition: all 0.2s ease;
}

.pagination a:hover {
  background-color: var(--color-g-gray-50);
  color: var(--color-g-gray-900);
}

.pagination .current {
  background-color: var(--color-google-blue);
  border-color: var(--color-google-blue);
  color: #ffffff;
}

/* ===== Post Navigation ===== */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.post-navigation a {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background-color: var(--color-g-gray-50);
  border-radius: 8px;
  max-width: 45%;
  transition: all 0.2s ease;
}

.post-navigation a:hover {
  background-color: var(--color-g-gray-100);
}

.post-navigation .nav-label {
  font-size: 0.75rem;
  color: var(--color-g-gray-600);
  margin-bottom: 0.25rem;
}

.post-navigation .nav-title {
  font-weight: 500;
  color: var(--color-g-gray-900);
}

.post-navigation .nav-next {
  text-align: right;
  margin-left: auto;
}

/* ===== No Posts ===== */
.no-posts {
  text-align: center;
  padding: 3rem 0;
}

.no-posts h2 {
  margin-bottom: 1rem;
}

.no-posts p {
  color: var(--color-g-gray-600);
  margin-bottom: 2rem;
}

/* ===== Tags Links ===== */
.tags-links {
  margin-bottom: 1rem;
}

.tags-links a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--color-g-gray-100);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--color-g-gray-700);
  margin-right: 0.5rem;
  transition: all 0.2s ease;
}

.tags-links a:hover {
  background-color: var(--color-g-gray-200);
  color: var(--color-g-gray-900);
}

/* ===== Footer Widgets ===== */
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-g-gray-200);
}

.footer-widget-area .widget {
  background: transparent;
  padding: 0;
}

.footer-widget-area .widget-title {
  border-bottom: none;
  padding-bottom: 0;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-g-gray-200);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-g-gray-300);
}

/* ===== Animations ===== */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .site-content {
    flex-direction: column;
  }
  
  .widget-area {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .main-navigation {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--color-g-gray-150);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .main-navigation.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-menu {
    flex-direction: column;
    padding: 1rem;
  }
  
  .nav-menu a {
    padding: 0.75rem 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-section {
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
}