/*
Theme Name: vican theme
Theme URI: https://vican.ir
Author: mohammad khosravi
Author URI: https://vican.ir
Description: A clean, minimal WordPress theme for Persian blogs with RTL support
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vican-theme
*/

/* Base Styles */
html {
    direction: rtl;
    unicode-bidi: embed;
    scroll-behavior: smooth;
}

body {
    font-family: 'Yekan', Tahoma, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Yekan', Tahoma, Arial, sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004080;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.site-header {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.site-title {
    font-size: 2rem;
    margin: 0;
}

.site-description {
    margin: 0;
    color: #666;
}

.site-content {
    display: flex;
    flex-wrap: wrap;
}

.content-area {
    flex: 1;
    min-width: 0;
    padding-left: 2rem;
}

.widget-area {
    width: 300px;
}

.site-footer {
    background-color: #333;
    color: #fff;
    padding: 2rem 0;
    margin-top: 2rem;
    text-align: center;
}

/* Posts */
.post {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.post-title {
    margin-top: 0;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-thumbnail {
    margin-bottom: 1rem;
}

.post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.post-content {
    margin-bottom: 1rem;
}

.post-tags {
    font-size: 0.9rem;
}


/* Comments */
.comments-area {
    margin-top: 2rem;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Widgets */
.widget {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.widget-title {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.main-navigation li {
    margin-left: 1.5rem;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 3px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pagination .current {
    background-color: #0066cc;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .site-content {
        flex-direction: column;
    }
    
    .content-area {
        padding-left: 0;
    }
    
    .widget-area {
        width: 100%;
    }
}

/* Font Face */
@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

.page-header {
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/**/

/* --- Overall Comment Area Container --- */
.comment-area {
    background-color: #fff; /* White background for the main area */
    border: 1px solid #e0e0e0; /* Light gray border, similar to sidebar widgets */
    border-radius: 4px; /* Slightly rounded corners */
    padding: 25px 30px; /* Ample padding inside the box */
    margin-top: 40px; /* Space above the comment section */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow for depth */
    font-family: Arial, sans-serif; /* A clean, readable font */
    color: #333; /* Dark gray for general text */
}

/* --- Heading for the Comment Section (e.g., "دیدگاهتان را بنویسید") --- */
.comment-area h2 {
    font-size: 24px; /* Larger, prominent heading */
    color: #333; /* Dark color */
    margin-bottom: 25px; /* Space below the heading */
    padding-bottom: 10px; /* Space for an underline effect if desired */
    position: relative; /* For the potential blue line */
}

/* --- Optional: Blue underline for the heading, like "سلام دنیا!" link --- */
/* You might need to adjust the selector here based on the actual HTML */
/* If the heading itself has a class, use that. Otherwise, this is a general approach. */
.comment-area h2::after {
    content: '';
    display: block;
    width: 60px; /* Length of the blue line */
    height: 3px; /* Thickness of the blue line */
    background-color: #007bff; /* Blue color */
    position: absolute;
    bottom: 0;
    left: 0; /* Or right if your layout is RTL and heading is right-aligned */
    margin-bottom: -10px; /* Adjust to place it below the text */
}

/* --- Info text above the comment form (e.g., "به عنوان adminmagi وارد شده‌اید...") --- */
.comment-area .comment-notes { /* WordPress often wraps this in p.comment-notes */
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.comment-area .comment-notes a {
    color: #007bff; /* Blue for links */
    text-decoration: none; /* No underline by default */
}

.comment-area .comment-notes a:hover {
    text-decoration: underline; /* Underline on hover */
}


/* --- Comment Form Fields (Textarea and Input fields) --- */
.comment-area textarea,
.comment-area input[type="text"],
.comment-area input[type="email"],
.comment-area input[type="url"] {
    width: 100%; /* Full width */
    padding: 12px 15px; /* Good padding inside */
    margin-bottom: 15px; /* Space between fields */
    border: 1px solid #ddd; /* Light gray border */
    border-radius: 4px; /* Rounded corners */
    font-size: 16px; /* Readable font size */
    color: #333;
    background-color: #fcfcfc; /* Slightly off-white background */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    transition: border-color 0.3s ease; /* Smooth transition for focus */
}

.comment-area textarea:focus,
.comment-area input[type="text"]:focus,
.comment-area input[type="email"]:focus,
.comment-area input[type="url"]:focus {
    outline: none; /* Remove default focus outline */
    border-color: #007bff; /* Blue border on focus */
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2); /* Subtle blue glow on focus */
}

/* --- Labels for Form Fields (e.g., "دیدگاه", "نام", "ایمیل") --- */
/* WordPress often puts labels inside <p> or <div> with specific classes */
.comment-area label {
    display: block; /* Make label appear on its own line */
    margin-bottom: 8px; /* Space between label and input */
    font-weight: bold; /* Make labels stand out */
    color: #555;
    font-size: 14px;
}


/* --- Submit Button --- */
.comment-area #submit { /* The submit button often has an ID of 'submit' */
    background-color: #007bff; /* Blue background */
    color: #fff; /* White text */
    padding: 12px 25px; /* Good padding */
    border: none; /* No border */
    border-radius: 4px; /* Rounded corners */
    font-size: 16px;
    cursor: pointer; /* Indicate it's clickable */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth hover effect */
    display: inline-block; /* Or block if you want it full width */
    margin-top: 15px; /* Space above the button */
    font-weight: bold;
}

.comment-area #submit:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-1px); /* Slight lift effect */
}

.comment-area #submit:active {
    background-color: #003f80; /* Even darker on click */
    transform: translateY(0); /* Reset position on click */
}

/* --- Styling for Checkboxes (e.g., "ذخیره نام، ایمیل و وبسایت من در مرورگر...") --- */
/* This is a bit trickier as the HTML structure varies. */
/* Assuming a simple input checkbox and label */
.comment-area .comment-form-cookies-consent label {
    display: inline-block; /* Keep label next to checkbox */
    font-weight: normal; /* Normal weight for consent text */
    margin-left: 5px; /* Space between checkbox and text */
}

.comment-area .comment-form-cookies-consent input[type="checkbox"] {
    width: auto; /* Don't force full width */
    margin-bottom: 0; /* Remove extra margin */
    vertical-align: middle; /* Align with text */
}


/* --- Error/Success Messages (if any) --- */
/* WordPress often outputs messages in a div or p */
.comment-area .comment-reply-title small a {
    color: #dc3545; /* Red for cancel link */
    text-decoration: none;
    font-size: 14px;
    margin-left: 10px;
}

.comment-area .comment-reply-title small a:hover {
    text-decoration: underline;
}


/* --- Individual Comment Styling (when comments are present) --- */
/* The image doesn't show existing comments, but these are good defaults */
.comment-list {
    list-style: none; /* Remove bullet points */
    padding: 0;
    margin: 0;
}

.comment-body {
    background-color: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative; /* For reply links, etc. */
}

.comment-author {
    font-weight: bold;
    color: #333;
    font-size: 16px;
    margin-bottom: 5px;
}

.comment-metadata {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
}

.comment-metadata a {
    color: #777;
    text-decoration: none;
}

.comment-metadata a:hover {
    text-decoration: underline;
}

.comment-content {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

.comment-content p:last-child {
    margin-bottom: 0; /* Remove extra margin from last paragraph */
}

.reply {
    margin-top: 15px;
    font-size: 14px;
}

.reply a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.reply a:hover {
    text-decoration: underline;
}

/* For nested comments */
.children {
    list-style: none;
    margin-left: 40px; /* Indent child comments */
    padding-left: 0;
    border-left: 2px solid #eee; /* Visual indicator for nesting */
    padding-top: 10px;
}

.children .comment-body {
    background-color: #f7f7f7; /* Slightly different background for nested */
}

/*


*/


@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.04); }
    40% { transform: scale(0.99); }
    60% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.tag-button {
    display: inline-block;
    padding: 8px 14px;
    margin: 5px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.3s ease;
    animation: heartbeat 1.5s infinite; /* انیمیشن تپش */
}

.tag-button:hover {
    background-color: #005f8d;
    color: #fff;
}

.archive-description {
text-align:justify;
padding:0px 8px;
}

@media (max-width: 768px) {
  .widget-area {
    margin-top: 40px; /* یا هر مقداری که دوست داری */
        display: none;
  }
}

/* دکمه منو (همبرگر) پیش‌فرض مخفی */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* منو در حالت دسکتاپ (افقی و عادی) */
#primary-menu {
    display: flex; /* آیتم‌های منو کنار هم */
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* حالت موبایل */
@media (max-width: 1122px) {
    .menu-toggle {
        display: block; /* فقط موبایل نمایش داده بشه */
    }

    #primary-menu {
        position: fixed;
        top: 0;
        right: -260px; /* خارج از صفحه */
        width: 260px;
        height: 100vh;
        background: #fff;
        box-shadow: -2px 0 8px rgba(0,0,0,0.2);
        padding: 50px 0px;
        overflow-y: auto;
        transition: right 0.3s ease-in-out;
        z-index: 100;
        display: block; /* به صورت ستونی */
    }

    #primary-menu.active {
        right: 0; /* موقع باز شدن */
    }

    #primary-menu li {
        margin: 10px 0;
        padding-bottom: 10px;
        padding-right: 10px;
        border-bottom: 1px solid #d8d8d8;
    }
}

/**/

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
    display: none;
  }
  .menu-overlay.active {
    display: block;
  }
  
  .widget-area {
position: relative;
}
.widget-area-content {
position: sticky;
top: 110px;
}
  
  
  .float-cta {
position: fixed;
bottom: 50px;
right: 50px;
background: #4483B4;
padding: 10px 15px;
border-radius: 8px;
color:#fff !important;
transition: background-color 0.3s ease;
    animation: heartbeat 1.5s infinite;
}


/* 
 * 
 * 
 *  */

.wp-block-latest-posts__post-title {
  display: inline-block; /* یا block */
  max-width: 100%;
  margin-right:7px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: middle;
}


/*  
 * 
 * toc
 * 
 * */

.vican-toc {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 10px;
  font-size: 14px;
}

.vican-toc ul {
  margin: 0;
  padding-left: 20px;
}

.vican-toc li {
  margin-bottom: 5px;
}

.vican-toc a {
  text-decoration: none;
  color: #333;
}

.vican-toc a:hover {
  color: #0073aa;
}
/*  */
.vican-toc ul li a {
    display: block;              /* کل متن رو در یک بلاک بگیره */
    white-space: nowrap;         /* نذاره متن بره خط بعد */
    overflow: hidden;            /* متن اضافی رو مخفی کنه */
    text-overflow: ellipsis;     /* آخر متن سه‌نقطه بذاره */
    max-width: 100%;             /* متناسب با عرض کانتینر باشه */
}

.wp-block-latest-posts__featured-image img {
  width: 55px;
  height: 55px;
  object-fit: cover;   /* عکس رو برش میزنه تا توی مربع فیت بشه */
  border-radius: 8px;  /* اختیاری: گرد کردن گوشه‌ها */
}


