/* Compact professional header and homepage hero */
@media (min-width: 783px) {
  .ccl-logo {
    width: auto !important;
    height: auto !important;
    max-height: 165px !important;
  }

  .ccl-mag-hero {
    min-height: 390px !important;
    padding: 42px 46px !important;
    background-position: center 48% !important;
  }
}

@media (max-width: 782px) {
  .ccl-logo {
    width: 100% !important;
    height: auto !important;
    max-height: 92px !important;
  }

  .ccl-mag-hero {
    min-height: 350px !important;
    padding: 34px 24px !important;
    background-position: 62% center !important;
  }
}

/* Logo integrated into the desktop navigation — August 2026 */
@media (min-width: 1200px) {
  .site-header {
    position: relative;
    background: #15543f !important;
  }

  .ccl-header {
    position: relative;
    z-index: 10000;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }

  .ccl-header > .ccl-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100%;
    height: 86px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    padding-right: 0;
    pointer-events: none;
  }

  .ccl-branding {
    width: 390px;
    max-width: 27%;
    margin: 0;
    padding: 8px 18px 8px 0;
    display: flex;
    align-items: center;
    pointer-events: auto;
  }

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

  .ccl-logo {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 390px !important;
    max-height: 70px !important;
    object-fit: contain;
  }

  .ccl-navigation {
    min-height: 86px;
  }

  .ccl-navigation > .ccl-container {
    min-height: 86px;
    padding-left: min(28%, 410px);
    display: flex;
    align-items: center;
  }

  .ccl-navigation .primary-menu {
    width: 100%;
    justify-content: flex-end;
    gap: clamp(2px, 0.35vw, 8px);
  }

  .ccl-navigation .primary-menu > li > a {
    padding-left: clamp(8px, 0.65vw, 13px);
    padding-right: clamp(8px, 0.65vw, 13px);
    white-space: nowrap;
  }
}

@media (min-width: 783px) and (max-width: 1199px) {
  .ccl-logo {
    max-height: 105px !important;
  }
}

@media (max-width: 782px) {
  .ccl-header {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .ccl-logo {
    max-height: 72px !important;
  }
}

/* Centre the integrated logo within its reserved header area */
@media (min-width: 1200px) {
  .ccl-branding {
    height: 86px;
    box-sizing: border-box;
    padding: 8px 0;
    justify-content: center;
  }

  .ccl-logo-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ccl-logo {
    margin: 0 auto;
  }
}


/* Replace the header logo with the uploaded farmhouse image */
.ccl-logo {
  content: url("https://canadiancountrylife.ca/wp-content/uploads/2026/10/CCL_Farmhouse_horizontal_logo_faded_420x120.png") !important;
}


/* Keep the farmhouse image clear of the desktop navigation */
@media (min-width: 1200px) {
  .ccl-logo {
    max-height: 54px !important;
  }
}


/* Align the mark with the left edge of the navigation container */
@media (min-width: 1200px) {
  .ccl-branding {
    justify-content: flex-start !important;
  }

  .ccl-logo-link {
    justify-content: flex-start !important;
  }

  .ccl-logo {
    margin: 0 !important;
  }
}


/* Fit every desktop navigation label beside the farmhouse logo */
@media (min-width: 1200px) {
  .ccl-navigation .primary-menu {
    gap: 0 !important;
  }

  .ccl-navigation .primary-menu > li > a {
    font-size: 14px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}


/* Restore the original header logo and navigation layout */
.ccl-logo {
  content: normal !important;
}

@media (min-width: 1200px) {
  .ccl-branding {
    justify-content: center !important;
  }

  .ccl-logo-link {
    justify-content: center !important;
  }

  .ccl-logo {
    max-height: 70px !important;
    margin: 0 auto !important;
  }

  .ccl-navigation .primary-menu {
    gap: clamp(2px, 0.35vw, 8px) !important;
  }

  .ccl-navigation .primary-menu > li > a {
    font-size: revert !important;
    padding-left: clamp(8px, 0.65vw, 13px) !important;
    padding-right: clamp(8px, 0.65vw, 13px) !important;
  }
}

/* Use the farmhouse in the homepage hero; its left fade keeps the copy readable */
.ccl-mag-hero {
  background-image: url("https://canadiancountrylife.ca/wp-content/uploads/2026/10/CCL_Farmhouse_horizontal_logo_faded_420x120.png") !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}


/* Correct homepage hero image: original farmhouse photo with a left fade behind existing copy */
.ccl-mag-hero {
  background-image: linear-gradient(90deg, rgba(8, 28, 20, .88) 0%, rgba(8, 28, 20, .68) 38%, rgba(8, 28, 20, .2) 70%, rgba(8, 28, 20, 0) 100%), url("https://canadiancountrylife.ca/wp-content/uploads/2026/10/CCL_Farmhouse_upload.png") !important;
  background-size: cover, cover !important;
  background-position: center, center 48% !important;
  background-repeat: no-repeat, no-repeat !important;
}

@media (max-width: 782px) {
  .ccl-mag-hero {
    background-image: linear-gradient(90deg, rgba(8, 28, 20, .86) 0%, rgba(8, 28, 20, .68) 52%, rgba(8, 28, 20, .25) 100%), url("https://canadiancountrylife.ca/wp-content/uploads/2026/10/CCL_Farmhouse_upload.png") !important;
    background-position: center, 62% center !important;
  }
}


/* Keep the full original logo clear of desktop navigation */
@media (min-width: 1200px) {
  .ccl-branding { width: 300px !important; max-width: 23% !important; }
  .ccl-logo { max-width: 300px !important; max-height: 66px !important; }
  .ccl-navigation > .ccl-container { padding-left: min(23%, 310px) !important; }
  .ccl-navigation .primary-menu { gap: 2px !important; }
  .ccl-navigation .primary-menu > li > a { font-size: 13px !important; padding-left: 5px !important; padding-right: 5px !important; }
}


/* Enlarge the two-badge logo in the desktop header */
@media (min-width: 1200px) {
  .ccl-branding { width: 370px !important; max-width: 28% !important; }
  .ccl-logo { max-width: 370px !important; max-height: 80px !important; }
}
