/* ============================================
   STEPC Blog Page Styles
   blog.css — 專欄文章頁面
   Color: Black + Orange (#FF8C00)
   ============================================ */

/* =============================================
   HERO — Smaller (50vh)
   ============================================= */
.blog-hero {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 80% at 50% 0%, rgba(255, 140, 0, 0.14) 0%, transparent 65%),
        radial-gradient(ellipse 50% 60% at 20% 100%, rgba(255, 100, 0, 0.07) 0%, transparent 55%),
        linear-gradient(160deg, #130900 0%, #080808 45%, #0d0200 100%);
}

.blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8,8,8,0.35) 0%,
        transparent 40%,
        rgba(8,8,8,0.6) 80%,
        rgba(8,8,8,1) 100%
    );
}

.blog-hero-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 68px; /* navbar height */
}

.blog-hero-label {
    font-size: 0.7rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--stepc-orange);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.85;
}

.blog-hero-title {
    font-family: 'Abril Fatface', serif;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    letter-spacing: 6px;
    line-height: 1;
    color: #fff;
    margin: 0 0 0.6rem;
    text-shadow: 0 0 50px rgba(255,140,0,0.25);
}

.blog-hero-en {
    font-family: 'Abril Fatface', serif;
    font-size: clamp(0.8rem, 1.8vw, 1.2rem);
    letter-spacing: 8px;
    color: var(--stepc-orange);
    margin: 0 0 0.8rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.blog-hero-sub {
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 3px;
    margin: 0;
}

/* Bottom decorative line */
.blog-hero-bottom-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,140,0,0.3), transparent);
}


/* =============================================
   BLOG LISTING SECTION
   ============================================= */
.blog-listing {
    background: var(--stepc-black);
}

.blog-listing-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}


/* =============================================
   BLOG GRID — 3 / 2 / 1 columns
   ============================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}


/* =============================================
   BLOG CARD
   ============================================= */
.blog-card {
    background: var(--stepc-dark);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1),
                border-color 0.35s ease,
                box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 140, 0, 0.35);
    box-shadow: 0 12px 40px rgba(255, 140, 0, 0.12),
                0 0 0 1px rgba(255, 140, 0, 0.1);
}

/* Card Image Area */
.blog-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-img-placeholder {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.12);
    font-size: 2.5rem;
    transition: background 0.3s ease;
}

.blog-card:hover .blog-img-placeholder {
    background: #1e1e1e;
}

/* Category Badge */
.blog-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cat-sport {
    background: rgba(255, 140, 0, 0.2);
    color: var(--stepc-orange);
    border: 1px solid rgba(255, 140, 0, 0.3);
}

.cat-travel {
    background: rgba(0, 180, 220, 0.15);
    color: #00b4dc;
    border: 1px solid rgba(0, 180, 220, 0.25);
}

.cat-lifestyle {
    background: rgba(180, 100, 255, 0.15);
    color: #b464ff;
    border: 1px solid rgba(180, 100, 255, 0.25);
}

.cat-fitness {
    background: rgba(255, 60, 60, 0.15);
    color: #ff5555;
    border: 1px solid rgba(255, 60, 60, 0.25);
}

.cat-party {
    background: rgba(255, 200, 0, 0.15);
    color: #ffc800;
    border: 1px solid rgba(255, 200, 0, 0.25);
}

.cat-mind {
    background: rgba(100, 200, 150, 0.15);
    color: #64c896;
    border: 1px solid rgba(100, 200, 150, 0.25);
}

/* Card Body */
.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    margin-bottom: 0.75rem;
}

.blog-date {
    font-size: 0.75rem;
    color: var(--stepc-gray);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-card-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--stepc-white);
    line-height: 1.5;
    margin: 0 0 0.85rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: #fff;
}

.blog-card-excerpt {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.42);
    line-height: 1.8;
    margin: 0 0 1.2rem;
    /* 2-line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Read More link */
.blog-read-more {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--stepc-orange);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.3s ease, opacity 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
}

.blog-read-more:hover {
    color: var(--stepc-orange-light);
    gap: 0.6rem;
}

.blog-arrow {
    transition: transform 0.3s ease;
}

.blog-read-more:hover .blog-arrow {
    transform: translateX(3px);
}


/* =============================================
   LOAD MORE BUTTON
   ============================================= */
.blog-load-more {
    text-align: center;
    padding-bottom: 2rem;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    color: var(--stepc-orange);
    border: 1.5px solid rgba(255, 140, 0, 0.4);
    padding: 0.9rem 2.8rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.35s ease;
    font-family: 'Noto Sans TC', sans-serif;
}

.btn-load-more:hover:not(:disabled) {
    background: rgba(255, 140, 0, 0.08);
    border-color: var(--stepc-orange);
    box-shadow: 0 0 24px rgba(255, 140, 0, 0.15);
    letter-spacing: 3px;
}

.btn-load-more:disabled,
.btn-load-more--done {
    opacity: 0.45;
    cursor: not-allowed;
    letter-spacing: 2px;
}

.btn-load-more .bi-arrow-clockwise {
    transition: transform 0.6s ease;
}

.btn-load-more.loading .bi-arrow-clockwise {
    animation: spinOnce 0.8s linear infinite;
}

@keyframes spinOnce {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}


/* =============================================
   RESPONSIVE — Tablet (2 columns)
   ============================================= */
@media (max-width: 1024px) {
    .blog-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}


/* =============================================
   RESPONSIVE — Mobile (1 column)
   ============================================= */
@media (max-width: 600px) {
    .blog-hero {
        min-height: 320px;
    }

    .blog-hero-title {
        letter-spacing: 3px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .blog-listing-inner {
        padding: 0 1.2rem;
    }

    .blog-card-body {
        padding: 1.2rem;
    }

    .btn-load-more {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .blog-hero-title {
        font-size: 2.2rem;
    }
}
