
h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 40px;
    margin-top: 40px;
}

.card-item-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.card-link {
    text-decoration: none;
    color: inherit;
    perspective: 1000px;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    border:none;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    /* background: #f2e7d8; */
    /* box-shadow: 0 15px 25px rgba(0, 0, 0, 0.05); */
    box-shadow: 0 0 20px 5px rgb(224 243 255 / 70%);
}

.card:hover {
    background-color: #fff;
    /* transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 40px rgba(0, 0, 0, 0.2); */
}
.card img {
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
}

.card:hover img {
    transform: rotateY(180deg);
}

.card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    transition: transform 0.5s ease;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* .card:hover img {
    transform: scale(1.05);
} */

.card-body {
    padding: 11px;
    text-align: center;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    line-height: normal;
}

.card-desc {
    font-size: 14px;
    color: #777;
}

@media (max-width: 600px) {
    .card img {
        height: 100px;
    }
}
/* === Section Heading === */
h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 40px;
    margin-top: 40px;
}

/* .card-item-container,
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
} */

.card-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card-item .blog-image {
    position: relative;
    overflow: hidden;
}

.card-item .blog-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-item:hover .blog-image img {
    transform: scale(1.05); 
}

.blog-categories {
    position: absolute;
    top: 15px;
    left: 15px;
}

.blog-categories .categories-btn {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-item .p-35px {
    padding: 25px;
    text-align: left;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #222;
    line-height: 1.3;
    display: block;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.card-title:hover {
    color: #000;
    /* text-decoration: underline; */
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* ========== AUTHOR SECTION ========== */
.author {
    display: flex;
    justify-content: space-between; /* spread date and like count */
    align-items: center; /* vertically center */
    font-size: 14px;
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 12px;
    flex-direction: row; /* date block left, like count right */
}

.author .author-info {
    display: flex;
    flex-direction: column; /* keeps date and name stacked */
}

/* Default state: show date, hide author-name */
.author .author-info span {
    opacity: 1;
    max-height: 40px;
    transition: all 0.4s ease;
}
.author .author-info .author-name {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    text-align: start;
}

/* Hover state: hide date, show author-name */
.author .author-info:hover span {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}
.author .author-info:hover .author-name {
    opacity: 1;
    max-height: 40px;
    margin-top: 3px;
}

.author .author-name a {
    font-weight: 500;
    color: #444;
    transition: all 0.3s ease;
    font-size:12px;
    /* text-decoration: underline; */
    text-decoration-thickness: 2px;
}

.author .author-name {
    display: flex;
    align-items: center;
    gap: 5px; /* space between icon and text */
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.author .author-name i {
    color: #e63946; /* red pin (match heart color) */
    font-size: 14px;
}


/* Like Count */
.like-count {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.like-count a {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #444;
    font-weight: bold;
}

.like-count i {
    font-size: 16px;
    color: #e63946;
}
