/* =========================================
   TOP AUTHORS SECTION - ISOLATED CSS
========================================= */

.top-authors-section,
.top-authors-section * {
    box-sizing: border-box;
}

.top-authors-section {
    width: 100%;
    padding: 70px 20px;
    background: linear-gradient(135deg, #f7f9fc, #ffffff);
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
}

.top-authors-section .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Section Heading */
.top-authors-section .section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 45px;
    line-height: 1.4;
}

.top-authors-section .section-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    margin: 12px auto 0;
    background: #2563eb;
    border-radius: 30px;
}

/* Carousel */
.top-authors-section #authorCarousel {
    position: relative;
    width: 100%;
    padding: 0 45px;
}

.top-authors-section #authorCarouselContent {
    width: 100%;
}

.top-authors-section .carousel-item {
    padding: 20px 0;
}

.top-authors-section .carousel-item .d-flex {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 25px;
}

/* Author Card */
.top-authors-section .author-card {
    position: relative;
    width: 33.333%;
    max-width: 350px;
    min-width: 0;
    padding: 30px 22px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.top-authors-section .author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.13);
}

/* Card Top Border */
.top-authors-section .author-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #2563eb;
}

/* Author Image */
.top-authors-section .author-card img {
    display: block;
    width: 115px;
    height: 115px;
    max-width: 100%;
    margin: 0 auto 20px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: 4px solid #2563eb;
    padding: 3px;
    background: #ffffff;
}

/* Author Name */
.top-authors-section .author-card h4 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Author Description */
.top-authors-section .author-card p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* Top Author Badge */
.top-authors-section .author-card::after {
    content: "Top Author";
    position: absolute;
    top: 15px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 30px;
    background: #2563eb;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
}

/* Previous / Next Buttons */
.top-authors-section #authorCarousel .carousel-control-prev,
.top-authors-section #authorCarousel .carousel-control-next {
    position: absolute;
    top: 50%;
    width: 42px;
    height: 42px;
    padding: 0;
    opacity: 1;
    transform: translateY(-50%);
    border: none;
    border-radius: 50%;
    background: #0b2b4c;
    transition: background 0.3s ease;
}

.top-authors-section #authorCarousel .carousel-control-prev {
    left: 0;
}

.top-authors-section #authorCarousel .carousel-control-next {
    right: 0;
}

.top-authors-section #authorCarousel .carousel-control-prev:hover,
.top-authors-section #authorCarousel .carousel-control-next:hover {
    background: #2563eb;
}

.top-authors-section .carousel-control-prev-icon,
.top-authors-section .carousel-control-next-icon {
    width: 18px;
    height: 18px;
    background-size: 100% 100%;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 991.98px) {
    .top-authors-section {
        padding: 60px 15px;
    }

    .top-authors-section .section-title {
        font-size: 32px;
    }

    .top-authors-section #authorCarousel {
        padding: 0 35px;
    }

    .top-authors-section .carousel-item .d-flex {
        gap: 18px;
    }

    .top-authors-section .author-card {
        width: calc(50% - 9px);
        max-width: 320px;
        padding: 28px 18px;
    }

    .top-authors-section .author-card img {
        width: 100px;
        height: 100px;
    }
}

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

@media (max-width: 767.98px) {
    .top-authors-section {
        padding: 45px 12px;
    }

    .top-authors-section .section-title {
        font-size: 27px;
        margin-bottom: 25px;
    }

    .top-authors-section #authorCarousel {
        padding: 0 30px;
    }

    .top-authors-section .carousel-item {
        padding: 15px 0;
    }

    .top-authors-section .carousel-item .d-flex {
        flex-wrap: nowrap;
        gap: 0;
    }

    .top-authors-section .author-card {
        width: 100%;
        max-width: 330px;
        padding: 28px 18px;
        margin: 0 auto;
    }

    .top-authors-section .author-card img {
        width: 95px;
        height: 95px;
        margin-bottom: 18px;
    }

    .top-authors-section .author-card h4 {
        font-size: 18px;
    }

    .top-authors-section .author-card p {
        font-size: 13px;
        line-height: 1.7;
    }

    .top-authors-section #authorCarousel .carousel-control-prev,
    .top-authors-section #authorCarousel .carousel-control-next {
        width: 32px;
        height: 32px;
    }

    .top-authors-section .carousel-control-prev-icon,
    .top-authors-section .carousel-control-next-icon {
        width: 14px;
        height: 14px;
    }
}

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

@media (max-width: 380px) {
    .top-authors-section .section-title {
        font-size: 23px;
    }

    .top-authors-section #authorCarousel {
        padding: 0 25px;
    }

    .top-authors-section .author-card {
        padding: 25px 14px;
    }

    .top-authors-section .author-card::after {
        top: 12px;
        right: 8px;
        font-size: 9px;
    }
}