/* Ex Libris Kirkland - Custom Styles */
/* Ported from Rails app: exlibris-bootstrapped.css.erb + mknav.css */

:root {
    --font-serif: 'Cardo', Georgia, serif;
    --font-display: 'Oswald', 'Helvetica Neue', sans-serif;
    --color-green: #99C445;
    --color-green-dark: #669933;
    --color-green-label: #4E6D12;
    --color-text: #333;
    --color-muted: #666;
    --color-light-muted: #aaa;
    --color-bg: #fafafa;
    --color-footer-bg: #151515;
}

html {
    background: #151515;
}

body {
    font-family: var(--font-serif);
    color: var(--color-text);
    line-height: 1.7;
    background-color: var(--color-bg);
    padding-top: 70px; /* Space for fixed navbar - 70px height */
}

a {
    color: var(--color-green);
}

a:hover {
    color: var(--color-green-dark);
    text-decoration: none;
}

hr {
    color: #ccc;
    border: 1px solid #ccc;
}

hr.clearing {
    clear: both;
    height: 0;
    border: none;
}

/* ============================================
   TOP BLACK NAVBAR (mknav.css)
   ============================================ */
.navbar-inverse {
    background-color: #222;
    border: none;
    padding: 0;
}

.navbar-inner {
    border: none;
    background-image: none;
    box-shadow: none;
    padding: 0;
    width: 100%;
}

.navbar-inverse .navbar-inner {
    background-image: none;
    background-color: #222;
    padding: 0;
    width: 100%;
}

.topnav-container {
    max-width: 1170px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: 15px;
    padding-right: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    box-sizing: border-box;
}

.navbar-fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0 !important;
}

.navbar-fixed-top .navbar-inner {
    padding: 0 !important;
    min-height: 70px;
}

.navbar-fixed-top .container {
    min-height: 70px;
    padding-top: 0;
    padding-bottom: 0;
}

a.brand {
    background: transparent url(https://mattkirkland.com/css/i/logo.png) left center no-repeat;
    text-indent: -9999px;
    width: 200px;
    height: 70px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Colored block navigation */
ul.blocknav {
    display: flex !important;
    list-style: none;
    margin: 0 0 0 auto !important;
    padding: 0;
    gap: 0;
    flex-shrink: 0;
}

ul.blocknav li {
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    line-height: 1.1;
    width: 70px;
    height: 70px;
    overflow: hidden;
    text-transform: uppercase;
    font-weight: 400;
    transition: all 0.5s ease;
    margin: 0;
    padding: 0;
}

ul.blocknav li:hover {
    width: 220px;
}

ul.blocknav li a {
    display: flex;
    align-items: center;
    height: 70px;
    padding-left: 70px;
    padding-right: 20px;
    width: 240px;
    color: #fff;
    text-decoration: none;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1);
    background-position: 20px center;
    background-repeat: no-repeat;
}

ul.blocknav li#blog a {
    background-color: #E83F97;
    background-image: url(https://mattkirkland.com/css/img/nav_dome.png);
    background-position: 16px 20px;
}

ul.blocknav li#work a {
    background-color: #2DC3DF;
    background-image: url(https://mattkirkland.com/css/img/nav_work.png);
    background-position: 20px 21px;
}

ul.blocknav li#personal a {
    background-color: #F3D53E;
    background-image: url(https://mattkirkland.com/css/img/nav_personal.png);
    background-position: 20px 20px;
}

ul.blocknav li#libris a {
    background-color: #99C445;
    background-image: url(https://mattkirkland.com/css/img/nav_libris.png);
    background-position: 23px 18px;
}

ul.blocknav li#contact a {
    background-color: #666666;
    background-image: url(https://mattkirkland.com/css/img/nav_contact.png);
    background-position: 25px 18px;
}

/* ============================================
   GREEN EX LIBRIS NAVBAR
   ============================================ */
#elk-navbar {
    background: var(--color-green);
    padding-top: 30px;
    padding-bottom: 20px;
    min-height: 100px;
}

#elk-navbar .container {
    position: relative;
}

#elk-navbar .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

h2.elk-logo {
    width: 240px;
    margin: 0;
}

h2.elk-logo a {
    width: 240px;
    height: 75px;
    background: url(/assets/images/elk-logo2.png) top left no-repeat;
    text-indent: -9999px;
    display: block;
    margin-top: 0;
}

.elk-nav-wrapper {
    flex: 1;
}

ul#elk-nav {
    list-style: none;
    font-size: 1.1em;
    float: right;
    color: #fff;
    font-weight: bold;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row-reverse;
}

ul#elk-nav li {
    margin-left: 10px;
}

ul#elk-nav li a {
    color: #fff;
    text-decoration: none;
}

ul#elk-nav li a:hover {
    color: #000;
}

ul#elk-nav span {
    color: var(--color-green-label);
    font-style: italic;
    font-weight: normal;
    font-family: Georgia, serif;
    padding-right: 5px;
}

#mobile-nav {
    display: none;
}

#mobile-nav .dropdown-menu li > a:hover,
#mobile-nav .dropdown-menu li > a:focus,
#mobile-nav .dropdown-menu .active > a,
#mobile-nav .dropdown-menu .active > a:hover {
    color: #ffffff;
    text-decoration: none;
    background-color: var(--color-green);
    background-image: none;
}

/* ============================================
   ADMIN BAR
   ============================================ */
.admin-bar {
    background: #333;
    padding: 8px 0;
    font-size: 0.875rem;
}

.admin-bar .admin-label {
    color: #999;
    margin-right: 15px;
}

.admin-bar a {
    color: #fff;
    margin-right: 15px;
    text-decoration: none;
}

.admin-bar a:hover {
    color: var(--color-green);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: 0.02em;
}

body h1 {
    letter-spacing: -0.05em;
    padding-bottom: 4px;
    text-align: center;
    margin-bottom: 40px;
    margin-top: 20px;
}

/* ============================================
   HOMEPAGE
   ============================================ */
p.intro {
    font-size: 2em;
    color: #333;
    font-family: 'Cardo', Georgia, serif;
    clear: both;
    margin: 40px 5% 20px 5%;
    padding-bottom: 0;
    line-height: 1.5em;
}

.homepage_recents {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.homepage_recents img {
    box-shadow: rgba(0,0,0,0.3) 0px 1px 3px;
}

.homepage_recents img:hover {
    box-shadow: rgba(0,0,0,0.8) 0px 1px 3px;
}

.homepage_recents h2.title {
    font-size: 1.4em;
    line-height: 1.2;
    margin-top: 5px;
}

.homepage_recents h3 {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 10px;
    font-style: normal;
    line-height: 1.3;
    font-weight: normal;
    margin-top: 0;
}

.homepage_recents h3 a {
    color: #666;
}

/* Homepage quotes section */
#homepage_quotes {
    margin: 40px 10%;
}

#homepage_quotes h2 {
    font-size: 1.8em;
    color: #333;
    margin-top: 20px;
    position: relative;
    text-align: center;
    z-index: 1;
}

#homepage_quotes h2:before {
    border-top: 2px dotted var(--color-green);
    content: "";
    margin: 0 auto;
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

#homepage_quotes h2 span {
    background: var(--color-bg);
    padding: 0 20px;
}

#homepage_quotes li {
    margin: 0;
    padding: 3rem 0;
}

#homepage_quotes p.quote {
    font-size: 1.6em;
    color: #333;
    font-family: 'Cardo', Georgia, serif;
    margin-top: 20px;
    margin-bottom: 20px;
    line-height: 1.5;
}

#homepage_quotes h4 {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 12px;
    font-style: normal;
    line-height: 1.3;
    font-weight: normal;
    margin-top: 0;
    color: #aaa;
}

/* ============================================
   BOOK CARDS & COVERS
   ============================================ */
.book-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card:hover {
    transform: translateY(-4px);
}

.card-author {
    color: var(--color-muted);
    line-height: 1.2;
    display: block;
}

img.cover {
    width: 100%;
    box-shadow: rgba(0,0,0,0.3) 0px 1px 3px;
}

img.cover:hover {
    box-shadow: rgba(0,0,0,0.8) 0px 1px 3px;
}

.book-cover {
    width: 100%;
    height: auto;
    background-color: #f5f5f5;
}

.book-sidebar {
    position: sticky;
    top: 90px; /* below both navbars */
    align-self: flex-start;
}

.book-cover-large {
    max-width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.book-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.4;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.book-title-link {
    color: var(--color-green);
    text-decoration: none;
    font-weight: 500;
}

.book-title-link:hover {
    text-decoration: none;
    color: var(--color-green-dark);
}

.book-grid-thumb {
    width: 15%;
    margin-right: 1.5%;
    margin-top: 20px;
    float: left;
}

.book-grid-thumb:nth-of-type(6n+1) {
    clear: left;
}

/* ============================================
   AUTHOR NAMES
   ============================================ */
.author-name,
.author_list h3 a {
    color: #666;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 10px;
    font-weight: normal;
}

.author-name:hover {
    text-decoration: underline;
    color: var(--color-green-dark);
}

.author_list li {
    width: 14%;
    margin: 0px 1%;
    list-style: none;
    display: inline-block;
    vertical-align: top;
}

/* ============================================
   BOOK DETAIL PAGE
   ============================================ */
h1#title {
    text-align: left;
    border-bottom: 3px solid #333;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

div#author_and_year {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid lightgray;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h3#author {
    font-size: 1.5em;
    font-family: 'Cardo', Georgia, serif;
    font-weight: normal;
    margin: 0;
    line-height: 1.2;
}

h3#author a {
    color: var(--color-green);
    text-decoration: none;
}

h3#author a:hover {
    color: var(--color-green-dark);
}

h4#year {
    font-size: 1.5em;
    font-family: 'Cardo', Georgia, serif;
    font-weight: normal;
    margin: 0;
    color: var(--color-green);
}

table#bookdetails {
    width: 100%;
    border-top: 3px solid #ededed;
    margin-top: 10px;
    background-color: transparent;
}

table#bookdetails tr,
table#bookdetails td {
    background-color: transparent;
}

table#bookdetails td {
    padding: 10px 5px 10px 0;
    font-size: 1em;
    color: #666;
    border-bottom: 1px solid #eee;
}

table#bookdetails td.attribute {
    color: #aaa;
    width: 90px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 9px;
    font-style: normal;
    line-height: 1.5em;
}

h3#amazon {
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    font-size: 1em;
}

h3#amazon a {
    text-decoration: none;
    display: block;
    width: 100%;
    background: #eee;
    border-radius: 5px;
    border: 1px solid #ccc;
    padding: 10px;
}

h3#amazon a:hover {
    background: var(--color-green);
    color: #fff;
}

/* ============================================
   NOTES & QUOTES
   ============================================ */
p.note_body {
    font-size: 1em;
    line-height: 1.5em;
    font-weight: normal;
    color: #444;
    margin: 20px 10%;
}

p.date {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 10px;
    font-style: normal;
    line-height: 1.3;
    font-weight: normal;
    margin-top: 0;
    text-align: right;
    border-bottom: 1px solid #fff;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.librisquote blockquote {
    border-left: 0;
    padding-left: 0;
    font-size: 1.45em;
    color: #333;
    font-family: 'Cardo', Georgia, serif;
    line-height: 1.5;
    margin: 40px 10%;
}

.quote-block {
    border-left: none;
    padding: 1.5rem 0;
    margin: 0 0 1.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1.2em;
    color: #333;
    font-family: 'Cardo', Georgia, serif;
    line-height: 1.5;
}

.quote-block p:not(.quote-attribution) {
    font-size: 1em;
    color: inherit;
    font-family: inherit;
    line-height: inherit;
}

.quote-date,
.note-date {
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 10px !important;
    font-family: var(--font-display) !important;
    color: #aaa !important;
    margin-top: 1rem;
    font-style: normal;
}

p.quote-attribution,
p.note-attribution {
    font-size: 0.75rem;
    color: var(--color-light-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 1rem;
}

p.quote-attribution a,
p.note-attribution a {
    color: var(--color-green);
    text-transform: uppercase;
}

.note-content {
    background-color: transparent;
    border: none;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
    font-size: 1.2em;
    line-height: 1.5;
}

/* ============================================
   TABLE VIEWS
   ============================================ */
table#booklist {
    width: 80%;
    margin-left: 10%;
    margin-bottom: 40px;
}

table#booklist th {
    font-weight: bold;
    border-bottom: 3px solid #ccc;
    color: #333;
    padding: 5px 0px;
    text-align: left;
}

table#booklist td {
    text-align: left;
    border-bottom: 1px solid #ccc;
    padding: 0px 10px 0px 0;
}

table#booklist h3 {
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1;
}

table#booklist td ul li {
    font-weight: bold;
    padding: 3px 10px;
    font-size: 1.2em;
    border-top: 1px solid #ddd;
    list-style: none;
}

/* ============================================
   FOOTER
   ============================================ */
#elkfooter,
.site-footer {
    padding-bottom: 0px;
    margin-top: 20px;
    background: var(--color-footer-bg) !important;
    color: #ccc;
    font-size: 16px;
    line-height: 1.5;
}

#elkfooter a,
.site-footer a {
    color: var(--color-green);
}

#elkfooter .container,
.site-footer .container {
    padding: 40px 0;
}

.site-footer p {
    margin-bottom: 0.5rem;
}

/* ============================================
   ADMIN STYLES
   ============================================ */
.admin-table img {
    max-width: 50px;
    max-height: 75px;
}

table.mgmt tr {
    vertical-align: top;
    border-top: 1px solid #ddd;
}

table.mgmt th {
    font-weight: bold;
}

table.mgmt td,
table.mgmt th {
    padding: 3px 5px;
}

textarea#note_body,
textarea#quote_body {
    min-width: 600px;
    min-height: 300px;
}

.form-label {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.375rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-green);
    box-shadow: 0 0 0 0.2rem rgba(153, 196, 69, 0.25);
}

.btn-primary {
    background-color: var(--color-green);
    border-color: var(--color-green);
}

.btn-primary:hover {
    background-color: var(--color-green-dark);
    border-color: var(--color-green-dark);
}

.btn-outline-primary {
    color: var(--color-green);
    border-color: var(--color-green);
}

.btn-outline-primary:hover {
    background-color: var(--color-green);
    border-color: var(--color-green);
    color: #fff;
}

.card {
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card-header {
    background-color: #f8f9fa;
    font-weight: 500;
}

.display-6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-green);
}

.pagination .page-link {
    color: var(--color-green);
}

.pagination .page-item.active .page-link {
    background-color: var(--color-green);
    border-color: var(--color-green);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 1200px) {
    #elk-navbar .container {
        margin: 0 auto;
    }
}

/* Hamburger toggle button - hidden on desktop */
.blocknav-toggle {
    display: none;
    background: #333;
    border: none;
    border-radius: 6px;
    padding: 12px 14px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    height: 44px;
    width: 50px;
    margin-right: 15px;
}

.blocknav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
}

@media (max-width: 979px) {
    body {
        padding-top: 0;
    }
    
    .navbar-fixed-top {
        position: relative;
        margin-bottom: 0;
    }
    
    .topnav-container {
        flex-wrap: wrap;
    }
    
    .navbar-fixed-top .navbar-inner {
        min-height: 50px;
    }
    
    .topnav-container {
        height: 50px;
    }
    
    a.brand {
        margin-top: 0;
        margin-left: 20px;
        height: 50px;
        background-size: 150px auto;
        background-position: left center;
    }
    
    .blocknav-toggle {
        display: flex;
        height: 36px;
        width: 42px;
        padding: 9px 11px;
    }
    
    ul.blocknav {
        display: none !important;
        flex-direction: column;
        width: 100%;
        order: 3;
        margin: 0;
        padding: 0;
    }
    
    ul.blocknav.open {
        display: flex !important;
    }
    
    ul.blocknav li {
        width: 100% !important;
        height: auto;
        display: block;
    }
    
    ul.blocknav li:hover {
        width: 100%;
    }
    
    ul.blocknav li a {
        width: 100%;
        height: auto;
        padding: 18px 20px 18px 60px;
        font-size: 28px;
        background-position: 30px center;
    }
    
    table#booklist {
        width: 100%;
        margin-left: 0;
    }
    
    .author_list li {
        width: 20%;
        margin: 0px 2%;
    }
}

@media (max-width: 979px) and (min-width: 768px) {
    ul#elk-nav span {
        display: none;
    }
}

@media (max-width: 767px) {
    #elk-navbar,
    #elkfooter,
    .site-footer {
        margin-left: -20px;
        padding-left: 20px;
        margin-right: -20px;
        padding-right: 20px;
    }
    
    h2.elk-logo {
        width: 100%;
    }
    
    h2.elk-logo a {
        width: 100%;
        background-position: top center;
        margin-bottom: 10px;
        margin-top: 0;
    }
    
    ul#elk-nav {
        display: none;
    }
    
    #mobile-nav {
        display: block;
        text-align: center;
        clear: both;
    }
    
    #mobile-nav .dropdown-menu {
        left: 35%;
        text-align: left;
    }
    
    p.intro {
        margin: 30px 10%;
    }
    
    .author_list li {
        width: 28%;
        margin: 0px 1.5%;
    }
    
    #bookdetails {
        display: none;
    }
    
    .span9 h1#title {
        text-align: center;
    }
    
    img.cover {
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
}

@media (max-width: 576px) {
    .book-cover-large {
        max-width: 200px;
    }
    
    .author_list li {
        width: 40%;
        margin: 0px 2%;
    }
    
    p.note_body {
        margin: 20px 2%;
    }
    
    #homepage_quotes {
        margin: 40px 2%;
    }
    
    .librisquote blockquote {
        font-size: 1.25em;
        margin: 40px 2%;
    }
}

@media (max-width: 320px) {
    .librisquote blockquote {
        margin: 40px 0;
    }
    
    p.note_body {
        margin: 20px 0;
    }
}
