/*
Theme Name: OptinFunnel Press
Theme URI: https://yoursite.com
Author: Your Name
Author URI: https://yoursite.com
Description: A high-converting one-page WordPress theme. Homepage is a pure landing page with a single CTA button. Blog pages have a clean layout with an isolated sidebar for opt-in forms.
Version: 1.1.0
Requires at least: 5.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: optinfunnel-press
Tags: one-column, two-columns, right-sidebar, custom-header, custom-menu, featured-images, full-width-template, blog, news
*/

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --primary-color: #e63946;
    --primary-hover: #c1121f;
    --secondary-color: #1d3557;
    --accent-color: #457b9d;
    --text-color: #2b2d42;
    --text-light: #6c757d;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1d3557;
    --border-color: #e9ecef;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Georgia', 'Times New Roman', serif;
    --max-width: 1200px;
    --sidebar-width: 320px;
    --header-height: 64px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --transition: 0.3s ease;
}

/* ============================================
   BASE (gentle — doesn't override plugin styles)
   ============================================ */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: #0052a3;
}

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

/* ============================================
   SKIP LINK
   ============================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--secondary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 100000;
    border-radius: 0 0 var(--radius) 0;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: box-shadow var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

.site-title a {
    color: var(--secondary-color);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.site-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
    display: none;
}

/* Custom logo */
.custom-logo-link img {
    max-height: 48px;
    width: auto;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.main-navigation li {
    position: relative;
    margin: 0;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* Dropdown */
.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: -1rem;
    background: var(--bg-color);
    min-width: 200px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    display: none;
    flex-direction: column;
    gap: 0;
    z-index: 100;
}

.main-navigation li:hover > .sub-menu {
    display: flex;
}

.main-navigation .sub-menu a {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.main-navigation .sub-menu a:hover {
    background: var(--bg-light);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* ============================================
   HERO SECTION (HOMEPAGE)
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #264653 50%, var(--accent-color) 100%);
    padding: calc(var(--header-height) + 2rem) 1.5rem 4rem;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.03)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>') no-repeat bottom center;
    background-size: cover;
    opacity: 0.5;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
    border: none;
    cursor: pointer;
}

.hero-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(230, 57, 70, 0.5);
    color: #ffffff;
    text-decoration: none;
}

.hero-cta svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition);
}

.hero-cta:hover svg {
    transform: translateX(4px);
}

/* Scroll indicator - hidden since homepage is single-screen */
.scroll-indicator {
    display: none;
}

/* ============================================
   CONTENT AREA (posts, pages, archives)
   ============================================ */
.content-area {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--header-height) + 2rem) 1.5rem 4rem;
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - var(--sidebar-width) - 2.5rem);
}

/* Full width — NO sidebar (default for pages and single posts) */
.content-area.full-width .main-content,
.main-content.full-width-content {
    max-width: 100%;
    flex: none;
}

.content-area.full-width .sidebar-area,
.content-area.full-width #secondary {
    display: none;
}

/* ============================================
   SINGLE POST / PAGE FORMATTING
   IMPORTANT: Only gentle styles. Don't override
   existing plugin/editor formatting.
   ============================================ */

/* Post header */
.single-post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.single-post-header .post-category {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0066cc;
    margin-bottom: 0.75rem;
}

.single-post-header .post-category a {
    color: #0066cc;
}

.single-post-header .post-category a:hover {
    color: #0052a3;
}

.single-post-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-meta-item svg {
    width: 16px;
    height: 16px;
}

/* Featured image */
.post-featured-image {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
}

/* ---- POST CONTENT ----
   Gentle typography that respects existing formatting.
   Only sets base size + line height. Does NOT strip
   margins/padding from child elements.
   ============================================ */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Only style direct elements — don't target everything with * */
.post-content > p,
.post-content .has-text-align-left,
.post-content .has-text-align-center,
.post-content .has-text-align-right {
    margin-bottom: 1.25rem;
}

.post-content h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.3;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.post-content h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Respect existing block formatting */
.post-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

/* Only style generic lists (not menu widgets etc) */
.post-content > ul,
.post-content > ol {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.post-content a {
    color: #0066cc;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: #0052a3;
}

/* Blockquote - gentle style */
.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    font-style: italic;
    color: var(--text-light);
    border-radius: 0 var(--radius) var(--radius) 0;
}

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

/* Pre/code blocks */
.post-content pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-light);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

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

.post-content pre code {
    padding: 0;
    background: none;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.post-content th,
.post-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.post-content th {
    background: var(--bg-light);
    font-weight: 600;
}

/* Horizontal rules */
.post-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

/* ---- WordPress alignment classes ---- */
.post-content .alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.post-content .alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.post-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

.post-content .alignwide {
    margin-left: -2rem;
    margin-right: -2rem;
    max-width: calc(100% + 4rem);
}

.post-content .alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.post-content figcaption {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ---- WordPress block compatibility ---- */
.post-content .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.post-content .gallery-item {
    margin: 0;
}

.post-content .gallery-item img {
    margin: 0;
    border-radius: 4px;
}

.post-content .wp-block-cover {
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
}

.post-content .wp-block-separator {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2rem 0;
}

.post-content .wp-block-quote {
    border-left: 4px solid var(--primary-color);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content .wp-block-table {
    margin-bottom: 1.5rem;
}

.post-content .wp-block-code {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.post-content .wp-block-buttons {
    margin-bottom: 1.5rem;
}

.post-content .wp-block-spacer {
    clear: both;
}

.post-content .wp-block-image {
    margin: 1.5rem 0;
}

.post-content .wp-block-image figcaption {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

.post-content .wp-block-columns {
    margin-bottom: 1.5rem;
}

.post-content .wp-block-group {
    margin-bottom: 1.5rem;
}

/* Responsive video embeds */
.post-content .wp-block-embed {
    margin-bottom: 1.5rem;
}

.post-content .wp-block-embed .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.post-content .wp-block-embed .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Post footer (tags) */
.post-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.post-tags-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.tag-link {
    display: inline-block;
    background: var(--bg-light);
    color: #0066cc;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    margin: 0.25rem;
    transition: all var(--transition);
    text-decoration: none;
}

.tag-link:hover {
    background: #0066cc;
    color: #fff;
    text-decoration: none;
}

/* Post navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.post-navigation a {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all var(--transition);
    max-width: 48%;
}

.post-navigation a:hover {
    background: var(--bg-color);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.post-navigation .nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.post-navigation .nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0066cc;
}

/* Page links (multi-page posts) */
.page-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
}

.page-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin: 0 0.25rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition);
}

.page-links a:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

/* ============================================
   SIDEBAR — only shows when widgets are added
   ============================================ */
.sidebar-area {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

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

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget-title {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #0066cc;
}

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

.sidebar-widget ul li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-widget ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-widget ul li a {
    color: #0066cc;
    font-size: 0.9rem;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
}

.sidebar-widget ul li a:hover {
    color: #0052a3;
    text-decoration: none;
}

/* Sidebar opt-in widget style */
.sidebar-optin {
    background: linear-gradient(135deg, var(--bg-dark), var(--accent-color));
    color: #fff;
    border: none;
    text-align: center;
}

.sidebar-optin .sidebar-widget-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.sidebar-optin p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.sidebar-optin .optin-form input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    outline: none;
    transition: border-color var(--transition);
}

.sidebar-optin .optin-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-optin .optin-form input[type="email"]:focus {
    border-color: rgba(255, 255, 255, 0.8);
}

.sidebar-optin .optin-form button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.sidebar-optin .optin-form button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* ============================================
   ARCHIVE / BLOG LISTING
   ============================================ */
.archive-header {
    text-align: center;
    padding: 1rem 0 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.archive-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.archive-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Post list style for archives */
.post-list-item {
    display: flex;
    gap: 1.5rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.post-list-item:last-child {
    border-bottom: none;
}

.post-list-image {
    flex-shrink: 0;
    width: 280px;
    height: 180px;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-list-content {
    flex: 1;
}

.post-list-content h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.post-list-content h2 a {
    color: #0066cc;
    text-decoration: none;
}

.post-list-content h2 a:hover {
    color: #0052a3;
    text-decoration: none;
}

.post-list-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.post-list-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.post-card-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0066cc;
    margin-bottom: 0.75rem;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #0066cc;
    text-decoration: none;
    margin-top: 0.5rem;
}

.read-more-link:hover {
    color: #0052a3;
    gap: 0.6rem;
    text-decoration: none;
}

/* Post grid (used on homepage if widgets) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

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

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.post-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

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

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

.post-card-title a {
    color: #0066cc;
    text-decoration: none;
}

.post-card-title a:hover {
    color: #0052a3;
    text-decoration: none;
}

.post-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
}

.pagination a {
    background: var(--bg-light);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    text-decoration: none;
}

.pagination .current {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.comments-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

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

.comment-list .comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-list .comment:last-child {
    border-bottom: none;
}

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

.comment-author .avatar {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
    font-size: 0.95rem;
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.7;
}

.comment-content p {
    margin-bottom: 0.75rem;
}

.comment-reply-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Comment Form */
.comment-respond {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.comment-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: border-color var(--transition);
    background: var(--bg-color);
}

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

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

.comment-form .form-submit input {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.comment-form .form-submit input:hover {
    background: var(--primary-hover);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget-title {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

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

.footer-widget ul li {
    margin-bottom: 0.5rem;
}

.footer-widget ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-widget ul li a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-navigation a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.footer-navigation a:hover {
    color: #fff;
}

/* ============================================
   SEARCH
   ============================================ */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.search-form .search-field {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--font-primary);
    outline: none;
    transition: border-color var(--transition);
    background: var(--bg-color);
}

.search-form .search-field:focus {
    border-color: var(--primary-color);
}

.search-form .search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background var(--transition);
}

.search-form .search-submit:hover {
    background: var(--primary-hover);
}

.search-results-header {
    padding: 1rem 0 2rem;
}

.search-results-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--secondary-color);
}

.search-results-header .search-query {
    color: var(--primary-color);
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
    text-align: center;
    padding: 6rem 1.5rem;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-404 p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.search-form-404 {
    max-width: 400px;
    margin: 0 auto;
}

.search-form-404 input[type="search"] {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition);
}

.search-form-404 input[type="search"]:focus {
    border-color: var(--primary-color);
}

/* ============================================
   IN-CONTENT OPT-IN WIDGET
   ============================================ */
.in-content-widget {
    background: linear-gradient(135deg, var(--bg-dark), var(--accent-color));
    color: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    margin: 2rem 0;
}

.in-content-title {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.in-content-widget p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

/* ============================================
   NO POSTS MESSAGE
   ============================================ */
.no-posts-message {
    text-align: center;
    padding: 4rem 2rem;
}

.no-posts-message h2 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.no-posts-message p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* ============================================
   STICKY POST
   ============================================ */
.sticky .post-list-item,
.sticky .post-card {
    border: 2px solid var(--primary-color);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

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

.screen-reader-text:focus {
    background-color: var(--bg-light);
    clip: auto !important;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .site-header,
    .sidebar-area,
    .site-footer,
    .post-navigation,
    .comments-area,
    .hero-section {
        display: none !important;
    }

    .content-area {
        display: block !important;
        padding-top: 0;
    }

    .main-content {
        max-width: 100% !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .content-area {
        flex-direction: column;
    }

    .main-content,
    .main-content.full-width-content {
        max-width: 100%;
    }

    .sidebar-area {
        width: 100%;
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .sidebar-widget {
        margin-bottom: 0;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        display: none;
    }

    .main-navigation.toggled {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation a {
        padding: 0.75rem 1rem;
        border-radius: var(--radius);
    }

    .main-navigation a:hover {
        background: var(--bg-light);
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
        display: flex;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-cta {
        font-size: 1rem;
        padding: 0.9rem 2rem;
    }

    .post-list-item {
        flex-direction: column;
    }

    .post-list-image {
        width: 100%;
        height: 200px;
    }

    .single-post-header h1 {
        font-size: 1.8rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-content h2 {
        font-size: 1.5rem;
    }

    .post-content .alignwide,
    .post-content .alignfull {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }

    .post-navigation {
        flex-direction: column;
    }

    .post-navigation a {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .content-area {
        padding: calc(var(--header-height) + 1rem) 1rem 3rem;
    }

    .site-footer {
        padding: 2rem 1rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    .archive-header h1,
    .single-post-header h1 {
        font-size: 1.5rem;
    }

    .search-form {
        flex-direction: column;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
}
