/*
Theme Name: SCHDcalc Child Theme
Theme URI: https://www.schdcalc.com
Template: generatepress
Author: Ronan Hayes
Author URI: https://www.schdcalc.com
Description: Child theme for SCHDcalc to implement custom blog and post templates with optimized header and footer
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: schdcalc-child
*/

/* Custom styles for blog and post templates */

/* Author Bio Box Styles */
.author-bio-container {
    margin: 40px 0;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.author-bio-box {
    display: flex;
    align-items: flex-start;
    padding: 24px;
    background-color: #e3dce8;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #4a55e5;
}

.author-image {
    flex: 0 0 auto;
    margin-right: 20px;
}

.author-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-content {
    flex: 1;
}

.author-name {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.author-title {
    margin-bottom: 12px;
    font-size: 14px;
    color: #4a55e5;
    font-weight: 500;
}

.author-description {
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.author-social {
    display: flex;
    align-items: center;
}

.author-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f1f1;
    color: #4a55e5;
    margin-right: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.author-social a:hover {
    background-color: #4a55e5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for author box */
@media (max-width: 600px) {
    .author-bio-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .author-image {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .author-social {
        justify-content: center;
    }
}

/* Blog Template Styles - Updated to match Thrive Agency */
.blog-hero {
    background-color: #1e3a8a;
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 400px; /* Fixed height to match Thrive Agency */
    display: flex;
    align-items: center;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="%231e3a8a"/><path d="M0,50 Q25,30 50,50 T100,50" stroke="%232d4a9a" fill="none" stroke-width="2"/><path d="M0,60 Q25,40 50,60 T100,60" stroke="%232d4a9a" fill="none" stroke-width="2"/><path d="M0,70 Q25,50 50,70 T100,70" stroke="%232d4a9a" fill="none" stroke-width="2"/></svg>');
    background-size: 300px;
    opacity: 0.1;
}

.featured-post {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

@media (min-width: 992px) {
    .featured-post {
        grid-template-columns: 1fr 1fr;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content .post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.featured-content .post-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-content .post-title a:hover {
    color: #f0f0f0;
}

.featured-content .post-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.explore-topics-btn {
    display: inline-block;
    background-color: #ffffff;
    color: #1e3a8a;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.explore-topics-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-label {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-content .post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.caption-title {
    font-weight: 600;
}

.category-navigation {
    margin: 2rem 0;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.category-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f8fafc;
    border-radius: 4px;
    text-decoration: none;
    color: #1e3a8a;
    transition: background-color 0.2s ease;
}

.category-tag:hover {
    background-color: #e2e8f0;
}

/* Latest Posts Section - Updated to match Thrive Agency */
.latest-posts-heading {
    text-align: center;
    margin: 3rem 0 2rem;
    font-size: 2rem;
    color: #1e3a8a;
    font-weight: 700;
    position: relative;
}

.latest-posts-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #1e3a8a;
    margin: 0.5rem auto 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (min-width: 576px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile-friendly adjustments */
@media (max-width: 767px) {
    .blog-hero {
        padding: 2rem 0;
        height: auto;
    }
    
    .featured-content .post-title {
        font-size: 1.8rem;
    }
    
    .featured-content .post-excerpt {
        font-size: 1rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .featured-post {
        padding: 0 1.5rem;
    }
}

/* Post Card Styles - Updated to match Thrive Agency */
.post-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #ffffff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-content .post-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1e3a8a;
    line-height: 1.4;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.post-excerpt {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    flex-grow: 1;
}

.post-date {
    font-weight: 500;
    color: #64748b;
}

.post-author {
    font-weight: 500;
    color: #1e3a8a;
}

/* Post Template Styles */
.post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .post-layout {
        grid-template-columns: 280px 1fr;
    }
}

/* Content Header - Thrive Agency Style */
.content-header {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-bottom: 2rem;
    width: 100%;
}

.content-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 992px) {
    .content-header-inner {
        grid-template-columns: 1fr 1fr;
    }
}

.content-header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-header-text .post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #333;
}

.content-header-text .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.content-header-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-header-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Table of Contents Styles with Mobile Collapsible */
.toc-container {
    position: sticky;
    top: 2rem;
    align-self: start;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.toc-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1e3a8a;
}

.toc-toggle {
    display: none;
    background: none;
    border: none;
    color: #1e3a8a;
    cursor: pointer;
    padding: 0.25rem;
}

.toc-icon {
    transition: transform 0.3s ease;
}

.toc-icon-up {
    display: none;
}

.toc-toggle[aria-expanded="true"] .toc-icon-down {
    display: none;
}

.toc-toggle[aria-expanded="true"] .toc-icon-up {
    display: inline-block;
}

.toc-nav ol {
    list-style-position: inside;
    padding-left: 0;
    margin: 0;
}

.toc-nav li {
    margin-bottom: 0.5rem;
}

.toc-nav a {
    color: #1e3a8a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-nav a:hover {
    color: #4a55e5;
    text-decoration: underline;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Mobile styles for Table of Contents */
@media (max-width: 768px) {
    .toc-toggle {
        display: block;
    }
    
    .toc-container {
        position: relative;
        top: 0;
        margin-bottom: 1.5rem;
    }
}

.post-header {
    margin-bottom: 2rem;
}

.featured-image-container {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    display: none; /* Hide the original featured image container */
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.6;
}

.post-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e3a8a;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.calculator-promo {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border-left: 4px solid #10b981;
}

.calculator-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.calculator-button:hover {
    background-color: #0d9668;
}

.author-bio {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 8px;
}

.author-bio .author-image {
    width: 80px;
    height: 80px;
}

.author-info h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.comments-section {
    margin-top: 3rem;
}

.comment-form {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.submit-comment {
    padding: 0.75rem 1.5rem;
    background-color: #1e3a8a;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-comment:hover {
    background-color: #1e3a8a;
}

/* Related Posts - Updated to match Thrive Agency */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.related-posts h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #1e3a8a;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .related-posts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.related-post {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #ffffff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.related-post-image {
    height: 160px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-post a {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.related-post h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #1e3a8a;
    line-height: 1.4;
}

.related-post-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.related-post-excerpt {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #4b5563;
    margin-top: 0.5rem;
}

