/*
Theme Name: Artemis Writer
Theme URI: https://artemiswriter.com
Author: Your Name
Description: GeneratePress child theme styled for genealogy and theology writers. Warm parchment palette, serif headings, high-readability typography. Designed for use with the BookPub Core plugin.
Template: generatepress
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
*/

/* ========================================================================
   Artemis Writer — Frontend Styles
   "Library + Ancestry + Bible Hub" Hybrid Aesthetic
   ======================================================================== */

:root {
    /* Core Palette */
    --aw-blue: #1B4F8A;
    --aw-green: #3A7D44;
    --aw-parchment: #FAF6EE;
    --aw-dark-slate: #2D3142;
    --aw-mahogany: #6B3434;

    /* Supporting Tones */
    --aw-border: #D8CFC0;
    --aw-muted: #6B6B6B;
    --aw-light-blue: #E8EFF6;
    --aw-light-green: #EDF5EE;
    --aw-link-hover: #144577;
    --aw-button-shadow: rgba(27, 79, 138, 0.25);

    /* Typography */
    --aw-serif: 'Lora', Georgia, 'Times New Roman', serif;
    --aw-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --aw-radius: 6px;
    --aw-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --aw-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.10);
}

/* -----------------------------------------------------------------------
   Base Typography
   ----------------------------------------------------------------------- */

body {
    background-color: var(--aw-parchment);
    color: var(--aw-dark-slate);
    font-family: var(--aw-sans);
    font-size: 17px;
    line-height: 1.7;
}

p {
    margin-bottom: 1.5em;
}

a,
a:visited {
    color: var(--aw-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--aw-link-hover);
    text-decoration: underline;
}

/* -----------------------------------------------------------------------
   Headings — Lora serif, authoritative feel
   ----------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--aw-serif);
    color: var(--aw-dark-slate);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.6em;
}

h1 {
    font-size: 2.2rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--aw-border);
    padding-bottom: 0.3em;
    margin-top: 2em;
}

h3 {
    font-size: 1.4rem;
    color: var(--aw-blue);
    margin-top: 1.8em;
}

h4 {
    font-size: 1.2rem;
    color: var(--aw-mahogany);
}

/* -----------------------------------------------------------------------
   Site Structure — GeneratePress Container Overrides
   ----------------------------------------------------------------------- */

.site-header {
    background-color: var(--aw-dark-slate);
    border-bottom: 3px solid var(--aw-blue);
    box-shadow: var(--aw-shadow);
}

.main-title a,
.main-title a:visited {
    color: var(--aw-parchment);
    font-family: var(--aw-serif);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.main-title a:hover {
    color: #fff;
    text-decoration: none;
}

.site-description {
    color: rgba(250, 246, 238, 0.7);
    font-style: italic;
    font-family: var(--aw-serif);
}

/* Main navigation */
.main-navigation {
    background-color: var(--aw-blue);
}

.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle {
    color: #fff;
    font-family: var(--aw-sans);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
    background-color: var(--aw-link-hover);
    color: #fff;
}

.main-navigation ul ul {
    background-color: var(--aw-dark-slate);
    box-shadow: var(--aw-shadow);
}

/* -----------------------------------------------------------------------
   Content Cards — Parchment on slate, Ancestry-style
   ----------------------------------------------------------------------- */

.inside-article,
.separate-containers .inside-article {
    background-color: #fff;
    border: 1px solid var(--aw-border);
    border-radius: var(--aw-radius);
    box-shadow: var(--aw-shadow);
    padding: 30px;
    margin-bottom: 20px;
}

.inside-article:hover {
    box-shadow: var(--aw-shadow-hover);
}

.entry-title {
    font-family: var(--aw-serif);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.4em;
}

.entry-title a {
    color: var(--aw-dark-slate);
}

.entry-title a:hover {
    color: var(--aw-blue);
    text-decoration: none;
}

.entry-meta {
    font-size: 13px;
    color: var(--aw-muted);
    font-family: var(--aw-sans);
    border-bottom: 1px solid var(--aw-border);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.entry-meta a {
    color: var(--aw-blue);
    font-weight: 500;
}

/* -----------------------------------------------------------------------
   Post Navigation — Ancestry-style prev/next cards
   ----------------------------------------------------------------------- */

.post-navigation {
    margin-top: 30px;
}

.nav-previous,
.nav-next {
    background-color: #fff;
    border: 1px solid var(--aw-border);
    border-radius: var(--aw-radius);
    padding: 15px 20px;
    box-shadow: var(--aw-shadow);
}

.nav-previous a,
.nav-next a {
    font-family: var(--aw-serif);
    font-weight: 600;
}

/* -----------------------------------------------------------------------
   Sidebar Widgets — Bible Hub panel feel
   ----------------------------------------------------------------------- */

.sidebar .widget,
.footer-widgets .widget {
    background-color: #fff;
    border: 1px solid var(--aw-border);
    border-radius: var(--aw-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--aw-shadow);
}

.widget-title {
    font-family: var(--aw-serif);
    font-size: 1.1rem;
    color: var(--aw-blue);
    border-bottom: 2px solid var(--aw-border);
    padding-bottom: 8px;
    margin-bottom: 15px;
    text-transform: none;
    letter-spacing: 0;
}

.widget ul li {
    border-bottom: 1px dotted var(--aw-border);
    padding: 6px 0;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--aw-dark-slate);
}

.widget ul li a:hover {
    color: var(--aw-blue);
}

/* -----------------------------------------------------------------------
   Forms & Inputs — Warm, accessible
   ----------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
    background-color: #fff;
    border: 1px solid var(--aw-border);
    border-radius: var(--aw-radius);
    padding: 10px 14px;
    font-family: var(--aw-sans);
    font-size: 15px;
    color: var(--aw-dark-slate);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--aw-blue);
    box-shadow: 0 0 0 3px rgba(27, 79, 138, 0.12);
    outline: none;
}

/* -----------------------------------------------------------------------
   Buttons — Forest Green primary, Blue secondary
   ----------------------------------------------------------------------- */

a.button,
.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    background-color: var(--aw-green);
    color: #fff;
    border: none;
    border-radius: var(--aw-radius);
    padding: 10px 22px;
    font-family: var(--aw-sans);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(58, 125, 68, 0.2);
}

a.button:hover,
.button:hover,
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
    background-color: #2E6434;
    color: #fff;
    box-shadow: 0 3px 8px rgba(58, 125, 68, 0.3);
    text-decoration: none;
}

a.button:visited,
.button:visited {
    color: #fff;
}

/* Secondary button style (blue) */
a.button-secondary,
.button-secondary {
    background-color: var(--aw-blue);
    box-shadow: 0 2px 4px var(--aw-button-shadow);
}

a.button-secondary:hover,
.button-secondary:hover {
    background-color: var(--aw-link-hover);
}

/* -----------------------------------------------------------------------
   Block Elements — Gutenberg / Block Editor
   ----------------------------------------------------------------------- */

.entry-content .wp-block-quote {
    border-left: 4px solid var(--aw-blue);
    background-color: var(--aw-light-blue);
    padding: 20px 24px;
    border-radius: 0 var(--aw-radius) var(--aw-radius) 0;
    font-family: var(--aw-serif);
    font-style: italic;
}

.entry-content .wp-block-quote p {
    margin-bottom: 0;
}

.entry-content .wp-block-pullquote {
    border-top: 4px solid var(--aw-blue);
    border-bottom: 4px solid var(--aw-blue);
    border-radius: var(--aw-radius);
}

.entry-content .wp-block-code {
    background-color: var(--aw-dark-slate);
    color: var(--aw-parchment);
    border-radius: var(--aw-radius);
    padding: 20px;
    font-size: 14px;
}

.entry-content .wp-block-code code {
    color: var(--aw-parchment);
}

.entry-content .wp-block-table tbody tr:nth-child(even) {
    background-color: var(--aw-parchment);
}

.entry-content .wp-block-table th {
    background-color: var(--aw-blue);
    color: #fff;
    font-family: var(--aw-serif);
}

.entry-content .wp-block-table td,
.entry-content .wp-block-table th {
    border: 1px solid var(--aw-border);
    padding: 10px 14px;
}

.entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(even) {
    background-color: var(--aw-light-blue);
}

/* Block separator */
.entry-content hr,
.wp-block-separator {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--aw-border), transparent);
    margin: 2em 0;
}

/* -----------------------------------------------------------------------
   Footer — Dark, grounded, library shelf feel
   ----------------------------------------------------------------------- */

.site-footer {
    background-color: var(--aw-dark-slate);
    color: rgba(250, 246, 238, 0.7);
    border-top: 3px solid var(--aw-blue);
}

.site-footer a,
.site-footer a:visited {
    color: rgba(250, 246, 238, 0.85);
}

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

.footer-widgets {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 30px 0;
}

.footer-widgets .widget-title {
    color: var(--aw-parchment);
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* -----------------------------------------------------------------------
   Comments — Warm thread styling
   ----------------------------------------------------------------------- */

.comments-area {
    background-color: #fff;
    border: 1px solid var(--aw-border);
    border-radius: var(--aw-radius);
    padding: 24px;
    box-shadow: var(--aw-shadow);
}

.comment-list .comment {
    border-bottom: 1px solid var(--aw-border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

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

.comment-author {
    font-family: var(--aw-serif);
    font-weight: 600;
    color: var(--aw-dark-slate);
}

.comment-reply-link {
    background-color: var(--aw-light-blue);
    color: var(--aw-blue);
    border-radius: var(--aw-radius);
    padding: 4px 12px;
    font-size: 13px;
}

.comment-reply-link:hover {
    background-color: var(--aw-blue);
    color: #fff;
    text-decoration: none;
}

/* -----------------------------------------------------------------------
   Search Results — Ancestry-style result snippets
   ----------------------------------------------------------------------- */

.search-results .entry-summary {
    background-color: var(--aw-parchment);
    border-left: 3px solid var(--aw-green);
    padding: 12px 16px;
    border-radius: 0 var(--aw-radius) var(--aw-radius) 0;
    font-size: 15px;
}

/* -----------------------------------------------------------------------
   Pagination — Bible Hub-style horizontal tabs
   ----------------------------------------------------------------------- */

.paging-navigation .nav-links {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 30px 0;
}

.paging-navigation .page-numbers {
    background-color: #fff;
    border: 1px solid var(--aw-border);
    border-radius: var(--aw-radius);
    padding: 8px 14px;
    font-family: var(--aw-sans);
    font-weight: 500;
    color: var(--aw-dark-slate);
    transition: all 0.2s ease;
}

.paging-navigation .page-numbers.current {
    background-color: var(--aw-blue);
    color: #fff;
    border-color: var(--aw-blue);
}

.paging-navigation .page-numbers:hover:not(.current) {
    background-color: var(--aw-light-blue);
    color: var(--aw-blue);
    text-decoration: none;
}

/* -----------------------------------------------------------------------
   Accessibility & Misc
   ----------------------------------------------------------------------- */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

:focus {
    outline: 2px solid var(--aw-blue);
    outline-offset: 2px;
}

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

/* Selection */
::selection {
    background-color: rgba(27, 79, 138, 0.15);
    color: var(--aw-dark-slate);
}

/* Smooth scroll for older browsers */
html {
    scroll-behavior: smooth;
}

/* -----------------------------------------------------------------------
   Responsive Adjustments
   ----------------------------------------------------------------------- */

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .inside-article {
        padding: 20px;
    }

    .paging-navigation .nav-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .entry-title {
        font-size: 1.5rem;
    }

    .button,
    a.button,
    button {
        display: inline-block;
        width: 100%;
        margin-bottom: 8px;
        text-align: center;
    }
}
