/* ============================================================
   Modern design overhaul for the site
   - Builds on top of the existing template styles
   - Modern desktop layout + mobile drawer navigation
   - Uses the site's existing color palette
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;0,900;1,400&family=Source+Sans+3:wght@400;600;700&display=swap');

/* ---------- Base ---------- */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 0 !important;
    background: linear-gradient(180deg, #EFE6D2 0%, #DED1B0 45%, #D5C49E 100%) fixed !important;
}

#art-main {
    font-size: 18px;
    font-family: 'Source Sans 3', 'Cabin', Arial, 'Arial Unicode MS', Helvetica, sans-serif;
    background: linear-gradient(180deg, #EFE6D2 0%, #DED1B0 45%, #D5C49E 100%) !important;
}

/* ---------- Content typography ---------- */
#art-main .art-postcontent,
#art-main .art-postcontent li,
#art-main .art-postcontent p,
#art-main .art-postcontent a,
#art-main .art-blockcontent {
    font-family: 'Source Sans 3', 'Cabin', Arial, sans-serif;
    color: #37281A;
    font-size: 18px;
    line-height: 1.9;
}

.art-postcontent p {
    margin: 15px 0;
}

.art-postcontent h1,
.art-postcontent h1 a {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 38px;
    line-height: 1.25;
    color: #8A3E00;
    letter-spacing: .01em;
    margin: 18px 0 22px;
}

.art-postcontent h2,
.art-postcontent h2 a {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 29px;
    line-height: 1.3;
    color: #A0512B;
}

.art-postcontent h3,
.art-postcontent h3 a {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 25px;
    color: #A0744B;
}

.art-postcontent h4,
.art-postcontent h4 a {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 22px;
    color: #3A3018;
}

/* Links */
.art-postcontent a,
.art-postcontent a:link,
.art-blockcontent a,
.art-blockcontent a:link {
    color: #A0512B;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.art-postcontent a:hover,
.art-blockcontent a:hover {
    color: #8A3E00;
    text-decoration: none;
    border-bottom-color: #C6A586;
}

/* ---------- Sheet / main card ---------- */
.art-sheet {
    width: 1060px;
    max-width: 94%;
    margin: 28px auto;
    border: none;
    border-radius: 16px;
    box-shadow: 0 22px 55px rgba(93, 63, 30, 0.20), 0 3px 10px rgba(93, 63, 30, 0.08);
    overflow: hidden;
}

/* ---------- Site header (logo) - white bar, logo on the left ---------- */
.art-sheet > a:first-child {
    display: block;
    text-align: left;
    padding: 22px 28px;
    background: #FFFFFF;
    border-bottom: 1px solid rgba(198, 165, 134, 0.7);
}

.art-sheet > a:first-child img {
    margin: 0 !important;
    display: block;
    width: auto !important;
    height: auto;
    max-width: 100%;
}

/* ---------- Horizontal nav bar ---------- */
.art-nav {
    background: linear-gradient(90deg, #74380a 0%, #8A3E00 55%, #9C4A10 100%);
    border-radius: 0;
    text-align: center;
    box-shadow: 0 4px 16px rgba(90, 50, 10, 0.28);
    padding: 8px 0;
}

ul.art-hmenu {
    float: none;
    display: block;
    text-align: center;
    padding: 0 8px;
}

ul.art-hmenu > li {
    float: none;
    display: inline-block;
    margin: 0 !important;
}

ul.art-hmenu > li:before {
    display: none;
}

ul.art-hmenu > li > a {
    height: auto;
    line-height: 1.35;
    padding: 13px 18px !important;
    margin: 3px 2px !important;
    font-size: 16px !important;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #FFF7EC;
    border-radius: 9px;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

ul.art-hmenu > li > a:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #FFFFFF !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

ul.art-hmenu > li > a.active,
ul.art-hmenu > li > a:active {
    background: rgba(255, 255, 255, 0.13) !important;
    color: #FFE9C9;
}

/* ---------- Sidebar ---------- */
.art-content-layout .art-sidebar1 {
    border-right: none;
    width: 290px;
    padding: 24px 8px 20px 6px;
}

.art-vmenublock {
    background: transparent;
    margin: 0;
}

div#sticker {
    width: 250px;
    margin: 0;
    background: #FBF6EE;
    border: 1px solid #E4D2B6;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(120, 90, 50, 0.12);
    overflow: hidden;
}

#sticker > p,
#sticker > p[style] {
    background: linear-gradient(90deg, #8A3E00, #A0522D) !important;
    margin: 0 !important;
    padding: 14px 10px !important;
    font-size: 17px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    letter-spacing: .05em;
    text-transform: uppercase;
}

#sticker > p a,
#sticker > p a[style] {
    color: #FFFFFF !important;
    text-decoration: none;
    display: block;
}

/* Sidebar chapter menu */
ul.art-vmenu > li {
    margin: 0 12px;
}

ul.art-vmenu > li:after,
ul.art-vmenu > li:before,
ul.art-vmenu ul:after,
ul.art-vmenu ul:before {
    display: none !important;
}

ul.art-vmenu > li > a,
ul.art-vmenu > li:first-child > a,
ul.art-vmenu > li:last-child > a {
    background: #F1E6D3 !important;
    color: #6B4426 !important;
    border: 1px solid #E7D5B8 !important;
    border-radius: 9px;
    margin: 5px 0;
    padding: 11px 15px !important;
    padding-left: 15px !important;
    font-size: 16px !important;
    line-height: 1.4;
    font-weight: 600;
    transition: background .18s ease, color .18s ease, padding-left .18s ease, transform .18s ease;
}

ul.art-vmenu > li > a:hover,
ul.art-vmenu > li > a.active:hover {
    background: #8A3E00 !important;
    color: #FFF7EC !important;
    border-color: #8A3E00 !important;
    padding-left: 20px !important;
}

ul.art-vmenu > li > a.active {
    background: #8A3E00 !important;
    color: #FFFFFF !important;
    border-color: #8A3E00 !important;
}

ul.art-vmenu > li:last-child > a,
ul.art-vmenu > li:last-child > a.active {
    font-weight: 700;
}

/* ---------- Article / post ---------- */
.art-post {
    margin: 12px 26px;
    padding: 0;
}

.art-postmetadataheader {
    background: none !important;
    border: none !important;
    text-align: center;
    padding: 20px 10px 6px;
    margin-bottom: 0;
}

.art-postmetadataheader img {
    display: block;
    margin: 0 auto !important;
    max-width: 100%;
    height: auto;
}

.art-postcontent {
    font-size: 18px;
    line-height: 1.9;
    padding: 6px 12px 22px;
}

/* ---------- desktop hides the mobile-only table ---------- */
.art-postcontent table.mobile-index {
    display: none;
}

/* ---------- Index table (Index of Verses) ---------- */
.art-postcontent table.auto-style1 {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #E0C9A8;
    border-radius: 12px;
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: 0 6px 22px rgba(120, 90, 50, 0.13);
    margin: 16px auto !important;
    table-layout: fixed;
}

.art-postcontent table.auto-style1 td {
    border: none !important;
    padding: 11px 12px;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

.art-postcontent table.auto-style1 td.auto-style3 {
    font-style: normal;
    text-align: left;
}

.art-postcontent table.auto-style1 tr:first-child td {
    background: #8A3E00 !important;
}

.art-postcontent table.auto-style1 tr:first-child td span {
    color: #FFF !important;
    font-weight: 700;
    letter-spacing: .1em;
    font-size: 14px;
    text-transform: uppercase;
}

.art-postcontent table.auto-style1 tr:nth-child(even) td {
    background: #F7EEDF;
}

.art-postcontent table.auto-style1 a,
.art-postcontent table.auto-style1 a:link {
    color: #5B3A1E !important;
    font-weight: 600;
    border-bottom: none;
}

.art-postcontent table.auto-style1 a:hover {
    color: #8A3E00 !important;
    border-bottom-color: transparent;
}

/* ---------- Verse markers inside chapters ---------- */
.verseclick {
    display: block;
    text-align: center !important;
    padding-right: 0 !important;
    color: #8A3E00 !important;
    font-size: 17px;
    letter-spacing: .05em;
    font-weight: 700;
    margin: 4px 0;
}

/* ---------- Blockquote ---------- */
blockquote,
.art-postcontent blockquote,
.art-blockcontent blockquote {
    background: #F2E7D4 !important;
    border-left: 4px solid #C6A586 !important;
    border-radius: 0 10px 10px 0;
    margin: 18px 0 18px 12px !important;
    padding: 15px 18px 15px 38px;
    font-family: 'Merriweather', Georgia, serif;
    color: #4A3320;
    font-size: 17px;
    box-shadow: 0 3px 12px rgba(120, 90, 50, 0.08);
}

/* ---------- Footer ---------- */
.art-footer {
    background: linear-gradient(90deg, #E8D9BE 0%, #F0E4CC 100%) !important;
    border-top: 1px solid #D8C09A;
    border-radius: 0;
    padding: 22px 16px;
    font-size: 16px;
    color: #5B4328;
    line-height: 1.6;
}

/* ---------- Buttons ---------- */
.art-button,
a.art-button {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(120, 90, 50, 0.25) !important;
    background: linear-gradient(to bottom, #C4AD73 0%, #B4964B 79%, #A98D47 100%) !important;
    border-color: #A0744B !important;
}

/* ------------------------------------------------------------------
   MOBILE - drawer navigation, larger type
------------------------------------------------------------------ */

/* floating hamburger button */
#m-drawer-open {
    display: none;
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 12500;
    height: 46px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(135deg, #9C4A10 0%, #8A3E00 100%);
    box-shadow: 0 6px 20px rgba(120, 60, 10, 0.45), 0 1px 4px rgba(60, 30, 5, 0.3);
    cursor: pointer;
    padding: 0 16px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: 'Source Sans 3', 'Cabin', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #FFF7EC;
    -webkit-tap-highlight-color: transparent;
}

.m-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 14px;
}

.m-burger i {
    display: block;
    height: 3px;
    width: 100%;
    background: #FFF7EC;
    border-radius: 3px;
    transition: transform .25s ease, opacity .25s ease;
}

#m-drawer-open:active {
    transform: scale(0.95);
}

#m-drawer-open.m-active .m-burger i:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

#m-drawer-open.m-active .m-burger i:nth-child(2) {
    opacity: 0;
}

#m-drawer-open.m-active .m-burger i:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}

/* backdrop */
.m-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(43, 26, 8, 0.55);
    z-index: 12400;
}

.m-backdrop.show {
    display: block;
}

/* drawer */
#m-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 90vw);
    background: #FBF6EE;
    z-index: 12450;
    box-shadow: -14px 0 45px rgba(60, 35, 10, 0.35);
    transform: translateX(102%);
    transition: transform .34s cubic-bezier(0.22, 0.8, 0.32, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
}

#m-drawer.open {
    transform: translateX(0);
}

body.m-locked {
    overflow: hidden;
}

.m-drawer-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 18px;
    background: linear-gradient(135deg, #9C4A10 0%, #8A3E00 100%);
    color: #FFF7EC;
    box-shadow: 0 4px 14px rgba(90, 50, 10, 0.25);
}

.m-drawer-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .02em;
}

.m-drawer-close {
    background: rgba(255, 255, 255, 0.16);
    color: #FFF7EC;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.m-drawer-close:active {
    background: rgba(255, 255, 255, 0.3);
}

.m-drawer-body {
    padding: 12px 16px 70px;
}

/* top-level site links inside drawer */
.m-site-nav {
    margin: 6px 0 4px;
}

.m-site-nav a {
    display: block;
    padding: 15px 16px;
    margin: 7px 0;
    background: #EFE3CB;
    color: #5B3A1E;
    border-left: 4px solid transparent;
    border-radius: 10px;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: .02em;
    line-height: 1.35;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.m-site-nav a:hover,
.m-site-nav a:active {
    background: #8A3E00;
    color: #FFF7EC;
    border-left-color: #E8B87E;
}

/* chapters title link (Index of Verses Explained) */
.m-chapter-link {
    display: block;
    margin: 14px 0 12px;
    padding: 15px 16px;
    background: linear-gradient(90deg, #9C4A10 0%, #8A3E00 100%);
    color: #FFF7EC !important;
    border-radius: 12px;
    text-align: center;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .03em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 6px 16px rgba(120, 60, 10, 0.3);
}

.m-chapter-link:hover,
.m-chapter-link:active {
    background: linear-gradient(90deg, #A0522D 0%, #8A3E00 100%);
    color: #FFFFFF !important;
}

/* chapters menu inside drawer */
#m-drawer ul.art-vmenu {
    margin: 0;
    padding: 0;
}

#m-drawer ul.art-vmenu > li {
    margin: 0;
}

#m-drawer ul.art-vmenu > li > a,
#m-drawer ul.art-vmenu > li:first-child > a,
#m-drawer ul.art-vmenu > li:last-child > a {
    background: transparent !important;
    color: #5B3A1E !important;
    border: none !important;
    border-bottom: 1px solid #EFE3CB !important;
    border-radius: 10px;
    padding: 14px 16px !important;
    padding-left: 16px !important;
    margin: 3px 0;
    font-size: 19px !important;
    font-weight: 600;
    line-height: 1.4;
    transition: background .16s ease, color .16s ease, padding-left .16s ease;
}

#m-drawer ul.art-vmenu > li > a:hover,
#m-drawer ul.art-vmenu > li > a:active,
#m-drawer ul.art-vmenu > li > a.active {
    background: #F3E7D2 !important;
    color: #8A3E00 !important;
    padding-left: 22px !important;
}

@media screen and (max-width: 991px) {
    body {
        min-width: 0;
        overflow-x: hidden;
    }

    #art-main {
        font-size: 20px;
    }

    .art-sheet {
        width: 100%;
        max-width: none;
        margin: 0 auto !important;
        min-width: 0 !important;
        border-radius: 0;
        box-shadow: none;
        border-color: transparent;
    }

    /* hide desktop nav & sidebar - both live inside the drawer on small screens */
    .art-nav {
        display: none;
    }

    .art-sidebar1 {
        display: none !important;
    }

    #m-drawer-open {
        display: flex;
    }

    #m-drawer {
        display: flex;
    }

    /* header / logo - room for the menu button on the right */
    .art-sheet > a:first-child {
        padding: 14px 118px 14px 16px;
    }

    /* logo must never overflow the screen */
    .art-sheet > a:first-child img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
    }

    /* content readability */
    .art-post {
        margin: 0 4px;
    }

    .art-postcontent,
    #art-main .art-postcontent p,
    #art-main .art-postcontent a,
    #art-main .art-blockcontent {
        font-size: 20px;
        line-height: 2;
    }

    .art-postcontent p {
        margin: 18px 6px;
    }

    .art-postmetadataheader {
        padding: 12px 6px 4px;
    }

    .art-postmetadataheader img {
        width: 100%;
    }

    .art-postcontent h1,
    .art-postcontent h1 a {
        font-size: 34px;
    }

    .art-postcontent h2,
    .art-postcontent h2 a {
        font-size: 28px;
    }

    .art-postcontent h3,
    .art-postcontent h3 a {
        font-size: 25px;
    }

    .art-postcontent h4,
    .art-postcontent h4 a {
        font-size: 23px;
    }

    .verseclick {
        font-size: 19px;
        padding-right: 0 !important;
    }

    /* ---------- index table on mobile: separate 2-column table, original hidden ---------- */
    .art-postcontent table.auto-style1 {
        display: none !important;
    }

    .art-postcontent table.mobile-index {
        display: table;
        width: 100% !important;
        border-collapse: collapse;
        background: #FFFFFF;
        border: 1px solid #E0C9A8;
        border-radius: 12px;
        overflow: hidden;
        margin: 16px auto !important;
    }

    .art-postcontent table.mobile-index td {
        border: none;
        padding: 11px 12px;
        font-size: 14px;
        line-height: 1.5;
        border-bottom: 1px solid #F0E3CC;
        vertical-align: middle;
    }

    .art-postcontent table.mobile-index tr:last-child td {
        border-bottom: none;
    }

    .art-postcontent table.mobile-index tr:first-child td {
        background: #8A3E00 !important;
        color: #FFFFFF;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        font-size: 12px;
        text-align: center;
    }

    .art-postcontent table.mobile-index td.m-verse {
        text-align: left;
        width: 72%;
    }

    .art-postcontent table.mobile-index td.m-chapter {
        text-align: center;
        width: 28%;
        background: #F7EEDF;
    }

    .art-postcontent table.mobile-index a {
        color: #5B3A1E;
        font-weight: 600;
        text-decoration: none;
    }

    blockquote,
    .art-postcontent blockquote {
        margin: 18px 0 18px 6px !important;
        padding: 14px 14px 14px 30px;
        font-size: 19px;
    }

    .art-footer {
        padding: 18px 12px;
        font-size: 17px;
    }
}

/* very small phones */
@media screen and (max-width: 380px) {
    #m-drawer {
        width: 100vw;
    }

    .art-postcontent h1,
    .art-postcontent h1 a {
        font-size: 27px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    #m-drawer,
    #m-drawer-open .m-burger i,
    .art-nav,
    ul.art-hmenu > li > a,
    ul.art-vmenu > li > a {
        transition: none !important;
    }
}