/* Main Grid 1 Styles */

.main-grid-1-wrap {
    max-width: 1200px;
    margin: 15px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.main-grid-1-item {
    display: flex;
    align-items: stretch;
    /* Stretch for equal height */
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    /* Card Style */
    border: 1px solid #e5e5e5;
    border-radius: 15px;
    background-color: #f6f7f8;
    padding: 20px;
    box-sizing: border-box;
    /* Ensure padding doesn't overflow width */
}

/* Odd: Image Left, Text Right (Default Flex Row) */
.main-grid-1-item.odd {
    flex-direction: row;
}

/* Even: Image Right, Text Left (Flex Row Reverse) */
.main-grid-1-item.even {
    flex-direction: row-reverse;
}

/* Image Area */
.grid-1-image {
    width: 50%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    /* Aspect Ratio 16:9 for PC */
    aspect-ratio: 16 / 9;
}

.grid-1-image .img-link {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.grid-1-image:hover .img-link {
    transform: scale(1.05);
    /* Zoom effect */
}

/* Content Area */
.grid-1-content {
    width: 50%;
    padding: 10px 0;
    /* Vertical padding for alignment */
    display: flex;
    /* Flex column for content distribution */
    flex-direction: column;
    justify-content: space-between;
}

.grid-1-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.4;
    word-break: keep-all;
    margin-top: 0;
}

.grid-1-title a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

.grid-1-title a:hover {
    color: #555;
}

.grid-1-excerpt {
    font-size: 17px;
    /* Increased by 2px */
    color: #555;
    /* Darker tone */
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    /* 5 lines limit */
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta Data */
.grid-1-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
    color: #666;
}

/* Align date to the right for Even items (next to image which is on the right) */
.main-grid-1-item.even .grid-1-meta {
    justify-content: flex-end;
}

.meta-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.meta-cat {
    display: inline-block;
}

.meta-cat a {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f0f0f0;
    color: #555;
    border-radius: 4px;
    /* Slight rounding on corners */
    text-decoration: none;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
}

.meta-cat a:hover {
    background-color: #e0e0e0;
    color: #333;
}


/* Mobile Responsive */
/* Category (Hidden on Desktop) */
.grid-1-cat-top {
    display: none;
    font-size: 15px;
    font-weight: 500;
    color: #111;
    margin-bottom: 8px;
}

.grid-1-cat-top a {
    text-decoration: none;
    color: inherit;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-grid-1-wrap {
        margin: 10px auto;
        padding: 0 16px;
        gap: 25px;
    }

    .main-grid-1-item,
    .main-grid-1-item.odd,
    .main-grid-1-item.even {
        flex-direction: column;
        /* Stacked */
        align-items: flex-start;
        padding: 20px;
        gap: 0;
		border-radius: 15px 15px 0 0;
        /* Reset gap, control via padding/margin */
    }

    /* Image Full Width */
    .grid-1-image {
        width: 100%;
        aspect-ratio: 16 / 9;
        /* Card standard */
        border-radius: 10px;
        /* Adjust radius if needed */
        margin-bottom: 20px;
    }

    /* Content Full Width */
    .grid-1-content {
        width: 100%;
        padding: 0;
        display: block;
        /* Reset flex column if not needed, or keep to manage order */
    }

    /* Show Category */
    .grid-1-cat-top {
        display: inline-block;
    }

    .grid-1-title {
        font-size: 21px;
        /* Adjust mobile title size */
        margin-bottom: 10px;
    }

    .grid-1-excerpt {
        display: -webkit-box;
        font-size: 17px;
        color: #666;
		margin-top: 20px;
        margin-bottom: 15px;
        -webkit-line-clamp: 3;
        /* Limit mobile lines */
        line-clamp: 3;
    }

    /* Date Bottom Right */
    .grid-1-meta {
        justify-content: flex-end;
        /* Always right on mobile */
        width: 100%;
		font-size: 14px;
		font-weight: 500;
    }

    /* Reset Even specific alignment since we have global right align for mobile */
    .main-grid-1-item.even .grid-1-meta {
        justify-content: flex-end;
    }
}