/* ==========================================
   🟢 METHODOLOGY MODAL (BOTTOM SHEET)
   ========================================== */
.methodology-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Darkens the background table/ad */
    z-index: 100000; /* Sits above EVERYTHING, including the sticky ad */
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Anchors the sheet to the bottom */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.methodology-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.methodology-content {
    background: #fff;
    width: 100%;
    max-width: 800px;
    max-height: 85dvh; /* 🟢 Changed to dvh (dynamic viewport height) to respect Safari/Chrome toolbars */
    border-radius: 20px 20px 0 0;
    padding: 40px 25px 50px 25px; /* 🟢 Increased top padding from 30px to 40px */
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}

.methodology-modal.active .methodology-content {
    transform: translateY(0); /* Slides up to resting position */
}

.methodology-content h2 {
    margin-top: 0;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
}

.methodology-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 15px;
}

.close-modal-btn {
    position: absolute;
    top: 15px; /* 🟢 Pushed slightly down */
    right: 15px; /* 🟢 Pushed slightly in */
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-modal-btn:hover { background: #e0e0e0; }

/* Critical: Locks the background page from scrolling when the modal is open */
body.modal-open { overflow: hidden; }