/*
Theme Name: A365 Blog Theme
Theme URI: https://academy365.net
Author: A365 Academy
Author URI: https://academy365.net
Description: A modern, clean blog theme with green accent colors, perfect for educational and digital marketing content. Features responsive design, full-width layout, and optimized for readability.
Version: 1.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: a365-blog
Tags: blog, education, one-column, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready, responsive-layout, full-width-template
*/

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary-color: #4be296;
    --secondary-color: #2e895b;
    --tertiary-color: #1f2f28;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --text-muted: #8e9aaf;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --border-light: #e9ecef;
    --shadow: 0 4px 20px rgba(75, 226, 150, 0.08);
    --shadow-hover: 0 8px 30px rgba(75, 226, 150, 0.15);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--light-bg);
    overflow-x: hidden;
}

/* Force visibility on all content */
article,
.post,
.entry-content,
.entry-header,
.entry-title,
.content-area,
.site-content,
.site-main {
    opacity: 1 !important;
    visibility: visible !important;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.entry-content p {
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* ========================================
   Header Styles
   ======================================== */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0 0.5rem;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--primary-color);
    background: rgba(75, 226, 150, 0.1);
}

/* Fixed CTA Button */
.header-cta {
    margin-left: 1rem;
}

.header-cta-button {
    background: var(--gradient);
    color: var(--white);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: inline-block;
}

.header-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--white);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 3px;
}

/* Mobile Menu Toggle - Fixed Visibility */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: var(--white);
    border: 2px solid var(--text-dark);
    padding: 0.75rem;
    border-radius: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.menu-toggle:hover {
    background: var(--light-bg);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Desktop Navigation - Hide hamburger */
@media screen and (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
    
    .main-navigation ul {
        display: flex !important;
    }
}

/* Mobile Navigation */
@media screen and (max-width: 768px) {
    /* Show hamburger */
    .menu-toggle {
        display: flex !important;
    }
    
    /* Header layout */
    .header-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap;
        position: relative;
    }
    
    .site-branding {
        order: 1;
        flex: 1;
    }
    
    .menu-toggle {
        order: 2;
        position: relative;
        z-index: 1002;
    }
    
    /* Navigation container */
    #site-navigation {
        order: 3;
        width: 100%;
        background: var(--white);
        margin-top: 1rem;
        border-radius: 12px;
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease;
    }
    
    #site-navigation.active {
        max-height: 800px;
        opacity: 1;
        padding: 1rem 0;
    }
    
    /* Menu items */
    .main-navigation ul,
    #primary-menu,
    .nav-menu {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        background: var(--white);
    }
    
    .main-navigation li {
        margin: 0 !important;
        border-bottom: 1px solid var(--border-light);
        width: 100%;
        list-style: none !important;
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation a {
        display: block !important;
        padding: 1rem 1.5rem !important;
        width: 100%;
        color: var(--text-dark) !important;
        text-decoration: none;
    }
    
    .main-navigation a:hover {
        background: rgba(75, 226, 150, 0.1) !important;
        color: var(--primary-color) !important;
    }
    
    /* CTA Button */
    .header-cta {
        display: block !important;
        margin: 0 !important;
        padding: 1rem 1.5rem !important;
        border-top: 2px solid var(--border-light);
    }
    
    .header-cta-button {
        display: block !important;
        width: 100% !important;
        text-align: center;
        padding: 1rem !important;
    }
    
    /* Adjust content for smaller screens */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .post {
        padding: 1.5rem;
    }
    
    .single .entry-title {
        font-size: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .header-container {
        padding: 1rem 3%;
    }
    
    .site-content {
        padding: 2rem 3%;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
}
/* ========================================
   Main Content Area
   ======================================== */
.site-content {
    max-width: 900px;
    margin: 100px auto 0;
    padding: 2rem 5%;
    position: relative;
    z-index: 1;
}

.content-area {
    width: 100%;
    position: relative;
    z-index: 1;
}

.site-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* ========================================
   Blog Post Styles
   ======================================== */
.post {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.post:hover {
    box-shadow: var(--shadow-hover);
}

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.entry-title a {
    color: var(--text-dark);
}

.entry-title a:hover {
    color: var(--primary-color);
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.entry-meta a {
    color: var(--text-muted);
}

.entry-meta a:hover {
    color: var(--primary-color);
}

.posted-on,
.byline,
.cat-links,
.comments-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-thumbnail {
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 12px;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.post:hover .entry-thumbnail img {
    transform: scale(1.05);
}

.entry-content {
    color: var(--text-light);
    line-height: 1.8;
}

.entry-content p:last-child {
    margin-bottom: 0;
}

.more-link {
    display: inline-block;
    background: var(--gradient);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.more-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Entry Footer */
.entry-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags-links a {
    background: rgba(75, 226, 150, 0.1);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tags-links a:hover {
    background: var(--gradient);
    color: var(--white);
}

/* ========================================
   Single Post
   ======================================== */
.single .post {
    background: var(--white) !important;
    box-shadow: var(--shadow);
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.single .entry-header {
    text-align: left;
    margin-bottom: 2rem;
    opacity: 1 !important;
    visibility: visible !important;
}

.single .entry-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    opacity: 1 !important;
    visibility: visible !important;
    text-align: left;
}

.single .entry-thumbnail {
    margin-bottom: 2rem;
    border-radius: 16px;
    opacity: 1 !important;
    visibility: visible !important;
}

.single .entry-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-light);
    opacity: 1 !important;
    visibility: visible !important;
}

.single .entry-content * {
    opacity: 1 !important;
    visibility: visible !important;
}

.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.single .entry-content ul,
.single .entry-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.single .entry-content li {
    margin-bottom: 0.5rem;
}

.single .entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(75, 226, 150, 0.05);
    border-radius: 8px;
    font-style: italic;
}

.single .entry-content code {
    background: var(--light-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.single .entry-content pre {
    background: var(--tertiary-color);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
}

.single .entry-content pre code {
    background: none;
    padding: 0;
    color: var(--white);
}

/* Post Navigation */
.post-navigation {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 1rem;
    background: rgba(75, 226, 150, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: rgba(75, 226, 150, 0.1);
    transform: translateX(-5px);
}

.nav-next a:hover {
    transform: translateX(5px);
}

/* ========================================
   Comments
   ======================================== */
.comments-area {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

.comments-title {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

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

.comment {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.comment-author img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.comment-metadata {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.comment-content {
    margin-left: 64px;
}

.reply {
    margin-left: 64px;
    margin-top: 1rem;
}

.reply a {
    background: rgba(75, 226, 150, 0.1);
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.reply a:hover {
    background: var(--gradient);
    color: var(--white);
}

.children {
    list-style: none;
    margin-left: 3rem;
    margin-top: 2rem;
}

/* Comment Form */
.comment-respond {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
}

.comment-reply-title {
    margin-bottom: 1.5rem;
}

.comment-form {
    display: grid;
    gap: 1rem;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: grid;
}

.comment-form label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    padding: 0.875rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(75, 226, 150, 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    margin-top: 1rem;
}

.submit {
    background: var(--gradient);
    color: var(--white);
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    list-style: none;
    padding: 0;
}

.pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 45px;
    text-align: center;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--gradient);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination .prev,
.pagination .next {
    font-weight: 600;
}

.pagination .dots {
    padding: 0.75rem 0.5rem;
    color: var(--text-muted);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background: var(--tertiary-color);
    color: var(--white);
    padding: 3rem 5%;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-content a {
    color: var(--primary-color);
}

.footer-content a:hover {
    color: var(--white);
}

/* ========================================
   Responsive Design
   ======================================== */
@media screen and (max-width: 1024px) {
    .site-content {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
    }
    
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: var(--shadow);
        display: none;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        padding: 1rem;
    }
    
    .main-navigation li {
        margin: 0;
    }
    
    .main-navigation a {
        display: block;
        padding: 1rem;
    }
    
    .header-cta {
        margin: 1rem;
        text-align: center;
    }
    
    .header-cta-button {
        display: block;
        width: 100%;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .post {
        padding: 1.5rem;
    }
    
    .single .entry-title {
        font-size: 2rem;
    }
    
    .children {
        margin-left: 1rem;
    }
    
    .comment-content,
    .reply {
        margin-left: 0;
    }
    
    .nav-links {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    .header-container {
        padding: 1rem 3%;
    }
    
    .site-content {
        padding: 2rem 3%;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--light-bg);
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: var(--text-dark);
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.5rem;
}

.sticky {
    border: 2px solid var(--primary-color);
}

.bypostauthor {
    background: rgba(75, 226, 150, 0.05);
}
