/* =========================
   GLOBAL RESET / BASE
========================= */
body {
    overflow-x: hidden;
}
.carousel-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 1rem;
    border-radius: 8px;
}
.containerMainpage {
    padding: 1rem;
}
.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* =========================
   CAROUSEL
========================= */
#carouselExampleCaptions {
    margin-bottom: 2rem;
}

.carousel-inner {
    border-radius: 12px;
    overflow: hidden;
}

.carousel-item {
    position: relative;
    height: 60vh;
    min-height: 300px;
}

    .carousel-item img {
        object-fit: cover;
        height: 100%;
        width: 100%;
    }

    /* Dark overlay for readability */
    .carousel-item::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 1;
    }

/* Caption styling */
.carousel-caption {
    z-index: 2;
    bottom: 20%;
    text-align: left;
}

    .carousel-caption h5 {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .carousel-caption p {
        font-size: 0.9rem;
    }

/* Controls */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 60%;
}

/* Indicators */
.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* =========================
   SEARCH BAR
========================= */
.ArticlefloatingSearch {
    padding: 0.75rem 1.2rem;
    font-size: 1rem;
}

/* =========================
   ARTICLES GRID
========================= */
.Articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* =========================
   CARD DESIGN
========================= */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
}

.card-subtitle {
    font-size: 0.9rem;
    color: #666;
}

/* =========================
   ARTICLE PAGE
========================= */
.Article {
    max-width: 900px;
    margin: auto;
}

.headerImage img {
    border-radius: 10px;
    margin: 1rem 0;
}

.ArticleDevlopment {
    line-height: 1.7;
    font-size: 1.05rem;
}

/* =========================
   COMMENT BOX
========================= */
.commentbox .card {
    border-radius: 12px;
}

.savecommentbtn {
    width: 100%;
}

/* =========================
   SUGGESTIONS
========================= */
.suggestionsBox {
    margin-top: 2rem;
}

/* =========================
   ARTICLE PRESENTATION LIST
========================= */
.articlePresention {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.article-image-card img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.pres-content {
    flex: 1;
}

.article-link {
    font-weight: bold;
    text-decoration: none;
    color: #000;
}

    .article-link:hover {
        text-decoration: underline;
    }

/* =========================
   MOBILE (<= 768px)
========================= */
@media (max-width: 768px) {

    .carousel-item {
        height: 40vh;
    }

    .carousel-caption {
        bottom: 10%;
    }

        .carousel-caption h5 {
            font-size: 1.1rem;
        }

        .carousel-caption p {
            font-size: 0.8rem;
        }

    .articlePresention {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-image-card img {
        width: 100%;
        height: auto;
    }

    .Articles {
        grid-template-columns: 1fr;
    }
}

/* =========================
   TABLET (769px - 1024px)
========================= */
@media (min-width: 769px) and (max-width: 1024px) {

    .carousel-item {
        height: 50vh;
    }

    .Articles {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================
   LARGE SCREENS (>= 1200px)
========================= */
@media (min-width: 1200px) {

    .carousel-item {
        height: 70vh;
    }

    .carousel-caption h5 {
        font-size: 2rem;
    }

    .Articles {
        grid-template-columns: repeat(3, 1fr);
    }
}
