/* ============================================
   BLOG RESPONSIVE - MEDIA QUERIES
   ============================================
   WARNING: THIS FILE MUST NOT BE REFORMATTED
   The CSS formatter/sorter strips @media and
   @keyframes blocks. Keep this file untouched.
   ============================================ */

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes blogSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blogFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes blogPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

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

/* ============================================
   TABLET: max 1024px
   ============================================ */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .blog-featured__grid {
        grid-template-columns: 1fr 1fr;
        min-height: 350px;
    }
    .blog-hero__title {
        font-size: 2rem;
    }
    .blog-hero__subtitle {
        font-size: 1rem;
    }
    .blog-toolbar__container {
        flex-direction: column;
        gap: 12px;
    }
    .blog-toolbar__search {
        min-width: auto;
        width: 100%;
    }
}

/* ============================================
   MOBILE: max 768px
   ============================================ */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .blog-featured__grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .blog-featured__main {
        min-height: 250px;
    }
    .blog-featured__side {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .blog-featured__side-item {
        min-height: 150px;
    }
    .blog-hero {
        padding: 70px 16px 32px;
    }
    .blog-hero__title {
        font-size: 1.6rem;
    }
    .blog-hero__subtitle {
        font-size: 0.9rem;
    }
    .blog-toolbar {
        padding: 12px 16px;
    }
    .blog-toolbar__container {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .blog-toolbar__categories {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 4px;
    }
    .blog-toolbar__cat {
        flex-shrink: 0;
        font-size: 0.8rem;
        padding: 6px 14px;
    }
    .blog-grid-section {
        padding: 20px 16px 60px;
    }
    .blog-card__content {
        padding: 16px;
    }
    .blog-card__title {
        font-size: 1rem;
    }
    .blog-card__excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    /* --- Blog Single Post --- */
    .blog-single {
        padding: 20px 16px 60px;
        max-width: 100%;
        overflow-x: hidden;
    }
    .blog-single__hero-img {
        margin: 0 -16px 24px;
        border-radius: 0;
    }
    .blog-single__hero-img img {
        max-height: 300px;
    }
    .blog-single__title {
        font-size: 1.4rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .blog-single__meta {
        flex-direction: column;
        gap: 8px;
    }
    .blog-single__content {
        font-size: 0.95rem;
        line-height: 1.7;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    .blog-single__content h2 {
        font-size: 1.3rem;
        margin: 32px 0 16px;
    }
    .blog-single__content h3 {
        font-size: 1.1rem;
        margin: 24px 0 12px;
    }
    .blog-single__content pre {
        padding: 14px 16px;
        font-size: 0.82rem;
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
    }
    .blog-single__content blockquote {
        padding: 14px 16px;
        margin-left: 0;
        margin-right: 0;
        font-size: 0.92rem;
    }
    .blog-single__content img {
        margin-left: -16px;
        margin-right: -16px;
        max-width: calc(100% + 32px);
        border-radius: 0;
    }
    .blog-single__content .ql-syntax {
        padding: 14px 16px;
        font-size: 0.82rem;
    }
    .blog-single__content .ql-indent-1 {
        padding-left: 1.5em;
    }
    .blog-single__content .ql-indent-2 {
        padding-left: 3em;
    }
    .blog-single__content .ql-indent-3 {
        padding-left: 4.5em;
    }
    .blog-single__nav {
        font-size: 0.8rem;
        padding: 10px 14px;
    }
    .blog-single__nav-current {
        max-width: 180px;
    }
    .blog-single__tags {
        margin: 24px 0 20px;
        padding-top: 20px;
    }
    .blog-single__tag {
        font-size: 0.78rem;
        padding: 5px 12px;
    }
    .blog-single__footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
    }
    .blog-pagination {
        margin-top: 32px;
    }
    .blog-pag__btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.82rem;
    }
    /* Header reset for blog single */
    .blog-single__header {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        z-index: auto !important;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        padding: 0 !important;
        border-bottom: none !important;
        background: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* ============================================
   SMALL MOBILE: max 480px
   ============================================ */
@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr !important;
    }
    .blog-featured__side {
        grid-template-columns: 1fr;
    }
    .blog-hero {
        padding: 62px 12px 24px;
    }
    .blog-hero__title {
        font-size: 1.3rem;
    }
    .blog-hero__subtitle {
        font-size: 0.82rem;
    }
    .blog-single {
        padding: 16px 12px 48px;
    }
    .blog-single__title {
        font-size: 1.2rem;
    }
    .blog-single__content {
        font-size: 0.9rem;
    }
    .blog-card__img, .blog-card__img--placeholder {
        height: 160px;
    }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .blog-hero,
    .blog-toolbar,
    .blog-pagination,
    .blog-single__nav,
    .blog-single__tags,
    .blog-single__footer {
        display: none !important;
    }
    .blog-grid {
        grid-template-columns: 1fr !important;
    }
    .blog-single {
        max-width: 100%;
        padding: 20px;
    }
    .blog-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}