/*
Theme Name: ReconScribe Reader Theme
Theme URI: https://reconscribe.com
Author: Antigravity
Description: Premium, content-focused reading theme for accounting, tax, and finance laws.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: reconscribe-reader
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    /* Color Tokens based on ReconScribe Logo */
    --brand-navy: 215, 88%, 27%;      /* #083B82 */
    --brand-green: 109, 61%, 39%;     /* #3CA026 */
    --brand-blue: 198, 100%, 45%;     /* #00A2E8 */
    
    /* Semantic Colors */
    --color-primary: hsl(var(--brand-navy));
    --color-accent: hsl(var(--brand-green));
    --color-accent-light: hsla(var(--brand-green), 0.1);
    --color-secondary: hsl(var(--brand-blue));
    
    /* Neutral Colors for Light Theme Reading */
    --bg-main: hsl(210, 20%, 98%);
    --bg-card: hsl(0, 0%, 100%);
    --bg-modal: hsla(0, 0%, 100%, 0.85);
    --text-main: hsl(222, 25%, 12%);
    --text-muted: hsl(215, 15%, 45%);
    --border-light: hsl(214, 15%, 91%);
    --shadow-sm: 0 2px 8px rgba(8, 59, 130, 0.04);
    --shadow-md: 0 10px 30px rgba(8, 59, 130, 0.06);
    --shadow-lg: 0 20px 40px rgba(8, 59, 130, 0.12);
    
    /* Layout & Fonts */
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-reading: 'Lora', Georgia, serif;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background-color: hsla(0, 0%, 100%, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

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

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

.logo-img {
    height: 68px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Auth Buttons */
.auth-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-signin {
    background-color: var(--bg-card);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-signin:hover {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(8, 59, 130, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-primary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

/* Hero */
.hero {
    padding: 60px 0 40px;
    text-align: center;
    background: radial-gradient(circle at top, hsla(var(--brand-blue), 0.05) 0%, transparent 60%);
}

.hero h1 {
    font-family: var(--font-reading);
    font-size: 2.6rem;
    color: var(--color-primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 30px;
    font-weight: 300;
}

/* Search */
.search-wrapper {
    position: relative;
    max-width: 580px;
    margin: 0 auto 32px;
    box-shadow: var(--shadow-md);
    border-radius: 30px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.search-wrapper:focus-within {
    border-color: var(--color-accent);
}

.search-input {
    width: 100%;
    padding: 16px 24px 16px 56px;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: var(--font-ui);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Category Filter Tags */
.filter-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tag-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.tag-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.tag-btn.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Grid */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    padding: 20px 0 80px;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    padding: 28px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--color-primary);
    opacity: 0;
    transition: var(--transition);
}

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

.card:hover::before {
    opacity: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-category {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-secondary);
}

.card-date {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.card-title {
    font-family: var(--font-reading);
    font-size: 1.35rem;
    color: var(--color-primary);
    line-height: 1.35;
    margin-bottom: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

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

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
    flex-grow: 1;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 18px;
    margin-top: auto;
}

.read-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.read-link:hover {
    color: var(--color-accent);
}

.downloads-wrapper {
    display: flex;
    gap: 8px;
}

.btn-download {
    background-color: var(--bg-main);
    border: 1px solid var(--border-light);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    text-decoration: none;
}

.btn-download.locked {
    position: relative;
    cursor: not-allowed;
}

.btn-download.locked:hover {
    background-color: hsla(0, 100%, 96%, 0.5);
    border-color: hsl(0, 80%, 90%);
    color: hsl(0, 70%, 50%);
}

.btn-download:not(.locked):hover {
    background-color: var(--color-accent-light);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.lock-icon {
    font-size: 0.75rem;
    color: hsl(0, 70%, 50%);
}

.excel-icon {
    color: hsl(120, 60%, 35%);
}

.pdf-icon {
    color: hsl(0, 80%, 45%);
}

/* Reader Mode inside single.php */
.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--bg-main);
    z-index: 510;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--color-accent);
    transition: width 0.1s ease;
}

.reader-header {
    border-bottom: 1px solid var(--border-light);
    padding: 16px 0;
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 505;
}

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

.btn-back {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-back:hover {
    color: var(--color-accent);
}

.font-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.font-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: white;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.font-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.reader-body {
    max-width: 680px;
    margin: 60px auto 100px;
    font-family: var(--font-reading);
}

.reader-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-ui);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.reader-category {
    color: var(--color-secondary);
    font-weight: 700;
    text-transform: uppercase;
}

.reader-body h1 {
    font-size: 2.5rem;
    line-height: 1.25;
    color: var(--color-primary);
    margin-bottom: 28px;
    font-weight: 700;
}

.reader-article-content {
    font-size: 1.18rem;
    line-height: 1.75;
    color: hsl(222, 25%, 15%);
}

.reader-article-content p {
    margin-bottom: 28px;
}

.reader-article-content h3 {
    font-size: 1.6rem;
    margin: 40px 0 16px;
    color: var(--color-primary);
}

.reader-article-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-muted);
}

.reader-downloads-block {
    background-color: var(--bg-main);
    border: 1px solid var(--border-light);
    padding: 24px;
    border-radius: var(--border-radius);
    margin-top: 50px;
    font-family: var(--font-ui);
}

.reader-downloads-block h4 {
    color: var(--color-primary);
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.reader-downloads-block p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: hsla(0, 0%, 100%, 0.7);
    padding: 60px 0 40px;
    font-size: 0.92rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.1);
    padding-bottom: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    height: 68px;
    filter: brightness(0) invert(1);
}

.footer-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.footer-links a {
    color: hsla(0, 0%, 100%, 0.7);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    color: white;
}

.footer-disclaimer {
    font-size: 0.82rem;
    line-height: 1.6;
    color: hsla(0, 0%, 100%, 0.55);
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.08);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.footer-disclaimer p {
    margin: 0;
}

.footer-disclaimer strong {
    color: white;
    font-weight: 600;
}

.footer-copy {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: hsla(0, 0%, 100%, 0.5);
}
