/* ============================================================
   Sanctuary FGP App – style.css v19.9 (QA & UX Fixes)
   ============================================================ */

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.hidden { display: none !important; }

/* =============================================
   SPA PAGE TRANSITIONS
   ============================================= */
.spa-page {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    transform: translateY(15px);
}
.spa-page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   BUTTONS 3D
   ============================================= */
.btn-3d {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 0px 0px rgba(0,0,0,0.15), 0 15px 20px -5px rgba(0,0,0,0.2);
    position: relative;
    top: 0;
}
.btn-3d:active {
    box-shadow: 0 0px 0px 0px rgba(0,0,0,0.15), 0 5px 10px -5px rgba(0,0,0,0.2);
    top: 6px;
}
.btn-3d-primary {
    box-shadow: 0 6px 0px 0px #304600, 0 15px 20px -5px rgba(74,104,0,0.4);
}
.btn-3d-primary:active {
    box-shadow: 0 0px 0px 0px #304600, 0 5px 10px -5px rgba(74,104,0,0.4);
}
.btn-3d-secondary {
    box-shadow: 0 6px 0px 0px #1e3a4b, 0 15px 20px -5px rgba(54,100,128,0.4);
}
.btn-3d-secondary:active {
    box-shadow: 0 0px 0px 0px #1e3a4b, 0 5px 10px -5px rgba(54,100,128,0.4);
}

/* =============================================
   GLASS PANELS
   ============================================= */
.glass-panel {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03), inset 0 1px 0 rgba(255,255,255,0.8);
}
.glass-nav {
    background: rgba(243,244,238,0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.05);
}

/* =============================================
   INPUTS
   ============================================= */
.input-inset {
    background: #ffffff;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.input-inset:focus-within {
    box-shadow: inset 0 2px 6px rgba(74,104,0,0.1), 0 0 0 3px rgba(200,241,122,0.3);
    border-color: #c8f17a;
}

/* =============================================
   CARD RADIO (שאלון קליני חדש) - מתוקן
   ============================================= */
.psych-card-label {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.8rem;
    border: 2px solid #e0e4dc;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
    background: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    color: #4a4a4a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    line-height: 1.3;
    height: 100%;
    width: 100%;
    user-select: none;
}
.psych-card-label:hover {
    border-color: #c8f17a;
    background: #fcfdfa;
    transform: translateY(-2px);
}
input[type="radio"]:checked + .psych-card-label {
    background: #f6ffe0;
    color: #304600;
    border-color: #739f00;
    box-shadow: 0 4px 12px rgba(74,104,0,0.15);
}
input[type="radio"]:checked + .psych-card-label::before {
    content: "done";
    font-family: 'Material Symbols Outlined';
    font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 24;
    margin-left: 6px;
    color: #739f00;
    font-size: 1.2rem;
}

/* =============================================
   ANIMATIONS FLOAT
   ============================================= */
.animate-float          { animation: float 6s ease-in-out infinite; }
.animate-float-delayed  { animation: float 6s ease-in-out 3s infinite; }
@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.recording-pulse { animation: pulse-red 1.5s infinite; color: #aa371c !important; }
@keyframes pulse-red {
    0%   { transform: scale(1);   opacity: 1; }
    50%  { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1);   opacity: 1; }
}

/* =============================================
   CARD FADE-IN
   ============================================= */
.card-fade-in {
    animation: card-fade 0.6s cubic-bezier(0.34,1.2,0.64,1) forwards;
}
@keyframes card-fade {
    from { opacity:0; transform:translateY(10px); }
    to   { opacity:1; transform:translateY(0); }
}

/* =============================================
   METRICS CARDS (כרטיסי מדדים)
   ============================================= */
.metric-card {
    animation: metric-slide-in 0.5s cubic-bezier(0.34,1.2,0.64,1) both;
}
@keyframes metric-slide-in {
    from { opacity:0; transform:translateX(20px); }
    to   { opacity:1; transform:translateX(0); }
}

.metric-bar-track {
    height: 6px;
    background: rgba(0,0,0,0.06);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 8px;
}
.metric-bar-fill {
    height: 100%;
    border-radius: 99px;
    width: 0%;
}

/* =============================================
   TEXT GRADIENT
   ============================================= */
.text-gradient {
    background: linear-gradient(135deg, #304600 0%, #739f00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =============================================
   AI TEXT
   ============================================= */
.ai-formatted-text { text-align: right !important; direction: rtl !important; }
.ai-formatted-text * { text-align: right !important; direction: rtl !important; }

/* =============================================
   SCROLLBAR
   ============================================= */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* =============================================
   BOTTOM NAV
   ============================================= */
.nav-item { position: relative; transition: all 0.3s ease; }
.nav-item.active { color: #141f00; transform: translateY(-4px); }
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 50%;
    transform: translateX(-50%);
    width: 24px; height: 4px;
    border-radius: 4px;
    background: #4a6800;
    box-shadow: 0 2px 8px rgba(74,104,0,0.6);
}
.nav-item.active span.material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
    color: #4a6800;
}

/* =============================================
   MODAL
   ============================================= */
.modal-enter {
    animation: modal-slide-up 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modal-slide-up {
    from { transform:translateY(40px); opacity:0; }
    to   { transform:translateY(0);    opacity:1; }
}

/* =============================================
   PROGRESS BAR & TIMELINE
   ============================================= */
.step-item    { transition: all 0.4s ease; min-width: 40px; }
.step-circle  { transition: all 0.4s ease; }
.step-connector { transition: background-color 0.4s ease; }

.timeline-item {
    animation: timeline-in 0.5s cubic-bezier(0.34,1.1,0.64,1) both;
}
@keyframes timeline-in {
    from { opacity:0; transform:translateX(16px); }
    to   { opacity:1; transform:translateX(0); }
}

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* =============================================
   HOME – גן חי (CANVAS HERO)
   ============================================= */
#page-home {
    min-height: calc(100vh - 160px);
    padding-bottom: 2rem;
}
.home-garden-wrap {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 0 0 3rem 3rem;
    margin: -1rem -1rem 0 -1rem;
    width: calc(100% + 2rem);
}
.home-garden-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(160deg, #f9faf4 0%, #e6eed8 100%);
}
.home-garden-fade {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 130px;
    background: linear-gradient(to top, #f9faf4 0%, transparent 100%);
    pointer-events: none;
}

/* =============================================
   HOME – כותרת
   ============================================= */
.home-eyebrow {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #4a6800;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}
.home-headline {
    font-family: 'Platypi', serif;
    font-size: clamp(2.4rem, 9vw, 3.6rem);
    font-weight: 800;
    line-height: 1.15;
    color: #1e3a4b;
    margin-bottom: 1rem;
}

/* =============================================
   HOME – Hook row
   ============================================= */
.home-hook-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(74,104,0,0.07);
    border: 1px solid rgba(74,104,0,0.15);
    border-radius: 99px;
    padding: 0.35rem 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e3a4b;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
    justify-content: center;
}
.home-hook-num {
    font-size: 1.1rem;
    font-weight: 900;
    color: #4a6800;
    min-width: 1.2ch;
    display: inline-block;
    text-align: center;
}
.home-hook-sep  { color: #1e3a4b; opacity: 0.7; }
.home-hook-arrow{ color: #4a6800; font-size: 0.9rem; }
.home-hook-result{ color: #1e3a4b; }

/* =============================================
   HOME – כרטיס אחרון
   ============================================= */
.home-last-card {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(74,104,0,0.2);
    border-radius: 1.5rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 4px 20px rgba(74,104,0,0.08);
    animation: card-fade 0.6s cubic-bezier(0.34,1.2,0.64,1) forwards;
}

/* =============================================
   HOME – שלוש הבטחות
   ============================================= */
.home-promises-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.2rem;
}
.home-promise-card {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(74,104,0,0.12);
    border-radius: 1.2rem;
    padding: 0.9rem 0.4rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.home-promise-card:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(74,104,0,0.12);
}
.home-promise-icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
    line-height: 1;
}
.home-promise-text {
    font-size: 0.63rem;
    font-weight: 700;
    color: #1e3a4b;
    line-height: 1.4;
}