/*
Theme Name: Personal Finance (RahulMoney)
Theme URI: 
Author: Antigravity
Author URI: 
Description: A professional, premium, and trustworthy personal finance theme for Rahul B. Features a persistent Light/Dark theme toggle, comprehensive dark mode support across all pages (Home, Blog, Services, About, Contact), full Gutenberg block compatibility in dark mode, sidebar widget dark overrides, and a native email subscription system.
Version: 4.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: personal-finance

Changelog:
  v4.1 - Fixed blog post content black text in dark mode. Added !important overrides to beat Gutenberg inline styles.
  v4.0 - Light/Dark theme toggle included. Full dark mode support for all pages, post content, Gutenberg blocks, sidebar, and forms.
  v3.0 - Dark mode CSS variables and section overrides added.
  v2.2 - Native email subscription system, inline subscribe forms, modal and sticky bar.
  v2.0 - Featured images on single posts, Open Graph meta tags, performance optimizations.
  v1.0 - Initial release.
*/

:root {
    --primary-color: #1e293b;
    /* Midnight Blue */
    --secondary-color: #0f172a;
    /* Deep Slate */
    --accent-color: #d4af37;
    /* Champagne Gold */
    --success-color: #10b981;
    /* Vibrant Green */

    /* ── Background Design System ── */
    --page-bg:        #F7FAFF;
    /* Main page background — soft trust-building blue-tinted white */
    --section-bg:     #FFFFFF;
    /* Primary content sections — max legibility */
    --alt-section-bg: #F1F5F9;
    /* Alternate section rhythm — cool light slate */
    --card-bg:        #FFFFFF;
    /* Cards & panels — pop-out white surface */
    --card-elevated:  #FCFCFD;
    /* Form containers, widget cards — barely warm near-white */
    --hover-surface:  #EEF4FF;
    /* Hover backgrounds & highlights */

    /* Legacy aliases (still used in some places) */
    --bg-color: #F1F5F9;
    /* Maps to alt-section-bg */

    --text-dark: #334155;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --header-height: 80px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

/* ── Dark Theme Variables ── */
[data-theme="dark"] {
    --primary-color: #e2e8f0;
    --secondary-color: #f8fafc;
    --accent-color: #d4af37;
    --success-color: #10b981;

    --page-bg: #0B0F14;
    --section-bg: #121821;
    --alt-section-bg: #161D26;
    --card-bg: #161D26;
    --card-elevated: #1a222c;
    --hover-surface: #1e293b;
    --bg-color: #161D26;

    --text-dark: #f1f5f9;
    --text-light: #cbd5e1;
    --border-color: #334155;
}

/* Smooth transition for theme toggle */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .site-header {
    background-color: rgba(18, 24, 33, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .header-search-field:focus,
[data-theme="dark"] .header-search-field:not(:placeholder-shown) {
    background: #1a222c;
    border-color: #334155;
    color: #f1f5f9;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 0;
}

.theme-toggle-btn:hover {
    background-color: var(--hover-surface);
    color: var(--primary-color);
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .moon-icon {
    display: block !important;
}

/* ── Dark Theme Section Overrides ── */
/* Some sections natively have dark backgrounds in light mode using primary/secondary vars. 
   When those vars invert in dark mode, we must restore dark backgrounds and fix text color. */

[data-theme="dark"] .hero,
[data-theme="dark"] .sub-sticky-bar {
    background: linear-gradient(135deg, #0B0F14 0%, #121821 100%);
    color: #f1f5f9;
}

[data-theme="dark"] .hero h1 {
    color: #f1f5f9;
}

[data-theme="dark"] .site-footer {
    background-color: #0B0F14;
    color: #cbd5e1;
}

[data-theme="dark"] .page-header {
    background: #0B0F14 !important;
    background-color: #0B0F14 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .page-header p {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .page-header h1,
[data-theme="dark"] .footer-widget h3 {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .step-number {
    background-color: #1a4fb5; /* A strong accent blue instead of inverted white */
    color: #ffffff;
}

[data-theme="dark"] .pf-newsletter-cta {
    background: linear-gradient(135deg, #0B0F14 0%, #161D26 100%);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background-color: #1a222c;
    color: #f1f5f9;
    border-color: #334155;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    background-color: #1e293b;
    border-color: #cbd5e1;
}

[data-theme="dark"] .pf-newsletter-cta__headline {
    color: #f1f5f9;
}


[data-theme="dark"] .bg-dark {
    background-color: #0B0F14;
    color: #f1f5f9;
}

[data-theme="dark"] .bg-dark h2,
[data-theme="dark"] .bg-dark p {
    color: #f1f5f9;
}

/* ── Dark Mode: Blog & Post Content Text ── */
/* Uses !important to override Gutenberg inline style="color:#000" on paragraphs */
[data-theme="dark"] .entry-content,
[data-theme="dark"] .entry-content p,
[data-theme="dark"] .entry-content li,
[data-theme="dark"] .entry-content ul,
[data-theme="dark"] .entry-content ol,
[data-theme="dark"] .entry-content td,
[data-theme="dark"] .entry-content th,
[data-theme="dark"] .entry-content span,
[data-theme="dark"] .entry-content strong,
[data-theme="dark"] .entry-content em,
[data-theme="dark"] .entry-content label {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .entry-content h1,
[data-theme="dark"] .entry-content h2,
[data-theme="dark"] .entry-content h3,
[data-theme="dark"] .entry-content h4,
[data-theme="dark"] .entry-content h5,
[data-theme="dark"] .entry-content h6 {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .entry-content a {
    color: #93c5fd !important;
}

[data-theme="dark"] .entry-content a:hover {
    color: #bfdbfe !important;
}

[data-theme="dark"] .entry-content blockquote,
[data-theme="dark"] .entry-content blockquote p,
[data-theme="dark"] .entry-content blockquote cite {
    border-left-color: #334155 !important;
    background-color: #161D26 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .entry-content code,
[data-theme="dark"] .entry-content pre,
[data-theme="dark"] .entry-content pre * {
    background-color: #1a222c !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .entry-content table {
    border-color: #334155 !important;
}

[data-theme="dark"] .entry-content th {
    background-color: #1a222c !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .entry-content td {
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* WordPress Gutenberg block overrides */
[data-theme="dark"] .wp-block-paragraph,
[data-theme="dark"] .wp-block-list,
[data-theme="dark"] .wp-block-heading {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .wp-block-pullquote,
[data-theme="dark"] .wp-block-quote {
    border-color: #335588 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .wp-block-code {
    background: #1a222c !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

/* Post card & blog listing overrides */
[data-theme="dark"] .post-card {
    background-color: var(--card-bg);
    border-color: #334155 !important;
}

[data-theme="dark"] .post-title a {
    color: #f1f5f9;
}

[data-theme="dark"] .post-title a:hover {
    color: #93c5fd;
}

[data-theme="dark"] .post-excerpt,
[data-theme="dark"] .post-meta,
[data-theme="dark"] .post-content {
    color: #cbd5e1;
}

[data-theme="dark"] .post-content a:not(.btn) {
    color: #93c5fd;
}

/* Sidebar widget overrides */
[data-theme="dark"] .custom-widget-card {
    background-color: var(--card-bg);
    border-color: #334155;
}

[data-theme="dark"] .custom-widget-title {
    color: #f1f5f9;
}

[data-theme="dark"] .custom-widget-list a,
[data-theme="dark"] .custom-word-cloud a {
    color: #cbd5e1;
}

[data-theme="dark"] .archive-year-summary {
    color: #f1f5f9;
}

/* Entry header / footer */
[data-theme="dark"] .entry-title {
    color: #f1f5f9;
}

[data-theme="dark"] .entry-footer,
[data-theme="dark"] .cat-links,
[data-theme="dark"] .tags-links {
    color: #94a3b8;
}

[data-theme="dark"] .entry-footer a,
[data-theme="dark"] .cat-links a,
[data-theme="dark"] .tags-links a {
    color: #93c5fd;
}

/* bg-white / bg-light utility fix */
[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-light {
    background-color: var(--page-bg) !important;
    color: #e2e8f0;
}

/* site-main / site-content body area */
[data-theme="dark"] .site-main,
[data-theme="dark"] .site-content {
    background-color: var(--page-bg);
    color: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--page-bg);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

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

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

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

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

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

.site-branding {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 800;
}

.site-branding a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.site-branding .custom-logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
}

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

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

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

/* Header Actions & Search */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-field {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 50px;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 10; /* Covers the button when collapsed to capture purely focus clicks */
}

/* Search icon graphic placed behind the input initially */
.header-search-submit {
    position: absolute;
    right: 2px;
    top: 2px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    z-index: 5;
}

/* When focused or containing text, expand! */
.header-search-field:focus,
.header-search-field:not(:placeholder-shown) {
    width: 240px;
    padding: 0 45px 0 20px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05), inset 0 2px 4px rgba(0,0,0,0.02);
    cursor: text;
    z-index: 1; /* Drop behind so the submit button becomes clickable */
}

.header-search-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 77, 140, 0.1), 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header-search-field:focus ~ .header-search-submit,
.header-search-field:not(:placeholder-shown) ~ .header-search-submit {
    z-index: 15; /* Ensure button receives the submit click */
    color: var(--primary-color);
}

.header-search-submit:hover {
    background: rgba(10, 77, 140, 0.05);
}

.header-search-field::placeholder {
    color: transparent;
    transition: color 0.3s ease;
}

.header-search-field:focus::placeholder {
    color: #94a3b8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #b89223 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e5c357 0%, var(--accent-color) 100%);
    color: #fff;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background-color: var(--success-color);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: #246d44;
    color: white;
}

.btn-outline {
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Trust Snapshot Section */
.trust-snapshot {
    background-color: var(--card-elevated);
    padding: 40px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 20;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.trust-item {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.trust-item i,
.trust-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Sections */
.section-padding {
    padding: 90px 0;
}

.bg-light {
    background-color: var(--alt-section-bg);
}

.bg-white {
    background-color: var(--section-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.section-subtitle {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Features/Services Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 4px solid var(--accent-color);
    border-bottom: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Step Process */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}

.process-step {
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.process-step h3 {
    font-size: 1.3rem;
}

/* Form Styles */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-elevated);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #f8fafc;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(10, 77, 140, 0.1);
}

/* Blog Styles (Used in front-page and home.php) */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.post-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* .post-list overrides for tall list thumbnails */
.post-list .post-thumbnail {
    height: 300px;
}

.post-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background: var(--card-bg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
}

/* Thumbnail: only shows when a background-image is injected.
   No image = no fallback gray box. */
.post-thumbnail {
    height: 220px;
    background-color: transparent;
    background-size: cover;
    background-position: center;
    display: none; /* Hidden by default; JS-free approach: PHP wraps it conditionally */
}

/* When a real image is present, the PHP tag adds this class */
.post-thumbnail.has-image {
    display: block;
    background-color: var(--alt-section-bg);
}

/* Specific height for single post featured image for premium look */
.single .post-thumbnail {
    height: 480px;
    border-radius: 12px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .single .post-thumbnail {
        height: 280px;
    }
}

/* No-image card: improve typography spacing for text-first layout */
.post-card--no-image .post-content {
    padding: 32px 30px 28px;
}

.post-card--no-image .post-title {
    font-size: 1.45rem;
    margin-bottom: 18px;
    line-height: 1.4;
}

.post-card--no-image .post-meta {
    margin-bottom: 14px;
}

.post-card--no-image .post-excerpt {
    margin-bottom: 22px;
    line-height: 1.75;
}

/* ── Blog Card Typography System ──
   Optimised for clarity, click-through, and premium editorial feel. */

.post-content {
    padding: 28px 30px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-meta {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Title: 2 lines maximum, clean clamp */
.post-title {
    font-size: 1.25rem;
    line-height: 1.45;
    margin-bottom: 12px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-title a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.25s ease;
}

.post-title a:hover {
    color: var(--accent-color);
}

/* Excerpt: 3-line ideal — readable and informative without overwhelming */
.post-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 1;
}

/* No-image cards: slightly boost excerpt since title has more visual weight */
.post-card--no-image .post-content {
    padding: 32px 30px 28px;
}

.post-card--no-image .post-title {
    font-size: 1.35rem;
    margin-bottom: 14px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.post-card--no-image .post-excerpt {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    margin-bottom: 22px;
    line-height: 1.75;
}

/* Inner Page Styles */
.page-header {
    background-color: var(--secondary-color);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    color: white;
    margin-bottom: 0;
}

.site-content {
    padding: 60px 0;
}

.content-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

@media (max-width: 900px) {
    .content-area {
        grid-template-columns: 1fr;
    }
}

/* Footer Section */
.site-footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-widget h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-widget p,
.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-widget ul li {
    margin-bottom: 10px;
}

.site-info {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Sticky WhatsApp CTA */
.sticky-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.3s;
}

.sticky-whatsapp:hover {
    transform: scale(1.1);
    color: white;
}

/* Custom Widget Sidebar UI */
.custom-widget-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
}

.custom-widget-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-color);
    position: relative;
}

.custom-widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

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

.custom-widget-list li {
    margin-bottom: 10px;
}

.custom-widget-list li:last-child {
    margin-bottom: 0;
}

.custom-widget-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--bg-color);
    color: var(--text-dark);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.custom-widget-list li a:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateX(5px);
}

.term-count {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.custom-widget-list li a:hover .term-count {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Custom Word Cloud */
.custom-word-cloud {
    padding: 10px 0;
}

/* Handle WordPress's potential inner wrappers (like .tagcloud div or p) */
.custom-word-cloud > div,
.custom-word-cloud > p,
.custom-word-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.custom-word-cloud a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    margin: 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--secondary-color);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(10, 77, 140, 0.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    line-height: 1.2;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

/* Shine overlay effect */
.custom-word-cloud a::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; 
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: all 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.custom-word-cloud a:hover::before {
    left: 150%;
}

.custom-word-cloud a:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #ffffff;
    transform: translateY(-5px) scale(1.05); /* Premium float and scale */
    box-shadow: 0 10px 25px rgba(10, 77, 140, 0.25), inset 0 -2px 5px rgba(0,0,0,0.1);
    border-color: transparent;
}


/* Archive Tree UI */
.archive-year-details {
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.archive-year-details:last-child {
    margin-bottom: 0;
}

.archive-year-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-dark);
    list-style: none;
}

.archive-year-summary:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.archive-year-summary::-webkit-details-marker {
    display: none;
}

.year-text::before {
    content: '▶';
    font-size: 0.75rem;
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.archive-year-details[open] .year-text::before {
    transform: rotate(90deg);
}

.archive-year-details[open] .archive-year-summary {
    border-bottom: 1px solid var(--border-color);
}

.archive-months-list {
    padding: 16px;
    background-color: var(--card-bg);
}

/* Comment Section UI */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}
.comments-title, .comment-reply-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 50px;
}
.comment-list .comment {
    margin-bottom: 30px;
}
.comment-body {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.comment-meta {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--bg-color);
    padding-bottom: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}
.comment-author img {
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 15px;
}
.comment-author b {
    font-size: 1.1rem;
    color: var(--secondary-color);
}
.comment-content p {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.reply a {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}
.comment-list .children {
    list-style: none;
    padding-left: 50px;
    margin-top: 30px;
    border-left: 2px solid var(--border-color);
}

/* Comment Form UI */
.comment-respond {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}
.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 20px;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(10, 77, 140, 0.1);
}
.comment-form textarea {
    min-height: 120px;
}
.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}
.comment-form-cookies-consent input {
    margin: 0;
}
.comment-form-cookies-consent label {
    margin: 0;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Header & Nav */
    .site-header {
        height: auto;
        padding-top: 15px;
        padding-bottom: 15px;
    }
    .site-header .container {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .site-branding {
        margin-bottom: 15px;
        font-size: 1.5rem;
        text-align: center;
    }
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
    }
    .main-navigation a {
        font-size: 0.95rem;
    }
    
    /* Hero */
    .hero {
        padding: 60px 0;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero-content {
        padding: 0 10px;
    }
    .hero p {
        font-size: 1.05rem;
        margin-bottom: 30px;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Sections */
    .section-padding {
        padding: 50px 0;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Utility grids */
    .split-section {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    /* Content Area overrides */
    .content-area {
        gap: 30px;
        grid-template-columns: 1fr;
    }
    
    /* Forms */
    .form-container {
        padding: 25px 20px;
    }

    /* Page Headers */
    .page-header {
        padding: 40px 0;
    }
    .page-header h1 {
        font-size: 2rem;
    }
    
    /* Restrict general button sizes */
    .feature-card .btn,
    .post-content .btn,
    .post-card .btn {
        width: auto;
        display: inline-flex;
    }
    
    .sticky-whatsapp {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    .sticky-whatsapp svg {
        width: 24px;
        height: 24px;
    }
}

/* Base Modal Container */
.sub-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 25, 47, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.sub-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Content Card */
.sub-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 480px;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sub-modal-overlay.active .sub-modal-content {
    transform: translateY(0) scale(1);
}

/* Close Button */
.sub-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.sub-modal-close:hover {
    background: #f1f5f9;
    color: var(--text-dark);
}

/* Text Elements */
.sub-modal-title {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 800;
}
.sub-modal-desc {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Form Overrides inside Modal */
.sub-modal-content form {
    margin: 0; 
}
.sub-modal-content input[type="email"] {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}
.sub-modal-content input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
}
.sub-modal-content .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-radius: 8px;
}

/* Dismiss Link */
.sub-modal-dismiss {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: underline;
    cursor: pointer;
    background: transparent;
    border: none;
    margin-top: 5px;
}
.sub-modal-dismiss:hover {
    color: var(--text-dark);
}

/* ============================================================
   Bottom Sticky Bar UI
============================================================ */
.sub-sticky-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-height: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    z-index: 9998;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.sub-sticky-bar.active {
    max-height: 100px; /* arbitrary height to allow expansion */
}

.sticky-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 15px 40px 15px 20px;
    flex-wrap: wrap; text-align: center;
}

.sticky-text {
    font-size: 1rem;
    font-weight: 500;
}

.sticky-btn {
    white-space: nowrap;
}

.sticky-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.sticky-close:hover {
    color: white;
}

/* Response for Sticky Bar */
@media (max-width: 768px) {
    .sub-sticky-bar.active {
        max-height: 150px;
    }
    .sticky-bar-content {
        flex-direction: column;
        gap: 10px;
        padding-top: 15px;
        padding-bottom: 15px;
    }
    .sticky-btn {
        margin-left: 0 !important;
        width: 100%;
    }
}


/* ══════════════════════════════════════════
   PF ALERT — Reusable inline feedback component
   Used across sidebar, modal, post, homepage
   ══════════════════════════════════════════ */
.pf-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.pf-alert--success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.pf-alert--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.pf-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.pf-alert--neutral {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

/* ══════════════════════════════════════════
   FOOTER — 4-column grid with subscribe widget
   ══════════════════════════════════════════ */
.footer-widgets {
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
    .footer-widgets {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 540px) {
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════
   HOMEPAGE NEWSLETTER CTA SECTION
   ══════════════════════════════════════════ */
.pf-newsletter-cta {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0f172a 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.pf-newsletter-cta::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.pf-newsletter-cta__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.pf-newsletter-cta__label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 14px;
}

.pf-newsletter-cta__headline {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 16px;
}

.pf-newsletter-cta__sub {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.65;
    margin-bottom: 22px;
    color: rgba(255,255,255,0.9);
}

.pf-newsletter-cta__trust {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--accent-color);
    font-weight: 600;
}

.pf-newsletter-cta__form-wrap {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 36px 32px;
    backdrop-filter: blur(10px);
}

.pf-newsletter-cta__form-wrap input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border 0.25s;
}

.pf-newsletter-cta__form-wrap input[type="email"]::placeholder {
    color: rgba(255,255,255,0.55);
}

.pf-newsletter-cta__form-wrap input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255,255,255,0.15);
}

@media (max-width: 768px) {
    .pf-newsletter-cta__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .pf-newsletter-cta__headline {
        font-size: 1.55rem;
    }
    .pf-newsletter-cta__form-wrap {
        padding: 24px 20px;
    }
}



/* =============================================================
   SOCIAL SHARE BUTTONS
   ============================================================= */

.pf-social-share {
    margin: 40px 0 28px;
    padding: 24px 28px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.pf-share-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 14px;
}

.pf-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Base button styles */
.pf-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-sans);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    line-height: 1;
    white-space: nowrap;
}

.pf-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    opacity: 0.93;
    text-decoration: none;
}

.pf-share-btn:active {
    transform: translateY(0);
}

/* X / Twitter — dark */
.pf-share-twitter {
    background: #000;
    color: #fff;
}

/* LinkedIn — brand blue */
.pf-share-linkedin {
    background: #0A66C2;
    color: #fff;
}

/* WhatsApp — brand green */
.pf-share-whatsapp {
    background: #25D366;
    color: #fff;
}

/* Facebook — brand blue */
.pf-share-facebook {
    background: #1877F2;
    color: #fff;
}

/* Copy Link — neutral surface */
.pf-share-copy {
    background: var(--alt-section-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.pf-share-copy.pf-copied {
    background: var(--success-color);
    color: #fff;
    border-color: var(--success-color);
}

/* Dark mode adjustments */
[data-theme="dark"] .pf-social-share {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

[data-theme="dark"] .pf-share-copy {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

[data-theme="dark"] .pf-share-twitter {
    background: #1a1a1a;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .pf-social-share {
        padding: 18px;
    }
    .pf-share-btn {
        padding: 8px 13px;
        font-size: 12px;
    }
    .pf-share-btn span {
        display: none;
    }
    .pf-share-btn svg {
        width: 20px;
        height: 20px;
    }
}
