/* Frontend Styles for Persian Editor Enhancements */

/* Fix for Latest Posts Block Link Underline and Spacing */
.wp-block-latest-posts__post-title {
    text-underline-offset: 0.4em;
    text-decoration-thickness: 1px;
    text-align: center;
    display: inline-block;
    margin-bottom: 0.5em;
}

/* Adjust spacing between blog posts */
.wp-block-latest-posts li {
    margin-bottom: 1.5em !important;
}

/* Adjust image spacing */
.wp-block-latest-posts__featured-image {
    margin-bottom: 0.5em;
}

/* Base RTL for frontend text */
.entry-content p,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.entry-content li,
.entry-content ol,
.entry-content ul {
    direction: rtl !important;
}

/* Paragraph "Indented" style */
.entry-content p.is-style-indented {
    text-indent: 2em;
}

/* List styles */
.entry-content ul,
.entry-content ol {
    list-style-position: outside;
    padding-right: 2.5em;           /* increased padding for RTL lists */
    padding-left: 0;                /* reset LTR padding */
    margin-right: 0;                /* reset right margin */
}

.entry-content ul {
    list-style-type: disc;          /* disc style for unordered lists */
}

.entry-content ol {
    list-style-type: decimal;       /* decimal style for ordered lists */
}

/* Nested lists support for RTL */
.entry-content ul ul,
.entry-content ul ol,
.entry-content ol ul,
.entry-content ol ol {
    padding-right: 1.5em;           /* indent nested lists */
    margin-right: 0;                /* reset right margin for nested lists */
    margin-left: 0;                 /* reset left margin for nested lists */
}

/* Adjust list style types for nested lists */
.entry-content ul ul {
    list-style-type: circle;        /* second level unordered lists */
}

/* Site Logo Border Radius */
.site-branding a.brand img {
    border-radius: 50px;
}

/* Contact Form 7 - Modern RTL Styling */
.wpcf7-form {
    direction: rtl;
    text-align: right;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    max-width: 700px;
    margin: 2rem auto;
}

.wpcf7-form p {
    margin-bottom: 1.5rem;
}

.wpcf7-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.4rem;
    font-size: 1rem;
    color: #333;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.3s;
    background-color: #f9f9f9;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
    border-color: #0073aa;
    outline: none;
    background-color: #fff;
}

/* Ensure RTL for all form input placeholders */
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
    direction: rtl;
    text-align: right;
    font-family: inherit;
}

.wpcf7-form textarea {
    min-height: 150px;
    resize: vertical;
}

.wpcf7-submit {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.wpcf7-submit:hover {
    background-color: #005b87;
}

/* Latest Posts block – frontend tweaks */
/* Uniform featured image size with cropping */
.wp-block-latest-posts__featured-image img {
	width: 100%;
	height: 250px;              /* set a consistent visual height */
	object-fit: cover;          /* crop to fill without distortion */
	display: block;
    border-radius: 10px; /* add a border radius for rounded corners */
}

/* Justify excerpts for better Persian readability */
.wp-block-latest-posts__post-excerpt {
	text-align: justify;
}

/* Style author and date on same line but separated from title */
.wp-block-latest-posts__post-author,
.wp-block-latest-posts__post-date {
    display: inline;           /* keep author and date inline */
    margin: 0 0.4em;          /* small spacing between author and date */
    font-size: 0.9em;         /* slightly smaller text */
    color: #666;              /* subtle color for meta information */
}

/* Ensure each grid item stacks content vertically cleanly */
.wp-block-latest-posts.is-grid li {
	display: flex;
	flex-direction: column;
}