/*
Theme Name: jecoaff Premium
Theme URI: https://jecoaff.com/
Author: jecoaff
Author URI: https://jecoaff.com/
Description: A modern, premium, light-speed, and AdSense-ready WordPress theme designed for wellness, lifestyle, productivity, and financial growth blogs.
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: jecoaff-premium
*/

/* ==========================================================================
   1. Theme Variables & Settings (Sage & Gold Theme)
   ========================================================================== */
:root {
    /* Color Palette */
    --color-primary-hsl: 152, 38%, 22%; /* Deep Sage Green */
    --color-primary: hsl(var(--color-primary-hsl));
    --color-primary-light: hsl(152, 30%, 35%);
    --color-primary-dark: hsl(152, 45%, 12%);
    
    --color-secondary-hsl: 38, 85%, 55%; /* Warm Amber Gold */
    --color-secondary: hsl(var(--color-secondary-hsl));
    --color-secondary-light: hsl(38, 90%, 65%);
    
    /* Light Theme Palette */
    --bg-main: #fcfbf9; /* Soft Warm White */
    --bg-card: #ffffff;
    --bg-header: #f3f1ec;
    --border-color: rgba(0, 0, 0, 0.08);
    --text-main: #1f2923; /* Dark Charcoal-Green */
    --text-muted: #57635c;
    --text-on-primary: #ffffff;
    
    /* Layout Constants */
    --max-width: 1200px;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Elevation */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Animation speed */
    --transition-speed: 0.3s;
}

/* Dark Mode Overrides (triggered by class on body or media query) */
body.dark-mode {
    --bg-main: #0c110e; /* Deep Charcoal Green Black */
    --bg-card: #131b17;
    --bg-header: #101613;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #e2e8e4;
    --text-muted: #94a39b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   2. Reset & General Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.625;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color var(--transition-speed);
}

body.dark-mode a {
    color: var(--color-secondary-light);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   3. AdSense Helper Classes
   ========================================================================== */
.adsense-placement {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(
        45deg,
        rgba(197, 160, 89, 0.05),
        rgba(197, 160, 89, 0.05) 10px,
        rgba(197, 160, 89, 0.1) 10px,
        rgba(197, 160, 89, 0.1) 20px
    );
    border: 1px dashed var(--color-secondary);
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
    padding: 1rem;
    min-height: 90px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

.adsense-placement::before {
    content: 'Sponsored Advertisement';
    font-size: 0.7rem;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.adsense-placement-header {
    max-width: 728px;
    margin: 1rem auto;
    min-height: 90px;
}

.adsense-placement-sidebar {
    min-height: 250px;
    max-width: 300px;
    margin: 1rem auto;
}

.adsense-placement-inline {
    margin: 2rem 0;
}

/* ==========================================================================
   4. Layout Styles (Grid & Structure)
   ========================================================================== */
.site-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin: 3rem 0;
}

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

/* Blog Feed & Cards */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 600px) {
    .blog-grid.grid-two {
        grid-template-columns: 1fr 1fr;
    }
}

.post-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(197, 160, 89, 0.25);
}

.post-card-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.category-tag {
    color: var(--color-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.post-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.post-card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* Sidebar Styling */
.sidebar-inner {
    position: sticky;
    top: 2rem;
}

.widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.15rem;
    border-left: 4px solid var(--color-secondary);
    padding-left: 0.75rem;
    margin-bottom: 1.25rem;
}

/* Footer Styling */
.site-footer {
    background-color: var(--bg-header);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-widget-title {
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

/* ==========================================================================
   5. Header & Navigation Styles
   ========================================================================== */
.site-branding .site-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-branding .site-title a {
    color: var(--text-main);
}

.site-branding .site-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: -0.25rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Desktop Main Menu */
.main-navigation ul {
    list-style: none;
    display: none; /* Hidden on mobile */
    gap: 1.75rem;
}

@media (min-width: 768px) {
    .main-navigation ul {
        display: flex;
    }
}

.main-navigation a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.main-navigation a:hover,
.main-navigation li.current-menu-item a {
    color: var(--color-primary);
}

body.dark-mode .main-navigation a:hover,
body.dark-mode .main-navigation li.current-menu-item a {
    color: var(--color-secondary);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: width var(--transition-speed);
}

.main-navigation a:hover::after,
.main-navigation li.current-menu-item a::after {
    width: 100%;
}

/* Buttons and Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle-btn, .menu-toggle-btn, .close-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
    width: 38px;
    height: 38px;
}

.theme-toggle-btn:hover, .menu-toggle-btn:hover {
    border-color: var(--color-secondary);
    background-color: rgba(197, 160, 89, 0.05);
}

.theme-toggle-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-main);
    position: relative;
    box-shadow: inset -4px -4px 0 var(--text-main);
    background-color: transparent;
    transition: all var(--transition-speed);
}

body.dark-mode .theme-toggle-icon {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    box-shadow: none;
}

.menu-toggle-btn {
    display: flex;
}

@media (min-width: 768px) {
    .menu-toggle-btn {
        display: none;
    }
}

.menu-toggle-icon {
    width: 18px;
    height: 2px;
    background-color: var(--text-main);
    position: relative;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: var(--text-main);
    left: 0;
}

.menu-toggle-icon::before { top: -6px; }
.menu-toggle-icon::after { bottom: -6px; }

/* ==========================================================================
   6. Mobile Overlay Menu
   ========================================================================== */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-card);
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transition: right var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-panel.active {
    right: 0;
}

.mobile-nav-panel ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-panel a {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
}

.mobile-nav-header {
    display: flex;
    justify-content: flex-end;
}

.close-btn {
    font-size: 1.5rem;
    line-height: 1;
}

/* ==========================================================================
   7. Blog Elements, Typography, Alignments
   ========================================================================== */
.single-article {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .single-article {
        padding: 3.5rem;
    }
}

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

.entry-title {
    font-size: 2.25rem;
    letter-spacing: -0.03em;
    margin: 0.75rem 0;
}

@media (min-width: 768px) {
    .entry-title {
        font-size: 3rem;
    }
}

.entry-meta, .entry-author-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.entry-thumbnail {
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--text-main);
}

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

.entry-content h2,
.entry-content h3 {
    margin-top: 2rem;
}

.tags-links {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tags-links a {
    background-color: var(--bg-header);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all var(--transition-speed);
}

.tags-links a:hover {
    background-color: var(--color-secondary);
    color: var(--text-on-primary);
}

/* Post Nav */
.post-navigation-links {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 3rem 0;
    flex-direction: column;
}

@media (min-width: 600px) {
    .post-navigation-links {
        flex-direction: row;
    }
}

.post-navigation-links div {
    flex: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed);
}

.post-navigation-links div:hover {
    transform: translateY(-2px);
    border-color: var(--color-secondary);
}

/* Standard WP classes */
.aligncenter {
    display: block;
    margin: 1.5rem auto;
}

.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1.5rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1.5rem 1.5rem;
}

.wp-caption {
    background-color: var(--bg-header);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    text-align: center;
}

.wp-caption-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ==========================================================================
   8. SoftDev Products Page Styling (Gutenberg/Template support)
   ========================================================================== */
.products-hero-section {
    text-align: center;
    background-color: var(--bg-header);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    margin: 2rem 0 3rem;
    border: 1px solid var(--border-color);
}

.products-hero-title {
    font-size: 2.5rem;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

.products-hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

@media (min-width: 768px) {
    .product-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-showcase-grid .product-display-card:only-child,
    .product-showcase-grid .product-display-card:last-child:nth-child(odd) {
        grid-column: span 2;
        max-width: 700px;
        margin: 0 auto;
        width: 100%;
    }
}

.product-display-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
    position: relative;
}

.product-display-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(197, 160, 89, 0.3);
}

.product-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: var(--color-secondary);
    color: #101613;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

.product-card-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.product-card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    padding-right: 5rem; /* Avoid overlap with absolute badge */
}

.product-card-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-primary-light);
    margin-bottom: 1.25rem;
    font-family: var(--font-heading);
}

body.dark-mode .product-card-price {
    color: var(--color-secondary);
}

.product-card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.product-features-checklist {
    list-style: none;
    margin: 0 0 2rem 0;
    padding: 0;
    margin-top: auto;
}

.product-features-checklist li {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.check-icon {
    color: var(--color-secondary);
    font-weight: 700;
}

.product-cta-btn {
    background-color: var(--color-primary);
    color: var(--text-on-primary);
    text-align: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: block;
    transition: all var(--transition-speed);
    margin-top: auto;
}

.product-cta-btn:hover {
    background-color: var(--color-secondary);
    color: #101613;
}

body.dark-mode .product-cta-btn {
    background-color: var(--color-secondary);
    color: #101613;
}

body.dark-mode .product-cta-btn:hover {
    background-color: var(--color-primary-light);
    color: white;
}

/* Footer Co-Branding Logo */
.softdev-branding-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    text-align: center;
}

.softdev-logo-img {
    max-height: 44px;
    width: auto;
    border-radius: 0;
}

body.dark-mode .softdev-logo-img {
    filter: invert(1) contrast(1.5);
}

.softdev-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0;
}


