/*
Theme Name: Dynamic Communities Corporate
Theme URI: https://www.dynamiccommunities.com/
Author: Dynamic Communities
Author URI: https://www.dynamiccommunities.com/
Description: Lightweight custom theme for the Dynamic Communities corporate site. Pages are built with WPBakery using the branded elements from the "Dynamic Communities — Core" plugin; the theme supplies the header, footer, typography, self-hosted fonts and the press release templates.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: dci-corporate
*/

/* ═══════════════════════════════════════════════════════════
   SELF-HOSTED FONTS (latin subset) — no Google Fonts request.
═══════════════════════════════════════════════════════════ */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/poppins-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('assets/fonts/poppins-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/poppins-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700 800;
    font-display: swap;
    src: url('assets/fonts/poppins-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('assets/fonts/open-sans-latin.woff2') format('woff2');
}

/* ═══════════════════════════════════════════════════════════
   TOKENS — the dci-core WPBakery elements read these too.
═══════════════════════════════════════════════════════════ */
:root {
    --dc-beige: #f5f0eb;
    --dc-navy: #395187;
    --dc-blue: #3a6fb6;
    --dc-blue-dark: #2d5a96;
    --dc-orange: #f39c1f;
    --dc-accent: #d9531e;
    --dc-ink: #283228;
    --dc-heading: #333333;
    --dc-text: #333333;
    --dc-muted: #666666;
    --dc-line: #d9d9d9;
    --dc-black: #000000;
    --dc-white: #ffffff;

    --dc-font: 'Poppins', Helvetica, Arial, sans-serif;
    --dc-font-display: 'Open Sans', Arial, sans-serif;

    --dc-container: 1080px;
    --dc-gutter: 24px;
    --dc-header-h: 96px;
}

/* ═══════════════════════════════════════════════════════════
   BASE
═══════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--dc-header-h);
}

body {
    margin: 0;
    background: var(--dc-white);
    color: var(--dc-text);
    font-family: var(--dc-font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--dc-blue);
}

a:hover {
    color: var(--dc-blue-dark);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    color: var(--dc-heading);
    font-family: var(--dc-font);
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin: 0 0 1em;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.skip-link:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    width: auto;
    height: auto;
    padding: 10px 16px;
    clip: auto;
    background: var(--dc-white);
    color: var(--dc-black);
}

:focus-visible {
    outline: 2px solid var(--dc-blue);
    outline-offset: 2px;
}

.dc-container {
    width: 100%;
    max-width: calc(var(--dc-container) + var(--dc-gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--dc-gutter);
}

/* ═══════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--dc-white);
    transition: box-shadow .2s ease;
}

.admin-bar .site-header {
    top: 32px;
}

.site-header.is-scrolled {
    box-shadow: 0 1px 12px rgba(0, 0, 0, .08);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--dc-header-h);
    padding: 0 39px;
}

.site-logo {
    display: block;
    line-height: 0;
}

.site-logo img {
    width: 200px;
    height: auto;
}

.site-nav ul {
    display: flex;
    gap: 34px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    color: var(--dc-black);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
    color: var(--dc-blue);
}

.nav-toggle {
    display: none;
    padding: 8px;
    border: 0;
    background: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background: var(--dc-black);
    transition: transform .2s, opacity .2s;
}

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

@media (max-width: 600px) {
    .admin-bar .site-header {
        top: 0;
    }
}

@media (max-width: 980px) {
    :root {
        --dc-header-h: 72px;
    }

    .site-header__inner {
        padding: 0 20px;
    }

    .site-logo img {
        width: 160px;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        background: var(--dc-white);
        box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 20px 16px;
    }

    .site-nav a {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid #eee;
        font-size: 16px;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* ═══════════════════════════════════════════════════════════
   WPBAKERY PAGES
   Rows that hold a dci-core element run edge to edge; ordinary
   rows (text, images) sit in the centred content column.
═══════════════════════════════════════════════════════════ */
.dc-page {
    overflow-x: clip;
}

/* WPBakery 7+ wraps content in .wpb-content-wrapper; match both. */
:is(.dc-page, .dc-page > .wpb-content-wrapper) > :is(.vc_row, .vc_section) {
    max-width: calc(var(--dc-container) + var(--dc-gutter) * 2);
    margin-right: auto;
    margin-left: auto;
    padding-right: calc(var(--dc-gutter) - 15px);
    padding-left: calc(var(--dc-gutter) - 15px);
}

:is(.dc-page, .dc-page > .wpb-content-wrapper) > :is(.vc_row, .vc_section):has(.dc-el) {
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
}

.dc-page .vc_row:has(.dc-el) > .wpb_column > .vc_column-inner {
    padding: 0;
}

.dc-page .vc_row:has(.dc-el) .wpb_content_element,
.dc-page .vc_row:has(.dc-el) .vc_column-inner > .wpb_wrapper > * {
    margin-bottom: 0;
}

/* Plain content rows (e.g. Privacy Policy text) */
:is(.dc-page, .dc-page > .wpb-content-wrapper) > .vc_row:not(:has(.dc-el)) {
    padding-top: 60px;
    padding-bottom: 40px;
}

.dc-page .wpb_text_column {
    font-family: var(--dc-font-display);
    font-size: 16px;
    line-height: 1.75;
}

.dc-page .wpb_text_column h2,
.dc-page .wpb_text_column h3,
.dc-page .wpb_text_column h4 {
    margin-top: 1.6em;
    font-family: var(--dc-font-display);
}

.dc-page .wpb_text_column h6 {
    font-size: 13px;
    font-weight: 600;
}

/* Pages built without WPBakery fall back to the content column */
.dc-page--plain {
    padding: 60px 0;
}

/* ═══════════════════════════════════════════════════════════
   PAGE / POST HERO (shared with the dc_page_hero element)
═══════════════════════════════════════════════════════════ */
.dc-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--dc-hero-h, 400px);
    padding: 60px var(--dc-gutter);
    background-color: var(--dc-white);
    background-position: center;
    background-size: cover;
    text-align: center;
}

.dc-hero__title {
    max-width: 1080px;
    margin: 0;
    color: var(--dc-hero-color, var(--dc-black));
    font-family: var(--dc-font-display);
    font-size: clamp(34px, 4.2vw, 60px);
    font-weight: 800;
    line-height: 1.15;
}

.dc-hero--overlay::before {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .25);
    content: '';
}

.dc-hero--overlay .dc-hero__title {
    position: relative;
}

/* ═══════════════════════════════════════════════════════════
   PRESS RELEASE — SINGLE
═══════════════════════════════════════════════════════════ */
.dc-hero--post {
    --dc-hero-h: 540px;
}

.dc-hero--post .dc-hero__title {
    font-size: clamp(30px, 3.4vw, 50px);
}

.dc-article {
    max-width: calc(var(--dc-container) + var(--dc-gutter) * 2);
    margin: 0 auto;
    padding: 80px var(--dc-gutter) 80px;
    font-family: var(--dc-font-display);
    font-size: 16px;
    line-height: 1.75;
    color: var(--dc-text);
}

.dc-article__image {
    margin: 0 0 32px;
}

.dc-article__image img {
    display: block;
    width: 100%;
    max-width: 1024px;
}

.dc-article__content a {
    color: #2ea3f2;
    text-decoration: none;
}

.dc-article__content a:hover {
    text-decoration: underline;
}

.dc-article__content img {
    height: auto;
}

.dc-article__back {
    display: inline-block;
    margin-top: 40px;
    font-family: var(--dc-font);
    font-weight: 600;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.site-footer {
    background: var(--dc-black);
    color: var(--dc-white);
    font-size: 14px;
    line-height: 1.8;
}

.site-footer a {
    color: var(--dc-white);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--dc-orange);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.25fr 1.25fr 1.25fr 1fr;
    gap: 40px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 80px 75px 150px;
}

.site-footer__logo img {
    width: 229px;
    height: auto;
}

.site-footer__tagline {
    max-width: 300px;
    margin-top: 18px;
    font-size: 13px;
    line-height: 2.2;
}

.site-footer__heading {
    margin: 0 0 26px;
    color: var(--dc-white);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
}

.site-footer address {
    font-style: normal;
}

.site-footer address,
.site-footer__col p {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.7;
}

.site-footer__links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__links li {
    margin: 0 0 8px;
    font-size: 13px;
}

.site-footer__social {
    display: flex;
    gap: 22px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.site-footer__social svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: currentColor;
}

@media (max-width: 980px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
        padding: 60px var(--dc-gutter) 80px;
    }
}

@media (max-width: 600px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════
   404 / FALLBACK
═══════════════════════════════════════════════════════════ */
.dc-notfound {
    padding: 120px var(--dc-gutter);
    text-align: center;
}

.dc-notfound h1 {
    font-size: 48px;
}
