/*
 * WordPress adjustments for the Red Kite Radio theme.
 * Loaded after assets/css/site.css.
 */

/* Keep the fixed header below the WordPress admin bar. */
body.admin-bar .header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
    }
}

/* The logo is a link back to the home page. */
.logo {
    text-decoration: none;
}

.logo-text .logo-name {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

/* Gutenberg output keeps the original layout classes. Keep the group's own
   margins (the content column relies on auto margins) and only cancel the
   extra block spacing WordPress injects between blocks. */
.wp-block-group,
.wp-block-group > * {
    margin-block-start: 0;
    margin-block-end: 0;
}

.wp-block-group.container,
.wp-block-group .container {
    margin-left: auto;
    margin-right: auto;
}

.wp-block-image {
    margin: 0;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.overview-grid > .wp-block-group,
.feature-grid > .wp-block-group,
.packages-grid > .wp-block-group,
.contact-options-grid > .wp-block-group,
.faq-grid > .wp-block-group,
.stats > .wp-block-group,
.presenters-grid > .wp-block-group {
    display: block;
}

/* Readable long-form content for news articles and plain pages. */
.rkr-prose {
    color: var(--dark-color);
    font-size: 1.05rem;
    line-height: 1.75;
}

.rkr-prose p {
    margin: 0 0 1rem;
}

.rkr-prose h2,
.rkr-prose h3,
.rkr-prose h4 {
    margin: 1.75rem 0 0.75rem;
    color: var(--dark-color);
}

.rkr-prose ul,
.rkr-prose ol {
    margin: 0 0 1.25rem 1.5rem;
}

.rkr-prose li {
    margin-bottom: 0.4rem;
}

.rkr-prose a {
    color: var(--primary-color);
}

.rkr-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.rkr-content-section .rkr-prose {
    max-width: 860px;
    margin: 0 auto;
}

/* Single article. */
.rkr-article__body {
    max-width: 860px;
    margin: 0 auto;
}

.rkr-article__image {
    margin: 0 0 2rem;
}

.rkr-article__image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.rkr-article__back {
    margin-top: 2.5rem;
}

/* Contact details generated from the Customizer. */
.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* Pagination. */
.rkr-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
}

.rkr-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius);
    background: var(--light-color);
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.rkr-pagination .page-numbers:hover,
.rkr-pagination .page-numbers.current {
    background: var(--primary-color);
    color: var(--white);
}

/* Gallery event notice when photos have not been added yet. */
.gallery-empty {
    color: var(--gray-color);
    font-style: italic;
}

/* News card links inherit the card colours. */
.featured-update h3 a,
.presenter-info h3 a {
    color: inherit;
    text-decoration: none;
}

.featured-update h3 a:hover,
.presenter-info h3 a:hover {
    color: var(--primary-color);
}

/* Spacing that used to be inline on the presenters page. */
.behind-scenes-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #e5e7eb;
}

/* Screen reader shortcut. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 0.75rem 1rem;
    background: var(--white);
    color: var(--primary-color);
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}
