:root {
    --primary-color: #1b73d8;
    --header-title-color: #2c3e50;
    --secondary-color: #e74c3c;
    --tertiary-color: #3498db;
    --bg-color: #f9f9f9;
    --blog-text-color: #2c3e50;
    --border-radius: 12px;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

body {
    /* background-color: var(--bg-color); */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.blog-portal {
    margin: 100px 0;
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.portal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--header-title-color);
    position: relative;
}

.portal-title::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.categories {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 5px;
}

.categories::-webkit-scrollbar {
    display: none;
}

.category {
    background-color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--header-title-color);
    cursor: pointer;
    transition: var(--transition-speed);
    border: 1px solid #e1e1e1;
    white-space: nowrap;
}

.category.active {
    background-color: var(--header-title-color);
    color: white;
}

.category:hover:not(.active) {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.blog-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.blog-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
}

.blog-card:hover {
    text-decoration: none;
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

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

.blog-card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.blog-tags {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 2;
}

.blog-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.blog-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #6c757d;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    color: #6c757d;
    font-weight: 600;
    font-size: 14px;
}

.author-date {
    font-size: 10px;
    color: #6c757d;
}

.blog-card-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--header-title-color);
    transition: color var(--transition-speed);
}

.blog-card:hover .blog-card-title {
    color: var(--tertiary-color);
}

.blog-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #4a4a4a;
    margin-bottom: 10px;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tertiary-color);
    transition: gap var(--transition-speed);
}

.blog-card:hover .read-more {
    gap: 10px;
}

.stats {
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
}

.stats-author-name {
    font-weight: bold;
    color: inherit;
    margin-left: 4px;
    margin-right: 8px;
}

.blog-featured {
    position: relative;
    background: linear-gradient(135deg, #3a1c71, #d76d77, #ffaf7b);
    padding: 20px;
    border-radius: var(--border-radius);
    color: white;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: transform var(--transition-speed);
    text-decoration: none;
}

.blog-featured:hover {
    transform: translateY(-6px);
    text-decoration: none;
}

.blog-featured::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect x="0" y="0" width="50" height="50" fill="rgba(255,255,255,0.03)"/><rect x="50" y="50" width="50" height="50" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: 20px;
    opacity: 0.6;
}

.blog-featured-label {
    display: inline-block;
    background-color: #ff3b30;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.blog-featured-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.blog-featured-time {
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.pulse {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ff3b30;
    box-shadow: 0 0 0 rgba(255, 59, 48, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 59, 48, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .portal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .blog-card-image {
        height: 180px;
    }

    .blog-featured-title {
        font-size: 22px;
    }
}

/* Loading effect animation */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.shimmer-effect {
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-name: shimmer;
    animation-timing-function: linear;
    background: linear-gradient(to right, #f6f6f6 8%, #f0f0f0 18%, #f6f6f6 33%);
    background-size: 800px 104px;
    position: relative;
}
