/* MAGAZINE ARCHIVE STYLES */
.magazine-container {
    padding-top: 30px;
    padding-bottom: 60px;
}

/* HERO SECTION */
.mag-hero {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 50px;
}

.mag-hero-left {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 500px;
}

.mag-hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.mag-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
}

.mag-hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.mag-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 80px 40px 40px;
    /* Natural vignette: transparent at top, readable dark at bottom */
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.75) 100%
    );
    color: #fff;
}

.mag-hero-content .mag-cat {
    display: inline-block;
    background: #8b5e3c;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.mag-hero-content h1 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.mag-hero-content p {
    font-size: 18px;
    color: #f0e8d8;
    margin-bottom: 25px;
    max-width: 600px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.read-btn {
    display: inline-block;
    background: #4a1c1c;
    color: #fff;
    padding: 10px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 40px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover,
.dot.active {
    background: #ffffff;
    transform: scale(1.25);
}

/* TRENDING WIDGET */
.trending-widget {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0e8dc;
    height: 100% !important;
    max-height: 500px !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.trending-widget h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    justify-content: space-around;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #333;
}

.trending-item img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
}

.trending-info strong {
    font-size: 14px;
    display: block;
    line-height: 1.4;
    margin-bottom: 5px;
}

.trending-info span {
    font-size: 11px;
    color: #999;
}

/* SECTION TITLES (100% MATCH WITH SCREENSHOT) */
.sec-title-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f2ea 100%);
    border: 1px solid #e8dfd1;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
    box-sizing: border-box;
    width: 100%;
}

.sec-title-flex h2 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.sec-title-flex .see-all,
.see-all {
    color: #222222 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.sec-title-flex .see-all:hover,
.see-all:hover {
    color: #2d5a27 !important;
}

/* SELECTED POSTS GRID */
.selected-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 60px;
}

.mag-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.mag-card:hover {
    transform: translateY(-5px);
}

.mag-card > a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 160px;
    background: #fbf9f6;
    overflow: hidden;
}

.mag-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.mag-card-content {
    padding: 20px;
}

.mag-card-content .cat {
    color: #8b5e3c;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.mag-card-content h3 {
    font-size: 17px;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.mag-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mag-author img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
}

.mag-author span {
    font-size: 11px;
    color: #888;
}

/* CATEGORY SECTION */
.cat-section-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.cat-box {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0e8dc;
    display: flex;
    flex-direction: column;
}

.cat-box-header {
    background: #fdfaf3;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.cat-box-header i {
    color: #2d5a27;
    font-size: 15px;
}

.cat-box-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.cat-main-img {
    display: block;
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
}

.cat-items-list {
    padding: 0 20px;
    flex: 1;
}

.cat-item-sm {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid #f8f6f0;
}

.cat-item-sm:last-child {
    border-bottom: none;
}

.cat-item-sm img {
    width: 50px !important;
    height: 50px !important;
    border-radius: 4px;
    object-fit: cover !important;
    flex-shrink: 0;
}

.cat-item-sm .info {
    flex: 1;
    min-width: 0;
}

.cat-item-sm .info strong {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    margin-bottom: 3px;
}

.cat-item-sm .info span {
    font-size: 11px;
    color: #888;
    display: block;
}

.cat-box-footer {
    padding: 14px 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background: #ffffff;
}

.cat-box-footer .see-all {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #222 !important;
    text-decoration: none !important;
    display: inline-block;
    transition: color 0.2s ease;
}

.cat-box-footer .see-all:hover {
    color: #2d5a27 !important;
}

/* BOTTOM BANNER */
.mag-bottom-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.life-hack-box {
    background: #fdfaf3;
    padding: 40px;
    border-radius: 15px;
    display: flex;
    gap: 30px;
    align-items: center;
}

.life-hack-box i {
    font-size: 40px;
    color: #e0d0b0;
}

.life-hack-text h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #4a1c1c;
}

.life-hack-text p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.newsletter-box {
    background: #f4ece1;
    padding: 40px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.newsletter-box h4 {
    font-size: 22px;
    margin-bottom: 15px;
}

.newsletter-box p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
    outline: none;
}

.newsletter-form button {
    background: #4a1c1c;
    color: #fff;
    border: none;
    padding: 0 25px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.mail-bg-icon {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 120px;
    color: rgba(0,0,0,0.03);
    transform: rotate(-15deg);
}

@media (max-width: 1279px) {
    .selected-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cat-section-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 799px) {
    .mag-hero {
        grid-template-columns: 1fr;
    }
    .mag-hero-left {
        height: 380px !important;
    }
    .trending-widget {
        height: auto !important;
        max-height: none !important;
    }
    .mag-bottom-banner {
        grid-template-columns: 1fr;
    }
}

/* FEATURED NEWS SECTION (EXACT MATCH WITH SCREENSHOT) */
.mag-featured-layout {
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mag-featured-top-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 25px;
}

.mag-hero-card-wide {
    position: relative;
    background: #000000;
    border-radius: 6px;
    overflow: hidden;
    height: 380px;
}

.mag-hero-card-wide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.mag-hero-card-wide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.mag-hero-card-wide:hover img {
    transform: scale(1.03);
}

.mag-hero-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 70px 25px 22px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    box-sizing: border-box;
}

.mag-hero-card-overlay h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.mag-hero-card-overlay h2 a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.mag-hero-card-overlay .mag-hero-card-excerpt {
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.mag-hero-card-overlay .mag-post-meta {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 500;
}

.mag-featured-card-side {
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mag-card-img-wrap {
    display: block;
    width: 100%;
    height: 195px;
    overflow: hidden;
}

.mag-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.mag-featured-card-side:hover .mag-card-img-wrap img,
.mag-featured-card-col:hover .mag-card-img-wrap img {
    transform: scale(1.04);
}

.mag-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mag-card-body h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px 0;
}

.mag-card-body h3 a {
    color: #111111;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mag-card-body h3 a:hover {
    color: #2d5a27;
}

.mag-card-body p {
    font-size: 13px;
    color: #555555;
    line-height: 1.55;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.mag-post-meta {
    font-size: 12px;
    color: #888888;
    display: block;
}

.mag-featured-bottom-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.mag-featured-card-col {
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mag-featured-card-col .mag-card-img-wrap {
    height: 180px;
}

@media (max-width: 991px) {
    .mag-featured-top-row {
        grid-template-columns: 1fr;
    }
    .mag-featured-bottom-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .mag-featured-bottom-row {
        grid-template-columns: 1fr;
    }
    .mag-hero-card-wide {
        height: 280px;
    }
    .mag-hero-card-overlay h2 {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .selected-posts-grid {
        grid-template-columns: 1fr;
    }
    .cat-section-grid {
        grid-template-columns: 1fr;
    }
    .mag-hero-content h1 {
        font-size: 30px;
    }
}

/* FORCE ALL IMAGES IN MAG-HERO AND MAG-FEATURED SECTIONS TO FIT PERFECTLY IN THEIR CONTAINERS */
.mag-hero img,
.mag-hero-left img,
.mag-hero-slide img,
.mag-featured-layout img,
.mag-hero-card-wide img,
.mag-card-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    max-width: 100% !important;
    display: block !important;
}

.trending-item img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
}

/* Force the Elementor section container to be full-width so our inner container can center at 1280px / 90% */
.elementor-section:has(.magazine-container) > .elementor-container,
.e-con:has(.magazine-container) > .e-con-inner {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Force the magazine widget container to align with the main menu margins */
body .elementor-widget .magazine-container.container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* =========================================================================
   NEW MAGAZINE ARCHIVE RESTUCTURING DESIGN STYLES
   ========================================================================= */

/* Header & Navigation */
.mag-archive-header-container {
    margin-bottom: 25px;
}

.mag-archive-logo-wrapper {
    text-align: left;
    padding: 10px 0 15px 0;
}

.mag-archive-logo {
    margin: 0;
}

.mag-archive-logo a {
    text-decoration: none;
    color: #e31e24; /* Red color matching screenshot */
    font-size: 38px;
    font-weight: 800;
    font-family: 'Hind Siliguri', 'Noto Serif Bengali', serif;
    letter-spacing: -0.5px;
}

.mag-archive-nav-wrapper {
    border-top: 1px solid #eef2f5;
    border-bottom: 1px solid #eef2f5;
    padding: 10px 0;
    margin-bottom: 30px;
    background: #ffffff; /* Make navigation background white */
}

.mag-archive-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 0 20px;
    gap: 15px;
}

.mag-archive-nav li {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.mag-archive-nav li:not(:last-child)::after {
    content: "•";
    color: #0088cc;
    font-size: 14px;
    pointer-events: none;
}

.mag-archive-nav a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.3s ease;
    font-family: 'Hind Siliguri', sans-serif;
}

.mag-archive-nav li.active a,
.mag-archive-nav a:hover {
    color: #0088cc;
}

.mag-archive-nav li.active a {
    font-weight: 700;
    border-bottom: 2px solid #0088cc;
    padding-bottom: 2px;
}

/* Layout Grid Container */
.mag-archive-grid-wrapper {
    margin-bottom: 40px;
}

.mag-archive-grid-container {
    display: flex;
    gap: 35px;
    align-items: flex-start;
}

.mag-archive-main-content {
    flex: 1;
    width: calc(100% - 385px);
    min-width: 0;
}

.mag-archive-sidebar {
    width: 350px;
    flex-shrink: 0;
}

/* AJAX Grid Wrapper & Loading transition */
#magazine-ajax-grid-container {
    width: 100%;
    min-width: 0;
    transition: opacity 0.3s ease;
}

/* 2 Row Grid Layout */
.mag-grid-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mag-grid-row-top {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 25px;
}

.mag-grid-row-bottom {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

/* Large Featured Post Card */
.mag-post-large {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 440px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.mag-post-large-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.mag-post-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.mag-post-large:hover img {
    transform: scale(1.02);
}

.mag-post-large-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 25px 25px;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.88) 100%);
    color: #fff;
    box-sizing: border-box;
    z-index: 10;
}

.mag-post-large-overlay h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    font-family: 'Hind Siliguri', 'Noto Serif Bengali', serif;
}

.mag-post-meta {
    font-size: 12px;
    color: #999;
}

.mag-post-large-overlay .mag-post-meta {
    color: rgba(255,255,255,0.85);
}

/* Medium Card */
.mag-post-medium {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.mag-post-medium:hover,
.mag-post-small:hover {
    transform: translateY(-3px);
}

.mag-post-medium a,
.mag-post-small a,
.mag-slide-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mag-post-medium-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.mag-post-medium-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-badge-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #e31e24;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2;
}

.mag-post-medium-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mag-post-medium-content h3 {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.4;
    font-family: 'Hind Siliguri', 'Noto Serif Bengali', serif;
}

.mag-post-medium-content p {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

/* Small Cards Row */
.mag-post-small {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.mag-post-small-img {
    height: 150px;
    overflow: hidden;
}

.mag-post-small-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-post-small-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mag-post-small-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.4;
    font-family: 'Hind Siliguri', 'Noto Serif Bengali', serif;
}

.mag-post-small-content p {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

/* Sidebar Styling */
.mag-sidebar-ad-wrapper {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.mag-ad-placeholder {
    position: relative;
    background: #eef2f5;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mag-ad-placeholder img,
.mag-ad-banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ad-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* Tab Switcher in Sidebar */
.mag-sidebar-tabs-container {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f0f3f6;
}

.mag-tabs-header {
    display: flex;
    border-bottom: 2px solid #eef2f5;
    margin-bottom: 20px;
    gap: 20px;
}

.mag-tab-btn {
    background: none;
    border: none;
    font-size: 17px;
    font-weight: 700;
    color: #a0abb6;
    padding-bottom: 10px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    font-family: 'Hind Siliguri', sans-serif;
}

.mag-tab-btn.active {
    color: #e31e24;
}

.mag-tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e31e24;
}

.mag-tab-content {
    display: none;
}

.mag-tab-content.active {
    display: block;
}

.mag-tabbed-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mag-tabbed-posts-list li {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding-bottom: 15px;
    border-bottom: 1px solid #f8fafb;
}

.mag-tabbed-posts-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mag-list-num {
    font-size: 24px;
    font-weight: 800;
    color: #cfd8dc;
    line-height: 1;
    flex-shrink: 0;
    width: 25px;
    text-align: center;
    font-family: 'Hind Siliguri', sans-serif;
}

.mag-list-item-content {
    flex: 1;
}

.mag-list-item-content a {
    text-decoration: none;
    color: #2c3e50;
    font-size: 14.5px;
    line-height: 1.4;
    display: block;
    font-weight: 600;
    font-family: 'Hind Siliguri', sans-serif;
}

.mag-list-item-content a:hover {
    color: #e31e24;
}

.mag-list-badge {
    color: #e31e24;
    font-weight: 700;
    margin-right: 4px;
}

/* Slider Section (Bottom) */
.mag-archive-slider-wrapper {
    padding: 50px 0;
    border-top: 1px solid #eef2f5;
    margin-top: -30px;
    background: #ffffff !important; /* Make background white */
}

.mag-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #56b4e9 !important; /* light blue/cyan line */
    padding-bottom: 8px;
    margin-bottom: 25px;
}

.mag-slider-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    position: relative;
    padding-bottom: 8px;
    font-family: 'Hind Siliguri', 'Noto Serif Bengali', serif;
}

.mag-slider-header h2::after {
    display: none !important; /* remove original red underline highlight */
}

.mag-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.75) !important;
    color: #ffffff !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    transition: all 0.3s ease;
}

.mag-slider-btn:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    color: #ffffff !important;
}

.mag-slider-btn.prev {
    left: -20px !important;
}

.mag-slider-btn.next {
    right: -20px !important;
}

.mag-slider-track-container {
    overflow: visible; /* allow chevrons to overlap outside the bounds */
    width: 100%;
    position: relative;
}

.mag-slider-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 10px;
}

.mag-slider-track::-webkit-scrollbar {
    display: none;
}

.mag-slide-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: #f4f8fa !important; /* light blue-gray background */
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: transform 0.3s ease;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}

.mag-slide-card:hover {
    transform: translateY(-3px);
}

.mag-slide-img {
    height: 160px;
    overflow: hidden;
}

.mag-slide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-slide-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    justify-content: space-between;
}

.mag-slide-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
    font-family: 'Hind Siliguri', 'Noto Serif Bengali', serif;
}

.mag-slide-content p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.mag-slide-content .date {
    font-size: 11px;
    color: #999;
    font-family: 'Hind Siliguri', sans-serif;
}

.mag-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.mag-slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mag-slider-dot.active {
    background: #e31e24;
}

/* Responsiveness overrides */
@media (max-width: 1024px) {
    .mag-archive-grid-container {
        flex-direction: column;
    }
    .mag-archive-main-content {
        width: 100%;
    }
    .mag-archive-sidebar {
        width: 100%;
    }
    .mag-sidebar-ad-wrapper {
        text-align: center;
    }
    .mag-ad-placeholder, .mag-ad-banner-img {
        max-width: 350px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .mag-grid-row-top {
        grid-template-columns: 1fr;
    }
    .mag-post-large {
        height: 350px;
    }
    .mag-grid-row-bottom {
        grid-template-columns: 1fr;
    }
}

/* White background for the elementor parent container inner wrappers on the magazine page */
.elementor-element[data-id="e_con_header"] > .e-con-inner,
.elementor-element[data-id="e_con_grid"] > .e-con-inner,
.elementor-element[data-id="e_con_slider"] > .e-con-inner,
#e_con_header .e-con-inner,
#e_con_grid .e-con-inner,
#e_con_slider .e-con-inner {
    background-color: #ffffff !important;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    padding: 0px 25px !important;
    margin-bottom: 5px !important;
    box-sizing: border-box;
}

/* Make sure container itself is transparent/unpadded so white box stands out */
.elementor-element[data-id="e_con_header"],
.elementor-element[data-id="e_con_grid"],
.elementor-element[data-id="e_con_slider"] {
    background: transparent !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    .mag-slider-btn.prev {
        left: 5px !important;
    }
    .mag-slider-btn.next {
        right: 5px !important;
    }
}

:is(.elementor-section-wrap,[data-elementor-id])>.e-con {
    margin-top: 0px !important;
}

.magazine-container .elementor-widget,
.mag-archive-grid-container .elementor-widget,
.mag-archive-slider-wrapper .elementor-widget,
.elementor-element[data-id="e_con_header"] .elementor-widget,
.elementor-element[data-id="e_con_grid"] .elementor-widget,
.elementor-element[data-id="e_con_slider"] .elementor-widget {
    margin-top: 20px !important;
}

/* MAGAZINE / EDITOR 1280PX CONTAINER WIDTH ENFORCEMENT */
.elementor-section:has(.magazine-container) > .elementor-container,
.e-con:has(.magazine-container) > .e-con-inner,
.elementor-element[data-id="e_con_header"] > .e-con-inner,
.elementor-element[data-id="e_con_grid"] > .e-con-inner,
.elementor-element[data-id="e_con_slider"] > .e-con-inner,
#e_con_header .e-con-inner,
#e_con_grid .e-con-inner,
#e_con_slider .e-con-inner,
.magazine-container,
.mag-archive-grid-container,
.mag-archive-slider-wrapper {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}


