/* ============================================================
   HOME PAGE (index.php + homepage/*.php)
   Colours come from the site theme in style.css, so light and
   dark mode both work. !important is used only where the site's
   global form / heading / list styles would otherwise win.
   ============================================================ */

.hm { --hm-gap: 22px; }
.hm *, .hm *::before, .hm *::after { box-sizing: border-box; }

/* the big hero on the home page: shorter, so content shows sooner */
.hero { min-height: clamp(300px, 48vh, 560px); }

/* ----- welcome / status message ----- */
.hm-message { margin: 0 0 22px !important; }

/* ============================================================
   SEARCH
   ============================================================ */

.hm .hm-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px !important;
    padding: 8px;
    border: 1px solid var(--nv-border);
    border-radius: 14px;
    background: var(--nv-card-bg);
    box-shadow: var(--nv-shadow);
}

.hm .hm-search > svg {
    flex: none;
    width: 22px;
    height: 22px;
    margin-left: 10px;
    color: var(--nv-muted-text);
}

.hm .hm-search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--nv-text) !important;
    font: 400 17px/1 var(--nv-font-ui) !important;
    -webkit-appearance: none;
    appearance: none;
}

.hm .hm-search input[type="search"]:focus { outline: none !important; }
.hm .hm-search:focus-within { border-color: var(--nv-accent); box-shadow: 0 0 0 3px var(--nv-accent-ring); }

.hm .hm-search button {
    flex: none;
    width: auto !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 22px !important;
    border-radius: 10px !important;
}

.hm-search-hint {
    margin: -12px 0 24px;
    font-size: 13.5px;
    color: var(--nv-muted-text);
}

.hm-search-hint a { font-weight: 600; }

/* ============================================================
   SHORTCUT TILES (style.css .icon-menu, tightened a little)
   ============================================================ */

.hm .icon-menu {
    padding: 0;
    margin: 0 0 34px;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
}

.hm .icon-menu > a { height: 112px; }
.hm .menu-item { padding: 14px 10px; }
.hm .menu-item svg { width: 28px; height: 28px; margin-bottom: 10px; }

.new-menu-item { position: relative; }

.new-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 45px;
    height: auto;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
    border-top-left-radius: 14px;
}

/* ============================================================
   SECTIONS & CARDS
   ============================================================ */

.hm-section { margin: 0 0 40px; }

.hm-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 14px;
}

.hm .hm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 24px;
}

.hm .hm-section-title::after { display: none; }   /* no h4 underline here */
.hm .hm-section-title svg { width: 24px; height: 24px; color: var(--nv-accent); }

.hm-section-link { font-size: 14.5px; font-weight: 600; white-space: nowrap; }

.hm-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--hm-gap);
    align-items: start;
}

.hm-stack { display: flex; flex-direction: column; gap: var(--hm-gap); min-width: 0; }

.hm-card {
    position: relative;
    padding: 22px 24px;
    border: 1px solid var(--nv-border);
    border-radius: 14px;
    background: var(--nv-card-bg);
    overflow: hidden;
}

.hm-card-soft { background: var(--nv-background-light1); }

.hm-card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font: 700 12px/1.3 var(--nv-font-ui);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--nv-accent);
}

.hm-card-label svg { width: 16px; height: 16px; }

.hm .hm-card-title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    font: 700 20px/1.3 var(--nv-font-ui);
    color: var(--nv-heading);
}

.hm .hm-card-title::after { display: none; }

.hm-card p { margin: 0 0 12px; }
.hm-card p:last-child { margin-bottom: 0; }

.hm-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hm-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid var(--nv-border);
    background: var(--nv-background-light1);
    font: 600 12.5px/1.5 var(--nv-font-ui);
    color: var(--nv-text);
    white-space: nowrap;
}

.hm-chip-accent { color: var(--nv-accent); }

/* ============================================================
   VERSE OF THE HOUR
   ============================================================ */

.hm-verse {
    background:
        radial-gradient(120% 120% at 100% 0%, var(--nv-accent-soft) 0%, transparent 55%),
        var(--nv-card-bg);
}

.hm .hm-verse-ref {
    display: inline-block;
    margin-bottom: 14px;
    font: 700 26px/1.2 var(--nv-font-heading);
    color: var(--nv-heading);
}

.hm .hm-verse-ref:hover { color: var(--nv-accent); }

.hm-verse-text {
    position: relative;
    margin: 0 0 14px;
    padding-left: 14px;
    border-left: 3px solid var(--nv-border);
    font-size: 16.5px;
    line-height: 1.65;
}

.hm-verse-text:first-of-type { border-left-color: var(--nv-accent); }

.hm-lang {
    display: block;
    margin-bottom: 2px;
    font: 700 11px/1.3 var(--nv-font-ui);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--nv-muted-text);
}

/* ============================================================
   ON THIS DAY
   ============================================================ */

.hm-timeline {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hm-timeline li {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--nv-border);
    font-size: 15.5px;
    line-height: 1.5;
}

.hm-timeline li:first-child { border-top: 0; padding-top: 0; }

.hm-year {
    font: 700 15px/1.5 var(--nv-font-ui);
    color: var(--nv-accent);
    white-space: nowrap;
}

.hm-timeline .source,
span.source {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--nv-muted-text);
}

/* ============================================================
   DID YOU KNOW
   ============================================================ */

.hm-fact { padding: 0; }

.hm-fact-img {
    aspect-ratio: 16 / 8;
    background: var(--nv-background-light1);
    overflow: hidden;
}

.hm-fact-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hm-fact-body { padding: 20px 24px 22px; }

.hm .hm-fact-text { font-size: 17px; font-weight: 700; line-height: 1.45; }
.hm .hm-fact-details { font-size: 15.5px; color: var(--nv-muted-text); line-height: 1.6; }

/* ============================================================
   MEMBER / GUEST / ADMIN BOX
   ============================================================ */

.hm-benefits {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hm-benefits li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 6px 0;
    font-size: 15px;
    line-height: 1.5;
}

.hm-benefits li svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--nv-accent); }

.hm-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.hm .hm-shortcut {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--nv-border);
    border-radius: 10px;
    background: var(--nv-card-bg);
    color: var(--nv-text);
    font: 600 14.5px/1.3 var(--nv-font-ui);
}

.hm .hm-shortcut:hover { border-color: var(--nv-accent); color: var(--nv-accent); }
.hm-shortcut svg { flex: none; width: 18px; height: 18px; color: var(--nv-accent); }

.hm-admin-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }

.hm-admin-list li { border-top: 1px solid var(--nv-border); }
.hm-admin-list li:first-child { border-top: 0; }

.hm .hm-admin-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--nv-text);
    font-size: 15px;
}

.hm .hm-admin-list a:hover { color: var(--nv-accent); }
.hm-admin-list svg { flex: none; width: 18px; height: 18px; color: var(--nv-muted-text); }

.hm-badge {
    margin-left: auto;
    min-width: 26px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--nv-accent);
    color: #fff;
    font: 700 12.5px/1.5 var(--nv-font-ui);
    text-align: center;
}

.hm-icon-guide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 14px;
    font-size: 14px;
}

.hm-icon-guide span { display: flex; align-items: center; gap: 8px; }
.hm-icon-guide svg { flex: none; width: 17px; height: 17px; color: var(--nv-accent); }

/* ============================================================
   RECENTLY ADDED
   ============================================================ */

.hm-songs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.hm-song-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--nv-border);
    border-radius: 14px;
    background: var(--nv-card-bg);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.hm-song-card:hover {
    border-color: var(--nv-accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}

.hm-song-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #2e1d12, #b24a00);
}

.hm-song-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.hm-song-card:hover .hm-song-thumb img { transform: scale(1.04); }

.hm-song-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .85);
}

.hm-song-thumb-empty svg { width: 34px; height: 34px; }

.hm-song-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    padding: 14px 16px 14px;
}

.hm .hm-song-title {
    font: 700 16.5px/1.35 var(--nv-font-ui);
    color: var(--nv-heading);
}

.hm .hm-song-title:hover { color: var(--nv-accent); }
.hm-song-title small { font-weight: 500; color: var(--nv-muted-text); }

.hm-song-credits { font-size: 13.5px; color: var(--nv-muted-text); }

.hm-song-body .song-icons { margin-top: auto; padding-top: 8px; }

.hm-image-note { margin: 10px 0 0; font-size: 12px; color: var(--nv-muted-text); }

/* ============================================================
   MOST VIEWED (tabs + ranked list)
   ============================================================ */

.hm-tabs {
    display: inline-flex;
    padding: 4px;
    border-radius: 12px;
    background: var(--nv-background-light1);
    border: 1px solid var(--nv-border);
}

.hm .hm-tab {
    all: unset;
    padding: 8px 16px;
    border-radius: 9px;
    font: 600 14.5px/1 var(--nv-font-ui);
    color: var(--nv-muted-text);
    cursor: pointer;
}

.hm .hm-tab:hover { color: var(--nv-text); }
.hm .hm-tab:focus-visible { outline: 2px solid var(--nv-accent); }
.hm .hm-tab[aria-selected="true"] { background: var(--nv-card-bg); color: var(--nv-accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

.hm-panel[hidden] { display: none !important; }

.hm .hm-rank-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--nv-border);
    border-radius: 14px;
    background: var(--nv-card-bg);
    overflow: hidden;
}

.hm .hm-rank-list > li {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
    margin: 0;
    border-top: 1px solid var(--nv-border);
    font-weight: normal;
}

.hm .hm-rank-list > li:first-child { border-top: 0; }
.hm .hm-rank-list > li:hover { background: var(--nv-background-light1); }

/* only the top 10 until "Show all" is pressed */
.hm-panel:not(.is-expanded) .hm-rank-list > li:nth-child(n + 11) { display: none; }

.hm-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--nv-background-light1);
    border: 1px solid var(--nv-border);
    font: 700 14px/1 var(--nv-font-ui);
    color: var(--nv-muted-text);
}

.hm-rank-list > li:nth-child(-n + 3) .hm-rank {
    background: var(--nv-accent);
    border-color: var(--nv-accent);
    color: #fff;
}

.hm-rank-main { min-width: 0; }

.hm .hm-rank-title {
    display: block;
    font: 700 16px/1.35 var(--nv-font-ui);
    color: var(--nv-heading);
    overflow-wrap: anywhere;
}

.hm .hm-rank-title:hover { color: var(--nv-accent); }
.hm-rank-title small { font-weight: 500; color: var(--nv-muted-text); }

.hm-rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 4px;
    font-size: 13.5px;
    color: var(--nv-muted-text);
}

.hm-rank-meta a { color: var(--nv-muted-text); }
.hm-rank-meta a:hover { color: var(--nv-accent); }

.hm-views { white-space: nowrap; }
.hm-views svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }

.hm-rank-icons .song-icons { margin: 0; white-space: nowrap; }

.hm-more {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

/* ============================================================
   BLOG + COMMENTS
   ============================================================ */

.hm .recent-blog-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--nv-border);
    color: inherit;
    text-decoration: none;
}

.hm .recent-blog-item:first-of-type { border-top: 0; padding-top: 0; }

.hm .recent-blog-image {
    aspect-ratio: 4 / 3;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    background: var(--nv-background-light1);
}

.hm .recent-blog-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.hm .recent-blog-item:hover .recent-blog-image img { transform: scale(1.05); }

.hm .recent-blog-title {
    margin: 0 0 6px !important;
    font: 700 17px/1.35 var(--nv-font-ui) !important;
    color: var(--nv-heading);
}

.hm .recent-blog-item:hover .recent-blog-title { color: var(--nv-accent); }

.hm .recent-blog-excerpt {
    margin: 0 0 6px !important;
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    color: var(--nv-muted-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm .recent-blog-date { font-size: 12.5px; color: var(--nv-muted-text); }

.hm .home-comment {
    padding: 14px 0;
    margin: 0;
    border-top: 1px solid var(--nv-border);
}

.hm .home-comment:first-child { border-top: 0; padding-top: 0; }

.hm .home-comment-top {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.hm .home-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--nv-background-light1);
}

.hm .home-comment-user { font-size: 14px; color: var(--nv-muted-text); line-height: 1.35; }
.hm .home-comment-user strong { display: block; font-size: 15px; color: var(--nv-heading); }
.hm .home-comment-user strong a { color: inherit; }

.hm .home-comment-text {
    margin: 8px 0 0 52px;
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.hm .home-comment-date { display: block; margin: 4px 0 0 52px; font-size: 12.5px; color: var(--nv-muted-text); }

.hm .admin-reply {
    margin: 10px 0 0 52px;
    padding: 10px 12px;
    border-left: 3px solid var(--nv-accent);
    border-radius: 0 10px 10px 0;
    background: var(--nv-background-light1);
    font-size: 14.5px;
    color: var(--nv-text);
}

.hm .admin-reply strong { color: var(--nv-accent); }
.hm .admin-reply p { margin: 4px 0; font-size: 14.5px; }
.hm .admin-reply small { color: var(--nv-muted-text); font-size: 12px; }

/* ============================================================
   RECOMMENDED LINKS
   ============================================================ */

.hm-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hm .hm-links a {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    height: 100%;
    padding: 12px 14px;
    border: 1px solid var(--nv-border);
    border-radius: 12px;
    background: var(--nv-card-bg);
    color: var(--nv-text);
}

.hm .hm-links a:hover { border-color: var(--nv-accent); }
.hm-links b { display: block; font-size: 15px; color: var(--nv-heading); }
.hm-links span { display: block; font-size: 13.5px; line-height: 1.45; color: var(--nv-muted-text); }
.hm-links svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--nv-accent); }

.hm-visitors img { max-width: 100%; height: auto; display: block; border-radius: 8px; }

/* ============================================================
   EXTRAS USED BY OTHER INCLUDES
   ============================================================ */

#biblePopup { max-height: 85dvh; overflow-y: auto; }

#biblePopup .bible-verse.highlighted-verse {
    background: #fff176;
    color: #000;
    border-radius: 4px;
    padding: 6px 8px;
}

.playlist-msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f7a3f;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: .3s;
}

.playlist-msg.show { opacity: 1; }
.playlist-msg.error { background: #b3261e; }

/* ----- Google login prompt (includes/google_login_prompt.php) ----- */

.google-login-prompt {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 375px;
    max-width: calc(100vw - 40px);
    background: #151515;
    border: 1px solid #555;
    border-radius: 18px;
    padding: 18px 22px 20px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
    z-index: 99999;
    color: #fff;
    font-family: var(--nv-font-ui);
    animation: googlePromptSlideIn 0.4s ease-out;
}

.google-prompt-header { display: flex; align-items: center; gap: 14px; padding-right: 25px; }
.google-prompt-logo { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.google-g { font-family: Arial, sans-serif; font-size: 32px; font-weight: 600; color: #4285F4; }
.google-prompt-title { font-size: 16px; line-height: 1.25; color: #ddd; }
.google-prompt-title strong { display: block; font-size: 17px; color: #fff; margin-top: 2px; }

.google-prompt-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 28px;
    line-height: 28px;
    cursor: pointer;
    padding: 0;
}

.google-prompt-close:hover { color: #fff; }

.google-prompt-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    margin-top: 18px;
    border-radius: 22px;
    background: #1769e0;
    color: #fff !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
}

.google-prompt-button:hover { background: #0d5bd0; color: #fff !important; }
.google-prompt-button:active { transform: scale(0.98); }

@keyframes googlePromptSlideIn {
    from { opacity: 0; transform: translate(20px, -20px); }
    to   { opacity: 1; transform: none; }
}

/* ============================================================
   SMALLER SCREENS
   ============================================================ */

@media (max-width: 980px) {
    .hm-songs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .hm { --hm-gap: 16px; }
    .hm-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .hm-section { margin-bottom: 32px; }
    .hm-card { padding: 18px; }
    .hm-fact-body { padding: 16px 18px 18px; }
    .hm .icon-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .hm .icon-menu > a { height: 100px; }
    .hm .menu-item span { font-size: 12.5px; }

    /* recently added: compact list with small pictures */
    .hm-songs-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .hm-song-card { flex-direction: row; align-items: stretch; }
    .hm-song-thumb { flex: none; width: 96px; aspect-ratio: auto; }
    .hm-song-body { padding: 10px 12px; }
    .hm-image-note { display: none; }

    .hm .hm-rank-list > li { grid-template-columns: 36px minmax(0, 1fr); padding: 12px; gap: 10px; }
    .hm-rank { width: 30px; height: 30px; font-size: 13px; }
    .hm-rank-icons { grid-column: 2; }

    .hm-links { grid-template-columns: minmax(0, 1fr); }
    .hm-shortcuts { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
    .hm .hm-search { padding: 6px; }
    .hm .hm-search > svg { display: none; }
    .hm .hm-search button { padding: 0 14px !important; }
    .hm .recent-blog-item { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
    .hm-icon-guide { grid-template-columns: minmax(0, 1fr); }

    .google-login-prompt { top: 12px; right: 12px; left: 12px; width: auto; border-radius: 18px; padding: 16px 18px 18px; }
    .google-prompt-title { font-size: 15px; }
    .google-prompt-title strong { font-size: 16px; }
}
