/* ===================================
   Love Yours – A Matt Abati Foundation
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Narrow:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --black:       #192930;
    --dark-gray:   #474f53;
    --medium-gray: #a5a29d;
    --light-gray:  #eeece8;
    --yellow:      #d7b221;
    --dark-yellow: #9c8012;
    --white:       #ffffff;
    --red:         #cf2e2e;
    --header-h:    84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }

body {
    margin: 0;
    font-family: 'Archivo Narrow', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--black);
    background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--dark-yellow); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--yellow); }
p { margin: 0 0 1.2em; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 0.75em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.5em; }
li { margin-bottom: 0.3em; }

/* ===== SITE HEADER ===== */
.site-header {
    background: var(--white);
    border-bottom: 2px solid var(--light-gray);
    position: relative;
    z-index: 100;
}

.branding-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.site-branding a img.logo {
    height: 60px;
    width: auto;
    display: block;
}

.site-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: var(--black);
    line-height: 1.3;
}
.site-title a { color: var(--black); }
.site-title a:hover { color: var(--yellow); text-decoration: none; }

/* ===== DESKTOP NAVIGATION ===== */
.main-navigation {
    display: flex;
    align-items: center;
}

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

.main-navigation ul li a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--dark-gray);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.2s;
    white-space: nowrap;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current > a {
    color: var(--yellow);
    text-decoration: none;
}

/* ===== HAMBURGER BUTTON ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: 2px solid var(--light-gray);
    border-radius: 4px;
    cursor: pointer;
    padding: 6px;
    transition: border-color 0.2s;
}
.menu-toggle:hover { border-color: var(--yellow); }
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark-gray);
    border-radius: 2px;
    transition: all 0.25s ease;
    transform-origin: center;
}

/* Animate to X when open */
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== MOBILE NAV DRAWER ===== */
.mobile-nav-drawer {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--light-gray);
    border-bottom: 3px solid var(--yellow);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    z-index: 99;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    opacity: 0;
}
.mobile-nav-drawer.is-open {
    max-height: 400px;
    opacity: 1;
}
.mobile-nav-drawer ul {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    max-width: 1100px;
    margin: 0 auto;
}
.mobile-nav-drawer ul li a {
    display: block;
    padding: 0.85rem 1.5rem;
    color: var(--dark-gray);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--light-gray);
}
.mobile-nav-drawer ul li:last-child a { border-bottom: none; }
.mobile-nav-drawer ul li a:hover,
.mobile-nav-drawer ul li.current > a {
    color: var(--yellow);
    background: #fafaf8;
    text-decoration: none;
}

/* ===== HERO ===== */
.home-hero {
    background: var(--light-gray);
    padding: 0 1.5rem;
}
.home-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 6px 6px;
}
.home-hero-img {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    object-position: center 25%;
    display: block;
}
.home-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(25,41,48,0.5) 0%, rgba(25,41,48,0.15) 60%, transparent 100%);
    display: flex;
    align-items: center;
}
.home-hero-text {
    padding: 2rem 2.5rem;
    color: var(--white);
    max-width: 480px;
}
.home-hero-text h1 {
    font-size: 3rem;
    margin: 0 0 0.2em;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    line-height: 1;
}
.home-hero-text > p {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.4em;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.home-hero-sub {
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    color: rgba(255,255,255,0.75) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.section-heading {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--yellow);
    color: var(--black);
}

/* ===== PAGE TITLE BAR ===== */
.page-title-bar {
    background: var(--light-gray);
    border-bottom: 1px solid #ddd;
    padding: 1.25rem 1.5rem;
}
.page-title-bar-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.page-title-bar h1 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--black);
}

/* ===== MAIN LAYOUT ===== */
.site-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start;
}

/* ===== ENTRY CONTENT ===== */
.entry-content {
    font-size: 1.05rem;
}
.entry-content h2 { font-size: 1.4rem; color: var(--black); margin-top: 1.5em; }
.entry-content h3 { font-size: 1.2rem; color: var(--black); margin-top: 1.2em; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figure img { border-radius: 3px; }
.entry-content ul,
.entry-content ol { padding-left: 1.5em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content pre {
    font-family: inherit;
    white-space: pre-wrap;
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 1em;
}
.entry-content blockquote {
    background: var(--light-gray);
    padding: 1.2em 1.5em;
    border-left: 4px solid var(--yellow);
    border-radius: 3px;
    margin: 1.5em 0;
    font-style: italic;
}
.entry-content blockquote p:last-of-type { margin-bottom: 0.5em; }
.entry-content blockquote footer {
    font-style: normal;
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-top: 0.5em;
}
address {
    font-style: normal;
    line-height: 1.8;
    margin-bottom: 1.5em;
    white-space: pre-line;
}
.entry-content .has-light-gray-background-color {
    background: var(--light-gray);
    padding: 1.2em 1.5em;
    border-left: 4px solid var(--yellow);
    border-radius: 3px;
    font-style: italic;
}
.entry-content .has-text-align-center { text-align: center; }

/* ===== HERO BUTTON ===== */
.btn-hero {
    background: var(--yellow);
    color: var(--white);
    font-weight: 700;
    padding: 0.65rem 1.5rem;
    border-radius: 4px;
    display: inline-block;
    transition: background 0.2s;
    text-decoration: none;
    font-size: 0.95rem;
    border: 2px solid rgba(255,255,255,0.2);
}
.btn-hero:hover { background: var(--dark-yellow); color: var(--white); text-decoration: none; }

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* ===== POST CARDS ===== */
.post-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.post-card {
    border-bottom: 1px solid var(--light-gray);
    padding: 1.5rem 0;
}
.post-card:first-child { padding-top: 0; }
.post-card:last-child { border-bottom: none; }

.post-card-date {
    display: block;
    font-size: 0.8rem;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4em;
}
.post-card-title {
    font-size: 1.3rem;
    margin: 0 0 0.5em;
    line-height: 1.3;
}
.post-card-title a {
    color: var(--black);
    text-decoration: none;
}
.post-card-title a:hover { color: var(--dark-yellow); }

.post-card-excerpt {
    font-size: 0.95rem;
    color: var(--dark-gray);
    margin: 0 0 0.6em;
    line-height: 1.55;
}
.post-card-link {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dark-yellow);
}
.post-card-link:hover { color: var(--yellow); }

/* ===== HOME POST LIST (legacy) ===== */
.posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.posts-list > li {
    border-top: 1px solid var(--medium-gray);
    padding: 1.5rem 0;
    margin: 0;
}
.posts-list > li:first-child { border-top: none; }

.post-title-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    display: block;
    margin-bottom: 0.3em;
}
.post-title-link:hover { color: var(--dark-yellow); text-decoration: none; }

.post-date {
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-bottom: 0.6em;
    display: block;
}

.post-excerpt {
    font-size: 0.98rem;
    color: var(--dark-gray);
    margin-bottom: 0.4em;
}

.read-more {
    display: inline-block;
    margin-top: 0.4em;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark-yellow);
}
.read-more:hover { color: var(--yellow); }

/* ===== SINGLE BLOG POST ===== */
.post-body { font-size: 1.05rem; }
.post-body figure { margin: 1.5em 0; }
.post-body img { border-radius: 3px; max-width: 100%; }
.post-body ul, .post-body ol { padding-left: 1.5em; }
.post-body li { margin-bottom: 0.4em; }
.post-body p:first-child { margin-top: 0; }
.post-meta { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--light-gray); }
.back-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 700;
    color: var(--dark-yellow);
}
.back-link:hover { color: var(--yellow); }

/* ===== SIDEBAR ===== */
.sidebar { min-width: 0; }

.sidebar-widget {
    margin-bottom: 2.5rem;
}
.sidebar-widget h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--yellow);
    padding-bottom: 0.4em;
    margin-bottom: 0.9em;
    color: var(--dark-gray);
}
.sidebar-widget > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-widget > ul > li {
    padding: 0.35em 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: 0.9rem;
    margin: 0;
}
.sidebar-widget > ul > li:last-child { border-bottom: none; }
.sidebar-widget > ul > li > a { color: var(--black); }
.sidebar-widget > ul > li > a:hover { color: var(--yellow); text-decoration: none; }
.sidebar-widget .post-date { font-size: 0.8rem; color: var(--medium-gray); display: block; }

.donations-info { font-size: 0.95rem; line-height: 1.8; }
.donations-info ul { list-style: disc; padding-left: 1.2em; margin: 0 0 0.5em; }
.donations-info li { margin: 0; font-size: 0.9rem; }
.donations-info ul ul { list-style: circle; margin-top: 0.2em; }

.sidebar-501c3 {
    font-size: 0.8rem;
    color: var(--medium-gray);
    font-style: italic;
    line-height: 1.4;
    margin: 0;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--black);
    color: var(--medium-gray);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
    font-size: 0.9rem;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 3rem;
    align-items: start;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #2e3c45;
}
.footer-brand .footer-logo {
    height: 52px;
    width: auto;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}
.footer-tagline {
    font-size: 0.9rem;
    color: var(--white);
    font-weight: 700;
    margin: 0 0 0.3em;
    letter-spacing: 0.02em;
}
.footer-501c3 {
    font-size: 0.78rem;
    color: var(--dark-gray);
    font-style: italic;
    margin: 0;
}
.footer-col h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--medium-gray);
    margin-bottom: 1em;
    font-weight: 700;
    border-bottom: 1px solid #2e3c45;
    padding-bottom: 0.5em;
}
.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-col ul li {
    padding: 0.25em 0;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
}
.footer-col ul li a { color: var(--medium-gray); }
.footer-col ul li a:hover { color: var(--yellow); text-decoration: none; }
.footer-copy {
    max-width: 1100px;
    margin: 1.25rem auto 0;
    font-size: 0.78rem;
    color: var(--dark-gray);
    text-align: center;
}

/* ===== ADMIN ===== */
.admin-wrap {
    max-width: 860px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    font-family: 'Archivo Narrow', Arial, sans-serif;
}
.admin-wrap h1 { color: var(--black); font-size: 1.8rem; margin-bottom: 1.5rem; }
.admin-wrap h2 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--dark-gray); }

.login-box {
    max-width: 420px;
    margin: 4rem auto;
    padding: 2.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    background: var(--white);
}
.login-box .logo-wrap { text-align: center; margin-bottom: 1.5rem; }
.login-box .logo-wrap img { height: 70px; margin: 0 auto; }
.login-box h1 { font-size: 1.25rem; text-align: center; margin-bottom: 1.5rem; color: var(--dark-gray); font-weight: 700; }

.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.35em;
    color: var(--dark-gray);
}
.form-group input[type=text],
.form-group input[type=password],
.form-group input[type=number],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--black);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(215,178,33,0.15);
}
.form-group textarea { min-height: 300px; resize: vertical; }

.captcha-question {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.captcha-question .captcha-label {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--light-gray);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    color: var(--black);
    white-space: nowrap;
}
.captcha-question input { width: 90px !important; }

.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    line-height: 1.4;
}
.btn-primary { background: var(--yellow); color: var(--white); }
.btn-primary:hover { background: var(--dark-yellow); color: var(--white); text-decoration: none; }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #a02020; color: var(--white); text-decoration: none; }
.btn-secondary { background: var(--light-gray); color: var(--dark-gray); border: 1px solid #ddd; }
.btn-secondary:hover { background: #ddd; color: var(--black); text-decoration: none; }
.btn-sm { padding: 0.28rem 0.75rem; font-size: 0.82rem; }

.alert {
    padding: 0.85rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}
.alert-error { background: #fde8e8; border-left: 4px solid var(--red); color: #7a1515; }
.alert-success { background: #e6f4ea; border-left: 4px solid #2e7d32; color: #1b5e20; }
.alert-info { background: #fff8e1; border-left: 4px solid var(--yellow); color: #5a4000; }

.admin-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--black);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.admin-nav a { color: var(--medium-gray); font-weight: 700; }
.admin-nav a:hover { color: var(--yellow); text-decoration: none; }
.admin-nav-links { display: flex; gap: 1.5rem; }

.posts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 1rem;
}
.posts-table th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    background: var(--light-gray);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dark-gray);
    border-bottom: 2px solid #ddd;
}
.posts-table td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--light-gray);
    vertical-align: middle;
}
.posts-table tr:hover td { background: #fafaf8; }

.badge {
    display: inline-block;
    padding: 0.15em 0.55em;
    border-radius: 3px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-published { background: #e6f4ea; color: #2e7d32; }
.badge-draft { background: var(--light-gray); color: var(--medium-gray); }

.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.editor-hint {
    font-size: 0.8rem;
    color: var(--medium-gray);
    margin-top: 0.35em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .main-navigation ul { display: none; }
    .menu-toggle { display: flex; }
    .mobile-nav-drawer { display: block; }
    .branding-container { padding: 0 1rem; }
    .site-title { font-size: 0.95rem; }
    .home-hero { padding: 0; }
    .home-hero-inner { border-radius: 0; }
    .home-hero-img { max-height: 240px; }
    .home-hero-text h1 { font-size: 2rem; }
    .home-hero-text { padding: 1.25rem 1.5rem; }
    .home-hero-sub { display: none; }
    .page-title-bar h1 { font-size: 1.4rem; }
    .posts-table th:nth-child(2),
    .posts-table td:nth-child(2) { display: none; }
}

@media (max-width: 540px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .login-box { margin: 1.5rem auto; padding: 1.5rem; }
    .site-branding a img.logo { height: 46px; }
}
