/*
Theme Name: Astrophile Child Theme
Theme URI: https://astrophiles.in
Description: Custom child theme for Astrophile WordPress blog integration
Author: Astrophile Team
Template: generatepress
Version: 1.0.0
Text Domain: astrophile-child
*/

/* 
   Main site styles are loaded from /css/style.css
   This file contains WordPress-specific overrides and blog styling only
*/

/* ===========================
   REMOVE WHITE BACKGROUNDS - CRITICAL
   =========================== */

/* Remove all white backgrounds from GeneratePress and WordPress */
body,
.site,
.site-content,
#page,
#content,
.inside-article,
.entry-content,
.hfeed,
.site-main,
main,
article,
.content-area,
.container,
.generate-columns-container {
    background: transparent !important;
    background-color: transparent !important;
}

/* Remove any padding/margin that creates white blocks */
.site-content {
    padding: 0 !important;
}

.inside-article {
    padding: 0 !important;
    margin: 0 !important;
}

/* Make sure space background shows through */
body {
    background: transparent !important;
}

/* Remove any box shadows that create white appearance */
article,
.post,
.page,
.type-post,
.type-page {
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
}

/* GeneratePress specific overrides */
.inside-site-info {
    background: transparent !important;
}

.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation,
.one-container .site-main {
    background: transparent !important;
    padding: 0 !important;
}

/* Grid containers */
.grid-container,
.inside-top-bar,
.inside-header {
    background: transparent !important;
}

/* ===========================
   WordPress Blog Content Styling
   =========================== */

/* Force all blog text to be readable */
.blog-section,
.single-post,
.archive,
.search-results,
.blog .site-main,
.archive .site-main {
    color: #ffffff !important;
    min-height: calc(100vh - 200px);
    background: transparent !important;
}

/* Blog container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 60px;
    background: transparent !important;
}

/* Blog header section */
.blog-header-section {
    text-align: center;
    margin-bottom: 60px;
}

.blog-main-title {
    font-size: 3em;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(108, 92, 231, 0.5);
}

.blog-subtitle {
    font-size: 1.2em;
    color: #cccccc;
    margin-bottom: 0;
}

/* Blog posts grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Blog post card styling */
.blog-post-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.4);
    border-color: rgba(108, 92, 231, 0.5);
}

/* Post thumbnail */
.post-thumbnail {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* Post content wrapper */
.post-content-wrapper {
    padding: 25px;
}

/* Post meta */
.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #aaaaaa;
}

.post-meta i {
    margin-right: 5px;
    color: #6c5ce7;
}

.post-category a {
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-category a:hover {
    color: #6c5ce7;
}

/* Post title */
.post-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #6c5ce7;
}

/* Post excerpt */
.post-excerpt {
    color: #dddddd;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Read more button */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #ffffff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: linear-gradient(135deg, #5f4fd1, #8b82e6);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(3px);
}

/* No posts message */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    color: #ffffff;
}

.no-posts i {
    font-size: 4em;
    color: #6c5ce7;
    margin-bottom: 20px;
}

.no-posts h2 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #ffffff;
}

.no-posts p {
    font-size: 1.2em;
    color: #cccccc;
    margin-bottom: 30px;
}

.btn-create-post {
    display: inline-block;
    padding: 12px 30px;
    background: #6c5ce7;
    color: #ffffff;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-create-post:hover {
    background: #5f4fd1;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.4);
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.blog-pagination .nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.blog-pagination a,
.blog-pagination span {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-pagination a:hover {
    background: rgba(108, 92, 231, 0.5);
    border-color: rgba(108, 92, 231, 0.8);
    transform: translateY(-2px);
}

.blog-pagination .current {
    background: #6c5ce7;
    border-color: #6c5ce7;
}

.blog-pagination .dots {
    padding: 12px 8px;
    background: transparent;
    border: none;
}

/* Blog post list page */
.blog-page main {
    padding: 80px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}
/* Single post styling */
.single-post .site-main,
.page .site-main,
.archive .site-main,
.blog .site-main {
    background: transparent !important;
    padding: 0 !important;
}

.single-post article,
.page article {
    background: transparent !important;
    padding: 0 !important;
}

.single-post .entry-content,
.page .entry-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    line-height: 1.8;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.4) !important;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.single-post .entry-content p,
.single-post .entry-content li,
.single-post .entry-content h1,
.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4,
.single-post .entry-content h5,
.single-post .entry-content h6 {
    color: #ffffff !important;
}

.single-post .entry-header,
.page .entry-header {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 20px 20px;
    background: transparent !important;
}

.entry-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffffff !important;
    text-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

.entry-meta {
    color: #aaaaaa !important;
    font-size: 0.9em;
    margin-bottom: 30px;
}

.entry-meta a {
    color: #6c5ce7 !important;
    text-decoration: none;
}

.entry-meta a:hover {
    color: #a29bfe !important;
}

/* Blog post excerpts */
.entry-summary {
    color: #ddd;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Read more link */
.read-more {
    color: #6c5ce7;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #a29bfe;
}

/* Blog grid/list */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-post-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

/* Featured image */
.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.pagination a:hover {
    background: rgba(108, 92, 231, 0.5);
}

.pagination .current {
    background: #6c5ce7;
}

/* ===========================
   COMMENTS SECTION STYLING
   =========================== */

.comments-area {
    max-width: 800px;
    margin: 60px auto 40px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.4) !important;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.comments-title,
.comment-reply-title {
    color: #ffffff !important;
    font-size: 1.8em;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(108, 92, 231, 0.5);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-author {
    color: #6c5ce7 !important;
    font-weight: bold;
    margin-bottom: 10px;
}

.comment-metadata {
    color: #aaaaaa !important;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.comment-metadata a {
    color: #aaaaaa !important;
}

.comment-content {
    color: #ffffff !important;
}

.comment-content p {
    color: #ffffff !important;
}

/* Comment Form Styling */
.comment-form {
    margin-top: 30px;
}

.comment-form label {
    color: #ffffff !important;
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 1em;
    transition: all 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #6c5ce7 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input[type="submit"],
.comment-form .submit {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form input[type="submit"]:hover,
.comment-form .submit:hover {
    background: linear-gradient(135deg, #5f4fd1, #8b82e6) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.4);
}

.form-submit {
    margin-top: 20px;
}

/* Comment form text */
.comment-notes,
.logged-in-as,
.comment-form-cookies-consent label {
    color: #cccccc !important;
    font-size: 0.9em;
}

.comment-form-cookies-consent label {
    display: inline !important;
    margin-left: 8px;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: auto !important;
    margin-right: 5px;
}

/* ===========================
   SIDEBAR & WIDGETS STYLING
   =========================== */

.sidebar,
.widget-area,
aside {
    background: transparent !important;
    padding: 0 !important;
}

.widget {
    background: rgba(0, 0, 0, 0.4) !important;
    padding: 25px !important;
    margin-bottom: 30px !important;
    border-radius: 15px !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(108, 92, 231, 0.3) !important;
}

.widget-title {
    color: #ffffff !important;
    font-size: 1.3em;
    margin-bottom: 20px !important;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(108, 92, 231, 0.5);
    text-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
}

/* Widget lists */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.widget a:hover {
    color: #6c5ce7 !important;
    padding-left: 5px;
}

/* Search widget */
.widget_search .search-form {
    display: flex;
    gap: 10px;
}

.widget_search .search-field {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 25px;
    color: #ffffff !important;
    font-size: 0.95em;
}

.widget_search .search-field:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #6c5ce7 !important;
    outline: none;
}

.widget_search .search-submit {
    padding: 12px 25px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget_search .search-submit:hover {
    background: linear-gradient(135deg, #5f4fd1, #8b82e6) !important;
    transform: translateY(-2px);
}

/* Archives widget */
.widget_archive select,
.widget_categories select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px;
    color: #ffffff !important;
    cursor: pointer;
}

/* Recent posts widget */
.widget_recent_entries ul li {
    padding: 12px 0;
}

.widget_recent_entries .post-date {
    display: block;
    color: #aaaaaa !important;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Categories widget */
.widget_categories ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget_categories .count {
    background: rgba(108, 92, 231, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    color: #ffffff;
}

/* Tag cloud widget */
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.widget_tag_cloud a {
    display: inline-block !important;
    padding: 6px 14px !important;
    background: rgba(108, 92, 231, 0.2) !important;
    border-radius: 20px;
    font-size: 0.9em !important;
    transition: all 0.3s ease;
}

.widget_tag_cloud a:hover {
    background: rgba(108, 92, 231, 0.5) !important;
    transform: translateY(-2px);
    padding-left: 14px !important;
}

/* WordPress core styling overrides */
.wp-block-image {
    margin: 30px 0;
}

.wp-block-quote {
    border-left: 4px solid #6c5ce7;
    padding-left: 20px;
    font-style: italic;
    color: #ddd;
}

/* WordPress content is readable on space background */
.blog-page,
.single-post,
.archive,
.search,
body.blog,
body.single-post,
body.archive,
body.search {
    color: #ffffff !important;
}

.blog-page a:not(.read-more-btn),
.single-post a:not(.read-more-btn),
.archive a:not(.read-more-btn),
.search a:not(.read-more-btn) {
    color: #6c5ce7;
    text-decoration: none;
}

.blog-page a:not(.read-more-btn):hover,
.single-post a:not(.read-more-btn):hover,
.archive a:not(.read-more-btn):hover,
.search a:not(.read-more-btn):hover {
    color: #a29bfe;
}

/* Ensure ALL text elements are white */
.blog-section *,
.single-post *,
.archive *,
.search * {
    color: inherit;
}

.blog-section h1,
.blog-section h2,
.blog-section h3,
.blog-section h4,
.blog-section h5,
.blog-section h6,
.blog-section p,
.blog-section span,
.blog-section div,
.single-post h1,
.single-post h2,
.single-post h3,
.single-post h4,
.single-post h5,
.single-post h6,
.single-post p,
.single-post span,
.single-post div {
    color: #ffffff !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .entry-title {
        font-size: 1.8em;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .single-post .entry-content,
    .page .entry-content,
    .single-post .entry-header,
    .page .entry-header {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ===========================
   FIX STICKY BLOG TITLE ISSUE
   =========================== */

.single-post .entry-header {
    position: relative !important;
    top: auto !important;
}

.single-post .entry-header * {
    position: relative !important;
}

/* ===========================
   FIX FEATURED IMAGE LAYERING
   =========================== */

/* Force space background to stay behind */
.space-bg,
.stars {
    z-index: -1 !important;
}

/* Ensure blog content is always above background */
.site,
.site-content,
#page,
#content,
.site-main,
.single-post article,
.single-post .entry-header,
.single-post .entry-content {
    position: relative;
    z-index: 2;
}

/* Ensure featured images are visible */
.single-post .post-thumbnail,
.single-post .wp-post-image {
    position: relative;
    z-index: 3;
}


/* Fix any potential conflicts with main site styles */
.blog-page .container,
.single-post .container {
    /* Ensure WordPress content areas work with your existing container styles */
}