img.emoji {
    display: none !important;
}


.mel-ebook-library {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* === FIXED: Removed overflow:hidden === */
.mel-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
}

.mel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* === Keep overflow only on cover === */
.mel-cover {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.mel-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mel-item:hover .mel-cover img {
    transform: scale(1.05);
}

.mel-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #0073aa;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: bold;
}

.mel-title {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-top: 1px solid #eee;
    transition: background 0.2s;
}

.mel-title:hover {
    background: #f9f9f9;
}

/* === ACCORDION PANEL - ABSOLUTE POSITIONED === */
.mel-details {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    z-index: 10;
    display: none;
    box-sizing: border-box;
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pointer triangle */
.mel-details:before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

/* === DESCRIPTION STYLE - SMALLER THAN TITLE === */
.mel-details p {
    font-size: 14px;
    font-weight: 400;
    color: #555;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

/* === FIXED: BUTTONS STAY INSIDE PANEL === */
.mel-details {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    z-index: 10;
    display: none;
    box-sizing: border-box;
    animation: slideDown 0.3s ease forwards;
    /* Prevent child overflow */
    overflow: hidden;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pointer triangle */
.mel-details:before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

/* Description text */
.mel-details p {
    font-size: 14px;
    font-weight: 400;
    color: #555;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

/* === BUTTON CONTAINER - CONTAINED WITHIN PADDING === */
.mel-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    width: 100%;           /* ← Respect parent width */
    box-sizing: border-box; /* ← Include padding in width */
}

/* Equal width buttons that stay inside container */
.mel-actions .mel-btn {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 0;          /* ← Prevent button text from forcing overflow */
    white-space: nowrap;   /* ← Keep text in one line */
    overflow: hidden;      /* ← Clip if too long */
    text-overflow: ellipsis; /* ← Show ... if clipped */
}

.mel-btn:hover {
    background: #005177;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mel-btn-preview {
    background: #f5a623;
}

.mel-btn-preview:hover {
    background: #e0921a;
}

/* Mobile: Stack buttons */
@media (max-width: 480px) {
    .mel-actions {
        flex-direction: column;
    }
    .mel-actions .mel-btn {
        width: 100%;
        flex: none;
    }
}

/* Preview on Hover */
.mel-item .mel-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.mel-item:hover .mel-preview-overlay {
    opacity: 1;
}

.mel-preview-overlay img {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid white;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Responsive Grid */
@media (max-width: 768px) {
    .mel-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 480px) {
    .mel-grid {
        grid-template-columns: 1fr;
    }
    .mel-title {
        font-size: 18px;
    }
}


body.user-registration-page #user-registration:not(.user-registration-MyAccount) .ur-frontend-form .user-registration-form .ur-form-row .ur-form-grid .user-registration-register a, body.user-registration-page .user-registration:not(.user-registration-MyAccount) .ur-frontend-form .user-registration-form .ur-form-row .ur-form-grid .user-registration-register a, body.user-registration-membership_page_user-registration-login-forms #user-registration:not(.user-registration-MyAccount) .ur-frontend-form .user-registration-form .ur-form-row .ur-form-grid .user-registration-register a, body.user-registration-membership_page_user-registration-login-forms .user-registration:not(.user-registration-MyAccount) .ur-frontend-form .user-registration-form .ur-form-row .ur-form-grid .user-registration-register a {
    text-underline-offset: 4px;
    color: #475bb2;
    font-size: 16px;
}


 .logo-wrapper {
    width: 200px;          /* adjust size */
    aspect-ratio: 1 / 1;   /* perfect square */
    margin: 0 auto;        /* center */
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }