/*
Theme Name: Cùng Cầu Nguyện
Theme URI: https://cungcaunguyen.com/
Description: Giao diện website Cùng Cầu Nguyện, dựa trên Twenty Twenty-Five.
Author: MEPHAR TECHNOLOGY COMPANY LIMITED
Template: twentytwentyfive
Version: 1.2.16
Requires at least: 6.5
Text Domain: cungcaunguyen
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Header: sticky, frosted */
.ccn-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(28, 26, 51, .07);
}
/* The frosted layer sits on a pseudo-element: backdrop-filter on the header itself would
   trap the mobile menu overlay (position: fixed) inside the header box. */
.ccn-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(251, 247, 243, .88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.admin-bar .ccn-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ccn-header { top: 46px; } }
.ccn-header .wp-block-site-logo img { height: auto; }
.ccn-header .wp-block-navigation { font-weight: 600; font-size: .95rem; gap: 1.6rem; }
.ccn-header .wp-block-navigation a:hover { color: var(--wp--preset--color--blue); }
.ccn-header .wp-block-navigation__submenu-container {
  border-radius: 16px;
  border: 1px solid rgba(28, 26, 51, .08) !important;
  box-shadow: 0 18px 40px rgba(10, 46, 87, .12);
  padding: .4rem;
  min-width: 230px !important;
}
.ccn-header .wp-block-navigation__submenu-container a { border-radius: 10px; padding: .55rem .8rem !important; }
.ccn-header .wp-block-navigation__submenu-container a:hover { background: #eef4fb; }

/* Footer */
.ccn-site-footer { background: #f1ebe4; color: var(--wp--preset--color--ink); }
.ccn-site-footer a { color: inherit; text-decoration: none; }
.ccn-site-footer a:hover { color: var(--wp--preset--color--blue); text-decoration: underline; }
.ccn-foot { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 32px; }
.ccn-foot h4 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--muted); margin: 0 0 12px; }
.ccn-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .95rem; }
.ccn-foot p { color: var(--wp--preset--color--muted); font-size: .95rem; max-width: 300px; }
.ccn-foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .85rem; color: var(--wp--preset--color--muted); border-top: 1px solid rgba(28, 26, 51, .1); padding-top: 20px; margin-top: 36px; }
@media (max-width: 800px) { .ccn-foot { grid-template-columns: 1fr 1fr; } .ccn-foot > div:first-child { grid-column: 1 / -1; } }

/* News templates */
.ccn-news-head { padding-block: 56px 24px; }
.ccn-news-head h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0; }
.ccn-news-head p { color: var(--wp--preset--color--muted); font-size: 1.1rem; margin: .5rem 0 0; }
.ccn-news-grid .wp-block-post-template { gap: 24px; }
.ccn-news-card { background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid rgba(28, 26, 51, .07); height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.ccn-news-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(10, 46, 87, .1); }
.ccn-news-card .wp-block-post-featured-image { margin: 0; }
.ccn-news-card .wp-block-post-featured-image img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.ccn-news-card .ccn-news-body { padding: 18px 20px 22px; }
.ccn-news-card .wp-block-post-title { font-size: 1.15rem; line-height: 1.3; margin: 6px 0 8px; }
.ccn-news-card .wp-block-post-title a { text-decoration: none; color: inherit; }
.ccn-news-card .wp-block-post-terms a { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; color: var(--wp--preset--color--rose); }
.ccn-news-card .wp-block-post-date, .ccn-news-card .wp-block-post-excerpt { color: var(--wp--preset--color--muted); font-size: .92rem; }
.ccn-news-empty { background: #fff; border-radius: 22px; padding: 32px; text-align: center; color: var(--wp--preset--color--muted); border: 1px dashed rgba(28, 26, 51, .15); }
.ccn-cats .wp-block-categories { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.ccn-cats .wp-block-categories li a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid rgba(28, 26, 51, .1); text-decoration: none; color: inherit; font-size: .9rem; font-weight: 600; }
.ccn-cats .wp-block-categories li.current-cat a, .ccn-cats .wp-block-categories li a:hover { background: var(--wp--preset--color--blue); border-color: var(--wp--preset--color--blue); color: #fff; }
.ccn-article .wp-block-post-title { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; }
.ccn-article .wp-block-post-featured-image img { border-radius: 24px; }
.ccn-article .wp-block-post-content { font-size: 1.08rem; }
.ccn-article .wp-block-post-terms a { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--wp--preset--color--rose); text-decoration: none; }

/* Menu: app button on the right */
.ccn-header .wp-block-navigation-item.ccn-nav-app > a { background: var(--wp--preset--color--blue, #0d5aa7); color: #fff !important; padding: .5rem 1rem !important; border-radius: 999px; }
.ccn-header .wp-block-navigation-item.ccn-nav-app > a:hover { color: #fff !important; filter: brightness(1.08); }
.ccn-header .wp-block-navigation__submenu-container { min-width: 230px; }
@media (max-width: 781px) { .ccn-header .wp-block-navigation-item.ccn-nav-app > a { display: inline-block; margin-top: .5rem; } }

/* News fallback: Vatican News headlines while the site has no posts */
.ccn-rss-label { color: var(--wp--preset--color--muted); font-size: .95rem; }
.ccn-rss { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.ccn-rss li { background: #fff; border: 1px solid rgba(28, 26, 51, .09); border-radius: 16px; padding: 14px 18px; }
.ccn-rss a { font-weight: 700; text-decoration: none; }
.ccn-rss time { display: block; color: var(--wp--preset--color--muted); font-size: .85rem; margin-top: 4px; }

/* Reading preferences (site.js toolbar): text size, roomy lines, night mode */
html { font-size: calc(100% * var(--ccn-fs, 1)); }
html.ccn-lh .ccn p, html.ccn-lh .ccn li { line-height: 2; }
html.ccn-dark { color-scheme: dark; --wp--preset--color--ink: #ece9f5; --wp--preset--color--muted: #b9b4cc; --wp--preset--color--blue: #8dbdf0; --wp--preset--color--rose: #f08bb0; }
html.ccn-dark body { background: #15131f; color: #ece9f5; }
html.ccn-dark .ccn { --paper: #15131f; --sand: #1c1a29; --white: #221f31; --ink: #ece9f5; --muted: #b6b1ca; --line: rgba(255, 255, 255, .1); --sky: #1b2a3d; --rose-soft: #3a1f2b; --navy: #d6e6f8; --blue: #8dbdf0; --rose: #f08bb0; --gold: #e0b35c; --shadow: none; }
html.ccn-dark .ccn-header, html.ccn-dark .ccn-site-footer { background: #1c1a29; color: #ece9f5; }
html.ccn-dark .ccn-header a, html.ccn-dark .ccn-site-footer a, html.ccn-dark .wp-block-navigation a { color: #ece9f5; }
html.ccn-dark .wp-block-navigation__submenu-container { background: #221f31 !important; }
html.ccn-dark img { filter: brightness(.88); }
html.ccn-dark .ccn-btn-light { color: #15131f; }
.ccn-rt-fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #0a2e57; color: #fff; font: 700 1.05rem/1 "Be Vietnam Pro", system-ui, sans-serif; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); cursor: pointer; }
.ccn-rt-panel { position: fixed; right: 16px; bottom: 78px; z-index: 50; width: min(300px, calc(100vw - 32px)); background: #fff; color: #1c1a33; border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); padding: 16px; font: 500 .95rem/1.4 "Be Vietnam Pro", system-ui, sans-serif; }
html.ccn-dark .ccn-rt-panel { background: #221f31; color: #ece9f5; }
.ccn-rt-panel[hidden] { display: none; }
.ccn-rt-panel p { margin: 0 0 10px; font-weight: 700; }
.ccn-rt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.ccn-rt-row button { min-width: 44px; min-height: 44px; border-radius: 12px; border: 1px solid rgba(28, 26, 51, .15); background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; padding: 0 12px; }
.ccn-rt-row button[aria-pressed="true"] { background: #0a2e57; color: #fff; border-color: #0a2e57; }
.ccn-rt-row small { opacity: .75; }
@media print { .ccn-rt-fab, .ccn-rt-panel { display: none; } }

/* Quick search overlay (site.js) */
.ccn-qs { position: fixed; inset: 0; z-index: 100; background: rgba(10, 16, 30, .45); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.ccn-qs[hidden] { display: none; }
.ccn-qs-card { width: min(640px, 100%); background: #fff; color: #1c1a33; border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); padding: 14px; font-family: "Be Vietnam Pro", system-ui, sans-serif; }
html.ccn-dark .ccn-qs-card { background: #221f31; color: #ece9f5; }
.ccn-qs-card form { display: flex; gap: 8px; }
.ccn-qs-card input { flex: 1; min-width: 0; box-sizing: border-box; font: inherit; font-size: 1.05rem; min-height: 52px; border-radius: 14px; border: 1px solid rgba(28, 26, 51, .15); padding: 0 16px; background: transparent; color: inherit; }
.ccn-qs-close { width: 52px; border-radius: 14px; border: 0; background: rgba(28, 26, 51, .06); color: inherit; font-size: 1.6rem; cursor: pointer; }
.ccn-qs-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 55vh; overflow: auto; }
.ccn-qs-list a { display: block; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: inherit; font-weight: 600; }
.ccn-qs-list a:hover, .ccn-qs-list a:focus { background: rgba(13, 90, 167, .1); outline: none; }
.ccn-qs-list small { display: block; font-size: .75rem; font-weight: 700; color: #c2416d; text-transform: uppercase; letter-spacing: .04em; }
.ccn-qs-hint { margin: 10px 4px 2px; font-size: .82rem; opacity: .7; }
html.ccn-qs-on { overflow: hidden; }

/* No focus ring after a mouse click or tap; keyboard users still see it. */
a:focus:not(:focus-visible), button:focus:not(:focus-visible), [tabindex]:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.wp-block-site-logo a, .wp-block-site-logo img { outline: none; -webkit-tap-highlight-color: transparent; }
.wp-block-site-logo a:focus-visible { outline: 2px solid #0d5aa7; outline-offset: 3px; border-radius: 6px; }
