/* Blog Page Styles */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: #f2f2f2;
}

/* Blog page container - scoped to avoid conflicts */
.blog-container,
.blog-container.container {
    max-width: 1300px;
    margin-top: 80px;
    margin-bottom: auto;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
}

.blog-section {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    padding: 7rem 4rem;
    background: linear-gradient(to right, #efc28e, #94c949);
    border-radius: 1rem;
    position: relative;
    margin-top: 4rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    color: #004d40;
}

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 1.8rem;
    }
}

.blog-header span {
    color: white;
}

.arrows {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.arrows button {
    font-size: 2rem;
    background: #e0f7fa;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #004d40;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.arrows button:hover {
    transform: scale(1.1);
}

.carousel-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.carousel-container::-webkit-scrollbar {
    height: 6px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    min-width: 360px;
    max-width: 400px;
    scroll-snap-align: start;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
}

.card img {
    width: 100%;
    height: 54%;
    object-fit: cover;
}

.content {
    padding: 1.2rem;
}

.content .tag {
    font-size: 0.85rem;
    font-weight: bold;
    color: #009688;
}

.content h2 {
    font-size: 1.3rem;
    color: #003F63;
    margin-top: 0.5rem;
}

.content .desc {
    font-size: 1rem;
    color: #555;
    margin-top: 0.5rem;
}

.content a {
    display: inline-block;
    margin-top: 1rem;
    color: #00796b;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.3s;
}

.title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.title-section h1 {
    font-size: 2.6rem;
    color: #002b5c;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .title-section h1 {
        font-size: 1.8rem;
    }
}

.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.filter-bar form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.search-input {
    border: 1px solid #ccc;
    min-width: 220px;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    flex: 1;
    min-width: 150px;
}

@media (max-width: 768px) {
    .filter-bar form {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
        min-width: 100%;
    }
    
    .filter-bar .btn {
        width: 100%;
    }
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 128, 128, 0.15);
}

.post-card img {
    width: 100%;
    height: 280px;
    object-fit: fill;
}

@media (max-width: 768px) {
    .post-card img {
        height: 200px;
    }
}

.post-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    padding: 1rem;
}

.post-title {
    font-size: 1.2rem;
    color: #002b5c;
    margin: 0.4rem 0;
}

.meta-title {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.meta {
    font-size: 0.85rem;
    color: #777;
}

.read-more {
    color: #008080;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.read-more::after {
    content: '→';
    display: inline-block;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: #004d40;
}

.read-more:hover::after {
    transform: translateX(6px);
}

.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a {
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    border-radius: 6px;
    color: #00796b;
}

.pagination a.active {
    font-weight: bold;
    color: #002b5c;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .blog-container,
    .blog-container.container {
        padding: 0.75rem;
    }
    
    .blog-section {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        margin-top: 2rem;
        gap: 1.5rem;
    }
    
    .blog-header {
        text-align: center;
    }
    
    .arrows {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .arrows button {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
    
    .carousel-container {
        gap: 1rem;
        padding-bottom: 0.5rem;
        /* Ensure only one card is visible at a time on mobile */
        scroll-padding: 0;
        /* Prevent showing partial cards */
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
    }

    .card {
        /* On mobile, each card takes full visible width of container */
        width: calc(100% - 0.5rem);
        min-width: calc(100% - 0.5rem);
        max-width: calc(100% - 0.5rem);
        flex-shrink: 0;
        scroll-snap-align: center;
    }
    
    .card img {
        height: 180px;
    }
    
    .content {
        padding: 1rem;
    }
    
    .content h2 {
        font-size: 1.1rem;
    }
    
    .content .desc {
        font-size: 0.9rem;
    }
    
    .title-section {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }
    
    .title-section h1 {
        width: 100%;
    }
    
    .post-title {
        font-size: 1.1rem;
    }
    
    .meta-title {
        font-size: 0.85rem;
    }
    
    .meta {
        font-size: 0.8rem;
    }
    
    .pagination {
        margin-top: 2rem;
        gap: 0.25rem;
    }
    
    .pagination a {
        padding: 0.35rem 0.6rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .blog-container,
    .blog-container.container {
        padding: 0.5rem;
    }
    
    .blog-section {
        padding: 1.5rem 1rem;
        border-radius: 0.5rem;
    }
    
        .card {
            /* On very small screens, ensure full width */
            width: calc(100% - 0.25rem);
            min-width: calc(100% - 0.25rem);
            max-width: calc(100% - 0.25rem);
        }
    
    .post-title {
        font-size: 1rem;
    }
    
    .pagination a {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
}

