/*
Theme Name: Porteghaal Blog
Theme URI: https://porteghaal.ir
Author: Porteghaal
Description: مینیمال، راست‌چین و هماهنگ با لندینگ پرتقال برای بلاگ.
Version: 1.0.0
Text Domain: porteghaal-blog
*/

/* Reset ساده */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  direction: rtl;
  unicode-bidi: embed;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Vazirmatn",
    "IRANSans", sans-serif;
  background-color: #ffffff;
  color: #111827;
  line-height: 1.7;
}

:root {
  --porteghaal-primary: #ff7a00;
  --porteghaal-primary-dark: #e06700;
  --porteghaal-bg: #ffffff;
  --porteghaal-muted: #6b7280;
  --porteghaal-border: #e5e7eb;
  --porteghaal-radius-lg: 18px;
  --porteghaal-radius-md: 12px;
  --porteghaal-radius-sm: 8px;
  --porteghaal-shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --container-width: 1080px;
}

a {
  color: var(--porteghaal-primary);
  text-decoration: none;
}

a:hover {
  color: var(--porteghaal-primary-dark);
}

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

.porteghaal-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* هدر */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1.25rem;
}

.site-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.25rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.1rem;
}

.site-logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ffe0bf, #ff7a00);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
}

/* وردپرس: لوگوی سفارشی */
.custom-logo-link,
.custom-logo {
  display: block;
}

.site-branding img.custom-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.site-title-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-title-text small {
  font-size: 0.7rem;
  color: var(--porteghaal-muted);
  font-weight: 500;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header-panel {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-menu-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.2rem;
}

.site-menu-toggle-box {
  width: 24px;
  height: 18px;
  position: relative;
  display: inline-block;
}

.site-menu-toggle-bar,
.site-menu-toggle-bar::before,
.site-menu-toggle-bar::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background-color: #111827;
  content: "";
  transition: transform 0.18s ease-out, opacity 0.18s ease-out,
    top 0.18s ease-out, bottom 0.18s ease-out;
}

.site-menu-toggle-bar {
  top: 50%;
  transform: translateY(-50%);
}

.site-menu-toggle-bar::before {
  top: -6px;
}

.site-menu-toggle-bar::after {
  bottom: -6px;
}

body.is-menu-open .site-menu-toggle-bar {
  transform: rotate(45deg);
}

body.is-menu-open .site-menu-toggle-bar::before {
  top: 0;
  opacity: 0;
}

body.is-menu-open .site-menu-toggle-bar::after {
  bottom: 0;
  transform: rotate(-90deg);
}

.site-nav {
  margin-inline: 1.5rem;
}

.site-nav-list {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.site-nav-list a {
  color: #4b5563;
}

.site-nav-list a:hover {
  color: var(--porteghaal-primary);
}

.btn,
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease-out;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #ff7a00, #ff9f3f);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(248, 113, 113, 0.4);
}

.btn-outline {
  background: transparent;
  border-color: rgba(156, 163, 175, 0.4);
  color: #374151;
}

.btn-outline:hover {
  border-color: var(--porteghaal-primary);
  color: var(--porteghaal-primary);
}

/* سکشن هیرو بلاگ */
.hero-blog {
  padding: 3.5rem 0 2.5rem;
}

.hero-blog-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.6fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.06);
  color: var(--porteghaal-primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--porteghaal-primary);
}

.hero-blog-title {
  margin: 1.1rem 0 0.8rem;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.hero-blog-subtitle {
  color: var(--porteghaal-muted);
  font-size: 0.95rem;
  max-width: 34rem;
}

.hero-blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: var(--porteghaal-muted);
}

.hero-blog-meta strong {
  color: #111827;
}

.hero-blog-visual {
  border-radius: 32px;
  background: radial-gradient(
    circle at 20% 0%,
    #ffe4d5,
    #fee2e2 40%,
    #f9fafb 80%
  );
  padding: 1.5rem 1.8rem;
  box-shadow: var(--porteghaal-shadow-soft);
  border: 1px solid rgba(255, 148, 115, 0.25);
}

.hero-blog-visual-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.85);
  color: #f9fafb;
}

.hero-blog-visual-main {
  margin-top: 1.4rem;
}

.hero-blog-visual-main h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.hero-blog-visual-main p {
  margin: 0;
  font-size: 0.85rem;
  color: #374151;
}

/* لیست پست‌ها */
.blog-layout {
  padding-bottom: 4rem;
}

.blog-layout-inner {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.1fr);
  gap: 2.8rem;
  align-items: flex-start;
}

.post-card {
  border-radius: var(--porteghaal-radius-lg);
  border: 1px solid rgba(229, 231, 235, 0.8);
  padding: 1.7rem 1.9rem;
  margin-bottom: 1.5rem;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.03);
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out,
    border-color 0.16s ease-out;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(248, 113, 113, 0.4);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
}

.post-card-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  color: var(--porteghaal-muted);
}

.post-card-excerpt {
  margin: 0.4rem 0 0.9rem;
  color: #4b5563;
  font-size: 0.9rem;
}

.post-card-readmore {
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.post-card-readmore::before {
  content: "←";
  font-size: 0.8rem;
}

.blog-sidebar {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.sidebar-card {
  border-radius: var(--porteghaal-radius-lg);
  border: 1px solid rgba(229, 231, 235, 0.9);
  padding: 1.2rem 1.4rem;
  background: #f9fafb;
}

.sidebar-card h3 {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.sidebar-list a {
  color: #374151;
}

.sidebar-list a:hover {
  color: var(--porteghaal-primary);
}

/* صفحه تکی پست */
.single-wrapper {
  max-width: 720px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
}

.single-header-eyebrow {
  font-size: 0.8rem;
  color: var(--porteghaal-muted);
  margin-bottom: 0.4rem;
}

.single-title {
  font-size: 1.7rem;
  margin: 0 0 0.6rem;
  line-height: 1.4;
}

.single-meta {
  font-size: 0.78rem;
  color: var(--porteghaal-muted);
  margin-bottom: 1.4rem;
}

.single-content {
  font-size: 0.98rem;
  color: #111827;
}

.single-content p {
  margin-bottom: 1.1rem;
}

.single-content h2,
.single-content h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.7rem;
}

.single-content ul,
.single-content ol {
  padding-right: 1.3rem;
  margin-bottom: 1.1rem;
}

/* فوتر */
.site-footer {
  border-top: 1px solid rgba(229, 231, 235, 0.9);
  padding: 1.8rem 0 2.4rem;
  background: #ffffff;
  margin-top: 2.5rem;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--porteghaal-muted);
}

.footer-badges {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.footer-e-namad {
  width: 80px;
  height: 80px;
  border-radius: var(--porteghaal-radius-md);
  border: 1px dashed rgba(209, 213, 219, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* واکنش‌گرا */
@media (max-width: 960px) {
  .site-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .site-header-panel {
    justify-content: space-between;
  }

  .hero-blog-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-blog-visual {
    order: -1;
  }

  .blog-layout-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header-inner {
    padding: 0.7rem 0;
    gap: 0.4rem;
  }

  .site-header-bar {
    width: 100%;
    padding-inline: 0.75rem;
  }

  .site-header-panel {
    display: none;
    width: 100%;
    padding-inline: 0.75rem;
  }

  .site-nav {
    margin: 0;
    width: 100%;
    display: none;
  }

  .site-nav-list {
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 0.4rem;
  }

  .site-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .site-actions .btn,
  .site-actions .btn-primary,
  .site-actions .btn-outline {
    flex: 1 1 150px;
    justify-content: center;
  }

  .site-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: auto;
  }

  body.is-menu-open .site-nav {
    display: block;
  }

  body.is-menu-open .site-header-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hero-blog {
    padding-top: 2.4rem;
  }

  .post-card {
    padding: 1.3rem 1.4rem;
  }
}
