/* Help Me Fonda — Theme overrides for Twenty Twenty-Five */

.wp-site-blocks {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.wp-site-blocks > header,
.wp-site-blocks > footer {
    display: none !important;
}

.wp-block-post-content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

.wp-site-blocks .wp-block-group,
.wp-site-blocks .wp-block-template-part {
    margin: 0 !important;
    padding: 0 !important;
}

/* Help Me Fonda */

.hmf-container {
    font-family: 'Inter', sans-serif;
    background: #141e33;
    color: #e8e2d8;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --gold-dark: #a07c1c;
}

.hmf-container * { box-sizing: border-box; }

.hmf-page { display: none; }
.hmf-page.hmf-active { display: block; }

/* ====== LANDING ====== */

.hmf-hero {
    text-align: center;
    padding: 50px 20px 10px;
    background: linear-gradient(180deg, rgba(201,168,76,0.12) 0%, transparent 100%);
}

.hmf-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 900;
    color: var(--gold);
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 2px 30px rgba(201,168,76,0.3);
    margin: 0;
}

.hmf-tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--gold-light);
    margin-top: 10px;
    opacity: 0.8;
}

.hmf-cta {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: rgba(232,226,216,0.55);
    margin-top: 38px;
}

/* ====== GRID ====== */

.hmf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 0 28px;
}

.hmf-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(201,168,76,0.12);
    border-radius: 20px;
    padding: 28px 20px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hmf-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: 0 16px 48px rgba(201,168,76,0.18);
    background: rgba(255,255,255,0.06);
}

/* ====== PHOTOS ====== */

.hmf-photo-wrap {
    width: 180px;
    height: 180px;
    margin: 0 auto 18px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
}

.hmf-photo-wrap::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    z-index: 2;
    transition: all 0.4s ease;
}

.hmf-card:hover .hmf-photo-wrap::before {
    border-color: var(--gold-light);
    box-shadow: 0 0 30px rgba(201,168,76,0.3);
}

.hmf-photo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.hmf-card[data-fonda="henry"] .hmf-photo-wrap::after {
    background: linear-gradient(160deg, rgba(74,85,104,0.5) 0%, rgba(20,30,51,0.4) 100%);
}
.hmf-card[data-fonda="jane"] .hmf-photo-wrap::after {
    background: linear-gradient(160deg, rgba(155,44,44,0.4) 0%, rgba(20,30,51,0.35) 100%);
}
.hmf-card[data-fonda="peter"] .hmf-photo-wrap::after {
    background: linear-gradient(160deg, rgba(116,66,16,0.45) 0%, rgba(20,30,51,0.35) 100%);
}
.hmf-card[data-fonda="bridget"] .hmf-photo-wrap::after {
    background: linear-gradient(160deg, rgba(40,94,97,0.45) 0%, rgba(20,30,51,0.35) 100%);
}

.hmf-card:hover .hmf-photo-wrap::after { opacity: 0.5; }

.hmf-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(40%) contrast(1.1) brightness(0.95);
    transition: all 0.4s ease;
}

.hmf-card[data-fonda="peter"] .hmf-photo-wrap img {
    object-position: center 15%;
}

.hmf-card:hover .hmf-photo-wrap img {
    filter: grayscale(10%) contrast(1.05) brightness(1);
    transform: scale(1.05);
}

.hmf-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e8e2d8;
    margin: 0 0 4px;
}

.hmf-years {
    font-size: 0.82rem;
    color: var(--gold);
    margin: 0 0 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hmf-card-tagline {
    font-size: 0.85rem;
    color: rgba(232,226,216,0.55);
    line-height: 1.5;
    font-style: italic;
    margin: 0;
}

/* ====== FONDAMIZER & LANDING BUTTONS ====== */

.hmf-fondamizer-section {
    text-align: center;
    margin: 55px auto 30px;
}

.hmf-fondamizer-label {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: rgba(232,226,216,0.45);
    margin-bottom: 14px;
}

.hmf-landing-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.hmf-fondamizer-btn {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #141e33;
    border: none;
    padding: 16px 40px;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(201,168,76,0.3);
}

.hmf-fondamizer-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 36px rgba(201,168,76,0.45);
}

.hmf-meeting-btn {
    background: linear-gradient(135deg, #2a3a5c, #3d5280);
    color: var(--gold-light);
    border: 2px solid var(--gold);
    padding: 14px 36px;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(201,168,76,0.15);
}

.hmf-meeting-btn:hover {
    transform: scale(1.06);
    background: linear-gradient(135deg, #344770, #4a629a);
    box-shadow: 0 8px 36px rgba(201,168,76,0.3);
}

.hmf-leaderboard-link {
    background: none;
    border: none;
    color: var(--gold);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    padding: 8px 16px;
}

.hmf-leaderboard-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ====== MUSIC TOGGLE ====== */

.hmf-music-toggle {
    position: fixed;
    bottom: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(201,168,76,0.12);
    color: var(--gold);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(201,168,76,0.2);
}
.hmf-music-toggle:hover {
    background: rgba(201,168,76,0.25);
    border-color: var(--gold);
}
.hmf-music-toggle.playing {
    background: rgba(201,168,76,0.25);
    animation: hmfMusicPulse 2s ease-in-out infinite;
}
@keyframes hmfMusicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.3); }
    50% { box-shadow: 0 0 12px 4px rgba(201,168,76,0.15); }
}

/* ====== EASTER EGG ====== */

.hmf-easter-egg {
    position: fixed;
    bottom: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(201,168,76,0.06);
    color: rgba(201,168,76,0.12);
    font-size: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(201,168,76,0.05);
    user-select: none;
}
.hmf-easter-egg:hover {
    background: rgba(201,168,76,0.15);
    color: var(--gold);
    border-color: rgba(201,168,76,0.3);
}

/* ====== CHAT PAGE ====== */

#hmf-chat.hmf-active {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.hmf-chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(201,168,76,0.12);
    flex-shrink: 0;
}

.hmf-back-btn {
    background: none;
    border: 1px solid rgba(201,168,76,0.25);
    color: var(--gold);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}
.hmf-back-btn:hover { background: rgba(201,168,76,0.1); border-color: var(--gold); }

.hmf-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.hmf-chat-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    overflow: hidden;
    flex-shrink: 0;
}

.hmf-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(30%) contrast(1.1);
}

.hmf-chat-header-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: #e8e2d8;
    margin: 0;
}
.hmf-chat-header-info p {
    font-size: 0.78rem;
    color: rgba(232,226,216,0.45);
    margin: 2px 0 0;
}

.hmf-fondamizer-btn-small {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #141e33;
    border: none;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.hmf-fondamizer-btn-small:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(201,168,76,0.35);
}

/* Messages */

.hmf-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hmf-msg {
    max-width: 72%;
    padding: 14px 18px;
    border-radius: 16px;
    line-height: 1.65;
    font-size: 0.93rem;
    animation: hmfFadeIn 0.3s ease;
}

@keyframes hmfFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hmf-msg-fonda {
    align-self: flex-start;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(201,168,76,0.1);
    color: #e8e2d8;
    border-bottom-left-radius: 4px;
}

.hmf-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #141e33;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.hmf-msg .hmf-sender {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--gold);
    margin-bottom: 6px;
    display: block;
}

.hmf-typing { display: flex; gap: 5px; padding: 8px 0; }
.hmf-typing span {
    width: 8px; height: 8px;
    background: var(--gold);
    border-radius: 50%;
    animation: hmfTyping 1.2s infinite;
    opacity: 0.4;
}
.hmf-typing span:nth-child(2) { animation-delay: 0.2s; }
.hmf-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes hmfTyping {
    0%, 60%, 100% { opacity: 0.4; transform: scale(1); }
    30% { opacity: 1; transform: scale(1.2); }
}

/* Input */

.hmf-input-area {
    padding: 14px 24px;
    background: rgba(0,0,0,0.25);
    border-top: 1px solid rgba(201,168,76,0.08);
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    max-width: 100%;
}

.hmf-input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(201,168,76,0.18);
    border-radius: 12px;
    padding: 13px 18px;
    color: #e8e2d8;
    font-family: 'Inter', sans-serif;
    font-size: 0.93rem;
    outline: none;
    transition: border-color 0.2s ease;
}
.hmf-input::placeholder { color: rgba(232,226,216,0.28); }
.hmf-input:focus { border-color: var(--gold); }

.hmf-send-btn {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #141e33;
    border: none;
    padding: 13px 26px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.hmf-send-btn:hover { box-shadow: 0 4px 15px rgba(201,168,76,0.35); }

/* ====== FONDAMIZER OVERLAY ====== */

.hmf-fondamizer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14,20,36,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10000;
    backdrop-filter: blur(10px);
}
.hmf-fondamizer-overlay.hmf-active { display: flex; }

.hmf-spinner {
    width: 280px;
    height: 100px;
    overflow: hidden;
    border: 3px solid var(--gold);
    border-radius: 16px;
    position: relative;
    background: #141e33;
}

.hmf-spinner-slot {
    display: flex;
    flex-direction: column;
    transition: transform 0.1s linear;
}

.hmf-spinner-name {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
}

.hmf-spinner-name img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--gold);
    filter: grayscale(30%);
}

.hmf-spinner-label {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--gold-light);
    margin-top: 20px;
    font-size: 1.05rem;
    opacity: 0.7;
}

/* ====== FAMILY MEETING INPUT ====== */

.hmf-meeting-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(201,168,76,0.12);
}

.hmf-meeting-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--gold);
    margin: 0;
    flex: 1;
}

.hmf-meeting-body {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 28px;
    text-align: center;
}

.hmf-meeting-subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: rgba(232,226,216,0.6);
    line-height: 1.7;
    margin-bottom: 40px;
}

.hmf-meeting-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.hmf-meeting-field {
    width: 100%;
    max-width: 600px;
    text-align: center;
    font-size: 1.05rem;
    padding: 16px 24px;
}

.hmf-meeting-send-btn {
    padding: 16px 40px;
    font-size: 1.05rem;
    border-radius: 50px;
}

/* ====== FAMILY MEETING RESULTS ====== */

.hmf-meeting-question {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--gold-light);
    padding: 20px 28px 10px;
    opacity: 0.8;
}

.hmf-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 16px auto 0;
    padding: 0 28px 28px;
}

.hmf-result-panel {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(201,168,76,0.12);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
}

.hmf-result-panel.hmf-voted {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(201,168,76,0.2);
    background: rgba(201,168,76,0.05);
}

.hmf-result-panel.hmf-dimmed {
    opacity: 0.4;
}

.hmf-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.hmf-result-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--gold);
    filter: grayscale(30%) contrast(1.1);
}

.hmf-result-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
}

.hmf-result-response {
    flex: 1;
    line-height: 1.7;
    font-size: 0.92rem;
    color: #e8e2d8;
    margin-bottom: 16px;
    min-height: 60px;
}

.hmf-vote-btn {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #141e33;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.hmf-vote-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(201,168,76,0.35);
}

.hmf-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hmf-vote-btn.hmf-voted {
    background: var(--gold-light);
    box-shadow: 0 0 20px rgba(201,168,76,0.4);
    opacity: 1;
}

/* Vote feedback */

.hmf-vote-feedback {
    text-align: center;
    padding: 24px 28px 40px;
}

.hmf-vote-feedback p {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.hmf-vote-feedback .hmf-meeting-btn {
    font-size: 1rem;
    padding: 12px 28px;
    margin-right: 12px;
}

.hmf-vote-feedback .hmf-back-btn {
    font-size: 0.9rem;
    padding: 10px 20px;
}

/* ====== LEADERBOARD ====== */

.hmf-leaderboard-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 28px 60px;
}

.hmf-leaderboard-section {
    margin-bottom: 40px;
}

.hmf-leaderboard-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(201,168,76,0.15);
}

.hmf-leader-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid rgba(201,168,76,0.06);
    transition: all 0.3s ease;
}

.hmf-leader-row.hmf-leader-first {
    background: rgba(201,168,76,0.06);
    border-color: rgba(201,168,76,0.2);
}

.hmf-leader-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
}

.hmf-leader-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--gold);
    filter: grayscale(30%);
}

.hmf-leader-name {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #e8e2d8;
    white-space: nowrap;
}

.hmf-leader-bar-wrap {
    flex: 1;
    min-width: 100px;
}

.hmf-leader-bar-track {
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    height: 28px;
    position: relative;
    overflow: hidden;
}

.hmf-leader-bar-fill {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    height: 100%;
    border-radius: 8px;
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 0;
}

.hmf-leader-first .hmf-leader-bar-fill {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
}

.hmf-leader-stats {
    font-size: 0.82rem;
    color: rgba(232,226,216,0.6);
    min-width: 110px;
    text-align: right;
    white-space: nowrap;
}

.hmf-leaderboard-empty {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: rgba(232,226,216,0.45);
    padding: 40px 20px;
}

.hmf-leaderboard-no-data {
    text-align: center;
    font-style: italic;
    color: rgba(232,226,216,0.35);
    padding: 16px 0;
    font-size: 0.9rem;
}

/* ====== RESPONSIVE ====== */

@media (max-width: 900px) {
    .hmf-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .hmf-results-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 500px) {
    .hmf-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0 16px; }
    .hmf-photo-wrap { width: 120px; height: 120px; }
    .hmf-card { padding: 18px 14px; }
    .hmf-card h2 { font-size: 1.2rem; }
    .hmf-card-tagline { font-size: 0.78rem; }
    .hmf-chat-header { flex-wrap: wrap; gap: 8px; }
    .hmf-msg { max-width: 88%; }

    .hmf-results-grid { grid-template-columns: 1fr; gap: 14px; padding: 0 16px 16px; }
    .hmf-meeting-body { padding: 30px 16px; }
    .hmf-meeting-subtitle { font-size: 0.95rem; }

    .hmf-leader-row { flex-wrap: wrap; gap: 8px; }
    .hmf-leader-info { min-width: 130px; }
    .hmf-leader-bar-wrap { min-width: 80px; }
    .hmf-leader-stats { min-width: auto; font-size: 0.78rem; }
    .hmf-leaderboard-body { padding: 20px 16px 40px; }

    .hmf-landing-buttons { flex-direction: column; align-items: center; }
    .hmf-meeting-btn { font-size: 1rem; padding: 12px 28px; }

    .hmf-vote-feedback .hmf-meeting-btn { margin-right: 0; margin-bottom: 10px; }
    .hmf-vote-feedback { display: flex; flex-direction: column; align-items: center; }
}
