/*
Theme Name: Teacher Theme
Theme URI: https://teachernjt.ir
Author: Narjes.N
Author URI: https://blog.teachernjt.ir
Description: personal teacher theme
Version: 1.0
Text Domain: bayan2wp
*/
/* ===============================
   FONT
================================= */
@font-face {
  font-family: Sabnam;
  src: url("https://blogix.ir/assets/font/shabnam/shabnam.eot"),
       url("https://blogix.ir/assets/font/shabnam/shabnam.eot?#iefix") format("embedded-opentype"),
       url("https://blogix.ir/assets/font/shabnam/shabnam.woff2") format("woff2"),
       url("https://blogix.ir/assets/font/shabnam/shabnam.woff") format("woff"),
       url("https://blogix.ir/assets/font/shabnam/shabnam.ttf") format("truetype");
  font-weight: normal;
  font-display: swap;
}



/* ===============================
   ROOT VARIABLES
================================= */
:root {
  --color-background: #F9F2D1;
  --color-surface: #FFFFFF;
  --color-primary: #ED8582;
  --color-accent: #A6D2EC;
  --color-highlight: #AEDFBE;
  --color-text: #585A3E;

  --border-radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ===============================
   GLOBAL
================================= */
* {
  box-sizing: border-box;
}

body {
  font-family: Sabnam;
  background-color: var(--color-background);
  color: var(--color-text);
  margin: 0;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===============================
   CONTAINER
================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5 20px;
}

/* ===============================
   HEADER
================================= */
header {
    position: fixed;
    display: flex;             
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    height: 3rem;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #f9f2d18f;   
    padding: 0 20px;             
    box-sizing: border-box;
}

.logo a {
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--color-text);
}
.logo a:hover{
  color: var(--color-highlight);
}

/* ===============================
   NAVIGATION
================================= */
nav{
    position: relative;
    list-style: none;
    display: flex;
    justify-content: center;
    text-align: center;
    gap: 10px;
    text-transform: uppercase;
    transition: all 0.2s;
    margin: 0 auto;
    z-index: 2;
}

nav ul {
    display: flex;
    gap: 15px;
    list-style-type: none;
    padding: 0;
    margin-top: .75rem;
}

nav a {
  text-decoration: none;
  color: var(--color-text);
  padding: 6px 12px;
  border-radius: 999px;
  transition: 0.2s;
}

header nav a:hover {
  background: var(--color-accent);
  color: #fff;
}

header nav a.selected,
header nav a.current {
  background: var(--color-primary);
  color: #fff;
}


/* ===============================
   BUTTONS
================================= */
.btn {
  padding: 10px 20px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background-color: var(--color-accent);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

/* ===============================
   HERO
================================= */
.hero {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 5rem;
  margin-bottom: 60px;
  background-color: #f2d2972c;
  padding: 0 35px 0 0;
  border-radius: 15px;
}

.hero-text {
  flex: 1;
}

.hero-text h2 {
  font-size: 2.8rem;
  line-height: 1.3;
  margin: 0;
}
.hero-text h2 a:hover{ color: var(--color-highlight);}

.short-description {
  font-size: 1rem;
  margin-top: 10px;
  color: rgba(88,90,62,0.85);
}

.connect {
  margin-top: 30px;
}

.connect h4 {
  margin-bottom: 10px;
}

/* ------------------------------
   HERO IMAGE BIGGER (NEW)
--------------------------------*/
.hero-image {
  flex: 1;
}

.hero-image img {
  width: 95%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transform: scale(1.1);
  transform-origin: center;
}

/* ===============================
   MAIN LAYOUT
================================= */
.main-content {
  display: flex !important;
  flex-direction: row-reverse;
  gap: 20px;
  width: 100%;
  align-items: flex-start;
}

.main-content > .sidebar {
  flex: 0 0 30%;
  max-width: 320px;
}

.main-content > .blog-feed {
  flex: 1 1 70%;
  min-width: 0;
}

/* SIDEBAR */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
	    font-size: 0.85rem;
}

/* BLOG FEED */
.blog-feed {
  width: 70%;
  display: flex;
  flex-direction: column;
  gap: 30px;
	    font-size: 0.85rem;
}


/* ===============================
   WIDGET
================================= */
.widget {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.widget h3 {
  margin-top: 0;
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.1rem;
  background-color: var(--color-background);
  padding: 8px;
  border-radius: 10px;
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
    font-size: 0.85rem;
}

.widget ul li {
  margin-bottom: 8px;
}

.widget a {
  text-decoration: none;
  color: var(--color-text);
}

.widget a:hover {
  color: var(--color-primary);
}

/* ===============================
   ABOUT ME
================================= */
.profile-pic{
  text-align: center;
}
.profile-pic img {
  width: 120px;
  height: 120pxu;
  border-radius: 50%;
  border: 4px solid var(--color-highlight);
  object-fit: cover;
  margin-bottom: 10px;
}

.description {
      font-size: 0.85rem;
  text-align: center;
}

/* ===============================
   RECENT COMMENTS
================================= */
.recent-comments li {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-comments img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: 8px;
}

/* ===== TAG CLOUD STYLES ===== */
.tagcloud-parent ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
    background-color: transparent;
}

.tagcloud-parent ul li {
    display: inline-block;
    border-bottom: none;
    padding: 0;
}

.tagcloud-parent ul li a {
    display: inline-block;
    background-color: var(--color-accent);
    color: #fff;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--color-background);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tagcloud-parent ul li a:hover {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* ===============================
   POST CARD
================================= */


/* چیدمان کلی: سایدبار + محتوا */
.main-content {
    display: flex;
    gap: 20px;
}

/* ستون محتوای پست (هم متن هم کامنت‌ها) */
.main-content .content {
    width: 72%;
    background: #ffffff;          /* بکگراند سفید مثل صفحه اصلی */
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: justify;
	    font-size: 0.85rem;
}

/* خود سایدبار کنار آن */
.main-content .sidebar {
    width: 28%;
}
/* فقط در صفحه تکی پست‌ها */
.single-post article.post {
    margin: 0;
}

.post-title {
    text-align: center;
    margin-bottom: 15px;
	 color: var(--color-primary);
}

.post-meta {
    text-align: justify;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 25px;
}

.post-content {
    line-height: 1.9;
    font-size: 0.85rem;
    color: #777;
}



.post-card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease;
    padding: 20px;
}

.post-card
.post-content
.post-meta
.single-post img,video {
    max-width: 90% !important;
    height: auto !important;
    object-fit: contain;
	border-radius: 10px;
}
.post-card .comments {
    width: 80%;
    margin: 0 auto;
}

.post-image {
  width: 90%;
  border-radius: 15%;
}

.post-content {
  padding: 20px;
   border-bottom: 1px solid #e5e5e5; 
}
.post-content a {
  color: var(--color-accent);
}
.post-content a:hover {
  color: var(--color-primary);
}
.posttags a{
  color: var(--color-primary);
  padding: 5px;
}
.posttags a:hover{
  color: var(--color-accent);
}
.more-link{
    margin: 10px;
}
.more-link a{
  padding: 8px;
  color: var(--color-text);
  background-color: var(--color-accent);
  border-radius: 8px;
}

.more-link a:hover{
  color: #FFFFFF;
  background-color: var(--color-primary);
}
.post-card h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.post-card h2 a {
  text-decoration: none;
  color: var(--color-primary);
  padding: 8px;
}

.post-card h2 a:hover {
  color: var(--color-accent);
}

.post-meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 10px;
}

.post-excerpt {
  font-size: 0.95rem;
}
.blog-feed {
    width: 90%;
    margin: 0 auto;
    text-align: justify;
}
.blog-feed .rad a{
  display: block;
  text-align: center;
    background-color: var(--color-background);
  color: var(--color-text);
  padding: 12px;
}


/* Comments Styles */
/* پاک کردن استایل عجیب قبلی جعبه کامنت‌ها */
.post.mb.rad {
    background: transparent;
    border: none;
    margin-bottom: 0;
    backdrop-filter: none;
}

/* کانتینر کلی لیست دیدگاه‌ها */
#comments {
    margin-top: 40px;
}

/* عنوان بخش دیدگاه‌ها */
#comments h2 {
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: right;
}

/* هر کامنت جداگانه */
.comment {
    background: #ffffff;
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

/* اطلاعات نویسنده و تاریخ کامنت */
.comment .comment-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
}

/* متن خود کامنت */
.comment .comment-content {
    font-size: 0.85rem;
    color: #333;
}

/* لینک «پاسخ» */
.comment .reply {
    margin-top: 10px;
    text-align: left;
}

.comment .reply a {
    font-size: 0.8rem;
    color: var(--color-highlight);
}

/* تفاوت ظاهری بین کامنت اصلی و پاسخ‌ها */
.comment .children {
    margin-top: 10px;
    margin-right: 15px; /* برای فارسی: کمی تو رفتگی پاسخ */
    border-right: 2px solid #eee;
    padding-right: 10px;
}
/* جعبه فرم ارسال دیدگاه */
#respond {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}
.avatar{
    border-radius:50%;
    width:48px;
    height:48px;
    object-fit:cover;
}
.comment-author{
    display:flex;
    align-items:center;
    gap:10px;
}

/* عنوان فرم */
#respond h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: right;
}

/* فاصله بین فیلدها */
.comment-form p {
    margin-bottom: 12px;
}

/* فیلدهای ورودی */
.comment-form input,
.comment-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fafafa;
    transition: all 0.2s ease;
}

/* وقتی کاربر داخل فیلد کلیک می‌کند */
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-highlight);
    background: #ffffff;
}

/* ارتفاع textarea */
.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* دکمه ارسال */
.comment-form .submit {
    background: var(--color-highlight);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
}

/* هاور دکمه */
.comment-form .submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* متن توضیحی فرم */
.comment-notes {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 10px;
}


/* ===== PAGINATION STYLES ===== */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination ul {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.pagination li {
    list-style: none;
}

.pagination a {
    display: inline-block;
    background-color: var(--color-accent);
    border: 2px solid var(--shadow);
    color: var(--color-text);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

.pagePrev, .pageNext {
    font-weight: bold;
}


/* ===============================
   UTILITY CLASSES
================================= */
.box {
  background: var(--color-surface);
}

.mb {
  margin-bottom: 20px;
}

.rad {
  border-radius: var(--border-radius);
}

/* ===============================
   FOOTER — TWO COLUMN (NEW)
================================= */
.site-footer {
    text-align: center;
    padding: 25px 10px;
    color: #555;
    background: transparent;
    margin-top: 40px;
    font-size: 14px;
}

.site-footer p {
    margin: 5px 0;
}

.footer-credit {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.85;
    color: #666;
}

.footer-credit span {
    font-weight: 600;
    color: #2a8f6b;
}

/* ===== MESSAGE STYLES ===== */
.message {
    padding: 15px 10px;
    text-align: center;
    background-color: var(--color-background);
    border: 2px solid var(--color-primary);
    border-radius: 10px;
    margin-bottom: 20px;
}

.message h3 {
      padding: 15px 10px;
    margin: 0;
    color: var(--color-text);
    font-size: 18px;
}
/* ===============================
   NEWSLETTER POPUP
================================= */

#newsletter-popup {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  display: none;                /* پیش‌فرض مخفی */
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);  /* پس‌زمینه تیره شفاف */
  z-index: 9999;
}

.newsletter-box {
  background: #ffffff;
  padding: 24px 28px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  max-width: 380px;
  width: 90%;
  text-align: center;
  direction: rtl;
}

.newsletter-box h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.4rem;
  color: var(--color-text);
}

.newsletter-box p {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: #666;
}

#newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#newsletter-email {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-family: inherit;
  font-size: 0.9rem;
}

#newsletter-email:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(237,133,130,0.2);
}

#newsletter-form button {
  padding: 10px 12px;
  border-radius: 999px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#newsletter-form button:hover {
  background: #e36b67;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

#newsletter-msg {
  margin-top: 10px;
  font-size: 0.9rem;
  color: green;
}

#newsletter-popup.show .newsletter-box {
  animation: newsletter-pop 0.28s ease-out;
}

@keyframes newsletter-pop {
  from {
    transform: translateY(10px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
/* ===============================
   MOBILE RESPONSIVE (popup)
================================= */

@media (max-width: 780px) {

  #newsletter-popup {
    padding: 20px; /* کمی فاصله برای جلوگیری از چسبیدن به لبه صفحه */
  }

  .newsletter-box {
    width: 100%;
    max-width: 320px;     /* در موبایل کوچک‌تر شود */
    padding: 20px 22px;   /* پدینگ کمتر */
    border-radius: 12px;
  }

  .newsletter-box h3 {
    font-size: 1.2rem;
  }

  .newsletter-box p {
    font-size: 0.85rem;
  }

  #newsletter-email {
    font-size: 0.85rem;
    padding: 9px 10px;
  }

  #newsletter-form button {
    font-size: 0.9rem;
    padding: 9px 10px;
  }

  #newsletter-msg {
    font-size: 0.85rem;
  }
}


/* =================================
MOBILE RESPONSIVE + SIDEBAR
================================= */

@media (max-width:800px){

body{
    font-size:14px;
}

/* =====================
HEADER
===================== */

header.container{
    width:92%;
    margin:10px auto;

    display:flex;
    align-items:center;
    justify-content:space-between;

    position:sticky;
    top:0;
    z-index:1000;
}

.logo{
    flex-grow:1;
}

/* =====================
HAMBURGER
===================== */

.sidebar-toggle{
    display:flex;
    flex-direction:column;
    justify-content:center;

    background:none;
    border:none;
    cursor:pointer;
    padding:8px;
}

.sidebar-toggle .bar{
    width:24px;
    height:3px;
    background:#333;
    margin:3px 0;
    border-radius:2px;
}

/* =====================
NAV
===================== */

.sidebar .main-nav{
    display:block;
    margin-top:20px;
	width: 100%;
}

.sidebar .main-nav ul{
    list-style:none;
    padding:0;
}

.sidebar .main-nav li{
    margin-bottom:14px;
}

.sidebar .main-nav a{
    font-size:18px;
    color:#333;
    text-decoration:none;
}

/* =====================
HERO
===================== */

.hero{
    width:100%;
    padding:0 20px;
    margin:25px auto 40px auto;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    box-sizing:border-box;
}


.hero-image{
    width:97%;
    display:flex;
    justify-content:center;
	text-align:center;
}

.hero-image img{
    display:block;
    max-width:100%;
    height:auto;
    margin:0 auto;
}

.hero-text{
    margin-top:15px;
}

.hero-text h2 a{
    font-size:26px;
}

.short-description{
    font-size:16px;
}

/* =====================
MAIN CONTENT
===================== */

main.container{
    width:100%;
    padding:0;
}

.main-content{
    width:92%;
    margin:auto;
    display:block;
}

.blog-feed,
.post-content,
.main-content .content{
    width:100%;
}

.post-card{
    padding:12px 8px;
}

.post-card h2{
    font-size:17px;
}

/* =====================
SIDEBAR PANEL
===================== */
.sidebar{

    position:fixed;

    top:0;
    left:0;

    width:50vw;
    max-width:360px;
    min-width:260px;
height:100dvh;
overflow-y:auto;

    backdrop-filter:blur(14px);
    background:rgba(215, 198, 166, 0.297);

    padding:25px 20px;

    z-index:9999;

    transform:translateX(-100%);
    transition:transform .35s ease;
}

.sidebar.sidebar-open{
    transform:translateX(0);
}

/* =====================
BACKDROP
===================== */

.sidebar-backdrop{

    position:fixed;
    inset:0;

    background:rgba(0,0,0,0.4);

    opacity:0;
    visibility:hidden;

    transition:opacity .25s ease;

    z-index:9998;
}

.sidebar-backdrop.active{
    opacity:1;
    visibility:visible;
}

/* =====================
FOOTER
===================== */

footer{
    width:92%;
    margin:30px auto;
}

}

/* =====================
DESKTOP SINGLE FIX
===================== */

@media (min-width:801px){

.single .main-content .content{
    width:72%;
}

.single .main-content .sidebar{
    width:28%;
}

}
