/*
 * static/css/style.css
 *
 * A hand-written stand-in for the WordPress "Sparkling" theme the original
 * firstpinelands.org runs, including its customiser settings. Colours, type
 * and spacing are taken from the live site so the two render alike.
 */

:root {
    --accent: #ac3a20;          /* customiser "primary colour" */
    --heading: #da4453;         /* Sparkling's default heading colour */
    --text: #6b6b6b;
    --page-bg: #f2f2f2;
    --card-bg: #ffffff;
    --border: #dadada;
    --navbar-bg: #363636;
    --footer-bg: #313233;
    --serif: 'Roboto Slab', Georgia, serif;
    --sans: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--text);
    background-color: var(--page-bg);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.7;
    word-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s;
}

a:hover,
a:focus {
    color: var(--border);
    text-decoration: none;
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--heading);
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.2;
    margin: 1.4em 0 0.6em;
}

h1 { font-size: 36px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

p { margin: 0 0 1.4em; }

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 2em 0;
}

blockquote {
    margin: 0 0 1.4em;
    padding: 10px 20px;
    border-left: 5px solid #eee;
    font-size: 17.5px;
}

blockquote p:last-child { margin-bottom: 0; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    display: block;
    background: #ddd;
    color: #444;
    padding: 15px 23px;
}

/* =Layout
----------------------------------------------- */

.container {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.main-content-area {
    margin-top: 40px;
    margin-bottom: 40px;
}

.main-content-inner {
    width: 66.66667%;
    padding: 0 15px;
}

.main-content-inner.full-width { width: 100%; }

#secondary {
    width: 33.33333%;
    padding: 0 15px;
}

/* =Header and navigation
----------------------------------------------- */

.navbar-default {
    background-color: var(--navbar-bg);
    border: none;
    margin-bottom: 0;
    font-family: var(--sans);
}

.navbar-default > .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

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

.site-name { margin: 0; }

.navbar-brand {
    display: inline-block;
    color: #dadada;
    font-size: 20px;
    font-family: var(--serif);
    margin: 10px 20px 10px 0;
}

.navbar-brand:hover,
.navbar-brand:focus { color: #fff; }

.navbar-toggle {
    display: none;
    background: transparent;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    padding: 9px 10px;
    cursor: pointer;
}

.navbar-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #f5f7fa;
    border-radius: 1px;
}

.navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; }

.navbar-nav {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav > li > a {
    display: block;
    color: #f5f7fa;
    line-height: 40px;
    padding: 15px;
    text-transform: uppercase;
    font-size: 12px;
}

.navbar-nav > li:hover > a,
.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus,
.navbar-nav > .active > a {
    color: var(--accent);
    background-color: transparent;
}

/* =Homepage slider
----------------------------------------------- */

.flexslider {
    position: relative;
    overflow: hidden;
    background: #363636;
}

.flexslider .slides {
    list-style: none;
    margin: 0;
    padding: 0;
}

.flexslider .slides > li {
    display: none;
    position: relative;
}

.flexslider .slides > li.flex-active-slide { display: block; }

.flexslider .slides img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
}

.flex-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 50px;
    z-index: 1;
    max-width: 1170px;
    margin: auto;
    padding: 0 30px;
}

.flex-caption h2 {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 24px;
    max-width: 640px;
    padding: 12px 20px;
    margin: 0;
}

.flex-caption .excerpt {
    display: block;
    background: rgba(59, 59, 59, 0.8);
    color: #ddd;
    max-width: 600px;
    padding: 12px 20px;
}

.flex-control-nav {
    position: absolute;
    right: 20px;
    bottom: 14px;
    z-index: 2;
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.flex-control-nav button {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.flex-control-nav button.flex-active { background: #fff; }

/* =Content card
----------------------------------------------- */

.post-inner-content {
    padding: 45px 50px;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
}

.page-header {
    margin-top: 0;
    border-bottom: 0;
    padding-bottom: 0;
}

.entry-title {
    color: #444;
    font-size: 28px;
    margin: 0 0 30px;
}

.entry-content > *:last-child { margin-bottom: 0; }

.entry-content h2,
.entry-content h3 { margin-top: 1.6em; }

.entry-content h2:first-child,
.entry-content h3:first-child { margin-top: 0; }

.entry-content ul,
.entry-content ol { padding-left: 25px; }

.entry-content li { margin-bottom: 0.4em; }

figure {
    margin: 0 0 1.4em;
}

figure img { height: auto; }

figure.aligncenter,
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

figure.alignright {
    float: right;
    margin: 0.5em 0 1em 1.5em;
    max-width: 45%;
}

figure.alignleft {
    float: left;
    margin: 0.5em 1.5em 1em 0;
    max-width: 45%;
}

figcaption {
    font-size: 13px;
    font-style: italic;
    margin-top: 0.5em;
}

.has-very-light-gray-background-color {
    background-color: #eee;
    padding: 1.25em 2.375em;
}

.has-very-dark-gray-color { color: #313131; }

.has-small-font-size { font-size: 0.875em; }

/* Simple multi-column blocks, as used by the WordPress columns block. */
.columns {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 1.4em;
}

.columns > * {
    flex: 1 1 0;
    min-width: 180px;
    margin-bottom: 0;
}

.columns.columns-4 > * { flex-basis: 20%; }

/* =Latest newsletter
------------------------------------------------ */
.latest-issue {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 1.4em;
}

.latest-issue figure {
    flex: 0 1 260px;
    margin-bottom: 0;
}

.latest-issue .latest-issue-text {
    flex: 1 1 240px;
    min-width: 240px;
}

/* =Resource link cards
----------------------------------------------- */

.resource-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 1.4em;
}

.resource-links .resource-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 18px 20px;
    background: var(--card-bg);
    transition: box-shadow 0.2s ease;
}

.resource-links .resource-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.resource-links .resource-card h4 {
    margin-top: 0;
    margin-bottom: 0.35em;
}

.resource-links .resource-card p {
    font-size: 14px;
    margin-bottom: 0.7em;
}

.resource-links .resource-card a.resource-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.resource-links .resource-card a.resource-link:hover {
    text-decoration: underline;
}

/* =Tables
----------------------------------------------- */

.table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.4em;
    border-collapse: collapse;
}

.table > tbody > tr > td,
.table > thead > tr > th {
    padding: 8px;
    line-height: 1.7;
    vertical-align: top;
    border-top: 1px solid #ddd;
}

.table > thead > tr > th {
    vertical-align: bottom;
    border-bottom: 2px solid #ddd;
    text-align: left;
}

.table-hover > tbody > tr:hover { background-color: #f5f5f5; }

/* =Buttons
----------------------------------------------- */

.btn,
.wp-block-button__link {
    display: inline-block;
    background-color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 10px 26px;
    text-transform: uppercase;
    cursor: pointer;
}

.btn:hover,
.btn:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus {
    background-color: #8e2f1a;
    border-color: #8e2f1a;
    color: #fff;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1.4em;
}

/* =Forms
----------------------------------------------- */

.site-form h3 { margin-top: 0; }

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.form-field {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-weight: 600;
    margin-bottom: 5px;
}

.form-field input,
.form-field textarea {
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background-color: #fafafa;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.required-mark { color: var(--accent); }

/* =Embeds
----------------------------------------------- */

.embed-responsive {
    position: relative;
    width: 100%;
    margin-bottom: 1.4em;
}

.embed-responsive iframe {
    width: 100%;
    border: 0;
    display: block;
}

/* =Sidebar
----------------------------------------------- */

.well {
    background-color: var(--card-bg);
    padding: 30px;
    border: 1px solid var(--border);
    overflow: hidden;
}

#secondary .widget {
    margin-bottom: 50px;
    color: #c1c0c0;
    overflow: hidden;
}

#secondary .widget:last-child { margin-bottom: 0; }

#secondary .widget > h3,
#secondary .widget-title {
    font-size: 14px;
    text-transform: uppercase;
    margin: 0 0 25px;
    color: #636467;
}

/* =Footer
----------------------------------------------- */

#footer-area {
    background-color: var(--footer-bg);
    color: #999;
}

#footer-area a { color: #dadada; }

.site-info {
    padding: 20px 15px;
}

.site-info .row {
    align-items: center;
}

.site-info a { color: #777; }

.site-info a:hover,
.site-info a:focus { color: #999; }

.social-icons,
#menu-social {
    position: relative;
    text-align: center;
    width: 100%;
    padding: 0 15px;
}

.social-menu {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

#menu-social li {
    display: inline-block;
    border: none;
    margin: 0;
}

.social-icons li a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    color: #999;
    border-radius: 4px;
}

.social-icons li a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

#menu-social li a:hover,
#menu-social li a:focus { color: #fff; }

#menu-social li a[href*="twitter.com"]:hover { background-color: #1da1f2; }
#menu-social li a[href*="facebook.com"]:hover { background-color: #4265b9; }
#menu-social li a[href*="instagram.com"]:hover { background-color: #c13584; }

.footer-menu {
    width: 50%;
    padding: 0 15px;
}

.footer-nav {
    list-style: none;
    margin: 0 0 2px;
    padding: 0;
}

.footer-nav li {
    position: relative;
    display: inline-block;
    border-bottom: none;
}

.footer-nav li a {
    display: inline-block;
    padding: 5px 10px 5px 0;
    font-size: 13px;
}

.copyright {
    width: 50%;
    padding: 0 15px;
    margin-top: 10px;
    text-align: right;
}

.scroll-to-top {
    display: none;             /* revealed by static/js/site.js once scrolled */
    position: fixed;
    right: 20px;
    bottom: 4%;
    z-index: 999;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    color: #fff;
    background: rgba(100, 100, 100, 0.4);
    border-radius: 4px;
    transition: background-color 0.3s linear;
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-top: 10px;
}

.scroll-to-top:hover,
.scroll-to-top:focus {
    background: var(--heading);
    color: #fff;
    opacity: 0.8;
}

/* =Responsive
----------------------------------------------- */

@media (max-width: 991px) {
    .main-content-inner,
    #secondary {
        width: 100%;
    }

    #secondary { margin-top: 40px; }

    .post-inner-content { padding: 30px; }
}

@media (max-width: 768px) {
    .navbar-default > .container {
        align-items: stretch;
        flex-direction: column;
    }

    .navbar-header {
        width: 100%;
        padding: 5px 0;
    }

    .navbar-toggle { display: block; }

    .navbar-collapse {
        display: none;
        width: 100%;
        border-top: 1px solid #4a4a4a;
    }

    .navbar-collapse.in { display: block; }

    .navbar-nav { flex-direction: column; }

    .navbar-nav > li > a {
        line-height: 24px;
        padding: 10px 0;
    }

    .flex-caption { display: none; }

    .footer-menu,
    .copyright {
        width: 100%;
        text-align: center;
    }

    .footer-nav li a { padding: 5px 8px; }

    figure.alignright,
    figure.alignleft {
        float: none;
        max-width: 100%;
        margin: 0 0 1.4em;
    }
}
