
/* ============================================================
   IMPRINT AUTOMATION INDIA MAGAZINE
   DIGITAL MAGAZINE MANAGER
   PREMIUM FIVE-CARD CENTRE SPOTLIGHT
   ============================================================ */


/* 01. MAIN WRAPPER */

.idmm-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 35px 38px 55px;
    box-sizing: border-box;
}


/* 02. CAROUSEL TRACK */

.idmm-track {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    transition: transform 0.65s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
}


/* 03. STANDARD MAGAZINE CARD */

.idmm-card {
    flex: 0 0 20%;
    width: 20%;
    min-width: 0;
    position: relative;

    display: flex;
    flex-direction: column;

    padding: 0 8px;
    box-sizing: border-box;
    overflow: hidden;

    background: #FFFFFF;
    border: 1px solid #E1EAF1;
    border-radius: 10px;

    box-shadow: 0 4px 16px rgba(23,54,93,.055);

    opacity: .48;
    transform: scale(.88);
    filter: grayscale(10%);

    transition:
        transform .65s cubic-bezier(.22,1,.36,1),
        opacity .65s ease,
        filter .65s ease,
        box-shadow .65s ease,
        border-color .65s ease;
}


/* 04. CENTRE HIGHLIGHTED MAGAZINE */

.idmm-card.is-center {
    flex: 0 0 20%;
    width: 20%;

    opacity: 1;
    transform: scale(1.075);
    filter: none;

    z-index: 5;

    border-color: #BFD7E8;

    box-shadow:
        0 12px 30px rgba(23,54,93,.15),
        0 2px 10px rgba(15,83,132,.08);
}


/* 05. NEAR SIDE MAGAZINES */

.idmm-card.is-side {
    opacity: .62;
    transform: scale(.91);
    filter: grayscale(6%);
    z-index: 2;
}


/* 06. FAR SIDE MAGAZINES */

.idmm-card.is-far-side {
    opacity: .38;
    transform: scale(.85);
    filter: grayscale(15%);
    z-index: 1;
}


/* 07. MAGAZINE COVER */

.idmm-cover {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 285px;

    padding: 17px 12px;
    box-sizing: border-box;

    overflow: hidden;
    background: #F5F8FB;
}


/* 08. COVER IMAGE */

.idmm-cover img {
    display: block;

    width: 100%;
    height: 100%;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
    object-position: center center;

    margin: 0 auto;
    padding: 0;

    box-sizing: border-box;
}


/* 09. CENTRE COVER */

.idmm-card.is-center .idmm-cover {
    height: 325px;
    padding: 20px 14px;
    background: #FFFFFF;
}


/* 10. NO COVER */

.idmm-no-cover {
    color: #64748B;
    font-weight: 600;
    text-align: center;
}


/* 11. CARD CONTENT */

.idmm-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;

    padding: 14px 12px 17px;

    box-sizing: border-box;
    background: #FFFFFF;
}


/* 12. MAGAZINE TITLE */

.idmm-card-content h3 {
    font-size: 15px;
    line-height: 1.45;
    font-weight: 600;
    color: #17365D;

    margin: 0 0 6px;
}


/* 13. ISSUE DETAILS */

.idmm-issue {
    font-size: 12px;
    line-height: 1.5;
    color: #718096;

    margin: 0 0 13px;
}


/* 14. BUTTON CONTAINER */

.idmm-actions {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 8px;
    width: 100%;

    margin-top: auto;
    padding-top: 5px;

    box-sizing: border-box;
}


/* 15. READ AND DOWNLOAD BUTTONS */

.idmm-read-button,
.idmm-download-button {
    display: flex;

    width: 90%;
    max-width: 190px;
    min-height: 38px;

    box-sizing: border-box;

    align-items: center;
    justify-content: center;

    padding: 9px 10px;

    border: 1px solid #0F5384;
    border-radius: 5px;

    background: #FFFFFF;
    color: #0F5384 !important;

    text-decoration: none !important;

    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    text-align: center;

    cursor: pointer;

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}


/* 16. BUTTON HOVER */

.idmm-read-button:hover,
.idmm-download-button:hover {
    background: #0F5384;
    border-color: #0F5384;
    color: #FFFFFF !important;

    box-shadow: 0 4px 12px rgba(15,83,132,.17);
}


/* 17. NAVIGATION ARROWS */

.idmm-nav {
    position: absolute;
    top: 44%;
    transform: translateY(-50%);

    z-index: 10;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #17365D;
    border-radius: 50%;

    background: #17365D;
    color: #FFFFFF;

    font-size: 18px;
    cursor: pointer;

    transition: background .25s ease;
}

.idmm-nav:hover {
    background: #0F5384;
    border-color: #0F5384;
}

.idmm-prev {
    left: 4px;
}

.idmm-next {
    right: 4px;
}


/* 18. PAGINATION */

.idmm-dots {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    position: absolute;
    bottom: 11px;
    left: 0;
    right: 0;
}

.idmm-dots button {
    width: 8px;
    height: 8px;

    padding: 0;
    border: none;
    border-radius: 50%;

    background: #CBD8E3;
    cursor: pointer;

    transition: all .3s ease;
}

.idmm-dots button.active {
    width: 22px;
    border-radius: 10px;
    background: #0F5384;
}


/* 19. DEARFLIP MODAL */

.idmm-modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 999999;

    background: rgba(8,22,40,.88);

    padding: 3vh 3vw;
    box-sizing: border-box;
}

.idmm-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.idmm-modal-panel {
    position: relative;

    background: #FFFFFF;

    width: min(1200px,100%);
    height: 94vh;

    border-radius: 9px;
    overflow: auto;

    padding: 42px 14px 14px;
    box-sizing: border-box;
}



/* ============================================================
   IDMM - DEARFLIP MODAL CLOSE BUTTON
   Perfect circular alignment
   ============================================================ */

.idmm-modal .idmm-modal-panel > .idmm-close {
    position: absolute !important;

    top: 12px !important;
    right: 14px !important;

    z-index: 999999 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;

    padding: 0 !important;
    margin: 0 !important;

    box-sizing: border-box !important;

    border: 1px solid #0E5384 !important;
    border-radius: 50% !important;

    background: #0E5384 !important;
    color: #FFFFFF !important;

    font-family: Arial, sans-serif !important;
    font-size: 26px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    text-align: center !important;
    text-decoration: none !important;

    cursor: pointer !important;

    appearance: none !important;
    -webkit-appearance: none !important;

    transform: none !important;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease !important;
}


/* HOVER EFFECT */

.idmm-modal .idmm-modal-panel > .idmm-close:hover {
    background: #FFFFFF !important;
    border-color: #0E5384 !important;
    color: #0E5384 !important;

    box-shadow: 0 3px 10px rgba(14,83,132,0.18) !important;
}


/* CLICK STATE */

.idmm-modal .idmm-modal-panel > .idmm-close:active {
    background: #0E5384 !important;
    color: #FFFFFF !important;
}


/* REMOVE UNWANTED FOCUS STYLING */

.idmm-modal .idmm-modal-panel > .idmm-close:focus {
    outline: none !important;
}

.idmm-modal .idmm-modal-panel > .idmm-close:focus-visible {
    outline: 2px solid #0E5384 !important;
    outline-offset: 3px !important;
}


/* MOBILE ADJUSTMENT */

@media (max-width: 599px) {

    .idmm-modal .idmm-modal-panel > .idmm-close {
        top: 8px !important;
        right: 10px !important;

        width: 36px !important;
        height: 36px !important;
    }

}



/* 21. READER CONTENT */

.idmm-reader-content {
    min-height: 80%;
    height: calc(100% - 10px);
}

.idmm-reader-content > * {
    max-width: 100%;
}

.idmm-loading,
.idmm-error {
    text-align: center;
    padding: 35px;
    color: #17365D;
}

.idmm-error {
    color: #B42318;
}

.idmm-modal-open {
    overflow: hidden;
}


/* ============================================================
   22. TABLET RESPONSIVE
   Three cards visible
   ============================================================ */

@media (min-width: 600px) and (max-width: 899px) {

    .idmm-wrap {
        padding: 28px 32px 48px;
    }

    .idmm-card,
    .idmm-card.is-center {
        flex: 0 0 33.333333%;
        width: 33.333333%;
    }

    .idmm-card.is-center {
        transform: scale(1.045);
    }

    .idmm-card.is-side {
        transform: scale(.91);
    }

    .idmm-card.is-far-side {
        transform: scale(.85);
    }

    .idmm-cover {
        height: 245px;
    }

    .idmm-card.is-center .idmm-cover {
        height: 275px;
    }

    .idmm-card-content {
        padding: 12px;
    }

    .idmm-card-content h3 {
        font-size: 14px;
    }

    .idmm-issue {
        font-size: 11px;
    }

    .idmm-read-button,
    .idmm-download-button {
        width: 90%;
        min-height: 36px;
        font-size: 11px;
    }

    .idmm-nav {
        width: 34px;
        height: 34px;
    }
}


/* ============================================================
   23. MOBILE RESPONSIVE
   One card visible
   ============================================================ */

@media (max-width: 599px) {

    .idmm-wrap {
        padding: 22px 30px 45px;
    }

    .idmm-card,
    .idmm-card.is-center {
        flex: 0 0 100%;
        width: 100%;
    }

    .idmm-card.is-center {
        transform: scale(1.01);
    }

    .idmm-card.is-side {
        transform: scale(.96);
    }

    .idmm-card.is-far-side {
        transform: scale(.92);
    }

    .idmm-cover {
        height: 275px;
        padding: 15px 13px;
    }

    .idmm-card.is-center .idmm-cover {
        height: 305px;
        padding: 18px 15px;
    }

    .idmm-card-content {
        padding: 13px;
    }

    .idmm-card-content h3 {
        font-size: 15px;
    }

    .idmm-issue {
        font-size: 12px;
    }

    .idmm-read-button,
    .idmm-download-button {
        width: 85%;
        max-width: 230px;
        min-height: 39px;
        font-size: 12px;
    }

    .idmm-nav {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }

    .idmm-modal {
        padding: 0;
    }

    .idmm-modal-panel {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        padding: 42px 6px 6px;
    }
}


/* =====================================================
   FIX: SHOW ONLY FIVE MAGAZINES ON DESKTOP
   ===================================================== */

.idmm-card.is-hidden {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Tablet: show only three magazines */
@media (min-width: 600px) and (max-width: 899px) {
    .idmm-card.is-hidden {
        visibility: hidden !important;
    }
}

/* Mobile: show only the centre magazine */
@media (max-width: 599px) {
    .idmm-card.is-hidden {
        visibility: hidden !important;
    }
}

/* Hide magazines outside the five-card spotlight */

.idmm-card.is-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}


/* ============================================================
   IDMM - FIX SPACING BETWEEN SPOTLIGHT MAGAZINES
   Balanced spacing around the centre magazine
   ============================================================ */

/* DESKTOP */
@media (min-width: 900px) {

    .idmm-track {
        gap: 24px !important;
    }

    .idmm-track > .idmm-card {
        flex: 0 0 calc((100% - 96px) / 5) !important;
        width: calc((100% - 96px) / 5) !important;
    }

}

/* TABLET */
@media (min-width: 600px) and (max-width: 899px) {

    .idmm-track {
        gap: 18px !important;
    }

    .idmm-track > .idmm-card {
        flex: 0 0 calc((100% - 36px) / 3) !important;
        width: calc((100% - 36px) / 3) !important;
    }

}

/* MOBILE */
@media (max-width: 599px) {

    .idmm-track {
        gap: 0 !important;
    }

    .idmm-track > .idmm-card {
        flex: 0 0 100% !important;
        width: 100% !important;
    }

}


/* ============================================================
   IDMM - REDUCE MAGAZINE CARD HEIGHT
   More compact and premium card proportions
   ============================================================ */

/* DESKTOP */
@media (min-width: 900px) {

    .idmm-cover {
        height: 245px !important;
        padding: 14px 12px !important;
    }

    .idmm-card.is-center .idmm-cover {
        height: 275px !important;
        padding: 16px 12px !important;
    }

    .idmm-card-content {
        padding: 11px 12px 13px !important;
    }

    .idmm-card-content h3 {
        margin-bottom: 4px !important;
    }

    .idmm-issue {
        margin-bottom: 9px !important;
    }

}

/* TABLET */
@media (min-width: 600px) and (max-width: 899px) {

    .idmm-cover {
        height: 215px !important;
    }

    .idmm-card.is-center .idmm-cover {
        height: 240px !important;
    }

}

/* MOBILE */
@media (max-width: 599px) {

    .idmm-cover {
        height: 235px !important;
    }

    .idmm-card.is-center .idmm-cover {
        height: 255px !important;
    }

}


/* ============================================================
   IDMM - PREMIUM MAGAZINE CARD HOVER EFFECT
   ============================================================ */

.idmm-card {
    cursor: pointer;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease,
        opacity 0.35s ease,
        filter 0.35s ease;
}

/* Hover effect for all magazine cards */
@media (hover: hover) and (pointer: fine) {

    .idmm-card:hover {
        border-color: #0F5384 !important;

        box-shadow:
            0 12px 28px rgba(15, 83, 132, 0.16),
            0 3px 10px rgba(23, 54, 93, 0.08);

        z-index: 8;
    }

    /* Side and normal cards */
    .idmm-card:not(.is-center):hover {
        transform: translateY(-7px) scale(0.92);
    }

    /* Centre card */
    .idmm-card.is-center:hover {
        transform: translateY(-7px) scale(1.095);
    }

}

/* Remove hover movement on touch devices */
@media (hover: none) {
    .idmm-card:hover {
        transform: none;
    }
}



/* ============================================================
   IMPRINT MAGAZINE - NAVIGATION & PAGINATION FINAL FIX
   ============================================================ */


/* ============================================================
   01. NAVIGATION ARROWS - NORMAL STATE
   ============================================================ */

.idmm-wrap .idmm-nav,
.idmm-wrap .idmm-nav:visited {
    background-color: #FFFFFF !important;
    border: 1px solid #0E5384 !important;
    color: #0E5384 !important;

    box-shadow: none !important;
    outline: none;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease;
}


/* ============================================================
   02. NAVIGATION ARROWS - HOVER STATE
   This also works when the button remains focused after clicking.
   ============================================================ */

.idmm-wrap .idmm-nav:hover,
.idmm-wrap .idmm-nav:focus:hover {
    background-color: #0E5384 !important;
    border-color: #0E5384 !important;
    color: #FFFFFF !important;

    box-shadow: 0 4px 12px rgba(14,83,132,0.20) !important;
}


/* ============================================================
   03. NAVIGATION ARROWS - CLICK STATE
   ============================================================ */

.idmm-wrap .idmm-nav:active {
    background-color: #0E5384 !important;
    border-color: #0E5384 !important;
    color: #FFFFFF !important;
}


/* ============================================================
   04. FOCUSED BUT NOT HOVERED
   Return to white after mouse leaves the arrow.
   ============================================================ */

.idmm-wrap .idmm-nav:focus:not(:hover) {
    background-color: #FFFFFF !important;
    border-color: #0E5384 !important;
    color: #0E5384 !important;

    box-shadow: none !important;
}


/* Keyboard accessibility */

.idmm-wrap .idmm-nav:focus-visible {
    outline: 2px solid #0E5384 !important;
    outline-offset: 3px;
}


/* ============================================================
   05. PAGINATION DOTS - NORMAL STATE
   ============================================================ */

.idmm-wrap .idmm-dots button {
    background-color: #CBD8E3 !important;
    border: none !important;
    box-shadow: none !important;

    transition:
        background-color 0.25s ease,
        width 0.3s ease;
}


/* ============================================================
   06. INACTIVE DOT - HOVER
   ============================================================ */

.idmm-wrap .idmm-dots button:not(.active):hover {
    background-color: #0E5384 !important;
}


/* ============================================================
   07. ACTIVE DOT - ALWAYS BLUE
   ============================================================ */

.idmm-wrap .idmm-dots button.active,
.idmm-wrap .idmm-dots button.active:hover,
.idmm-wrap .idmm-dots button.active:focus {
    background-color: #0E5384 !important;
    border: none !important;
    box-shadow: none !important;
}


/* ============================================================
   IDMM - FINAL CLOSE BUTTON POSITION FIX
   ============================================================ */

.idmm-modal .idmm-modal-panel > .idmm-close {
    position: absolute !important;

    /* Correct position */
    top: 3px !important;
    right: 22px !important;

    /* Perfect circle */
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;
    margin: 0 !important;

    box-sizing: border-box !important;

    border-radius: 50% !important;
    background: #0E5384 !important;
    border: 1px solid #0E5384 !important;

    color: #FFFFFF !important;
    font-size: 26px !important;
    line-height: 1 !important;

    transform: none !important;
}

/* Hover */
.idmm-modal .idmm-modal-panel > .idmm-close:hover {
    background: #FFFFFF !important;
    color: #0E5384 !important;
    border-color: #0E5384 !important;
}

/* Mobile */
@media (max-width: 599px) {
    .idmm-modal .idmm-modal-panel > .idmm-close {
        top: 3px !important;
        right: 10px !important;
    }
}


/* ============================================================
   IDMM - DEARFLIP COMPACT MODAL
   FIXED VIEWER CLIPPING
   ============================================================ */

/* MAIN MODAL PANEL */

.idmm-modal .idmm-modal-panel {
    width: min(1120px, 94vw) !important;
    height: 90vh !important;
    max-height: 90vh !important;

    margin: auto !important;
    padding: 48px 12px 12px !important;

    box-sizing: border-box !important;
    overflow: auto !important;

    border-radius: 10px !important;
}

/* READER CONTAINER */

.idmm-modal .idmm-reader-content {
    width: 100% !important;
    height: calc(90vh - 65px) !important;
    min-height: 500px !important;

    overflow: visible !important;
    box-sizing: border-box !important;
}

/* VIEWER CONTENT */

.idmm-modal .idmm-reader-content > * {
    max-width: 100% !important;
}

/* CLOSE BUTTON */

.idmm-modal .idmm-modal-panel > .idmm-close {
    top: 8px !important;
    right: 12px !important;
}

/* TABLET */

@media (min-width: 600px) and (max-width: 899px) {

    .idmm-modal .idmm-modal-panel {
        width: 96vw !important;
        height: 90vh !important;
    }

    .idmm-modal .idmm-reader-content {
        height: calc(90vh - 65px) !important;
    }

}

/* MOBILE */

@media (max-width: 599px) {

    .idmm-modal {
        padding: 2vh 2vw !important;
    }

    .idmm-modal .idmm-modal-panel {
        width: 96vw !important;
        height: 94vh !important;
        max-height: 94vh !important;

        padding: 45px 6px 8px !important;
    }

    .idmm-modal .idmm-reader-content {
        height: calc(94vh - 60px) !important;
        min-height: 400px !important;
    }

}


/* ============================================================
   IDMM - SOFT BLENDING EDGES
   Seamless Magazine Carousel Background Effect
   ============================================================ */

/* Main wrapper */
.idmm-wrap {
    position: relative;
    isolation: isolate;
}

/* Left soft fade */
.idmm-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;

    width: 11%;

    background: linear-gradient(
        to right,
        #FFFFFF 0%,
        rgba(255,255,255,0.88) 25%,
        rgba(255,255,255,0.48) 60%,
        rgba(255,255,255,0) 100%
    );

    z-index: 7;
    pointer-events: none;
}

/* Right soft fade */
.idmm-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;

    width: 11%;

    background: linear-gradient(
        to left,
        #FFFFFF 0%,
        rgba(255,255,255,0.88) 25%,
        rgba(255,255,255,0.48) 60%,
        rgba(255,255,255,0) 100%
    );

    z-index: 7;
    pointer-events: none;
}

/* Keep navigation arrows above fade layers */
.idmm-wrap .idmm-nav {
    z-index: 10 !important;
}

/* Keep pagination visible */
.idmm-wrap .idmm-dots {
    z-index: 10 !important;
}

/* Softer outer magazine cards */
.idmm-card.is-far-side {
    border-color: rgba(225,234,241,0.35);
    box-shadow: 0 3px 12px rgba(23,54,93,0.025);
}

/* ============================================================
   END SOFT BLENDING EFFECT
   ============================================================ */

