/* =============================================
   WRAPPER
============================================= */
.ep-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont,
                 'Noto Sans Devanagari', 'Segoe UI', sans-serif;
}

/* =============================================
   SECTION TITLE
============================================= */
.ep-section-title {
    display: flex;
    align-items: center;
    margin: 20px 0 15px;
}
.ep-section-title span {
    font-size: 18px;
    font-weight: 700;
    color: #c0392b;
    border-left: 4px solid #c0392b;
    padding-left: 10px;
}
.ep-old-title {
    margin-top: 35px;
}

/* =============================================
   LATEST GRID
============================================= */
.ep-latest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1024px) {
    .ep-latest-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .ep-latest-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .ep-latest-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* =============================================
   CARD
============================================= */
.ep-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    border: 1px solid #eee;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ep-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* =============================================
   COVER BOX
============================================= */
.ep-cover {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
}
.ep-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =============================================
   PDF IFRAME - LATEST CARD
============================================= */
.ep-pdf-thumb-wrap {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #fff;
}
.ep-pdf-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 250%;
    height: 250%;
    border: none;
    transform: scale(0.4);
    transform-origin: top left;
    pointer-events: none;
}

/* Transparent overlay - scroll band karo */
.ep-pdf-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent;
    z-index: 2;
    cursor: default;
}

/* =============================================
   DATE BADGE
============================================= */
.ep-date-badge {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.82));
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 22px 8px 8px;
    text-align: center;
    z-index: 3;
}

/* =============================================
   NO COVER
============================================= */
.ep-no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 12px;
    gap: 8px;
}

/* =============================================
   INFO SECTION
============================================= */
.ep-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ep-title {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ep-edition {
    font-size: 11px;
    color: #888;
}

/* =============================================
   BUTTONS
============================================= */
.ep-btns {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.ep-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.2s;
    cursor: pointer;
    border: none;
}
.ep-btn:hover { opacity: 0.85; }
.ep-view     { background: #c0392b; color: #fff !important; }
.ep-download { background: #27ae60; color: #fff !important; }
.ep-no-pdf   { font-size: 11px; color: #aaa; }

/* =============================================
   OLD EDITIONS LIST
============================================= */
.ep-old-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.ep-old-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.ep-old-item:last-child { border-bottom: none; }
.ep-old-item:hover { background: #fafafa; }

/* OLD THUMB */
.ep-old-thumb {
    width: 55px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
    background: #f0f0f0;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.ep-old-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* OLD PDF IFRAME */
.ep-old-pdf-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #fff;
}
.ep-old-pdf-iframe {
    position: absolute;
    top: 0; left: 0;
    width: 500%;
    height: 500%;
    border: none;
    transform: scale(0.20);
    transform-origin: top left;
    pointer-events: none;
}

/* OLD DETAILS */
.ep-old-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.ep-old-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-old-date    { font-size: 12px; color: #888; }
.ep-old-edition { font-size: 11px; color: #aaa; }

/* OLD BUTTONS */
.ep-old-btns {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

/* =============================================
   MOBILE
============================================= */
@media (max-width: 768px) {
    .ep-cover { height: 180px; }
    .ep-old-title-text { font-size: 13px; }
}
@media (max-width: 480px) {
    .ep-cover        { height: 150px; }
    .ep-old-item     { padding: 10px 8px; gap: 8px; }
    .ep-old-thumb    { width: 45px; height: 58px; }
    .ep-old-btns     { flex-direction: row; }
    .ep-btn          { padding: 5px 8px; font-size: 11px; }
    .ep-old-title-text { font-size: 12px; }
}