/*
Theme Name: QuillFast
Theme URI: https://wpcodequill.com/free-files/quillfast-theme/
Author: QuillFast by WPCodeQuill
Author URI: https://wpcodequill.com/pages/about-us/
Description: QuillFast is fast, premium-quality, modern & beautiful WordPress theme suitable for blog, personal Blog, news magazines, and professional writers.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quillfast
Tags: block-patterns, wide-blocks, left-sidebar, right-sidebar, custom-colors, editor-style, featured-images, full-width-template, microformats, post-formats, rtl-language-support, theme-options, threaded-comments, translation-ready, blog
*/


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
    color: #333;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   8. WORDPRESS REQUIRED CLASSES
   ========================================= */
.alignleft { float: left; margin: 0 1.5em 1.5em 0; }
.alignright { float: right; margin: 0 0 1.5em 1.5em; }
.aligncenter { clear: both; display: block; margin: 0 auto; }
.bypostauthor { display: block; }
.gallery-caption { display: block; text-align: center; font-style: italic; color: #666; font-size: 0.85rem; }
.sticky { display: block; }

/* Image Captions (Required by Theme Check) */
.wp-caption {
    margin-bottom: 1.5em;
    max-width: 100%;
}
.wp-caption img[class*="wp-image-"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.wp-caption .wp-caption-text {
    margin: 0.8em 0;
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    color: #666;
}
/* =========================================
   2. LANDING PAGE: HERO SECTION
   ========================================= */
.hero-section {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 80px 0;
    border-bottom: 1px solid #eaeaea;
}

.hero-content {
    flex: 1;
}

.hero-thumbnail {
    flex: 1;
}

.hero-label {
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--wp--preset--color--primary, #0073aa);
    margin-bottom: 15px;
    background: rgba(0, 115, 170, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.2;
    margin: 0 0 20px;
    color: #111;
    font-weight: 800;
}

.hero-excerpt {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
}

.button.hero-button {
    display: inline-block;
    background-color: var(--wp--preset--color--primary, #0073aa);
    color: #ffffff;
    padding: 14px 32px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.2);
}

.button.hero-button:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.3);
}

.hero-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* =========================================
   3. LANDING PAGE: CATEGORY GRIDS
   ========================================= */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    margin-top: 30px;
}

.section-heading,
.section-title {
    font-size: 1.8rem;
    margin-top: 50px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--wp--preset--color--primary, #0073aa);
    display: inline-block;
}

.category-block {
    margin-bottom: 60px;
}

.view-all {
    display: inline-block;
    margin-top: 20px;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.9rem;
}

/* =========================================
   4. POST CARDS (GRID VIEW)
   ========================================= */
.post-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}

.post-card-image a {
    display: block;
}

.post-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid #eaeaea;
}

.post-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-card .entry-title {
    font-size: 1.25rem;
    margin: 0 0 10px;
    line-height: 1.4;
}

.post-card .entry-title a {
    text-decoration: none;
    color: #222;
}

.post-card .entry-meta {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.updated-date time {
    color: var(--wp--preset--color--primary, #0073aa);
}


/* =========================================
   5. DYNAMIC SIDEBAR LAYOUT STYLES
   ========================================= */

/* Default Mobile Layout */
.site-content-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* Desktop Grid Settings */
@media (min-width: 992px) {
    /* Right Sidebar */
    .site-content-container.layout-right-sidebar {
        grid-template-columns: 2fr 1fr; 
    }

    /* Left Sidebar */
    .site-content-container.layout-left-sidebar {
        grid-template-columns: 1fr 2fr; 
    }
    
    /* Swap content order for Left Sidebar layout */
    .site-content-container.layout-left-sidebar .site-main {
        order: 2;
    }
    .site-content-container.layout-left-sidebar .widget-area {
        order: 1;
    }

    /* No Sidebar (Full Width) */
    .site-content-container.layout-no-sidebar {
        grid-template-columns: 1fr !important;
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Widget Styling */
.widget {
    margin-bottom: 40px;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wp--preset--color--primary, #0073aa);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #f9f9f9;
}


/* =========================================
   6. FOOTER STYLES
   ========================================= */
.site-footer {
    background-color: #f9f9f9;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

.site-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-info a {
    color: inherit;
    text-decoration: none;
}

.site-info a:hover {
    text-decoration: underline;
}

/* =========================================
   ARCHIVE PAGE HEADERS (Modern Left-Aligned)
   ========================================= */
.archive-page-header {
    text-align: left; /* Forces everything to the left */
    margin: 0 0 50px 0;
    padding: 0 0 30px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08); /* Clean divider line across the page */
    background: transparent; /* Removes the bulky gray box */
}

.archive-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 20px 0;
    position: relative;
    padding-bottom: 15px;
    letter-spacing: -0.5px;
}

/* Left-aligned blue accent line */
.archive-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0; /* Anchors the line to the left edge */
    width: 80px; /* Sleek, short line */
    height: 4px; /* Slightly thicker for a premium feel */
    background-color: var(--wp--preset--color--primary, #0073aa);
    border-radius: 2px;
}

.archive-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #555;
    margin: 0;
    max-width: 900px; /* Keeps line lengths comfortable for reading */
}

.archive-description p {
    margin: 0 0 15px 0;
}

.archive-description p:last-child {
    margin: 0; /* Cleans up spacing at the bottom */
}


/* =========================================================
   Accessibility: Skip Links & Keyboard Focus
   ========================================================= */
/* Skip Link */
.skip-link.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 !important; width: 1px; word-wrap: normal !important;
}
.skip-link.screen-reader-text:focus {
    background-color: #f1f1f1; border-radius: 3px; box-shadow: 0 0 2px 2px rgba(0,0,0,.6);
    clip: auto !important; clip-path: none; color: #21759b; display: block;
    font-size: 14px; font-weight: 700; height: auto; left: 5px; line-height: normal;
    padding: 15px 23px 14px; text-decoration: none; top: 5px; width: auto; z-index: 100000;
}

/* Keyboard Focus Indicators (Mobile & Desktop) */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px dashed #0073aa !important;
    outline-offset: 2px;
}

/* Submenu Keyboard Focus */
.main-navigation ul li:focus-within > ul {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Mobile Adjustments for Archive Header */
@media (max-width: 768px) {
    .archive-page-header {
        padding: 0 0 20px 0;
        margin: 0 0 30px 0;
    }
    .archive-title {
        font-size: 2.2rem;
    }
    .archive-description {
        font-size: 1rem;
    }
}


/* =========================================
   7. MOBILE RESPONSIVE TWEAKS
   ========================================= */
@media (max-width: 992px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 50px 20px;
        gap: 40px;
    }
    
    .hero-thumbnail {
        order: -1; /* Image on top for mobile */
    }
}