﻿/* ============================================
   HOME PAGE  (index.php)
============================================ */

/* ---- Hero ---- */
.home-hero {
    position: relative;
    overflow: visible;
    padding: 64px 0 52px;
    text-align: center;
    background: linear-gradient(150deg, var(--cream) 0%, var(--cream-mid) 55%, var(--cream-dark) 100%);
}

/* Clipping wrapper for the âœ watermark â€” keeps hero overflow:visible for the dropdown */
.home-hero-cross-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Large âœ watermark */
.home-hero-cross {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32rem;
    line-height: 1;
    color: rgba(78, 46, 26, 0.045);
    pointer-events: none;
    user-select: none;
}

.home-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--brown-deep);
    line-height: 1.2;
    margin: 0 0 0.55rem;
    position: relative;
}

.home-hero-sub {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--brown-mid);
    margin: 0 0 2rem;
    position: relative;
}

/* ---- Hero search bar ---- */
.home-search-wrap {
    position: relative;
    max-width: 560px;
    margin: 0 auto 1.6rem;
}

.home-search-input {
    width: 100%;
    padding: 15px 52px 15px 22px;
    border-radius: 40px;
    border: 2px solid var(--cream-dark);
    background: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: var(--text);
    box-shadow: 0 4px 22px rgba(78, 46, 26, 0.11);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}
.home-search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 4px 28px rgba(200, 136, 58, 0.2);
}
.home-search-input::placeholder { color: var(--text-faint); }

.home-search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brown-mid);
    pointer-events: none;
    display: flex;
}

/* ---- Autocomplete dropdown ---- */
.home-ac-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    z-index: 99999;
    overflow: hidden;
    text-align: left;
}
.home-ac-dropdown.open { display: block; }

.home-ac-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: background .1s;
    border-bottom: 1px solid rgba(0,0,0,.035);
}
.home-ac-item:last-of-type { border-bottom: none; }
.home-ac-item:hover,
.home-ac-item.focused {
    background: var(--cream);
    text-decoration: none;
    color: var(--text);
}

.home-ac-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--cream-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    color: var(--brown-mid);
    flex-shrink: 0;
}

.home-ac-title {
    flex: 1;
    font-size: .82rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.home-ac-artist {
    font-size: .72rem;
    color: var(--text-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    flex-shrink: 0;
}

.home-ac-type {
    font-size: .6rem;
    color: var(--text-faint);
    font-family: 'Open Sans', sans-serif;
    background: var(--cream-mid);
    padding: 1px 7px;
    border-radius: 8px;
    flex-shrink: 0;
    letter-spacing: .02em;
}

/* ---- Autocomplete footer / paginator ---- */
.home-ac-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-top: 1px solid var(--border);
    background: var(--cream);
}

.home-ac-footer-link {
    flex: 1;
    font-size: .76rem;
    color: var(--brown-mid);
    font-family: 'Open Sans', sans-serif;
    cursor: pointer;
    transition: color .12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
.home-ac-footer-link:hover { color: var(--gold); text-decoration: none; }

.home-ac-pager {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.home-ac-pager-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--brown-mid);
    font-size: .72rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .12s;
    line-height: 1;
    padding: 0;
}
.home-ac-pager-btn:hover:not(:disabled) { background: var(--gold); color: #fff; border-color: var(--gold); }
.home-ac-pager-btn:disabled { opacity: .3; cursor: default; }

.home-ac-pager-count {
    font-size: .68rem;
    font-family: 'Open Sans', sans-serif;
    color: var(--text-faint);
    white-space: nowrap;
    min-width: 32px;
    text-align: center;
}

/* ---- CTA buttons ---- */
.home-hero-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.home-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 26px;
    border-radius: 30px;
    font-family: 'Open Sans', sans-serif;
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
    border: 2px solid;
}
.home-hero-btn-primary {
    background: var(--brown-deep);
    color: #fff;
    border-color: var(--brown-deep);
    box-shadow: 0 3px 14px rgba(78, 46, 26, 0.22);
}
.home-hero-btn-primary:hover {
    background: var(--brown-mid);
    border-color: var(--brown-mid);
    color: #fff;
    text-decoration: none;
}
.home-hero-btn-secondary {
    background: transparent;
    color: var(--brown-deep);
    border-color: var(--brown-deep);
}
.home-hero-btn-secondary:hover {
    background: var(--brown-deep);
    color: #fff;
    text-decoration: none;
}

/* ---- Shared section utilities ---- */
.home-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.home-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brown-deep);
    margin: 0;
    line-height: 1.2;
}

.home-section-all {
    margin-left: auto;
    font-size: .8rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    color: var(--gold);
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}
.home-section-all:hover { color: var(--brown-deep); text-decoration: none; }

.home-section-icon {
    font-size: 1.3rem;
    line-height: 1;
}
.home-section-icon-sm {
    font-size: 1.1rem;
    color: var(--gold);
    line-height: 1;
}

/* ---- Seasonal spotlight ---- */
.home-seasonal {
    padding: 28px 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.home-seasonal-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.home-seasonal-col {
    background: var(--cream);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}

.home-seasonal-col-head {
    font-family: 'Open Sans', sans-serif;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* ---- Popular Songs + Poems (2-column grid) ---- */
.home-popular-section {
    padding: 44px 0;
    background: #fff;
}

.home-popular-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.home-popular-col {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
}

.home-popular-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}
.home-popular-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}
.home-popular-list li:last-child { border-bottom: none; }

.home-popular-num {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold);
    min-width: 22px;
    flex-shrink: 0;
    line-height: 1;
}

.home-popular-title {
    flex: 1;
    font-family: 'Open Sans', sans-serif;
    font-size: .875rem;
    font-weight: 500;
    color: var(--brown-deep);
    text-decoration: none;
    line-height: 1.3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .14s;
}
.home-popular-title:hover {
    color: var(--gold);
    text-decoration: none;
}

.home-popular-views {
    font-size: .7rem;
    color: var(--text-faint);
    font-family: 'Open Sans', sans-serif;
    flex-shrink: 0;
    white-space: nowrap;
}

.home-all-link {
    display: block;
    text-align: right;
    font-size: .8rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    color: var(--gold);
    text-decoration: none;
    transition: color .14s;
}
.home-all-link:hover { color: var(--brown-deep); text-decoration: none; }

/* ---- Categories ---- */
.home-cats-section {
    padding: 22px 0 26px;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
}

.home-cats-heading {
    margin-bottom: 12px !important;
    font-size: 1rem !important;
}

.home-cats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.home-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--brown-mid);
    font-family: 'Open Sans', sans-serif;
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
    box-shadow: var(--shadow-sm);
}
.home-cat-pill:hover {
    background: var(--brown-deep);
    color: #fff;
    border-color: var(--brown-deep);
    text-decoration: none;
    box-shadow: var(--shadow-md);
}
.home-cat-pill-icon { font-size: .95rem; }

/* ---- Home footer strip ---- */
.home-footer {
    padding: 20px 0;
    background: var(--brown-deep);
    text-align: center;
    font-family: 'Open Sans', sans-serif;
    font-size: .75rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: .05em;
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
    .home-hero-title { font-size: 2.1rem; }
}
@media (max-width: 640px) {
    /* Hero */
    .home-hero           { padding: 28px 0 22px; }
    .home-hero-title     { font-size: 1.55rem; }
    .home-hero-sub       { font-size: .85rem; margin-bottom: 1.2rem; }
    .home-hero-cross     { font-size: 14rem; }
    .home-search-input   { font-size: .9rem; padding: 11px 44px 11px 16px; }
    .home-search-wrap    { margin-bottom: 1rem; }
    .home-hero-btn       { padding: 9px 18px; font-size: .82rem; }
    .home-hero-btns      { gap: 8px; }

    /* Section heads */
    .home-section-head   { margin-bottom: 10px; }
    .home-section-title  { font-size: 1.05rem; }

    /* Seasonal */
    .home-seasonal       { padding: 16px 0; }
    .home-seasonal-cols  { grid-template-columns: 1fr; gap: 10px; }
    .home-seasonal-col   { padding: 10px 12px; }

    /* Categories */
    .home-cats-section   { padding: 12px 0 16px; }
    .home-cats-heading   { margin-bottom: 8px !important; }
    .home-cats-grid      { gap: 5px; }
    .home-cat-pill       { padding: 5px 11px; font-size: .75rem; }

    /* Popular */
    .home-popular-section { padding: 16px 0 20px; }
    .home-popular-grid    { grid-template-columns: 1fr; gap: 10px; }
    .home-popular-col     { padding: 12px 14px; }
    .home-popular-list    { margin-bottom: 8px; }
    .home-popular-list li { padding: 7px 0; gap: 7px; }
    .home-popular-num     { display: none; }         /* remove rank numbers */
    .home-popular-views   { display: none; }         /* remove view counts */
    .home-popular-title   { font-size: .82rem; }

    /* Footer */
    .home-footer          { padding: 14px 0; }
}


/* ============================================================
   VERSION SWITCHER (floating collapsible)
============================================================ */
.home-vsw {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9999;
}

.home-vsw-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(46, 26, 14, 0.93);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 22px;
    padding: 7px 12px 7px 14px;
    color: rgba(255,255,255,.85);
    font-family: 'Open Sans', sans-serif;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    transition: background .15s;
    white-space: nowrap;
}
.home-vsw-toggle:hover { background: rgba(46, 26, 14, 1); }

.home-vsw-toggle-label { color: var(--gold); }

.home-vsw-toggle-icon {
    font-size: .55rem;
    color: rgba(255,255,255,.45);
    transition: transform .2s;
    line-height: 1;
}
.home-vsw.open .home-vsw-toggle-icon { transform: rotate(180deg); }

.home-vsw-panel {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(36, 20, 10, 0.96);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    flex-wrap: wrap;
    gap: 4px;
    width: 210px;
}
.home-vsw.open .home-vsw-panel { display: flex; }

.home-vsw-btn {
    width: 36px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,.09);
    color: rgba(255,255,255,.65);
    font-size: .75rem;
    font-family: 'Open Sans', sans-serif;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    flex-shrink: 0;
    font-weight: 500;
}
.home-vsw-btn:hover  { background: rgba(255,255,255,.22); color: #fff; text-decoration: none; }
.home-vsw-btn.active { background: var(--gold); color: #fff; font-weight: 700; text-decoration: none; }

/* When both theme & version switchers are present, stack them */
body:has(#home-vsw) #al-tsw { bottom: 60px !important; }
body:has(#home-csw) #home-fsw { bottom: 60px; }
body:has(#home-csw) #al-tsw  { bottom: 108px !important; }

