.content-section {
    background: white;
	border-radius: 15px;
	padding: 30px;
	margin: 30px 15px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
    border-left: 4px solid #4AC4FA;
    padding-left: 15px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 固定3列 */
    gap: 1.25rem;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    min-width: 280px;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-image-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 寬高比 */
    overflow: hidden;
}

.post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /*height: 100% !important;*/
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.post-content {
    padding: 1.25rem;
    border-top: 1px solid #eee;
}

.post-date {
    color: #999;
    margin-bottom: 0.5rem;
}

.post-content p {
    color: #333;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
  
/* 響應式設計 */
@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(1, 1fr);
        padding: 0 1rem;
    }
    
    .latest-posts-section {
        padding: 1rem 0;
    }
    
    .post-card {
        margin-bottom: 1rem;
    }
}

/* 確保橫向滾動時的平滑效果 */
@media (max-width: 992px) {
    .posts-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding-bottom: 1rem; /* 為滾動條留出空間 */
    }
    
    .post-card {
        flex: 0 0 300px;
        margin-right: 1.25rem;
        scroll-snap-align: start;
    }
    
    /* 美化滾動條 */
    .posts-grid::-webkit-scrollbar {
        height: 6px;
    }
    
    .posts-grid::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    
    .posts-grid::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }
    
    .posts-grid::-webkit-scrollbar-thumb:hover {
        background: #999;
    }
}

/* basic theme */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px;
}

.post-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 180px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* not(:has(.post-image-wrapper)) */
.morning-theme:not(:has(.post-image-wrapper)) {
    background: linear-gradient(135deg, #87CEEB, #40E0D0);
    color: #1A5276;
}

.noon-theme:not(:has(.post-image-wrapper)) {
    background: linear-gradient(135deg, #FFE5C0, #FFB6C1);
    color: #644B49;
}

.sunset-theme:not(:has(.post-image-wrapper)) {
    background: linear-gradient(135deg, #FF7F50, #6A5ACD);
    color: white;
}

.evening-theme:not(:has(.post-image-wrapper)) {
    background: linear-gradient(135deg, #2C3E50, #3498DB);
    color: white;
}

.midnight-theme:not(:has(.post-image-wrapper)) {
    background: linear-gradient(135deg, #0F2027, #203A43);
    color: white;
}

.post-card:not(:has(.post-image-wrapper)) .post-content p {
	background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 20px;
}

.midnight-theme:not(:has(.post-image-wrapper)) .post-content p, .evening-theme:not(:has(.post-image-wrapper)) .post-content p, .sunset-theme:not(:has(.post-image-wrapper)) .post-content p{
    color: #fff;
}

.time-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.time-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    margin-bottom: 12px;
}

.time-icon {
    margin-right: 6px;
    font-size: 1.1em;
}

.sun-rise {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #FFD700, transparent 70%);
    top: -30px;
    right: 20px;
    animation: sunrise 4s infinite;
}

.clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.3) 20px, transparent 30px),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.3) 30px, transparent 40px);
    animation: driftClouds 20s infinite linear;
}

.sun-peak {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 30px #FFD700;
    animation: pulseSun 3s infinite;
}

.heat-waves {
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.1) 10px,
        rgba(255,255,255,0.1) 20px
    );
    animation: heatWave 20s infinite linear;
}

.sunset-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at bottom,
        rgba(255,69,0,0.4),
        transparent 60%
    );
    animation: sunsetGlow 4s infinite;
}

.birds {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 70% 30%, transparent 8px, #000 9px, transparent 10px),
        radial-gradient(circle at 75% 35%, transparent 8px, #000 9px, transparent 10px);
    opacity: 0.3;
    animation: flyBirds 10s infinite linear;
}

.moon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #F5F5F5;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 10% 20%, white 100%, transparent),
        radial-gradient(1px 1px at 20% 50%, white 100%, transparent),
        radial-gradient(1px 1px at 30% 30%, white 100%, transparent);
    animation: twinkle 4s infinite;
}

.night-sky {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 15% 15%, white 100%, transparent),
        radial-gradient(1px 1px at 25% 45%, white 100%, transparent),
        radial-gradient(1px 1px at 35% 25%, white 100%, transparent),
        radial-gradient(1px 1px at 45% 65%, white 100%, transparent);
    opacity: 0.6;
}

.shooting-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shooting-stars::before,
.shooting-stars::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.1),
        0 0 0 2px rgba(255,255,255,0.1),
        0 0 2px rgba(255,255,255,0.5);
}

.shooting-stars::before {
    top: 20%;
    left: 80%;
    animation: shootingStarOne 4s infinite ease-in;
}

.shooting-stars::after {
    top: 40%;
    left: 60%;
    animation: shootingStarTwo 5s infinite ease-in;
}

.shooting-stars span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 20px 3px white;
    opacity: 0;
    filter: drop-shadow(0 0 6px white);
    animation: shootingStarThree 6s infinite ease-in;
}

@keyframes shootingStarOne {
    0% {
        transform: translate(0, 0) rotate(-45deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    20% {
        transform: translate(-200px, 200px) rotate(-45deg) scale(1);
        opacity: 0;
    }
    100% {
        transform: translate(-200px, 200px) rotate(-45deg) scale(1);
        opacity: 0;
    }
}

@keyframes shootingStarTwo {
    0% {
        transform: translate(0, 0) rotate(-45deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    20% {
        transform: translate(-150px, 150px) rotate(-45deg) scale(1);
        opacity: 0;
    }
    100% {
        transform: translate(-150px, 150px) rotate(-45deg) scale(1);
        opacity: 0;
    }
}

@keyframes shootingStarThree {
    0% {
        transform: translate(0, 0) rotate(-45deg) scale(0);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    15% {
        transform: translate(-250px, 250px) rotate(-45deg) scale(1);
        opacity: 0;
    }
    100% {
        transform: translate(-250px, 250px) rotate(-45deg) scale(1);
        opacity: 0;
    }
}

@keyframes sunrise {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(5px); opacity: 1; }
}

@keyframes driftClouds {
    0% { background-position: 0 0; }
    100% { background-position: 100% 0; }
}

@keyframes pulseSun {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes heatWave {
    0% { transform: translateX(0); }
    100% { transform: translateX(20px); }
}

@keyframes sunsetGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

@keyframes flyBirds {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

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

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .post-card {
        min-height: 150px;
    }
}