/*
Theme Name: EmissionTrak
Theme URI: https://emissiontrak.com
Description: A professional, NYRB-inspired theme for EmissionTrak with excellent typography and clean design
Version: 1.0
Author: EmissionTrak Team
*/

/* ===================================
   CSS Variables & Color Palette
   =================================== */
:root {
    --primary-color: #051094;      /* Admiral blue */
    --accent-color: #0a1fb8;       /* Lighter Admiral blue accent */
    --text-primary: #2d3748;       /* Near-black for body text */
    --text-secondary: #718096;     /* Gray for secondary text */
    --background: #ffffff;
    --background-light: #f7fafc;
    --border-color: #e2e8f0;
}

/* ===================================
   Typography - NYRB Style
   =================================== */
body {
    font-family: 'Bookman Old Style', 'URW Bookman L', 'Bookman', 'Georgia', 'Palatino', serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--background);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bookman Old Style', 'URW Bookman L', 'Bookman', 'Georgia', 'Palatino', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1.5em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

a:hover {
    border-bottom-color: var(--primary-color);
}

/* ===================================
   Layout & Structure
   =================================== */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===================================
   Header
   =================================== */
.site-header {
    background-color: var(--background-light);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.site-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.site-title a {
    color: var(--primary-color);
    border: none;
}

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

.site-description {
    margin: 5px 0 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===================================
   Navigation
   =================================== */
.main-navigation {
    margin-top: 15px;
}

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

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    padding-bottom: 2px;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Breadcrumb navigation */
.breadcrumb-navigation {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.breadcrumb-navigation a {
    color: var(--primary-color);
    border: none;
    font-weight: 500;
}

.breadcrumb-navigation a:hover {
    border-bottom: 1px solid var(--primary-color);
}

.breadcrumb-navigation .current-page {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===================================
   Article/Post Styles
   =================================== */
article {
    margin-bottom: 60px;
}

.entry-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
}

/* Colored entry headers for section pages */
.entry-header.section-light,
.entry-header.section-maroon,
.entry-header.section-moss,
.entry-header.section-lead,
.entry-header.section-cinnamon {
    padding: 40px;
    margin-left: -20px;
    margin-right: -20px;
    margin-top: -40px;
    border-bottom: none;
}

.entry-header.section-maroon .entry-title,
.entry-header.section-moss .entry-title,
.entry-header.section-lead .entry-title,
.entry-header.section-cinnamon .entry-title {
    color: #ffffff;
    margin-top: 0;
}

.entry-header.section-light .entry-title {
    color: var(--primary-color);
    margin-top: 0;
}

.entry-title {
    margin-top: 0;
}

.entry-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.entry-content {
    font-size: 1.1rem;
}

/* Archive/index page excerpt with inline Read More link */
.excerpt-with-link {
    display: inline;
}

.excerpt-with-link p {
    display: inline;
    margin: 0;
    margin-right: 0.5em;
}

.excerpt-with-link .btn {
    white-space: nowrap;
    display: inline;
    margin: 0;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
}

.entry-content a {
    color: #800020;
    border-bottom-color: #800020;
}

.entry-content a:hover {
    color: #600018;
    border-bottom-color: #600018;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 30px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* ===================================
   Footer
   =================================== */
.site-footer {
    background-color: var(--background-light);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===================================
   Buttons & CTAs
   =================================== */
.btn {
    display: inline;
    padding: 0;
    background-color: transparent;
    color: #800020;
    border: none;
    border-bottom: 1px solid #800020;
    border-radius: 0;
    font-family: inherit;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background-color: transparent;
    color: #600018;
    border-bottom-color: #600018;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .content-wrapper {
        padding: 20px;
    }
}

/* ===================================
   Colored Section Backgrounds
   =================================== */
.section-cinnamon {
    background-color: #652A0E;
    color: #ffffff;
    padding: 40px;
    margin: 40px 0;
}

.section-cinnamon h1,
.section-cinnamon h2,
.section-cinnamon h3,
.section-cinnamon h4,
.section-cinnamon h5,
.section-cinnamon h6 {
    color: #ffffff;
}

.section-cinnamon a {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.section-cinnamon a:hover {
    border-bottom-color: #ffffff;
}

.section-moss {
    background-color: #466D1D;
    color: #ffffff;
    padding: 40px;
    margin: 40px 0;
}

.section-moss h1,
.section-moss h2,
.section-moss h3,
.section-moss h4,
.section-moss h5,
.section-moss h6 {
    color: #ffffff;
}

.section-moss a {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.section-moss a:hover {
    border-bottom-color: #ffffff;
}

.section-maroon {
    background-color: #800000;
    color: #ffffff;
    padding: 40px;
    margin: 40px 0;
}

.section-maroon h1,
.section-maroon h2,
.section-maroon h3,
.section-maroon h4,
.section-maroon h5,
.section-maroon h6 {
    color: #ffffff;
}

.section-maroon a {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.section-maroon a:hover {
    border-bottom-color: #ffffff;
}

.section-lead {
    background-color: #3F3F4E;
    color: #ffffff;
    padding: 40px;
    margin: 40px 0;
}

.section-lead h1,
.section-lead h2,
.section-lead h3,
.section-lead h4,
.section-lead h5,
.section-lead h6 {
    color: #ffffff;
}

.section-lead a {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.section-lead a:hover {
    border-bottom-color: #ffffff;
}

/* Light background variation - uses dark text */
.section-light {
    background-color: var(--background-light);
    color: var(--text-primary);
    padding: 40px;
    margin: 40px 0;
    border-left: 4px solid var(--primary-color);
}

/* ===================================
   Drop Cap Styling
   =================================== */
.drop-cap::first-letter {
    float: left;
    font-size: 3.5em;
    line-height: 0.9;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 0.1em;
    margin-top: 0.05em;
}

/* Alternative: Raised Cap */
.raised-cap::first-letter {
    font-size: 3em;
    line-height: 1;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 0.05em;
}

/* ===================================
   Footnotes - NYRB Style
   =================================== */
/* Hide WordPress footnotes section - we use tooltip instead */
.entry-content .footnotes,
.entry-content ol.footnotes,
.entry-content div.footnotes {
    display: none !important;
}

.footnote-ref {
    position: relative;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    border: none;
    font-size: 0.75em;
    vertical-align: super;
    line-height: 0;
}

.footnote-ref:hover {
    border: none;
    opacity: 0.8;
}

.footnote-tooltip {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    border-top: 3px solid var(--primary-color);
    padding: 20px 40px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 100%;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.footnote-tooltip.active {
    display: block;
}

.footnote-content {
    max-width: 720px;
    margin: 0 auto;
}

.footnote-content a {
    color: #800020;
    border-bottom-color: #800020;
}

.footnote-content a:hover {
    color: #600018;
    border-bottom-color: #600018;
}

.footnote-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
}

.footnote-close:hover {
    color: var(--primary-color);
}

/* ===================================
   End-of-Article Marker
   =================================== */
/* Hide the separate article-end div */
.article-end {
    display: none;
}

/* Add end mark to last paragraph in entry-content - only on single posts */
.single .entry-content > p:last-of-type::after {
    content: "\2009\25A0"; /* Em space + filled square */
    color: var(--primary-color);
    font-size: 0.8rem;
    margin-left: 0.2em;
    vertical-align: middle;
}

/* Remove end mark from paragraphs that are followed by hr */
.single .entry-content > p:has(+ hr)::after {
    content: none;
}

/* ===================================
   Share Buttons
   =================================== */
.share-section {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.share-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 0 0 15px 0;
}

.share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 0;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 1.2rem;
}

.share-btn i,
.share-btn svg,
.share-btn .share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.share-icon {
    fill: currentColor;
    max-width: 24px;
    max-height: 24px;
    width: auto;
    height: auto;
}

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

.twitter-x {
    font-size: 1.3rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================================
   Accessibility
   =================================== */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.screen-reader-text {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
