/*
Theme Name:   CMCA Circulation Audit (BeTheme Child)
Theme URI:    https://circulationaudit.ca
Description:  Child theme for BeTheme — Canadian Media Circulation Audit website.
              Provides custom CSS, page templates, and CircStats database integration.
              Requires the BeTheme parent theme to be installed.
Author:       News Media Canada
Author URI:   https://newsmediacanada.ca
Template:     betheme
Version:      2.0.0
Text Domain:  cmca-theme
*/


:root {
    --cmca-primary: #18719a;
    --cmca-dark: #0e4761;
    --cmca-heading-red: #af1c1c;
    --cmca-navy: #191f45;
    --cmca-grey-bg: #f6f6f6;
}

/* Font overrides — static site uses Faustina (body) + Montserrat (headings/nav) */
body,
span.date_label,
.timeline_items li h3 span,
input[type="date"],
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="email"],
input[type="url"],
textarea,
select,
.lead,
.big,
.offer_li .title h3,
.mfn-menu-item-megamenu {
    font-family: "Faustina", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

body,
.mfn-menu-item-megamenu {
    font-size: 18px !important;
    line-height: 23px !important;
    font-weight: 400 !important;
    letter-spacing: 0px !important;
}

.lead,
.big {
    font-size: 18px !important;
    line-height: 28px !important;
    font-weight: 400 !important;
}

p {
    font-family: "Faustina", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    font-weight: 400 !important;
    color: #000000 !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.text-logo #logo,
#menu>ul>li>a,
#overlay-menu ul li a,
#Subheader .title,
blockquote {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

/* Body/global link colour */
a {
    color: var(--cmca-primary) !important;
}

a:hover {
    color: var(--cmca-dark) !important;
}

/* Keep button text white */
a.button,
a.button:hover,
a.button .button_label {
    color: #ffffff !important;
}

/* Heading colour overrides */
h1,
h1 a,
h1 a:hover,
h2,
h2 a,
h2 a:hover,
h3,
h3 a,
h3 a:hover {
    color: var(--cmca-heading-red) !important;
}

h4,
h4 a,
h4 a:hover,
h5,
h5 a,
h5 a:hover {
    color: var(--cmca-navy) !important;
}

h6,
h6 a,
h6 a:hover {
    color: var(--cmca-dark) !important;
}

/* Theme colours used by BeTheme helpers */
.themecolor {
    color: var(--cmca-dark) !important;
}

.themebg {
    background-color: var(--cmca-dark) !important;
}

/* Primary button */
body {
    --mfn-button-bg: var(--cmca-primary) !important;
    --mfn-button-bg-hover: var(--cmca-dark) !important;
}

/* Top bar (nav) link colours  — !important to beat BeTheme inline CSS */
#Top_bar .menu>li>a,
#Top_bar #menu ul li.submenu .menu-toggle {
    color: #000000 !important;
}

#Top_bar .menu>li.current-menu-item>a,
#Top_bar .menu>li.current_page_item>a,
#Top_bar .menu>li.current-menu-parent>a,
#Top_bar .menu>li.current-page-parent>a,
#Top_bar .menu>li.current-menu-ancestor>a,
#Top_bar .menu>li.current-page-ancestor>a,
#Top_bar .menu>li.current_page_ancestor>a,
#Top_bar .menu>li.hover>a {
    color: #ffffff !important;
}

/* Menu-highlight pill backgrounds (active / hover) */
.menu-highlight #Top_bar #menu>ul>li.current-menu-item>a,
.menu-highlight #Top_bar #menu>ul>li.current_page_item>a,
.menu-highlight #Top_bar #menu>ul>li.current-menu-parent>a,
.menu-highlight #Top_bar #menu>ul>li.current-page-parent>a,
.menu-highlight #Top_bar #menu>ul>li.current-menu-ancestor>a,
.menu-highlight #Top_bar #menu>ul>li.current-page-ancestor>a,
.menu-highlight #Top_bar #menu>ul>li.current_page_ancestor>a,
.menu-highlight #Top_bar #menu>ul>li.hover>a {
    background: #25333b !important;
}

/* Submenu arrow colours */
.menuo-arrows #Top_bar .menu>li.submenu>a>span:not(.description)::after {
    border-top-color: #000000 !important;
}

.menuo-arrows #Top_bar .menu>li.current-menu-item.submenu>a>span:not(.description)::after,
.menuo-arrows #Top_bar .menu>li.hover.submenu>a>span:not(.description)::after {
    border-top-color: #ffffff !important;
}

/* Sub-menu dropdown */
#Top_bar .menu>li ul {
    background-color: #F2F2F2 !important;
}

#Top_bar .menu>li ul li a {
    color: #5f5f5f !important;
}

#Top_bar .menu>li ul li a:hover,
#Top_bar .menu>li ul li.hover>a {
    color: #2e2e2e !important;
}

/* Menu accent underline (hidden by menu-link-color, but override color anyway) */
#Top_bar .menu>li a:not(.menu-toggle):after {
    background: #ffffff !important;
}

/* Responsive menu toggle */
#Top_bar .responsive-menu-toggle {
    color: #0e4761 !important;
    background: #ffffff !important;
}

/* Header / footer backgrounds */
#Header .top_bar_left,
#Top_bar,
#Top_bar #menu {
    background-color: #ffffff !important;
}

#Footer {
    background-color: #d6d6d6 !important;
}

/* Homepage: hide the dark header area and subheader bar */
.home #Header {
    min-height: 0 !important;
}

.home #Header_wrapper {
    background-image: url(/wp-content/uploads/2019/01/CMCA-home-header-dimmed.jpg) !important;
    min-height: 700px !important;
}

/* Hide subheader on all pages */
#Subheader {
    display: none !important;
}

/* Header image — all pages */
#Header_wrapper {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding-top: 70px;
    min-height: 467px !important;
    position: relative;
    display: flex;
    justify-content: center;
}

body:not(.home) #Header {
    min-height: 0 !important;
}

/* Inner-page hero title overlay (replaces #Subheader) */
.cmca-page-hero {
    position: relative;
    margin-top: -467px;
    height: 467px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

.cmca-page-hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    line-height: 36px;
    font-weight: 400;
    letter-spacing: 0;
    color: #ffffff !important;
}

@media (max-width: 767px) {
    #Header_wrapper {
        min-height: 320px !important;
    }

    .cmca-page-hero {
        margin-top: -320px;
        height: 320px;
    }

    .cmca-page-hero-title {
        font-size: 26px;
        line-height: 30px;
    }
}

/* Body wrapper background */
#Wrapper,
#Content {
    background-color: #f6f6f6;
}

html {
    background-color: #7e8b93;
    background-image: url(/wp-content/uploads/2016/01/home_accountant_bgd.jpg);
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: fixed;
}

body:not(.template-slider):not(.home) #Header_wrapper {
    background-image: url(/wp-content/uploads/2019/01/CMCA-header-image-dimmed.jpg);
}



/* Heading sizes — !important to beat BeTheme dynamic inline CSS */
h1 {
    font-size: 36px !important;
    line-height: 36px !important;
    font-weight: 500 !important;
}

h2 {
    font-size: 32px !important;
    line-height: 32px !important;
    font-weight: 500 !important;
}

h3 {
    font-size: 26px !important;
    line-height: 28px !important;
    font-weight: 500 !important;
}

h4 {
    font-size: 20px !important;
    line-height: 24px !important;
    font-weight: 400 !important;
}

h5 {
    font-size: 18px !important;
    line-height: 23px !important;
    font-weight: 400 !important;
}

h6 {
    font-size: 16px !important;
    line-height: 21px !important;
    font-weight: 400 !important;
}

#menu>ul>li>a,
#overlay-menu ul li a {
    font-size: 14px !important;
    font-weight: 400 !important;
}

/* Responsive font sizing — matches static site BeTheme Muffin Options */
@media only screen and (min-width: 768px) and (max-width: 959px) {

    body,
    .mfn-menu-item-megamenu {
        font-size: 15px !important;
        line-height: 20px !important;
    }

    .lead,
    .big {
        font-size: 15px !important;
        line-height: 24px !important;
    }

    h1 {
        font-size: 31px !important;
        line-height: 31px !important;
    }

    h2 {
        font-size: 27px !important;
        line-height: 27px !important;
    }

    h3 {
        font-size: 22px !important;
        line-height: 24px !important;
    }

    h4 {
        font-size: 17px !important;
        line-height: 20px !important;
    }

    h5 {
        font-size: 15px !important;
        line-height: 20px !important;
    }

    h6 {
        font-size: 14px !important;
        line-height: 19px !important;
    }
}

@media only screen and (min-width: 480px) and (max-width: 767px) {

    body,
    .mfn-menu-item-megamenu {
        font-size: 14px !important;
        line-height: 19px !important;
    }

    .lead,
    .big {
        font-size: 14px !important;
        line-height: 21px !important;
    }

    h1 {
        font-size: 27px !important;
        line-height: 27px !important;
    }

    h2 {
        font-size: 24px !important;
        line-height: 24px !important;
    }

    h3 {
        font-size: 20px !important;
        line-height: 21px !important;
    }

    h4 {
        font-size: 15px !important;
        line-height: 19px !important;
    }

    h5 {
        font-size: 14px !important;
        line-height: 19px !important;
    }

    h6 {
        font-size: 13px !important;
        line-height: 19px !important;
    }
}

@media only screen and (max-width: 479px) {

    body,
    .mfn-menu-item-megamenu {
        font-size: 13px !important;
        line-height: 19px !important;
    }

    .lead,
    .big {
        font-size: 13px !important;
        line-height: 19px !important;
    }

    h1 {
        font-size: 22px !important;
        line-height: 22px !important;
    }

    h2 {
        font-size: 19px !important;
        line-height: 19px !important;
    }

    h3 {
        font-size: 16px !important;
        line-height: 19px !important;
    }

    h4 {
        font-size: 13px !important;
        line-height: 19px !important;
    }

    h5 {
        font-size: 13px !important;
        line-height: 19px !important;
    }

    h6 {
        font-size: 13px !important;
        line-height: 19px !important;
    }
}


#Top_bar .logo img.svg {
    width: 100px;
}


#Footer .widgets_wrapper {
    padding: 40px 0 !important;
}

.mfn-footer,
.mfn-footer .widget_recent_entries ul li a {
    color: #505866 !important;
}

.mfn-footer a:not(.button):not(.icon_bar):not(.mfn-btn):not(.mfn-option-btn) {
    color: var(--cmca-primary) !important;
}

.mfn-footer a:not(.button):not(.icon_bar):not(.mfn-btn):not(.mfn-option-btn):hover {
    color: var(--cmca-dark) !important;
}

.mfn-footer h1,
.mfn-footer h1 a,
.mfn-footer h2,
.mfn-footer h2 a,
.mfn-footer h3,
.mfn-footer h3 a,
.mfn-footer h4,
.mfn-footer h4 a,
.mfn-footer h5,
.mfn-footer h5 a,
.mfn-footer h6,
.mfn-footer h6 a {
    color: #6a798a !important;
}

/* Footer Quick Menu nav widget */
.mfn-footer .widget_nav_menu {
    margin: 0 !important;
    padding: 0 !important;
}

.mfn-footer .widget_nav_menu ul.menu {
    list-style: none !important;
    padding: 0 0 0 20px !important;
    margin: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    line-height: 32px !important;
}

.mfn-footer .widget_nav_menu ul.menu li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mfn-footer .widget_nav_menu ul.menu li a,
.mfn-footer .widget_nav_menu .menu>li>a,
.mfn-footer .widget_nav_menu .menu>li a {
    color: var(--cmca-primary) !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 32px !important;
    display: block !important;
    background: none !important;
}

.mfn-footer .widget_nav_menu .menu>li a:after,
.mfn-footer .widget_nav_menu .menu>li a:before {
    display: none !important;
    background: none !important;
}

.mfn-footer .widget_nav_menu .widgettitle,
.mfn-footer .widget_nav_menu h2.widgettitle {
    color: #6a798a !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    margin-bottom: 15px !important;
}

/* Hide footer_copy bar and back-to-top button */
.mfn-footer .footer_copy,
#back_to_top {
    display: none !important;
}


/* --- Newspaper search table --- */
.newspaper-search-table input[type="text"] {
    margin-bottom: 0 !important;
}

table.newspaper-search-table td {
    border-width: 0 !important;
}

table.newspaper-search-table input {
    margin: 0 auto 0;
}

/* --- CMCA logo sizing --- */
img.cmca-logo {
    margin-right: auto !important;
    margin-left: auto !important;
    width: 1057px !important;
}


/* Outer wrapper */
.cmca-report {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #111;
    max-width: 860px;
    margin: 0 auto 40px;
    border: 1px solid #ccc;
    padding: 24px 28px;
    background: #fff;
}

/* Suppress BeTheme table + cell styles inside the report */
.cmca-report table,
.cmca-report table th,
.cmca-report table td {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2px 6px !important;
    vertical-align: top !important;
    text-align: left !important;
    font-size: inherit !important;
}

.cmca-report table tr:first-child td {
    box-shadow: none !important;
}

/* Letterhead */
.cmca-letterhead {
    border-bottom: 2px solid #18719a;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.cmca-letterhead p {
    margin: 0 0 4px !important;
    font-size: 12px;
    color: #444;
    line-height: 1.4;
}

.cmca-org-name {
    font-size: 15px !important;
    font-weight: bold;
    color: #18719a !important;
    letter-spacing: .03em;
}

/* Report title block */
.cmca-report-title {
    text-align: center;
    margin-bottom: 14px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.cmca-stmt-type {
    font-size: 15px !important;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0 0 4px !important;
}

.cmca-period-line {
    margin: 0 !important;
    font-size: 13px;
}

/* Newspaper header table */
.cmca-newspaper-header {
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 8px 0;
    margin-bottom: 12px;
}

.cmca-nh-table {
    width: 100%;
}

.cmca-nh-label {
    font-weight: bold;
    white-space: nowrap;
    padding-right: 6px !important;
}

.cmca-nh-name {
    font-weight: bold;
}

.cmca-nh-address {
    color: #333;
}

/* Numbered section wrapper */
.cmca-section {
    border-top: 1px solid #ccc;
    padding: 10px 0 8px;
}

h3.cmca-section-heading {
    font-size: 13px !important;
    font-weight: bold;
    margin: 0 0 8px !important;
    color: #111 !important;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: none !important;
    border: none !important;
}

/* Section 1: three-column circulation grid */
.cmca-circ-grid {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cmca-circ-col {
    flex: 1 1 0;
}

.cmca-circ-summary {
    flex: 0 0 220px;
    border-left: 1px solid #ccc;
    padding-left: 12px;
}

h6.paid,
h6.controlled {
    font-size: 12px !important;
    font-weight: bold;
    text-decoration: underline;
    margin: 0 0 4px !important;
    font-family: Arial, Helvetica, sans-serif;
}

table.cmca-circ-items {
    width: 100%;
    border-collapse: collapse;
}

table.cmca-circ-items td.cmca-qty {
    text-align: right !important;
    padding-right: 8px !important;
    white-space: nowrap;
    width: 50px;
}

table.cmca-circ-items td.cmca-label {
    text-align: left !important;
}

table.cmca-circ-items tr.cmca-subtotal td {
    font-weight: bold;
    border-top: 1px solid #555 !important;
    padding-top: 2px !important;
}

table.cmca-summary-items tr.cmca-subtotal td {
    font-weight: bold;
    border-top: 1px solid #555 !important;
}

/* Section 2: quarterly averages */
table.cmca-quarter-table {
    width: 100%;
}

table.cmca-quarter-table td {
    white-space: nowrap;
    padding: 2px 16px 2px 0 !important;
}

.cmca-qlabel {
    font-weight: normal;
}

.cmca-qval {
    font-weight: bold;
    margin-left: 6px;
}

/* Section 3: trading area */
table.cmca-trading-table {
    border-collapse: collapse;
}

table.cmca-trading-table td.cmca-market {
    padding-right: 16px !important;
    font-weight: bold;
}

table.cmca-trading-table td.cmca-dist-count {
    text-align: right !important;
}

/* Section 4: geographic breakdown */
table.cmca-geo-table {
    width: 100%;
    border-collapse: collapse;
}

table.cmca-geo-table td {
    padding: 3px 12px 3px 0 !important;
    white-space: nowrap;
}

.cmca-geo-count {
    font-weight: bold;
    margin-right: 4px;
}

/* Notes */
.cmca-notes p {
    margin: 0 !important;
    font-style: italic;
}

/* Sections 5–7: statement body + signature rows */
.cmca-statement-body {
    margin: 0 0 10px !important;
}

table.cmca-sig-table {
    margin-top: 6px;
}

table.cmca-sig-table td.cmca-sig-val {
    text-align: center !important;
    padding: 0 24px 0 0 !important;
    min-width: 120px;
}

table.cmca-sig-table td.cmca-sig-label {
    text-align: center !important;
    padding: 0 24px 0 0 !important;
    font-size: 11px;
    color: #555;
}

/* Underline utility */
.cmca-underline {
    border-bottom: 1px solid #333;
    padding: 0 8px;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

/* Certificate circulation number (spaced digits like PDF) */
.cmca-cert-circ {
    letter-spacing: .25em;
    font-size: 14px;
}

/* Print styles */
@media print {
    .cmca-report {
        border: none;
        padding: 0;
        max-width: 100%;
        font-size: 11pt;
    }

    .cmca-circ-grid {
        page-break-inside: avoid;
    }

    .cmca-section {
        page-break-inside: avoid;
    }

    .cmca-letterhead {
        border-bottom-color: #000;
    }

    .cmca-org-name {
        color: #000 !important;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}

/* --- Member area --- */
h1.member-home {
    font-size: 22px !important;
}

.menu-member-menu-container {
    width: auto;
    text-align: right;
    margin-bottom: 15px;
}

ul.logout {
    display: inline;
    margin: 0;
}

ul.logout,
.menu-member-menu-container ul {
    list-style: none !important;
}

.menu-member-menu-container ul li {
    display: inline;
    padding-right: 20px;
}

li#menu-item-logout {
    float: right;
}

.menu-member-menu-container {
    display: inline-block;
}

/* --- Report CSS fonts --- */
.cmca-report,
h6.paid,
h6.controlled {
    font-family: Arial, Helvetica, sans-serif;
}

h6.paid,
h6.controlled {
    margin-bottom: 0;
}

/* --- Tables --- */
table tr:first-child td {
    box-shadow: none !important;
}

/* --- Login form cosmetics --- */
#user_login {
    margin-bottom: 10px;
}

#username-text {
    color: grey;
}

/* --- Profile table --- */
table.profile td {
    text-align: left;
    border-style: none;
}

table.profile {
    width: 50%;
}

/* --- Flat button font --- */
.button-flat a.button {
    font-family: "Montserrat", Arial, Tahoma, sans-serif !important;
}

/* --- Member home menu --- */
.member-home-menu {
    margin-bottom: 0 !important;
    width: auto;
    text-align: right;
}

div.search,
div.reset {
    display: inline;
    margin: 0 10px;
}

/* --- Menu login highlight item --- removed, login inherits standard nav styles */



@media only screen and (min-width: 1240px) {

    #Wrapper,
    .with_aside .content_wrapper {
        max-width: 1240px !important;
    }

    .section_wrapper,
    .container {
        max-width: 1220px !important;
    }
}


.cmca-hero {
    position: relative;
    margin-top: -700px;
    height: 700px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

/* No dark overlay — image is pre-dimmed */

.cmca-hero-inner {
    position: relative;
    z-index: 2;
    text-align: left;
    padding: 0 0 90px 0;
    max-width: 1220px;
    width: 100%;
    margin: 0 auto;
}

.cmca-hero-title {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 44px;
    font-weight: 600;
    color: #af1c1c;
    line-height: 46px;
    letter-spacing: 2px;
    background-color: #ffffff;
    padding: 10px;
    margin-bottom: 0;
    max-width: 630px;
}

.cmca-hero-subtitle {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #0e4761;
    line-height: 23px;
    letter-spacing: 2px;
    background-color: #ffffff;
    padding: 10px 50px 10px 10px;
    margin-bottom: 20px;
    max-width: 864px;
}

.cmca-hero-btn {
    display: block !important;
    width: fit-content;
    margin: 0 !important;
    border-radius: 0 !important;
    letter-spacing: 1px;
    text-decoration: none !important;
    font-size: 16px !important;
}

@media (max-width: 767px) {
    .cmca-hero {
        height: 480px;
    }

    .cmca-hero-inner {
        padding: 0 20px 60px 20px;
    }

    .cmca-hero-title {
        font-size: 28px;
        line-height: 32px;
        max-width: 100%;
    }

    .cmca-hero-subtitle {
        font-size: 14px;
        line-height: 20px;
        max-width: 100%;
        padding: 10px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .cmca-hero {
        height: 550px;
    }

    .cmca-hero-inner {
        padding: 0 0 70px 40px;
    }

    .cmca-hero-title {
        font-size: 36px;
        line-height: 40px;
    }

    .cmca-hero-subtitle {
        font-size: 16px;
    }
}


.faq .heading {
    color: var(--cmca-heading-red);
    margin-bottom: 15px;
}

.faq .question .title {
    cursor: pointer;
    padding: 12px 15px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

.faq .question .title .num {
    margin-right: 10px;
    font-weight: 700;
    color: var(--cmca-primary);
}

.faq .question .answer {
    padding: 15px;
    line-height: 1.7;
}


.cmca-download-row .column_visual a {
    font-weight: 600;
    text-decoration: none;
}

.cmca-download-row .column_visual a:hover {
    text-decoration: underline;
}


/* Remove first-row box-shadow that BeTheme sometimes adds */
table tr:first-child td {
    box-shadow: none !important;
}