/**
 * Text Color Variables Implementation
 * 
 * This file applies the new text color variables to all text elements throughout the theme.
 * All these colors can be customized from Theme Options → Global Colors.
 * 
 * Available Variables:
 * --body-text-color: Main body text
 * --heading-text-color: All headings and titles  
 * --post-title-color: Post titles specifically
 * --subtitle-text-color: Subtitles and secondary text
 * --meta-text-color: Meta information (dates, authors, etc.)
 * --comments-title-color: Comments section titles
 * --comment-author-color: Comment author names
 * --comment-text-color: Comment content text
 * --comment-meta-color: Comment meta information
 */

/* ==========================================================================
   Body Text
   ========================================================================== */

body,
.entry-content,
.widget-content,
.post-content,
.rmt-post-content {
    color: var(--body-text-color, #333333);
}

/* 
 * Removed global p tag color rules to allow Elementor templates 
 * to override paragraph colors without interference from Redux panel.
 * 
 * If specific p tag color control is needed in the future, 
 * add more targeted selectors like:
 * .blog-content p, .post-excerpt p, etc.
 */

/* ==========================================================================
   Headings and Titles
   ========================================================================== */

/* All headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--heading-text-color, #1a1a1a);
}

/* Specific heading elements */
.rmt-heading-wrapper .rmt-heading-title,
.heading-title,
.section-title,
.widget-title {
    color: var(--heading-text-color, #1a1a1a);
}

/* ==========================================================================
   Post Titles (The main issue you mentioned)
   ========================================================================== */

/* Post title wrapper and text */
.rmt-post-title,
.rmt-post-title a,
.post-title,
.entry-title,
.entry-title a {
    color: var(--post-title-color, #1a1a1a) !important;
}

/* Specific post title text spans */
.rmt-title-text,
.title-text {
    color: var(--post-title-color, #1a1a1a) !important;
}

/* Post title in different contexts */
.rmt-single-post .rmt-post-title .rmt-title-text,
.post-item .post-title .rmt-title-text,
.archive-post .post-title .rmt-title-text {
    color: var(--post-title-color, #1a1a1a) !important;
}

/* Hover states for post titles */
.rmt-post-title a:hover,
.post-title a:hover,
.entry-title a:hover,
.rmt-title-text:hover {
    color: var(--primary-color, #667eea) !important;
}

/* ==========================================================================
   Subtitles and Secondary Text
   ========================================================================== */

.rmt-subtitle-text,
.subtitle,
.post-subtitle,
.entry-subtitle,
.rmt-heading-wrapper .rmt-heading-subtitle {
    color: var(--subtitle-text-color, #666666);
}

/* ==========================================================================
   Meta Information
   ========================================================================== */

.post-meta,
.entry-meta,
.rmt-post-meta,
.post-date,
.post-author,
.post-category,
.post-tags,
.meta-item,
.meta-text {
    color: var(--meta-text-color, #999999);
}

.post-meta a,
.entry-meta a,
.rmt-post-meta a {
    color: var(--meta-text-color, #999999);
}

.post-meta a:hover,
.entry-meta a:hover,
.rmt-post-meta a:hover {
    color: var(--primary-color, #667eea);
}

/* ==========================================================================
   Comments Section (The specific issue you mentioned)
   ========================================================================== */

/* Comments title - "One Comment", "Leave a Comment", etc. */
.comment-title,
.comment-title .title-text,
.comments-title,
.comment-reply-title,
h3#reply-title {
    color: var(--comments-title-color, #1a1a1a) !important;
}

/* Comment author names */
.comment-author,
.comment-author .fn,
.comment-author a,
.comment-meta .author,
.commentmetadata .author {
    color: var(--comment-author-color, #333333) !important;
}

/* Comment text content */
.comment-content,
.comment-text,
.comment p,
.comment-body p {
    color: var(--comment-text-color, #555555);
}

/* Comment meta (dates, reply links, etc.) */
.comment-meta,
.comment-date,
.reply,
.comment-reply-link,
.commentmetadata,
.comment-edit-link {
    color: var(--comment-meta-color, #999999);
}

.comment-meta a,
.comment-reply-link,
.comment-edit-link {
    color: var(--comment-meta-color, #999999);
}

.comment-meta a:hover,
.comment-reply-link:hover,
.comment-edit-link:hover {
    color: var(--primary-color, #667eea);
}

/* ==========================================================================
   Archive and Blog Listings
   ========================================================================== */

.blog-post .post-title,
.archive-post .post-title,
.search-results .post-title {
    color: var(--post-title-color, #1a1a1a);
}

.blog-post .post-excerpt,
.archive-post .post-excerpt {
    color: var(--body-text-color, #333333);
}

/* ==========================================================================
   Widget Areas
   ========================================================================== */

.widget {
    color: var(--body-text-color, #333333);
}

.widget-title {
    color: var(--heading-text-color, #1a1a1a);
}

.widget ul li {
    color: var(--body-text-color, #333333);
}

.widget ul li a {
    color: var(--body-text-color, #333333);
}

.widget ul li a:hover {
    color: var(--primary-color, #667eea);
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.form-group label,
.comment-form label,
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    color: var(--body-text-color, #333333);
}

.form-group label,
.comment-form label {
    color: var(--heading-text-color, #1a1a1a);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumb,
.breadcrumbs,
.rmt-breadcrumb {
    color: var(--meta-text-color, #999999);
}

.breadcrumb a,
.breadcrumbs a,
.rmt-breadcrumb a {
    color: var(--meta-text-color, #999999);
}

.breadcrumb a:hover,
.breadcrumbs a:hover,
.rmt-breadcrumb a:hover {
    color: var(--primary-color, #667eea);
}

/* ==========================================================================
   Search Results
   ========================================================================== */

.search-results .entry-title,
.search-results .rmt-title-text {
    color: var(--post-title-color, #1a1a1a);
}

.search-results .entry-excerpt {
    color: var(--body-text-color, #333333);
}

/* ==========================================================================
   Archive Pages
   ========================================================================== */

.archive-title,
.page-title,
.archive-description {
    color: var(--heading-text-color, #1a1a1a);
}

/* ==========================================================================
   Navigation Elements
   ========================================================================== */

.post-navigation,
.posts-navigation,
.pagination {
    color: var(--body-text-color, #333333);
}

.post-navigation a,
.posts-navigation a,
.pagination a {
    color: var(--body-text-color, #333333);
}

.post-navigation a:hover,
.posts-navigation a:hover,
.pagination a:hover {
    color: var(--primary-color, #667eea);
}

/* ==========================================================================
   Icon Box and Content Blocks
   ========================================================================== */

.rmt-icon-box-wrapper .rmt-icon-box-title .rmt-title-text {
    color: var(--heading-text-color, #1a1a1a) !important;
}

.rmt-icon-box-wrapper .rmt-icon-box-content {
    color: var(--body-text-color, #333333);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    /* Ensure mobile title visibility */
    .rmt-title-text,
    .title-text,
    .rmt-post-title {
        color: var(--post-title-color, #1a1a1a) !important;
    }
    
    /* Mobile comment styles */
    .comment-reply-title {
        color: var(--comments-title-color, #1a1a1a) !important;
    }
}

/* ==========================================================================
   High Specificity Overrides (for stubborn elements)
   ========================================================================== */

/* Force post title colors */
.rmt-single-post .rmt-post-header .rmt-post-title .rmt-title-text,
.single-post .rmt-post-title .rmt-title-text,
article .rmt-post-title .rmt-title-text {
    color: var(--post-title-color, #1a1a1a) !important;
}

/* Force comment title colors */
.comments-area .comment-title .title-text,
.comments-area #reply-title,
.comment-reply-title {
    color: var(--comments-title-color, #1a1a1a) !important;
}

/* Force heading colors */
.rmt-heading-wrapper .rmt-heading-title h1,
.rmt-heading-wrapper .rmt-heading-title h2,
.rmt-heading-wrapper .rmt-heading-title h3,
.rmt-heading-wrapper .rmt-heading-title h4,
.rmt-heading-wrapper .rmt-heading-title h5,
.rmt-heading-wrapper .rmt-heading-title h6 {
    color: var(--heading-text-color, #1a1a1a) !important;
}