/* Blog Page Redesign - Modern Clean UI Inspired (Insights Style) */

:root {
    --primary-color: #3498db;
    --primary-hover: #3498db;
    --text-main: #101828;
    --text-muted: #475467;
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --border-color: #EAECF0;
    --shadow-sm: 0px 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0px 4px 8px -2px rgba(16, 24, 40, 0.06), 0px 12px 24px -4px rgba(16, 24, 40, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Hero Section */
.blog-hero {
    padding: 120px 0 80px;
    text-align: center;
    background-color: #fcfcfd;
}

.hero-label {
    display: inline-block;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 24px;
    margin-top: 100px;
    color: #3498db;
    font-size: 1.3rem;
    font-weight: 700;
    display: inline-block;
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.4);
    color: #177ee6;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 20px;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 55px;
    line-height: 1.1;
    color: #2c3e50;
    text-align: center;
}

.hero-description {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 40px;
}

.hero-subscribe {
    max-width: 540px;
    margin: 0 auto;
}

.subscribe-form {
    display: flex;
    gap: 12px;
}

.subscribe-form input {
    flex-grow: 1;
    padding: 14px 20px;
    border: 1px solid #bfcae1;
    border-radius: 100px;
    font-size: 16px;
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.subscribe-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.btn-subscribe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background-color: #3498db;
    color: white !important;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(10, 73, 109, 0.3);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-subscribe:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Featured Posts Layout */
.featured-posts-section {
    padding: 60px 0;
    background-color: #fcfcfd;
}

.featured-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.slider-window {
    flex: 1;
    overflow: hidden;
    padding: 10px 0;
}

.featured-grid {
    display: flex; /* Changed from grid to flex for sliding */
    gap: 32px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-card {
    flex: 0 0 100%; /* Each card takes full width of window */
    display: flex;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    min-height: 280px;
}

.slider-arrow {
    background: white;
    border: 1px solid var(--border-color);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.slider-arrow:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.featured-card .card-img {
    width: 45%;
    object-fit: cover;
    background-color: #f2f4f7;
}

.featured-card .card-content {
    width: 55%;
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    align-items: center;
}

.card-tag {
    color: var(--primary-color);
    font-weight: 600;
    background: #EFF8FF;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--text-main);
}

.card-excerpt {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f2f4f7;
}

.author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.arrow-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-muted);
    transition: var(--transition);
}

.featured-card:hover .arrow-icon {
    background: var(--primary-color);
    color: white;
}

/* Main Content area */
.main-blog-content {
    padding: 100px 0;
}

.blog-section-header {
    margin-bottom: 60px;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: block;
    margin-left: 550px;
    color: #3498db;
    font-size: 1.3rem;
    font-weight: 700;
    display: inline-block;
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.4);
    color: #177ee6;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 20px;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 45px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.section-subtext {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 600px;
    text-align: center;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    background: #f9fafb;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e8ebf0;
}

.filter-nav {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text-main);
    background: #f2f4f7;
}

.filter-btn.active {
    background: white;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.search-wrap {
    position: relative;
}

.search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-wrap input {
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    outline: none;
    width: 280px;
    font-size: 14px;
    transition: var(--transition);
}

.search-wrap input:focus {
    border-color: var(--primary-color);
    width: 320px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 32px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: var(--transition);
}

.blog-card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-img-wrap {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    background-color: #f2f4f7;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card .card-payload {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card .card-title {
    font-size: 20px;
    margin-bottom: 8px;
}

.blog-card .card-excerpt {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

/* Bottom CTA */
.bottom-cta-section {
    padding: 100px 0;
}

.cta-card {
    display: flex;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    align-items: center;
    flex-direction: row;
}

.cta-img {
    width: 45%;
    object-fit: cover;
    min-height: 360px;
}

.cta-content {
    width: 55%;
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cta-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.3;
}

.cta-subscribe {
    max-width: 480px;
}

/* ── NEW Badge ── */
.new-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 2;
    animation: newBadgePulse 2s ease-in-out infinite;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.4);
}

.new-badge i {
    font-size: 10px;
}

@keyframes newBadgePulse {

    0%,
    100% {
        box-shadow: 0 2px 12px rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 2px 20px rgba(16, 185, 129, 0.7);
    }
}

.card-img-wrap,
.card-img-container {
    position: relative;
}

.card-img-container {
    width: 45%;
    overflow: hidden;
    position: relative;
}

.card-img-container .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Admin Section ── */
.blog-admin-section {
    padding: 20px 0 0;
    background: #fcfcfd;
}

.admin-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #94a3b8;
    border: 1px solid #475569;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.admin-toggle-btn:hover {
    background: linear-gradient(135deg, #334155, #475569);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(30, 41, 59, 0.3);
}

.admin-toggle-btn i {
    font-size: 12px;
}

/* ── Login Panel ── */
.admin-login-panel {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(16, 24, 40, 0.08);
}

.admin-login-header {
    text-align: center;
    margin-bottom: 28px;
}

.admin-login-header i {
    font-size: 32px;
    color: #3498db;
    margin-bottom: 16px;
    display: block;
}

.admin-login-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.admin-login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.admin-login-form {
    display: flex;
    gap: 10px;
}

.admin-login-form input {
    flex: 1;
    padding: 12px 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
    background: #f9fafb;
}

.admin-login-form input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    background: white;
}

.admin-login-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.admin-login-btn:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.admin-login-error {
    color: #d92d20;
    font-size: 13px;
    text-align: center;
    margin-top: 16px;
    font-weight: 500;
}

/* ── Upload Panel ── */
.admin-upload-panel {
    margin-top: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 8px 32px rgba(16, 24, 40, 0.08);
    animation: fadeSlideIn 0.3s ease;
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.admin-panel-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.admin-panel-header h3 i {
    color: #3498db;
    margin-right: 8px;
}

.admin-panel-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.admin-logout-btn {
    padding: 8px 18px;
    background: #fef3f2;
    color: #d92d20;
    border: 1px solid #fecdca;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.admin-logout-btn:hover {
    background: #d92d20;
    color: white;
    border-color: #d92d20;
}

/* ── Upload Form ── */
.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.admin-form-full {
    grid-column: 1 / -1;
}

.admin-form-group {
    margin-bottom: 22px;
}

.admin-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 8px;
}

.admin-form-group label i {
    color: #3498db;
    margin-right: 6px;
    font-size: 12px;
}

.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
    background: #f9fafb;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.admin-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.admin-image-method {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

.radio-label {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: auto;
    accent-color: #3498db;
}

.admin-file-input {
    padding: 10px !important;
    background: white !important;
    cursor: pointer;
}

.admin-image-preview {
    width: 100%;
    height: 180px;
    background: #f2f4f7;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s;
}

.admin-image-preview.has-image {
    border-style: solid;
    border-color: #3498db;
}

.admin-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-placeholder {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-placeholder i {
    font-size: 20px;
    opacity: 0.4;
}

.admin-publish-btn {
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.admin-publish-btn:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.35);
}

/* ── Uploaded Posts List ── */
.admin-uploaded-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
}

.admin-uploaded-section h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 18px;
}

.admin-uploaded-section h4 i {
    color: #3498db;
    margin-right: 8px;
}

.admin-empty-msg {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 24px;
    background: #f9fafb;
    border-radius: 10px;
}

.admin-blog-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 10px;
    background: white;
    transition: all 0.2s;
}

.admin-blog-item:hover {
    border-color: #d0d5dd;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

.admin-blog-item-img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f2f4f7;
}

.admin-blog-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-blog-item-info {
    flex: 1;
    min-width: 0;
}

.admin-blog-item-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-blog-item-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-delete-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #fecdca;
    background: #fef3f2;
    color: #d92d20;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.admin-delete-btn:hover {
    background: #d92d20;
    color: white;
    border-color: #d92d20;
}

/* ── Toast Notification ── */
.admin-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #101828;
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.admin-toast i {
    color: #10b981;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 48px;
    }

    .admin-upload-panel {
        padding: 28px;
    }

    .card-img-container {
        width: 45%;
    }
}

/* ── Expanded Card Styles ── */
.blog-card.expanded, .featured-card.expanded {
    grid-column: 1 / -1 !important;
    height: auto !important;
    flex-direction: column !important;
    cursor: default;
}

.expanded .card-img-wrap, .expanded .card-img-container {
    width: 100% !important;
    height: 400px !important;
}

.expanded .card-payload, .expanded .card-content {
    width: 100% !important;
}

.expanded-content-wrap {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.4s ease forwards;
}

.full-text {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 32px;
}

.full-img-trigger {
    position: relative;
    cursor: zoom-in;
    border-radius: 12px;
    overflow: hidden;
}

.expandable-img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.full-img-trigger:hover .expandable-img {
    transform: scale(1.02);
}

.img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.full-img-trigger:hover .img-overlay {
    opacity: 1;
}

/* ── Blog Lightbox ── */
.blog-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}

.blog-lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.blog-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.close-lightbox {
    position: absolute;
    top: 32px;
    right: 32px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-lightbox:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero-title {
        font-size: 36px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .featured-grid {
        flex-direction: row; /* Keep it flex for sliding */
    }
    
    .featured-card {
        flex-direction: column;
        height: auto;
    }

    .featured-card .card-img,
    .featured-card .card-content {
        width: 100%;
    }

    .card-img-container {
        width: 100%;
        height: 200px;
    }

    .cta-card {
        flex-direction: column;
    }

    .cta-img,
    .cta-content {
        width: 100%;
    }

    .cta-content {
        padding: 40px 24px;
    }

    .subscribe-form {
        flex-direction: column;
    }

    .btn-subscribe {
        width: 100%;
        justify-content: center;
    }

    .admin-form-row {
        grid-template-columns: 1fr;
    }

    .admin-upload-panel {
        padding: 20px;
    }

    .admin-panel-header {
        flex-direction: column;
        gap: 16px;
    }

    .admin-login-form {
        flex-direction: column;
    }

    .admin-login-btn {
        width: 100%;
        justify-content: center;
    }

    .admin-toast {
        left: 20px;
        right: 20px;
        bottom: 20px;
        justify-content: center;
    }

    .expanded .card-img-wrap, .expanded .card-img-container {
        height: 250px !important;
    }
}

.blog-card,
.featured-card {
    position: relative;
}

.blog-card:hover {
    transform: translateY(-4px);
}

.blog-card:focus-visible,
.featured-card:focus-visible {
    outline: 3px solid rgba(52, 152, 219, 0.28);
    outline-offset: 4px;
}

.blog-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 72px 24px;
    color: var(--text-muted);
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 24px;
}

.blog-empty-state i {
    font-size: 42px;
    margin-bottom: 18px;
    opacity: 0.28;
}

.blog-pagination {
    margin-top: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-control,
.pagination-number {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.pagination-control:hover,
.pagination-number:hover {
    border-color: #bfdcf5;
    transform: translateY(-2px);
}

.pagination-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 10px 22px rgba(52, 152, 219, 0.22);
}

.pagination-control:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.post-page {
    background:
        radial-gradient(circle at top left, rgba(52, 152, 219, 0.08), transparent 28%),
        linear-gradient(180deg, #f7fbff 0%, #ffffff 18%, #ffffff 100%);
}

.post-detail-hero {
    padding: 132px 0 40px;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f5ea8;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 28px;
}

.post-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.post-header-content,
.post-overview-card,
.post-article-shell,
.post-sidebar-card,
.cta-inner {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(217, 225, 235, 0.9);
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

.post-header-content {
    padding: 40px;
}

.post-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.post-date-chip,
.post-category-tag,
.post-new-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.post-date-chip {
    background: #eff6ff;
    color: #205493;
}

.post-category-tag {
    background: rgba(52, 152, 219, 0.14);
    color: #177ee6;
}

.post-new-chip {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.post-main-title {
    font-size: clamp(2.3rem, 4.6vw, 3.7rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    color: #0f172a;
}

.post-summary {
    font-size: 18px;
    line-height: 1.8;
    color: #475467;
    max-width: 60ch;
}

.post-meta-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #edf2f7;
}

.post-meta-info p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #667085;
}

.post-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3498db, #0f5ea8);
    color: white;
    font-size: 16px;
}

.post-overview-card {
    padding: 28px;
}

.post-overview-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #177ee6;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.post-overview-list {
    list-style: none;
}

.post-overview-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #edf2f7;
}

.post-overview-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-overview-list span {
    color: #667085;
    font-size: 14px;
}

.post-overview-list strong {
    color: #101828;
    text-align: right;
}

.post-body-section {
    padding: 12px 0 96px;
}

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.post-article-shell {
    padding: 34px;
}

.post-featured-image {
    border-radius: 22px;
    overflow: hidden;
    margin-bottom: 36px;
    background: #eaf2f9;
}

.post-featured-image img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.post-article-content {
    font-size: 17px;
    line-height: 1.9;
    color: #344054;
}

.post-article-content h2,
.post-article-content h3 {
    color: #101828;
    line-height: 1.25;
    margin: 34px 0 14px;
}

.post-article-content h2 {
    font-size: 28px;
}

.post-article-content h3 {
    font-size: 22px;
}

.post-article-content p,
.post-article-content ul {
    margin-bottom: 18px;
}

.post-article-content ul {
    padding-left: 22px;
}

.post-article-content li {
    margin-bottom: 8px;
}

.post-gallery-section {
    margin-top: 44px;
    padding-top: 34px;
    border-top: 1px solid #edf2f7;
}

.post-section-heading {
    margin-bottom: 20px;
}

.post-section-heading span {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #177ee6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.post-section-heading h3 {
    font-size: 28px;
    color: #101828;
}

.post-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.gallery-item {
    position: relative;
    border: none;
    padding: 0;
    background: transparent;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.32);
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.post-sidebar {
    position: sticky;
    top: 120px;
}

.post-sidebar-card {
    padding: 26px;
}

.related-posts {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.related-post-link {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 14px;
    align-items: center;
    text-decoration: none;
    padding: 10px;
    border-radius: 16px;
    transition: var(--transition);
}

.related-post-link:hover {
    background: #f7fbff;
}

.related-post-link img {
    width: 84px;
    height: 84px;
    border-radius: 14px;
    object-fit: cover;
}

.related-post-link span {
    display: block;
    font-size: 12px;
    color: #667085;
    margin-bottom: 6px;
}

.related-post-link strong {
    color: #101828;
    line-height: 1.45;
}

.bottom-cta-post {
    padding: 0 0 96px;
}

.cta-inner {
    text-align: center;
    padding: 42px 28px;
}

.cta-inner h2 {
    font-size: clamp(2rem, 4vw, 2.7rem);
    margin-bottom: 10px;
    color: #101828;
}

.cta-inner p {
    color: #667085;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .post-hero-layout,
    .post-layout {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .filter-nav {
        flex-wrap: wrap;
    }

    .search-wrap input,
    .search-wrap input:focus {
        width: 100%;
    }

    .slider-arrow {
        width: 42px;
        height: 42px;
    }

    .post-detail-hero {
        padding-top: 112px;
    }

    .post-header-content,
    .post-overview-card,
    .post-article-shell,
    .post-sidebar-card {
        padding: 24px;
    }

    .post-summary {
        font-size: 16px;
    }

    .post-gallery-grid {
        grid-template-columns: 1fr;
    }

    .pagination-control,
    .pagination-number {
        width: 42px;
        height: 42px;
    }
}
