/*
Theme Name: DHCTranslations
Theme URI: https://dhctranslations.com/
Author: DHCTranslations
Author URI: https://dhctranslations.com/
Description: Custom WordPress theme for DHCTranslations, a UK-based certified translation provider. 100% human translations for the Home Office, UKVI, courts, UK ENIC, GMC, GDC, DVLA and other official bodies. Built with Tailwind CSS tokens and a locked brand palette (authorityBlue, darkBlue, accentOrange).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: dhc-translations
Tags: custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* =============================================================================
   WordPress required base styles.
   Layout, components and brand styling live in main.css (enqueued from
   functions.php). Nothing in this file should duplicate main.css rules.
   ========================================================================== */

/* WordPress core alignment + caption classes --------------------------------- */
.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    margin-left: auto;
    margin-right: auto;
    max-width: 80rem;
}

.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text,
.wp-caption .wp-caption-text,
.gallery-caption,
.entry-caption {
    font-size: 0.8125rem;
    color: #64748B;
    margin-top: 0.5rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    border-radius: 0.75rem;
    height: auto;
    width: 100%;
}

.sticky,
.bypostauthor {
    position: relative;
}

/* Screen reader text (used by the skip link and icon-only buttons) ---------- */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    white-space: nowrap;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #FFFFFF;
    border: 1px solid #2563EB;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -18px rgba(11, 42, 91, 0.5);
    clip: auto;
    clip-path: none;
    color: #0F172A;
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    height: auto;
    left: 1rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    top: 1rem;
    width: auto;
    z-index: 100000;
}

/* Editor / legacy content helpers ------------------------------------------ */
.entry-content::after,
.page-content::after {
    clear: both;
    content: "";
    display: table;
}

.entry-content img,
.page-content img {
    height: auto;
    max-width: 100%;
}

.entry-content blockquote,
.page-content blockquote {
    border-left: 4px solid #F15A23;
    color: #0B2A5B;
    font-weight: 600;
    margin: 1.5rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
}

.entry-content table,
.page-content table {
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    width: 100%;
}

.entry-content th,
.entry-content td,
.page-content th,
.page-content td {
    border: 1px solid rgba(11, 42, 91, 0.15);
    padding: 0.625rem 0.875rem;
    text-align: left;
}

/* WordPress toolbar offset.
 *
 * Do NOT add `top: 32px` to the sticky nav here. WordPress already shifts the whole document
 * down with `html { margin-top: 32px !important }` when a user is logged in. A sticky element
 * that also declares `top: 32px` is offset a second time: it renders 32px below the space the
 * document reserved for it, so it paints over whatever comes next - in practice the breadcrumb,
 * which then looked "covered" by the header whenever an admin was logged in. Logged-out visitors
 * never saw it because these rules did not apply.
 *
 * The only cost of leaving `top` unset is that a logged-in user who scrolls sees the fixed
 * toolbar overlap the top of the stuck nav. That is cosmetic and editor-only; covering page
 * content permanently is not.
 */

/* WordPress core "no results" / pagination fallbacks ----------------------- */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(11, 42, 91, 0.15);
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0B2A5B;
    text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
    background-color: #2563EB;
    border-color: #2563EB;
    color: #FFFFFF;
}

/* =============================================================================
   Entry content: long-form WordPress editor output used by page.php and
   single.php. Tailwind Preflight strips default typography, so headings,
   lists, links and media need their own rhythm here.
   ========================================================================== */
.entry-content > * + * {
    margin-top: 1.15rem;
}

.entry-content h2 {
    font-size: 1.625rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0B2A5B;
    letter-spacing: -0.01em;
    margin-top: 2.25rem;
}

.entry-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0B2A5B;
    margin-top: 1.75rem;
}

.entry-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0F172A;
    margin-top: 1.5rem;
}

.entry-content p,
.entry-content li {
    color: #0F172A;
}

.entry-content a {
    color: #2563EB;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.entry-content a:hover {
    color: #0B2A5B;
}

.entry-content ul {
    list-style: disc;
    padding-left: 1.4rem;
}

.entry-content ol {
    list-style: decimal;
    padding-left: 1.4rem;
}

.entry-content li + li {
    margin-top: 0.35rem;
}

.entry-content hr {
    border: 0;
    border-top: 1px solid rgba(11, 42, 91, 0.15);
    margin: 2rem 0;
}

.entry-content figure {
    margin: 1.5rem 0;
}

.entry-content img {
    border-radius: 1rem;
}

.entry-content figcaption,
.entry-content .wp-block-image figcaption {
    color: #64748B;
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

.entry-content code {
    background-color: #F1F5F9;
    border-radius: 0.375rem;
    color: #0B2A5B;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    padding: 0.15rem 0.35rem;
}

.entry-content pre {
    background-color: #0B2A5B;
    border-radius: 1rem;
    color: #E2E8F0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    padding: 1.25rem;
}

.entry-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.entry-content .wp-block-quote {
    border-left: 4px solid #F15A23;
    padding-left: 1.25rem;
}
