/**
 * Blog Creative Template Styles
 * Scoped with .blog-creative prefix to avoid affecting global styles
 * Uses theme CSS variables for consistency
 */

/* ============================================
   LAYOUT & CONTAINER
   ============================================ */
.blog-creative {
    background-color: var(--bg-card, #fff);
    min-height: 100vh;
}

.blog-creative .container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.blog-creative__search-wrap {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-creative__search-form {
    width: 100%;
}

.blog-creative__search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f3f4f6;
    border-radius: 100px;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.blog-creative__search-input-wrap:focus-within {
    background: #fff;
    border-color: #11a4d4;
    box-shadow: 0 0 0 3px rgba(17, 164, 212, 0.1);
}

.blog-creative__search-icon {
    flex-shrink: 0;
    color: #9ca3af;
}

.blog-creative__search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    font-family: var(--font-main, 'Inter', sans-serif);
    color: var(--text-primary, #111);
    outline: none;
}

.blog-creative__search-input::placeholder {
    color: #9ca3af;
}

.blog-creative__search-btn {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 100px;
    background: var(--text-primary, #111);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-main, 'Inter', sans-serif);
    cursor: pointer;
    transition: background 0.2s ease;
}

.blog-creative__search-btn:hover {
    background: #11a4d4;
}

/* ============================================
   HEADER & FILTER
   ============================================ */
.blog-creative__header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px 0;
}

.blog-creative__filter-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.blog-creative__filter-wrap::-webkit-scrollbar {
    display: none;
}

.blog-creative__filter {
    display: flex;
    gap: 8px;
    min-width: max-content;
}

.blog-creative__filter-btn {
    padding: 10px 20px;
    border-radius: 100px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-main, 'Inter', sans-serif);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.blog-creative__filter-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.blog-creative__filter-btn.is-active {
    background: var(--text-primary, #111);
    color: #fff;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.blog-creative__main {
    padding: 24px 0 60px;
}

/* ============================================
   HERO FEATURED POST
   ============================================ */
.blog-creative__hero {
    padding: 0 0 32px;
}

.blog-creative__hero-card {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

@media (min-width: 640px) {
    .blog-creative__hero-card {
        aspect-ratio: 16 / 9;
    }
}

.blog-creative__hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.blog-creative__hero-card:hover .blog-creative__hero-image {
    transform: scale(1.05);
}

.blog-creative__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

@media (min-width: 640px) {
    .blog-creative__hero-overlay {
        padding: 32px;
    }
}

.blog-creative__hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.blog-creative__hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(17, 164, 212, 0.2);
    color: #11a4d4;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
}

.blog-creative__hero-date {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.blog-creative__hero-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 12px;
}

.blog-creative__hero-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 640px) {
    .blog-creative__hero-excerpt {
        font-size: 16px;
    }
}

/* ============================================
   DIVIDER
   ============================================ */
.blog-creative__divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 8px 0;
}

.blog-creative__divider--light {
    margin: 16px 0;
}

/* ============================================
   SECTION
   ============================================ */
.blog-creative__section {
    padding: 24px 0;
}

.blog-creative__section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.blog-creative__section-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
    color: var(--text-primary, #111);
    margin: 0;
}

.blog-creative__view-all {
    font-size: 14px;
    font-weight: 500;
    color: #11a4d4;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.blog-creative__view-all:hover {
    opacity: 0.7;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.blog-creative__grid {
    display: grid;
    gap: 32px;
}

.blog-creative__grid--list {
    grid-template-columns: 1fr;
}

.blog-creative__grid--square {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ============================================
   ARTICLE CARDS
   ============================================ */
.blog-creative__card {
    display: block;
}

.blog-creative__card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* List card style */
.blog-creative__card-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 16px;
}

.blog-creative__card-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.blog-creative__card:hover .blog-creative__card-img {
    transform: scale(1.05);
}

.blog-creative__card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-creative__card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.blog-creative__card-cat {
    color: #11a4d4;
}

.blog-creative__card-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d1d5db;
}

.blog-creative__card-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary, #111);
    margin: 0;
    transition: color 0.2s ease;
}

.blog-creative__card:hover .blog-creative__card-title {
    color: #11a4d4;
}

.blog-creative__card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Square card style */
.blog-creative__card--square .blog-creative__card-link {
    display: flex;
    flex-direction: column;
}

.blog-creative__card-image--square {
    aspect-ratio: 1 / 1;
    margin-bottom: 12px;
}

.blog-creative__card-title--small {
    font-size: 15px;
    line-height: 1.35;
    margin-bottom: 4px;
}

.blog-creative__card-cat-label {
    font-size: 12px;
    color: #9ca3af;
}

/* ============================================
   LOAD MORE
   ============================================ */
.blog-creative__load-more {
    padding: 32px 0 16px;
}

.blog-creative__load-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    color: var(--text-primary, #111);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-main, 'Inter', sans-serif);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-creative__load-btn:hover {
    background: #f9fafb;
    border-color: var(--text-primary, #111);
}

/* ============================================
   FILTER INTERACTION (JS will toggle visibility)
   ============================================ */
.blog-creative__section.is-hidden {
    display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
    .blog-creative .container {
        max-width: 800px;
    }

    .blog-creative__grid--square {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-creative .container {
        max-width: 900px;
    }
}