/* =========================================
   PANCHAKOSHA WELLNESS - MASTER CSS
   ========================================= */

/* --- 1. CORE VARIABLES & RESETS --- */
:root {
    --bg-color: #e8dcc7;
    --text-dark: #3a2517;
    --text-light: #fefefe;
    --primary-btn: #714e66; 
    --secondary-btn: #8a4121; 
    --nav-bg: #4a3022;
    --app-max-width: 480px; 
    --gold-accent: #d1a75c;
    --gold-light: #F9D976;
    --gold-dark: #E29547;
    --text-muted: rgba(58, 37, 23, 0.85);
    --inactive-gray: rgba(209, 167, 92, 0.3);
}

html, body {
    margin: 0; padding: 0; width: 100%; height: 100%; overflow-x: hidden;
}

body { 
    font-family: 'Montserrat', sans-serif; 
    background-color: #24160d; color: var(--text-dark);
    display: flex; justify-content: center; align-items: flex-start;
    -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}

/* --- 2. GLOBAL LAYOUT --- */
.app-container { 
    width: 100vw; max-width: var(--app-max-width); 
    background-image: linear-gradient(to bottom, #cfbba5, #e8dcc7 20%, #e8dcc7);
    min-height: 100vh; position: relative; padding-bottom: 90px;
    box-shadow: 0 0 30px rgba(0,0,0,0.6); overflow-x: hidden; overflow-y: auto;
    background-color: var(--bg-color); display: flex; flex-direction: column; margin: 0 auto;
}

@media (min-width: 482px) {
    .app-container { width: 100%; min-height: calc(100vh - 40px); margin: 20px auto; border-radius: 30px; }
}

/* --- 3. SHARED HEADERS & NAVIGATION --- */
.page-header {
    background: url('assets/images/app/hero-lotus-bg-02.png') center/cover no-repeat;
    background-color: #d8c7b3; padding: 30px 20px 25px 20px;
    text-align: center; position: relative; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-bottom-left-radius: 24px; border-bottom-right-radius: 24px;
}
.page-header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(74, 48, 34, 0.7) 0%, rgba(74, 48, 34, 0.95) 100%);
    border-bottom-left-radius: 24px; border-bottom-right-radius: 24px; z-index: 1;
}

.header-content { position: relative; z-index: 2; }
.back-btn { color: var(--gold-accent); text-decoration: none; position: absolute; left: 0; top: 0; display: flex; align-items: center; font-weight: 600; font-size: 14px;}
.page-title { font-family: 'Cinzel', serif; font-size: 22px; color: var(--gold-accent); margin: 0 0 5px 0; letter-spacing: 1px; }
.page-desc { font-size: 11px; color: rgba(255,255,255,0.8); font-weight: 700; text-transform: uppercase; margin: 0; letter-spacing: 1px;}

.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: var(--app-max-width); background-color: var(--nav-bg);
    display: flex; justify-content: space-around; padding: 12px 0;
    border-top: 2px solid #3a2218; border-radius: 16px 16px 0 0; 
    box-shadow: 0 -4px 12px rgba(0,0,0,0.25); z-index: 1000;
}
@media (min-width: 482px) { 
    .bottom-nav { bottom: 20px; border-radius: 16px 16px 30px 30px; width: calc(100% - 40px); border: 1px solid rgba(209, 167, 92, 0.4); box-shadow: 0 15px 35px rgba(0,0,0,0.4); } 
}
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--gold-accent); text-decoration: none; font-size: 11px; font-weight: 600; opacity: 0.5; }
.nav-item.active { opacity: 1; transform: translateY(-4px); }
.nav-icon { font-size: 26px; margin-bottom: 4px; }
.nav-item.active .nav-icon { text-shadow: 0 0 10px rgba(209, 167, 92, 0.6); }

/* --- 4. GAMIFIED TOUCH PHYSICS --- */
.gamified-element { transition: transform 0.1s cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 0.1s ease; will-change: transform; cursor: pointer; }
.is-pressed { transform: scale(0.95) translateY(2px) !important; filter: brightness(0.9); box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;}
@keyframes rubberBandPop { 0% { transform: scale(0.95); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
.is-released { animation: rubberBandPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }

/* --- 5. SHARED UI COMPONENTS --- */
.toast { position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%); background-color: var(--nav-bg); color: var(--gold-accent); padding: 12px 24px; border-radius: 30px; font-size: 13px; font-weight: 700; transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 2000; display: flex; align-items: center; gap: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); border: 1px solid var(--gold-accent);}
.toast.show { bottom: 100px; }

.section-title { font-size: 16px; font-weight: 800; color: var(--nav-bg); margin-bottom: 15px; font-family: 'Cinzel', serif; display: flex; align-items: center; gap: 8px;}

/* Buttons */
.btn-purple { background: linear-gradient(135deg, var(--primary-btn), #9a6589); color: white; border: none; padding: 14px; border-radius: 12px; font-size: 14px; font-weight: 700; font-family: 'Montserrat', sans-serif; cursor: pointer; box-shadow: 0 4px 10px rgba(113, 78, 102, 0.3); display: flex; justify-content: center; align-items: center; gap: 6px;}

/* --- 6. AUTHENTICATION & FORMS (Login, Forgot Pwd) --- */
.login-header { text-align: center; padding: 20px 20px 10px; position: relative; }
.login-header::before { content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 150px; height: 150px; background: radial-gradient(circle, rgba(209, 167, 92, 0.4) 0%, rgba(255,255,255,0) 70%); z-index: 0; }
.logo-img { width: 85px; height: auto; margin-bottom: 10px; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2)); position: relative; z-index: 1; border-radius: 50%; border: 2px solid rgba(209, 167, 92, 0.5); }
.spiritual-quote { font-family: 'Montserrat', sans-serif; font-style: italic; font-size: 13px; color: #7a6b5d; margin: 10px auto 20px; max-width: 80%; line-height: 1.5; position: relative; z-index: 1; font-weight: 500;}

.form-container { padding: 0 25px; flex-grow: 1; position: relative; z-index: 1; }
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; font-size: 12px; font-weight: 700; color: var(--nav-bg); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 15px; color: #a89f91; font-size: 20px; transition: 0.3s; pointer-events: none;}
.input-wrapper input { width: 100%; padding: 15px 45px; border: 2px solid rgba(209, 167, 92, 0.4); border-radius: 12px; background: rgba(255, 255, 255, 0.6); box-sizing: border-box; font-size: 15px; font-family: 'Montserrat', sans-serif; color: var(--text-dark); transition: 0.3s; }
.input-wrapper input:focus { outline: none; border-color: var(--gold-accent); background: #ffffff; box-shadow: 0 0 12px rgba(209, 167, 92, 0.2); }
.input-wrapper input:focus + .input-icon, .input-wrapper input:not(:placeholder-shown) + .input-icon { color: var(--gold-accent); }

.toggle-password { position: absolute; right: 15px; color: #a89f91; font-size: 20px; cursor: pointer; transition: 0.3s; z-index: 10; }
.toggle-password:hover { color: var(--gold-accent); }

/* --- 7. MEDITATION & MIXER --- */
.mixer-section { padding: 25px 20px 10px; }
.sound-track { background: rgba(255,255,255,0.5); border-radius: 16px; padding: 15px 20px; margin-bottom: 15px; display: flex; align-items: center; border: 1px solid rgba(209, 167, 92, 0.3); transition: 0.3s; box-shadow: inset 0 0 10px rgba(255,255,255,0.5), 0 4px 6px rgba(0,0,0,0.02);}
.sound-track.active { background: #ffffff; border-color: var(--gold-accent); box-shadow: 0 6px 15px rgba(209, 167, 92, 0.2); }
.sound-icon { font-size: 30px; width: 45px; text-align: center; margin-right: 15px; opacity: 0.6; transition: 0.3s; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));}
.sound-track.active .sound-icon { opacity: 1; transform: scale(1.15); filter: drop-shadow(0 4px 4px rgba(209, 167, 92, 0.4));}
.sound-controls { flex-grow: 1; display: flex; flex-direction: column; }
.sound-label { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--nav-bg);}

input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; height: 6px; border-radius: 10px; outline: none;}
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 6px; cursor: pointer; background: transparent; border-radius: 10px; }
input[type=range]::-webkit-slider-thumb { height: 20px; width: 20px; border-radius: 50%; background: #ffffff; cursor: pointer; -webkit-appearance: none; margin-top: -7px; border: 3px solid var(--secondary-btn); box-shadow: 0 2px 5px rgba(0,0,0,0.3); transition: 0.2s;}
.sound-track.active input[type=range]::-webkit-slider-thumb { border-color: var(--nav-bg); background: var(--gold-accent); transform: scale(1.2);}

/* --- 8. BREATHING TOOL --- */
.breathing-section { padding: 30px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,0.6); margin: 20px 15px; border-radius: 25px; box-shadow: inset 0 0 10px rgba(255,255,255,0.5), 0 6px 15px rgba(0,0,0,0.05); border: 1px solid rgba(209, 167, 92, 0.3);}
.breath-container { position: relative; width: 160px; height: 160px; display: flex; justify-content: center; align-items: center; margin: 20px 0; }
.breath-circle { width: 90px; height: 90px; border-radius: 50%; position: absolute; background: linear-gradient(135deg, var(--gold-light), var(--gold-dark)); box-shadow: 0 0 30px var(--breath-color); transition: all 4s ease-in-out; display: flex; justify-content: center; align-items: center; z-index: 2; }
.breath-ring { width: 160px; height: 160px; border: 2px dashed rgba(209, 167, 92, 0.6); border-radius: 50%; position: absolute; z-index: 1; }
.instruction-text { color: var(--nav-bg); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;}
.breath-circle.inhale { transform: scale(1.7); background: linear-gradient(135deg, var(--primary-btn), #a27292); box-shadow: 0 0 40px rgba(113, 78, 102, 0.5);}
.breath-circle.inhale .instruction-text { color: white; }
.breath-circle.exhale { transform: scale(1); background: linear-gradient(135deg, var(--gold-light), var(--gold-dark)); box-shadow: 0 0 20px var(--breath-color);}

/* --- 9. JOURNAL & BLISS --- */
.release-card { background: rgba(255,255,255,0.4); border-radius: 20px; padding: 20px; text-align: center; border: 1px solid rgba(255,255,255,0.6); position: relative; overflow: hidden; box-shadow: inset 0 0 10px rgba(255,255,255,0.5);}
.release-input { width: 100%; border: none; border-bottom: 2px solid rgba(209, 167, 92, 0.5); background: transparent; font-family: 'Montserrat', sans-serif; font-size: 14px; color: var(--text-dark); padding: 10px 5px; text-align: center; margin-bottom: 15px; transition: 0.3s;}
.release-input:focus { outline: none; border-bottom-color: var(--primary-btn); }
.btn-release { background: transparent; border: 2px solid var(--secondary-btn); color: var(--secondary-btn); padding: 10px 25px; border-radius: 20px; font-size: 13px; font-weight: 700; font-family: 'Montserrat', sans-serif; cursor: pointer; transition: 0.3s;}

@keyframes floatAway {
    0% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
    100% { transform: translateY(-80px) scale(1.1); opacity: 0; filter: blur(4px); }
}
.floating-text { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 14px; color: var(--text-dark); font-style: italic; pointer-events: none; opacity: 0; white-space: nowrap; font-family: 'Cinzel', serif;}
.floating-text.animate { animation: floatAway 2s ease-in forwards; }

.rest-card { background: linear-gradient(135deg, var(--nav-bg), #2a1a12); border-radius: 20px; padding: 25px 20px; text-align: center; color: var(--gold-accent); box-shadow: 0 8px 20px rgba(0,0,0,0.3); border: 1px solid rgba(209, 167, 92, 0.2);}
@keyframes gentlePulse { 0% { box-shadow: 0 0 10px rgba(209, 167, 92, 0.1); } 50% { box-shadow: 0 0 30px rgba(209, 167, 92, 0.4); } 100% { box-shadow: 0 0 10px rgba(209, 167, 92, 0.1); } }
.play-ring { width: 70px; height: 70px; border-radius: 50%; margin: 15px auto; display: flex; justify-content: center; align-items: center; background: rgba(209, 167, 92, 0.1); border: 2px solid var(--gold-accent); cursor: pointer; transition: 0.3s; animation: gentlePulse 4s infinite ease-in-out;}


/* --- ENHANCED REVIEWS SLIDER (BULLETPROOF HORIZONTAL) --- */

/* 1. The Container (Holds the relative position for arrows) */
.slider-container {
    position: relative;
    width: 100%;
    padding: 0 10px; /* Room for the floating arrows */
    box-sizing: border-box;
}

/* 2. The Horizontal Scrollable Box */
.reviews-wrapper {
    display: flex;
    overflow: hidden; /* IMPORTANT: hides extra cards */
    transition: transform 0.6s ease-in-out;
    scroll-behavior: smooth;
    width: 100%;
}

    .reviews-wrapper::-webkit-scrollbar {
        display: none;
    }

/* 3. The Individual Review Card */
.review-card {
    flex: 0 0 100%;
    max-width: 100%;
    min-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    scroll-snap-align: center;
    display: flex;
    justify-content: center;
}

/* 4. The Decorative Inner Card */
.review-card-inner {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(245, 235, 220, 0.85));
    border-radius: 20px;
    padding: 25px 20px;
    border: 1px solid rgba(209, 167, 92, 0.6);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%; /* Expands to fill the wrapper */
    box-sizing: border-box;
}

/* Decorative Quote Icon */
.quote-icon {
    color: var(--gold-accent);
    opacity: 0.4;
    margin-bottom: 10px;
}

    .quote-icon span {
        font-size: 40px;
    }

/* The Review Text */
.review-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--nav-bg);
    margin: 10px 0 20px;
    font-weight: 500;
    font-style: italic;
}

/* Elegant Golden Divider */
.review-divider {
    width: 40px;
    height: 2px;
    background: var(--gold-accent);
    margin: 0 auto 15px;
    opacity: 0.5;
    border-radius: 2px;
}

/* Author Info (Footer) */
.review-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.reviewer-name {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--nav-bg);
    margin: 0;
}

.reviewer-meta {
    font-size: 11px;
    color: #7a6b5d;
    display: block;
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.star-rating {
    color: var(--gold-accent);
    font-size: 18px;
    display: flex;
    gap: 2px;
    margin: 8px 0;
    justify-content: center;
}

.review-date {
    font-size: 10px;
    color: var(--secondary-btn);
    font-weight: 700;
    opacity: 0.7;
}

/* 5. Floating Slider Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--nav-bg);
    color: var(--gold-accent);
    border: 2px solid var(--gold-accent);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#btnPrevSlide {
    left: -2px;
}

#btnNextSlide {
    right: -2px;
}

/* 6. Strict Media Constraints (Prevents tall images from breaking layout) */
.review-media {
    width: 100%;
    max-height: 250px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 15px;
}

.media-box {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid rgba(209, 167, 92, 0.4);
    background: #000;
}

    .media-box.landscape {
        aspect-ratio: 16/9;
    }

    .media-box.portrait {
        aspect-ratio: 9/16;
        max-width: 220px;
        margin: 0 auto 15px;
    }

/* Enhanced "Read All Experiences" Link */
.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
    font-size: 15px;
    font-weight: 500;
    color: var(--primary-btn);
    text-decoration: none; /* Removes default underline */
}

    .view-all-link .link-text {
        border-bottom: 1.5px solid var(--primary-btn);
        padding-bottom: 2px; /* Creates that nice gap between text and line */
    }

/* --- GLOBAL APP LOADER --- */
.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color); /* Matches your theme background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Higher than nav or banners */
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loader-logo {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(209, 167, 92, 0.3));
    animation: pulse 2s infinite ease-in-out;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(113, 78, 102, 0.1);
    border-top: 3px solid var(--primary-btn);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--secondary-btn);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Animations */
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Class to hide loader */
.loader-hidden {
    opacity: 0;
    visibility: hidden;
}