/*
Theme Name:   Astra ArtsPro
Theme URI:    https://example.com/astra-artspro
Description:  A custom Astra child theme inspired by ArtsProfessional.co.uk. Provides editorial landing pages for News, Features, Jobs and other post taxonomies via a flexible shortcode/block and custom page template.
Author:       Your Name
Author URI:   https://example.com
Template:     astra
Version:      1.0.0
Requires PHP: 7.4
Text Domain:  astra-artspro
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    --ap-blue: #0a3b7a;          /* primary editorial blue */
    --ap-blue-dark: #062a59;
    --ap-blue-light: #e8eef7;
    --ap-accent: #d32f2f;        /* accent red used for tags / hover */
    --ap-ink: #1a1a1a;
    --ap-muted: #5a5a5a;
    --ap-border: #e3e3e3;
    --ap-bg-alt: #f7f7f5;
    --ap-success: #2e7d32;
    --ap-font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ap-font-head: 'Merriweather', Georgia, 'Times New Roman', serif;
}

/* ==========================================================================
   Global typography
   ========================================================================== */
body,
.ast-container {
    font-family: var(--ap-font-body);
    color: var(--ap-ink);
}

h1, h2, h3, h4, h5, h6,
.entry-title {
    font-family: var(--ap-font-head);
    font-weight: 700;
    line-height: 1.25;
    color: var(--ap-ink);
}

a,
a:visited {
    color: var(--ap-blue);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--ap-accent);
    text-decoration: underline;
}

/* ==========================================================================
   Header / site branding
   ========================================================================== */
.site-header {
    border-bottom: 3px solid var(--ap-blue);
    background: #fff;
}

.main-header-menu > .menu-item > a {
    font-family: var(--ap-font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--ap-ink);
}

.main-header-menu > .menu-item > a:hover,
.main-header-menu > .current-menu-item > a {
    color: var(--ap-blue);
    border-bottom: 2px solid var(--ap-accent);
}

/* Utility "top bar" for login/subscribe links */
.ap-topbar {
    background: var(--ap-blue);
    color: #fff;
    font-size: 0.85rem;
}

.ap-topbar .ap-topbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.4rem 20px;
    display: flex;
    justify-content: flex-end;
    gap: 1.25rem;
}

.ap-topbar a {
    color: #fff;
    opacity: 0.9;
}

.ap-topbar a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==========================================================================
   Taxonomy landing page (archive + custom template)
   ========================================================================== */
.ap-landing {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.ap-landing-header {
    border-bottom: 2px solid var(--ap-blue);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.ap-landing-eyebrow {
    display: inline-block;
    background: var(--ap-blue);
    color: #fff;
    font-family: var(--ap-font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    margin-bottom: 0.75rem;
}

.ap-landing-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin: 0 0 0.5rem;
}

.ap-landing-description {
    font-family: var(--ap-font-body);
    color: var(--ap-muted);
    max-width: 60ch;
}

/* ==========================================================================
   Post list grid (used by the shortcode)
   ========================================================================== */
.ap-post-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .ap-post-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .ap-post-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .ap-post-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.ap-card {
    background: #fff;
    border: 1px solid var(--ap-border);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ap-card:hover {
    box-shadow: 0 6px 18px rgba(10, 59, 122, 0.1);
    transform: translateY(-2px);
}

.ap-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--ap-bg-alt);
}

.ap-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ap-card__body {
    padding: 1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ap-card__meta {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ap-blue);
    margin-bottom: 0.5rem;
}

.ap-card__meta a { color: var(--ap-blue); }
.ap-card__meta a:hover { color: var(--ap-accent); }

.ap-card__title {
    font-size: 1.15rem;
    line-height: 1.35;
    margin: 0 0 0.6rem;
}

.ap-card__title a {
    color: var(--ap-ink);
}

.ap-card__title a:hover {
    color: var(--ap-blue);
    text-decoration: none;
}

.ap-card__excerpt {
    color: var(--ap-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0.75rem;
}

.ap-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--ap-muted);
}

.ap-card__byline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ap-card__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Featured/hero list variant (big lead card + secondary items) */
.ap-feature-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 900px) {
    .ap-feature-block {
        grid-template-columns: 2fr 1fr;
    }
}

.ap-feature-block__lead .ap-card__media {
    aspect-ratio: 16 / 10;
}

.ap-feature-block__lead .ap-card__title {
    font-size: 1.75rem;
}

.ap-feature-block__secondary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ap-feature-block__secondary .ap-card {
    flex-direction: row;
    min-height: 110px;
}

.ap-feature-block__secondary .ap-card__media {
    flex: 0 0 40%;
    aspect-ratio: auto;
}

.ap-feature-block__secondary .ap-card__title {
    font-size: 1rem;
}

.ap-feature-block__secondary .ap-card__excerpt {
    display: none;
}

/* ==========================================================================
   Section headings (used on homepage/landing pages)
   ========================================================================== */
.ap-section {
    margin: 3rem 0;
}

.ap-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 2px solid var(--ap-blue);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.ap-section__title {
    font-size: 1.5rem;
    margin: 0;
    color: var(--ap-blue);
}

.ap-section__more {
    font-family: var(--ap-font-body);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==========================================================================
   Jobs list (specific to the "jobs" post type / taxonomy)
   ========================================================================== */
.ap-jobs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 700px) {
    .ap-jobs-list { grid-template-columns: repeat(2, 1fr); }
}

.ap-job {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--ap-border);
    background: #fff;
}

.ap-job__logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: var(--ap-bg-alt);
}

.ap-job__location {
    font-size: 0.8rem;
    color: var(--ap-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.ap-job__location span { color: var(--ap-blue); font-weight: 600; }

.ap-job__title {
    font-family: var(--ap-font-head);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.ap-job__title a { color: var(--ap-ink); }
.ap-job__title a:hover { color: var(--ap-blue); }

.ap-job__meta {
    font-size: 0.85rem;
    color: var(--ap-muted);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ap-job__salary { font-weight: 600; color: var(--ap-ink); }

/* ==========================================================================
   Filters
   ========================================================================== */
.ap-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.ap-filter {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--ap-border);
    background: #fff;
    color: var(--ap-ink);
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ap-filter:hover,
.ap-filter.is-active {
    background: var(--ap-blue);
    border-color: var(--ap-blue);
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   Newsletter CTA
   ========================================================================== */
.ap-newsletter {
    background: var(--ap-blue-light);
    border-left: 4px solid var(--ap-blue);
    padding: 1.5rem;
    margin: 2rem 0;
}

.ap-newsletter__title {
    font-family: var(--ap-font-head);
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    color: var(--ap-blue);
}

.ap-newsletter__btn {
    display: inline-block;
    background: var(--ap-blue);
    color: #fff;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.ap-newsletter__btn:hover {
    background: var(--ap-blue-dark);
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--ap-blue-dark);
    color: #dbe4f1;
}

.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--ap-accent); text-decoration: underline; }
.site-footer h4, .site-footer .widget-title { color: #fff; }

/* ==========================================================================
   Single post refinements
   ========================================================================== */
.single .entry-title { font-size: clamp(1.75rem, 4vw, 2.5rem); }

.single .entry-meta {
    color: var(--ap-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--ap-border);
    border-bottom: 1px solid var(--ap-border);
    padding: 0.75rem 0;
    margin: 1.5rem 0;
}

.single .entry-content {
    font-size: 1.05rem;
    line-height: 1.7;
}

.single .entry-content p { margin-bottom: 1.25rem; }

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