/*
Theme Name: Comeback Project Theme
Theme URI: https://thecomebackproject.org
Author: The Refinery Creative
Author URI: https://therefinerycreative.com
Description: Minimal custom theme for The Comeback Project. Compiled stylesheet, self-hosted fonts, responsive images and built-in search metadata — no plugins required.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: comeback-project-theme
Tags: nonprofit, custom-theme, one-column, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   Document
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

html,
body {
    overflow-x: hidden;
}

body {
    padding-top: 64px;
}

section[id] {
    scroll-margin-top: 64px;
}

@media (min-width: 1024px) {
    body {
        padding-top: 112px;
    }

    section[id] {
        scroll-margin-top: 112px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.comeback-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.85rem 1.5rem;
    background: #193ab1;
    color: #fff;
    font-weight: 700;
}

.comeback-skip-link:focus {
    left: 0;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #193ab1;
    outline-offset: 2px;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero-section {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #00072c;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

@media (max-width: 768px) {
    .hero-section {
        aspect-ratio: auto;
        min-height: 520px;
    }

    .hero-image {
        object-position: center bottom;
    }
}

.hero-copy-text {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   Components
   ========================================================================== */

.forward-button {
    transition: all 0.3s ease;
}

.forward-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 58, 177, 0.3);
}

.image-accent-wrap {
    position: relative;
}

.image-accent-square {
    position: absolute;
    width: 72px;
    height: 72px;
    background: rgba(25, 58, 177, 0.09);
    z-index: 0;
}

.image-accent-square.top-left {
    top: -16px;
    left: -16px;
}

.image-accent-square.bottom-right {
    right: -16px;
    bottom: -16px;
}

.template-header {
    min-height: 340px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.template-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 7, 44, 0.55);
}

.template-header-inner {
    position: relative;
    z-index: 1;
}

/* FAQ disclosure ---------------------------------------------------------- */

.comeback-faq summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.comeback-faq summary::-webkit-details-marker {
    display: none;
}

.comeback-faq summary::before {
    content: "+";
    color: #193ab1;
    font-weight: 700;
    line-height: 1.35;
    flex-shrink: 0;
}

.comeback-faq[open] summary::before {
    content: "\2212";
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.comeback-primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 48px;
}

.comeback-primary-menu > li + li {
    border-left: 1px solid #bfdbfe;
}

.comeback-primary-menu a {
    display: block;
    padding: 0 1rem;
    color: #00072c;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
}

.comeback-primary-menu a:hover,
.comeback-primary-menu .current-menu-item > a {
    color: #193ab1;
}

.comeback-mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
}

.comeback-mobile-menu a {
    display: block;
    padding: 0.75rem;
    color: #374151;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
}

.comeback-mobile-menu a:hover {
    color: #193ab1;
    background: #f9fafb;
}

.comeback-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.comeback-footer-menu a {
    color: #9ca3af;
    font-size: 0.875rem;
    text-decoration: none;
}

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

/* ==========================================================================
   Editor content (replaces the unstyled `prose` class used previously)
   ========================================================================== */

.comeback-prose {
    font-size: 1.0625rem;
    line-height: 1.75;
}

.comeback-prose > * + * {
    margin-top: 1.5rem;
}

.comeback-prose h1,
.comeback-prose h2,
.comeback-prose h3,
.comeback-prose h4,
.comeback-prose h5,
.comeback-prose h6 {
    font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
    font-weight: 700;
    color: #242424;
    line-height: 1.25;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.comeback-prose h2 { font-size: 1.875rem; }
.comeback-prose h3 { font-size: 1.5rem; }
.comeback-prose h4 { font-size: 1.25rem; }

.comeback-prose p,
.comeback-prose li {
    color: #4b5563;
}

.comeback-prose a {
    color: #193ab1;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.comeback-prose a:hover {
    color: #0e2163;
}

.comeback-prose ul,
.comeback-prose ol {
    padding-left: 1.5rem;
}

.comeback-prose ul { list-style: disc; }
.comeback-prose ol { list-style: decimal; }

.comeback-prose li + li {
    margin-top: 0.5rem;
}

.comeback-prose img,
.comeback-prose figure {
    max-width: 100%;
    height: auto;
}

.comeback-prose figcaption {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.75rem;
}

.comeback-prose blockquote {
    border-left: 4px solid #193ab1;
    padding-left: 1.5rem;
    font-size: 1.25rem;
    font-style: italic;
    color: #242424;
}

.comeback-prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    display: block;
    overflow-x: auto;
}

.comeback-prose th,
.comeback-prose td {
    border: 1px solid #dbeafe;
    padding: 0.65rem 0.9rem;
    text-align: left;
}

.comeback-prose th {
    background: #eff6ff;
    font-weight: 700;
    color: #242424;
}

.comeback-prose pre {
    background: #00072c;
    color: #e5e7eb;
    padding: 1.25rem;
    overflow-x: auto;
    font-size: 0.875rem;
}

.comeback-prose code {
    font-size: 0.9em;
    background: #eff6ff;
    padding: 0.1em 0.35em;
}

.comeback-prose pre code {
    background: none;
    padding: 0;
}

.comeback-prose hr {
    border: 0;
    border-top: 1px solid #dbeafe;
}

/* Full-width template: let wide/full blocks breathe, keep text readable. */
.comeback-prose-wide > * {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.comeback-prose-wide > .alignwide {
    max-width: 72rem;
}

.comeback-prose-wide > .alignfull {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* ==========================================================================
   Blog furniture
   ========================================================================== */

.comeback-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.comeback-meta a {
    color: #193ab1;
}

.comeback-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.comeback-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 7, 44, 0.08);
}

.comeback-tags {
    list-style: none;
    margin: 2.5rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comeback-tags a {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: #eff6ff;
    color: #193ab1;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
}

.comeback-tags a:hover {
    background: #193ab1;
    color: #fff;
}

.comeback-pagination {
    margin-top: 3.5rem;
}

.comeback-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.comeback-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.75rem;
    background: #fff;
    border: 1px solid #dbeafe;
    color: #242424;
    font-weight: 600;
    text-decoration: none;
}

.comeback-pagination .page-numbers:hover,
.comeback-pagination .page-numbers.current {
    background: #193ab1;
    border-color: #193ab1;
    color: #fff;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comeback-comment-list,
.comeback-comment-list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comeback-comment-list .children {
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    border-left: 2px solid #dbeafe;
}

.comeback-comment-list li {
    margin-bottom: 2rem;
}

.comeback-comments .comment-form input[type="text"],
.comeback-comments .comment-form input[type="email"],
.comeback-comments .comment-form input[type="url"],
.comeback-comments .comment-form textarea {
    width: 100%;
    border: 1px solid #dbeafe;
    padding: 0.75rem 1rem;
    font: inherit;
}

.comeback-comments .comment-form .submit {
    background: #193ab1;
    color: #fff;
    border: 0;
    padding: 0.85rem 2rem;
    font-weight: 700;
    cursor: pointer;
}

.comeback-comments .comment-form .submit:hover {
    background: #0e2163;
}

/* ==========================================================================
   WordPress core classes
   ========================================================================== */

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

.screen-reader-text:focus {
    clip-path: none;
    height: auto;
    width: auto;
    display: block;
    top: 5px;
    left: 5px;
    padding: 0.85rem 1.5rem;
    background: #193ab1;
    color: #fff;
    z-index: 100;
}

.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1.5rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1.5rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.sticky .comeback-card {
    border-color: #193ab1;
    border-width: 2px;
}
