/* Design: html-design/index.html */
/* =========================================================
   MAGAZINE SECTION
========================================================= */

.realis-magazine-section {
    width: 100%;
    padding: 90px 0;
    background: #f7f7f7;
    overflow: hidden;
}


/* =========================================================
   SECTION HEADING
========================================================= */

.magazine-section-heading {
    max-width: 850px;
    margin: 0 auto 55px;
}

.magazine-eyebrow {
    display: inline-block;
    margin-bottom: 12px;

    color: var(--brand-teal);

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 2px;
    text-transform: uppercase;
}

.magazine-section-heading h2 {
    margin: 0 0 15px;

    color: #111;

    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.1;
}

.magazine-section-heading h2 span {
    color: var(--brand-teal);
}

.magazine-section-heading p {
    max-width: 700px;
    margin: 0 auto;

    color: #777;

    font-size: 16px;
    line-height: 1.8;
}


/* =========================================================
   SLIDER WRAPPER
========================================================= */

.magazine-slider-wrapper {
    position: relative;
    width: 100%;
}


/* =========================================================
   MAGAZINE ROW
========================================================= */

.magazine-slider {
    display: flex;
    flex-wrap: wrap;

    width: 100%;

    margin: 0;
    padding: 0;
}


/* =========================================================
   MAGAZINE ITEM
   DESKTOP = 4 PER ROW
========================================================= */

.magazine-item {
    flex: 0 0 25%;
    width: 25%;

    padding: 12px;
}


/* =========================================================
   MAGAZINE CARD
========================================================= */

.magazine-modern-card {
    width: 100%;
    height: 100%;

    padding: 12px;

    background: #fff;

    border: 1px solid #e5e5e5;
    border-radius: 16px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);

    overflow: hidden;

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

.magazine-modern-card:hover {
    transform: translateY(-7px);

    border-color: var(--brand-teal);

    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.13);
}


/* =========================================================
   FIXED MAGAZINE IMAGE BOX
========================================================= */

/*
   IMPORTANT:

   এই box-এর size সব magazine-এর জন্য SAME থাকবে।

   Desktop:
   Height = 430px

   Tablet:
   Height = 410px

   Mobile:
   Height = 430px

   তাই source image যত বড়/ছোট বা যেকোনো ratio-এর
   হলেও card-এর image area change হবে না।
*/

.magazine-cover {
    position: relative;

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

    width: 100%;
    height: 430px;

    overflow: hidden;

    background: #f1f1f1;

    border-radius: 11px;

    text-decoration: none;

    line-height: 0;
}


/* =========================================================
   IMAGE
========================================================= */

/*
   contain ব্যবহার করা হয়েছে।

   এর ফলে:

   - image crop হবে না
   - পুরো image দেখা যাবে
   - original ratio নষ্ট হবে না
   - source image-এর ratio আলাদা হলেও
     image box-এর size change হবে না
*/

.magazine-cover img {
    display: block;

    width: 100%;
    height: 100%;

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

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

    vertical-align: middle;

    transition: transform 0.5s ease;
}


/* =========================================================
   IMAGE HOVER
========================================================= */

.magazine-modern-card:hover .magazine-cover img {
    transform: scale(1.035);
}


/* =========================================================
   HOVER OVERLAY
========================================================= */

.magazine-hover {
    position: absolute;
    inset: 0;

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

    background: rgba(17, 17, 17, 0.58);

    opacity: 0;

    transition: opacity 0.35s ease;
}

.magazine-modern-card:hover .magazine-hover {
    opacity: 1;
}

.magazine-hover span {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 18px;

    background: var(--brand-teal);
    color: #d5e7ed;

    border-radius: 50px;

    font-size: 13px;
    font-weight: 700;

    transform: translateY(10px);

    transition: transform 0.35s ease;
}

.magazine-modern-card:hover .magazine-hover span {
    transform: translateY(0);
}


/* =========================================================
   CARD CONTENT
========================================================= */

.magazine-card-content {
    padding: 18px 5px 5px;
}

.magazine-small {
    display: block;

    margin-bottom: 5px;

    color: #999;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.magazine-title {
    margin: 0;

    color: #111;

    font-size: 18px;
    font-weight: 700;

    line-height: 1.3;
}


/* =========================================================
   BUTTON AREA
========================================================= */

.magazine-card-actions {
    display: flex;
    align-items: stretch;

    gap: 9px;

    margin-top: 17px;
}


/* =========================================================
   READ ISSUE BUTTON
========================================================= */

.magazine-view-link {
    flex: 1;

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

    gap: 6px;

    min-height: 43px;

    padding: 9px 10px;

    background: #fff;
    color: #333;

    border: 1px solid #ddd;
    border-radius: 7px;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    transition: all 0.3s ease;
}

.magazine-view-link:hover {
    background: #d5e7ed;
    color: #111;

    border-color: var(--brand-teal);
}


/* =========================================================
   GET STARTED BUTTON
========================================================= */

.magazine-get-started {
    flex: 1;

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

    gap: 6px;

    min-height: 43px;

    padding: 9px 10px;

     background-color: var(--brand-teal);
    color: #d5e7ed;

    border: 1px solid var(--brand-teal);
    border-radius: 7px;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    transition: all 0.3s ease;
}

.magazine-get-started:hover {
    background: #111;
    color: #fff;

    border-color: #111;

    transform: translateY(-2px);
}

.magazine-get-started i {
    transition: transform 0.3s ease;
}

.magazine-get-started:hover i {
    transform: translateX(4px);
}


/* =========================================================
   SLIDER ARROWS
========================================================= */

.magazine-slider-btn {
    position: absolute;

    top: 43%;

    z-index: 20;

    width: 46px;
    height: 46px;

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

    padding: 0;

    background: #fff;
    color: #111;

    border: 1px solid #ddd;
    border-radius: 50%;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.14);

    cursor: pointer;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}

.magazine-slider-btn:hover {
    background: #f5a800;
    color: #111;

    transform: scale(1.08);
}

.magazine-slider-btn i {
    font-size: 18px;
}

.magazine-prev {
    left: -8px;
}

.magazine-next {
    right: -8px;
}


/* =========================================================
   TABLET
   2 CARDS PER ROW
========================================================= */

@media (max-width: 991.98px) {

    .realis-magazine-section {
        padding: 75px 0;
    }

    .magazine-section-heading {
        margin-bottom: 40px;
    }

    .magazine-item {
        flex: 0 0 50%;
        width: 50%;
    }

    .magazine-cover {
        height: 410px;
    }

    .magazine-slider-btn {
        display: none;
    }

}


/* =========================================================
   MOBILE
   HORIZONTAL SLIDER
========================================================= */

@media (max-width: 575.98px) {

    .realis-magazine-section {
        padding: 60px 0;
    }


    /* =========================
       HEADING
    ========================== */

    .magazine-section-heading {
        padding: 0 20px;

        margin-bottom: 32px;
    }

    .magazine-section-heading h2 {
        font-size: 31px;
    }

    .magazine-section-heading p {
        font-size: 14px;
        line-height: 1.7;
    }


    /* =========================
       SLIDER
    ========================== */

    .magazine-slider {

        flex-wrap: nowrap;

        overflow-x: auto;
        overflow-y: hidden;

        width: 100%;

        padding: 5px 20px 25px;

        gap: 16px;

        /*
           One card = one snap
        */
        scroll-snap-type: x mandatory;

        scroll-behavior: smooth;

        -webkit-overflow-scrolling: touch;

        /*
           Hide scrollbar
        */
        scrollbar-width: none;

        overscroll-behavior-x: contain;
    }

    .magazine-slider::-webkit-scrollbar {
        display: none;
    }


    /* =========================
       ONE CARD PER SLIDE
    ========================== */

    .magazine-item {

        flex: 0 0 calc(100% - 25px);

        width: calc(100% - 25px);

        padding: 0;

        scroll-snap-align: start;
        scroll-snap-stop: always;
    }


    /* =========================
       CARD
    ========================== */

    .magazine-modern-card {
        padding: 9px;

        border-radius: 13px;
    }


    /* =========================
       FIXED MOBILE IMAGE
    ========================== */

    .magazine-cover {

        width: 100%;

        /*
           EVERY IMAGE SAME HEIGHT
        */
        height: 430px;

        border-radius: 10px;
    }


    .magazine-cover img {

        width: 100%;
        height: 100%;

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

        /*
           FULL IMAGE VISIBLE
           NO CROP
        */
        object-fit: contain;

        object-position: center center;
    }


    /* =========================
       CONTENT
    ========================== */

    .magazine-card-content {
        padding: 14px 3px 3px;
    }

    .magazine-small {
        font-size: 9px;
    }

    .magazine-title {
        font-size: 15px;
    }


    /* =========================
       BUTTONS
    ========================== */

    .magazine-card-actions {

        gap: 6px;

        margin-top: 13px;
    }

    .magazine-view-link,
    .magazine-get-started {

        min-height: 40px;

        padding: 8px 5px;

        font-size: 10px;

        gap: 4px;
    }

    .magazine-view-link i,
    .magazine-get-started i {
        font-size: 10px;
    }


    /* =========================
       MOBILE HOVER
    ========================== */

    .magazine-hover {
        opacity: 1;

        background: linear-gradient(
            to top,
            rgba(17, 17, 17, 0.45),
            transparent 35%
        );

        align-items: flex-end;

        justify-content: center;

        padding-bottom: 15px;
    }

    .magazine-hover span {

        padding: 8px 13px;

        font-size: 11px;

        transform: translateY(0);
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .magazine-slider {

        padding-left: 15px;
        padding-right: 15px;

        gap: 14px;
    }

    .magazine-item {

        flex: 0 0 calc(100% - 10px);

        width: calc(100% - 10px);
    }

    .magazine-cover {
        height: 395px;
    }

    .magazine-modern-card {
        padding: 8px;
    }

    .magazine-card-content {
        padding: 13px 2px 2px;
    }

    .magazine-get-started,
    .magazine-view-link {
        font-size: 9.5px;
        padding-left: 4px;
        padding-right: 4px;
    }

}


/* =========================================================
   VERY SMALL DEVICES
========================================================= */

@media (max-width: 330px) {

    .magazine-cover {
        height: 360px;
    }

    .magazine-card-actions {
        gap: 5px;
    }

    .magazine-get-started,
    .magazine-view-link {
        min-height: 38px;
        font-size: 9px;
    }

}

/* Set by client.js when there is nothing to scroll. */
