/* =====================================================
   CATHOLICG33K — FACELIFT LAYER
   Non-destructive visual upgrade for the existing
   WPCode components, shortcodes, header, footer,
   graphics, and Flydock Manuscript pages.

   Load this AFTER the Unified Global CSS.
===================================================== */

:root {
  --cg-gold-deep: #8f6814;
  --cg-gold-soft: rgba(217,163,0,.18);
  --cg-gold-line: rgba(217,163,0,.30);
  --cg-surface-1: #070910;
  --cg-surface-2: #0b0e17;
  --cg-surface-3: #10141f;
  --cg-page-width: 1180px;
  --cg-reading-width: 860px;
  --cg-shadow-soft: 0 18px 50px rgba(0,0,0,.28);
  --cg-shadow-card: 0 24px 65px rgba(0,0,0,.36);
}

/* =====================================================
   GLOBAL RHYTHM
===================================================== */

.cg-page {
  padding-top: clamp(5rem, 9vw, 7rem);
  padding-bottom: clamp(5rem, 9vw, 7rem);
  background:
    radial-gradient(circle at 50% 0%, rgba(217,163,0,.055), transparent 31rem),
    var(--cg-bg);
}

.cg-section {
  padding-top: clamp(4.5rem, 8vw, 6.5rem);
  padding-bottom: clamp(4.5rem, 8vw, 6.5rem);
}

.cg-container {
  max-width: var(--cg-page-width);
}

.cg-container-sm {
  max-width: 920px;
}

.cg-page-header {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.cg-page-header::after {
  content: "";
  display: block;
  width: 92px;
  height: 1px;
  margin: 2rem auto 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(217,163,0,.82),
    transparent
  );
}

.cg-page-header .cg-page-cross,
.cg-page-header .cg-cross {
  margin-bottom: 1.1rem;
  filter: drop-shadow(0 0 13px rgba(217,163,0,.28));
}

.cg-title {
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 500;
  letter-spacing: .105em;
  line-height: 1.16;
  text-wrap: balance;
}

.cg-subtitle {
  max-width: 720px;
  margin: 1rem auto 0;
  font-size: .77rem;
  letter-spacing: .18em;
  line-height: 1.75;
  text-wrap: balance;
}

.cg-section-title {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 500;
  line-height: 1.25;
}

/* =====================================================
   PANELS AND CARDS
===================================================== */

.cg-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.032), rgba(255,255,255,.012)),
    var(--cg-surface-1);
  border: 1px solid rgba(217,163,0,.20);
  border-radius: 4px;
  box-shadow: var(--cg-shadow-soft);
}

.cg-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(217,163,0,.46),
    transparent
  );
  opacity: .55;
  pointer-events: none;
}

.cg-about-panel,
.cg-connect-card,
.cg-resource-card,
.cg-bottom-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008)),
    var(--cg-surface-1);
}

.cg-about-panel {
  padding: clamp(1.5rem, 4vw, 2.4rem);
}

.cg-about-panel + .cg-about-panel {
  margin-top: 1.35rem;
}

.cg-about-panel h2,
.cg-resource-title,
.cg-bottom-card h3 {
  position: relative;
  padding-bottom: .9rem;
  border-bottom: 0;
}

.cg-about-panel h2::after,
.cg-resource-title::after,
.cg-bottom-card h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 1px;
  background: rgba(217,163,0,.70);
}

.cg-bottom-card h3::after {
  left: 50%;
  transform: translateX(-50%);
}

.cg-about-panel p + p {
  margin-top: 1.1rem;
}

.cg-about-panel ul,
.cg-about-panel ol {
  margin: 1.1rem 0 0;
  padding-left: 1.35rem;
}

.cg-about-panel li {
  margin-bottom: .55rem;
  color: rgba(245,241,232,.80);
  line-height: 1.75;
}

.cg-about-panel li::marker {
  color: var(--cg-gold);
}

.cg-about-panel h3 {
  margin: 2rem 0 .65rem;
  color: #fff;
  font-family: var(--cg-font-heading);
  font-size: .9rem;
  letter-spacing: .09em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* Informational panels should not jump on hover. */
.cg-about-panel:hover,
.cg-connect-card:hover,
.cg-library-card:hover,
.cg-bottom-card:hover,
.cg-team-card:hover {
  transform: none;
}

/* =====================================================
   BUTTONS AND LINKS
===================================================== */

.cg-btn {
  min-height: 44px;
  padding: .78rem 1.45rem;
  border-radius: 2px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  box-shadow: 0 0 22px rgba(217,163,0,.12);
}

.cg-btn:hover {
  transform: translateY(-2px);
}

.cg-btn-outline,
.cg-btn-light {
  background: rgba(255,255,255,.018);
}

.cg-read-more {
  font-weight: 600;
  letter-spacing: .13em;
}

.cg-resource-link {
  min-height: 52px;
  padding: .9rem 1rem;
  background: rgba(255,255,255,.018);
  border-color: rgba(217,163,0,.18);
}

.cg-resource-link:hover {
  background: rgba(217,163,0,.065);
  border-color: rgba(217,163,0,.48);
}

/* =====================================================
   HOME PAGE
===================================================== */

.cg-hero {
  min-height: 620px;
  height: min(86vh, 880px);
}

.cg-hero-bg::before {
  background: linear-gradient(
    to bottom,
    rgba(2,3,10,.58),
    rgba(2,3,10,.32) 44%,
    var(--cg-bg) 100%
  );
}

.cg-hero-content {
  max-width: 880px;
}

.cg-hero-logo {
  width: min(300px, 72vw);
}

.cg-hero-kicker {
  max-width: 42rem;
  font-size: clamp(.9rem, 2vw, 1.08rem);
  line-height: 1.85;
}

.cg-hero-actions {
  margin-top: 2.25rem;
}

.cg-journey-header {
  margin-bottom: 3rem;
}

.cg-journey-grid {
  gap: 1.4rem;
}

.cg-journey-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cg-journey-card::before {
  width: 100%;
  height: 1px;
  inset: 0 0 auto 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(217,163,0,.60),
    transparent
  );
}

.cg-journey-img {
  height: 12rem;
}

.cg-journey-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.45rem;
}

.cg-journey-body h3 {
  font-size: .82rem;
  line-height: 1.45;
}

.cg-journey-body p {
  flex: 1;
  font-size: 13px;
  line-height: 1.75;
}

.cg-quote-banner {
  min-height: 470px;
  border-top: 1px solid rgba(217,163,0,.16);
  border-bottom: 1px solid rgba(217,163,0,.16);
}

.cg-quote-content blockquote {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3.4vw, 2rem);
  line-height: 1.65;
}

.cg-faith-icon-grid {
  grid-template-columns: repeat(9, minmax(0,1fr));
  max-width: 1320px;
  gap: 24px;
  padding: 10px 0 24px;
}

.cg-faith-icon-card img {
  max-width: 108px;
  margin-bottom: .8rem;
}

.cg-faith-icon-card span {
  font-size: .73rem;
  line-height: 1.35;
}

.cg-bottom-layout {
  align-items: stretch;
}

.cg-bottom-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.7rem;
}

.cg-bottom-card .cg-read-more,
.cg-bottom-card .cg-btn:last-of-type {
  margin-top: auto;
}

.cg-mini-post {
  padding: .7rem 0;
  margin: 0;
  border-bottom: 1px solid rgba(217,163,0,.10);
}

.cg-mini-post:last-of-type {
  border-bottom: 0;
}

.cg-mini-post img {
  width: 3.35rem;
  height: 3.35rem;
  border: 1px solid rgba(217,163,0,.16);
  opacity: .82;
}

/* =====================================================
   TEACHINGS PAGE
===================================================== */

.cg-teachings-grid {
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.4rem;
}

.cg-teaching-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.55rem;
  text-align: center;
  text-decoration: none;
}

.cg-teaching-card::before {
  width: 100%;
  height: 1px;
  inset: 0 0 auto 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(217,163,0,.58),
    transparent
  );
}

.cg-teaching-img-wrap {
  width: 118px;
  height: 118px;
  margin-bottom: 1.15rem;
}

.cg-teaching-icon-card h3 {
  margin: 0 0 .7rem;
  color: var(--cg-gold);
  font-size: .9rem;
  line-height: 1.4;
}

.cg-teaching-icon-card p {
  flex: 1;
  margin: 0 0 1.2rem;
  font-size: 13px;
  line-height: 1.72;
}

.cg-teaching-icon-card .cg-read-more {
  margin-top: auto;
}

.cg-teaching-icon-card:hover {
  transform: translateY(-5px);
  border-color: rgba(217,163,0,.48);
}

/* =====================================================
   RESOURCES LIBRARY
   Higher specificity is intentional because the current
   resource shortcode contains inline <style> rules.
===================================================== */

body .cg-library-page .cg-resources-grid {
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  align-items: start !important;
  gap: 1.4rem !important;
}

body .cg-library-page .cg-library-card {
  padding: 2rem 1.65rem 2.2rem !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.008)),
    var(--cg-surface-1) !important;
  border: 1px solid rgba(217,163,0,.20) !important;
  border-radius: 4px !important;
  box-shadow: var(--cg-shadow-card) !important;
}

body .cg-library-page .cg-library-card:hover {
  transform: none !important;
  border-color: rgba(217,163,0,.34) !important;
}

body .cg-library-page .cg-library-ornament {
  margin-bottom: .8rem !important;
  color: var(--cg-gold) !important;
  font-size: 20px !important;
  opacity: .78 !important;
}

body .cg-library-page .cg-library-title {
  letter-spacing: .16em !important;
  line-height: 1.4 !important;
}

body .cg-library-page .cg-library-title a {
  color: var(--cg-gold) !important;
}

body .cg-library-page .cg-library-rule {
  margin: 1.1rem 0 1.4rem !important;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(217,163,0,.48),
    transparent
  ) !important;
}

body .cg-library-page .cg-library-list {
  font-family: var(--cg-font-body) !important;
}

body .cg-library-page .cg-library-item {
  margin: .25rem 0 !important;
}

body .cg-library-page .cg-library-row {
  gap: .65rem !important;
  min-height: 34px !important;
}

body .cg-library-page button.cg-library-toggle {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  border: 1px solid rgba(217,163,0,.30) !important;
  border-radius: 2px !important;
  color: var(--cg-gold) !important;
  background: rgba(217,163,0,.035) !important;
  font-family: var(--cg-font-mono) !important;
  font-size: 15px !important;
}

body .cg-library-page button.cg-library-toggle:hover {
  background: rgba(217,163,0,.10) !important;
  border-color: rgba(217,163,0,.62) !important;
}

body .cg-library-page .cg-library-link {
  color: rgba(245,241,232,.82) !important;
  font-family: var(--cg-font-body) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

body .cg-library-page .cg-library-link:hover {
  color: var(--cg-gold) !important;
}

body .cg-library-page .cg-library-mark {
  color: rgba(217,163,0,.66) !important;
}

body .cg-library-page .cg-library-children {
  margin-left: 12px !important;
  padding-left: 18px !important;
  border-left: 1px solid rgba(217,163,0,.20) !important;
}

body .cg-library-page .cg-library-depth-1 .cg-library-link {
  color: rgba(245,241,232,.72) !important;
  font-size: 13.5px !important;
}

body .cg-library-page .cg-library-depth-2 .cg-library-link,
body .cg-library-page .cg-library-depth-3 .cg-library-link {
  color: rgba(245,241,232,.62) !important;
  font-size: 13px !important;
}

/* =====================================================
   JOURNEY PAGES
===================================================== */

.cg-journey-page .cg-about-panel {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.cg-journey-page .cg-journey-grid {
  grid-template-columns: repeat(2, minmax(0,1fr));
}

.cg-journey-page .cg-journey-card {
  min-height: 210px;
}

.cg-journey-page .cg-journey-body {
  justify-content: center;
}

/* =====================================================
   COMMUNITY
===================================================== */

.cg-community-list {
  gap: 1rem;
}

.cg-community-card {
  padding: 1.55rem;
  background:
    linear-gradient(90deg, rgba(217,163,0,.035), transparent 35%),
    var(--cg-surface-1);
}

.cg-community-card .cg-community-icon {
  width: 3.35rem;
  height: 3.35rem;
  background: rgba(217,163,0,.045);
}

.cg-community-card h3 {
  font-size: .9rem;
}

.cg-community-card p {
  max-width: 680px;
  line-height: 1.75;
}

/* =====================================================
   ABOUT
===================================================== */

.cg-about-stack {
  gap: 1.35rem;
}

.cg-about-team-image img {
  border: 1px solid rgba(217,163,0,.24);
  box-shadow: var(--cg-shadow-card);
}

.cg-team-grid {
  gap: 1rem;
}

.cg-team-card {
  padding: 1.55rem;
}

.cg-team-avatar {
  background: rgba(217,163,0,.055);
}

/* =====================================================
   CONNECT FORM
===================================================== */

.cg-connect-card {
  border-color: rgba(217,163,0,.24) !important;
  border-radius: 4px;
  box-shadow: var(--cg-shadow-card) !important;
}

.cg-natural-input {
  border-radius: 2px;
}

.cg-natural-input:focus-within {
  border-color: rgba(217,163,0,.68) !important;
  box-shadow: 0 0 0 2px rgba(217,163,0,.08) !important;
}

/* =====================================================
   BLOG
===================================================== */

.cg-blog-grid {
  gap: 1.4rem;
}

.cg-blog-card {
  display: flex;
  flex-direction: column;
}

.cg-blog-img {
  height: 210px;
}

.cg-blog-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.55rem;
}

.cg-blog-body h2 {
  line-height: 1.45;
}

.cg-blog-body p {
  line-height: 1.75;
}

/* =====================================================
   FLYDOCK / MANUSCRIPT
   Preserve the current manuscript look and align its
   spacing with the surrounding site.
===================================================== */

.cg-flydock-manuscript-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(217,163,0,.055), transparent 30rem),
    var(--cg-bg);
}

.cg-flydock-manuscript-header {
  margin-bottom: 3.8rem;
}

.cg-flydock-manuscript-content {
  max-width: var(--cg-reading-width);
}

.cg-flydock-manuscript-section {
  border-top-color: rgba(217,163,0,.16);
}

.cg-flydock-manuscript-panel {
  border-color: rgba(217,163,0,.23);
  box-shadow: var(--cg-shadow-soft);
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1100px) {
  .cg-faith-icon-grid {
    grid-template-columns: repeat(5, minmax(0,1fr));
    max-width: 780px;
  }

  body .cg-library-page .cg-resources-grid,
  .cg-teachings-grid {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
}

@media (max-width: 780px) {
  .cg-page {
    padding-left: .85rem;
    padding-right: .85rem;
  }

  .cg-title {
    font-size: clamp(1.85rem, 9vw, 2.55rem);
    letter-spacing: .07em;
  }

  .cg-subtitle {
    letter-spacing: .13em;
  }

  .cg-journey-grid,
  .cg-bottom-layout,
  .cg-team-grid,
  .cg-journey-page .cg-journey-grid {
    grid-template-columns: 1fr;
  }

  .cg-faith-icon-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
    max-width: 520px;
  }

  .cg-community-card {
    align-items: center;
    text-align: center;
  }

  .cg-community-card p {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 620px) {
  .cg-page-header {
    margin-bottom: 2.8rem;
  }

  .cg-about-panel,
  .cg-connect-card,
  .cg-bottom-card {
    padding: 1.3rem !important;
  }

  .cg-teachings-grid,
  body .cg-library-page .cg-resources-grid {
    grid-template-columns: 1fr !important;
  }

  .cg-teaching-card {
    padding: 1.55rem 1.25rem;
  }

  .cg-faith-icon-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 22px 12px;
  }

  .cg-faith-icon-card img {
    max-width: 82px;
  }

  .cg-faith-icon-card span {
    font-size: .66rem;
  }

  .cg-hero-logo {
    width: min(330px, 88vw);
  }

  .cg-hero-actions {
    flex-direction: column;
  }

  .cg-hero-actions .cg-btn {
    width: min(100%, 290px);
  }
}
/* =====================================================
   MAIN/PAGE BACKGROUND SEAM FIX
===================================================== */

.cg-main {
  background:
    radial-gradient(
      circle at 50% 8rem,
      rgba(217,163,0,.045),
      transparent 34rem
    ),
    var(--cg-bg);
}

/* Let the background continue seamlessly from beneath the header. */
.cg-main > .cg-page {
  background: transparent !important;
}

/* Remove the older masked grid layer that creates the granite rectangle
   and can cause a one-pixel rendering artifact. */
.cg-main > .cg-page::before {
  display: none !important;
}
/* =====================================================
   MOBILE BOTTOM CARD HEIGHT FIX
===================================================== */

@media (max-width: 780px) {
  body .cg-bottom-layout {
    grid-auto-rows: auto !important;
    align-items: start !important;
  }

  body .cg-bottom-layout > article.cg-bottom-card {
    height: auto !important;
    min-height: 0 !important;
    align-self: start !important;
  }
}
/* =====================================================
   CG33K — COMPACT CENTERED FOOTER BOTTOM
===================================================== */

.cg-footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 30px 20px 18px;
}

.cg-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;

    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 24px 32px;
    box-sizing: border-box;
    text-align: center;
}

.cg-footer-copyright {
    width: 100%;
    max-width: 760px;
    margin: 0;

    color: #7f8da3;
    font-size: 10px;
    line-height: 1.65;
    letter-spacing: 0.025em;
}

.cg-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cg-footer-links a {
    color: #8d99ae;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.05em;
    text-decoration: none;
    white-space: nowrap;
}

.cg-footer-links a:hover,
.cg-footer-links a:focus-visible {
    color: #d5aa22;
}

.cg-footer-links-cross {
    width: 12px;
    height: 18px;
    display: block;
    object-fit: contain;
}

/* Prevent accidental horizontal footer overflow */
.cg-footer,
.cg-footer * {
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .cg-footer-social {
        padding-top: 24px;
        flex-wrap: wrap;
    }

    .cg-footer-bottom {
        padding: 8px 18px 26px;
    }

    .cg-footer-copyright {
        font-size: 9px;
        line-height: 1.45;
    }

    .cg-footer-links {
        gap: 14px 20px;
    }

    .cg-footer-links a {
        font-size: 9px;
    }
}
