/* ==========================================================================
   RaketMate Blog — Public Pages Stylesheet (Dark Theme)
   Uses CSS variables from public.css (_PublicLayout)
   ========================================================================== */

/* ---------- Blog Hero / Page Header ---------- */
.blog-hero {
    background: var(--rm-gradient);
    padding: calc(var(--rm-nav-height) + 48px) 0 48px;
    color: var(--rm-white);
    text-align: center;
    margin-bottom: 2rem;
}

.blog-hero h1 {
    color: var(--rm-white);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.blog-hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.blog-hero .search-box {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.blog-hero .search-box input {
    width: 100%;
    padding: 0.75rem 1.25rem 0.75rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.12);
    color: var(--rm-white);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.blog-hero .search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

.blog-hero .search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.blog-hero .search-box i {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.1rem;
}

/* ---------- Category/Tag Header ---------- */
.blog-category-hero {
    background: var(--rm-gradient);
    padding: calc(var(--rm-nav-height) + 40px) 0 40px;
    color: var(--rm-white);
    text-align: center;
    margin-bottom: 2rem;
}

.blog-category-hero h1 {
    color: var(--rm-white);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-category-hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 0;
}

.blog-category-hero .badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--rm-white);
}

/* ---------- Post Card ---------- */
.blog-post-card {
    background: var(--rm-bg-elevated);
    border-radius: var(--rm-radius);
    border: 1px solid var(--rm-border);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rm-shadow);
    border-color: var(--rm-border-hover);
}

.blog-post-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.blog-post-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-post-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.blog-post-card .card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(232, 121, 168, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/10;
}

.blog-post-card .card-img-placeholder i {
    font-size: 3rem;
    color: var(--rm-primary);
    opacity: 0.4;
}

.blog-post-card .category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--rm-primary);
    color: var(--rm-white);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}
.blog-post-card .category-badge:hover {
    color: var(--rm-white);
    background: var(--rm-primary-hover);
}

.blog-post-card .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-post-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-post-card .card-title a {
    color: var(--rm-heading);
}

.blog-post-card .card-title a:hover {
    color: var(--rm-primary-light);
}

.blog-post-card .card-text {
    font-size: 0.9rem;
    color: var(--rm-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    flex: 1;
}

.blog-post-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--rm-text-dim);
    padding-top: 0.75rem;
    border-top: 1px solid var(--rm-border);
    margin-top: auto;
}

.blog-post-card .card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-post-card .card-meta i {
    font-size: 0.9rem;
}

/* ---------- Tags in card ---------- */
.blog-post-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.blog-post-card .card-tags .tag-badge {
    background: rgba(124, 58, 237, 0.12);
    color: var(--rm-primary-light);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
}
.blog-post-card .card-tags .tag-badge:hover {
    background: var(--rm-primary);
    color: var(--rm-white);
}

/* ---------- Sidebar ---------- */
.blog-sidebar .sidebar-card {
    background: var(--rm-bg-elevated);
    border-radius: var(--rm-radius);
    border: 1px solid var(--rm-border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.blog-sidebar .sidebar-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--rm-primary);
    color: var(--rm-heading);
}

.blog-sidebar .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar .category-list li {
    margin-bottom: 0.5rem;
}

.blog-sidebar .category-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: var(--rm-text);
    transition: all 0.3s ease;
}

.blog-sidebar .category-list li a:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--rm-primary-light);
}

.blog-sidebar .category-list li a .count {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rm-text-dim);
}

.blog-sidebar .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-sidebar .tag-cloud a {
    background: rgba(255, 255, 255, 0.05);
    color: var(--rm-text);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-sidebar .tag-cloud a:hover,
.blog-sidebar .tag-cloud a.bg-primary {
    background: var(--rm-primary);
    color: var(--rm-white);
}

.blog-sidebar .rss-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f59e0b;
    font-weight: 500;
}

.blog-sidebar .rss-link:hover {
    color: #d97706;
}

/* ---------- Pagination ---------- */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-pagination .pagination {
    gap: 0.35rem;
}

.blog-pagination .page-link {
    border: 1px solid var(--rm-border);
    border-radius: 8px !important;
    color: var(--rm-text);
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    background: var(--rm-bg-elevated);
    transition: all 0.3s ease;
}

.blog-pagination .page-link:hover {
    background: var(--rm-primary);
    color: var(--rm-white);
    border-color: var(--rm-primary);
}

.blog-pagination .page-item.active .page-link {
    background: var(--rm-primary);
    color: var(--rm-white);
    border-color: var(--rm-primary);
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3);
}

.blog-pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.02);
    color: var(--rm-text-dim);
    border-color: var(--rm-border);
}

/* ---------- Single Post ---------- */
.blog-single-post {
    background: var(--rm-bg-elevated);
    border-radius: var(--rm-radius);
    border: 1px solid var(--rm-border);
    overflow: hidden;
    margin-bottom: 2rem;
}

.blog-single-post .post-header-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.blog-single-post .post-content-wrapper {
    padding: 2rem 2.5rem;
}

.blog-single-post .post-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--rm-heading);
}

.blog-single-post .post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--rm-border);
    font-size: 0.9rem;
    color: var(--rm-text-dim);
}

.blog-single-post .post-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-single-post .post-meta .meta-item a {
    color: var(--rm-primary-light);
}
.blog-single-post .post-meta .meta-item a:hover {
    color: var(--rm-primary);
}

.blog-single-post .post-meta i {
    font-size: 1.1rem;
    color: var(--rm-primary-light);
}

.blog-single-post .post-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--rm-text);
}

.blog-single-post .post-body h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--rm-heading);
}

.blog-single-post .post-body h3 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--rm-heading);
}

.blog-single-post .post-body p {
    margin-bottom: 1.25rem;
}

.blog-single-post .post-body img {
    border-radius: var(--rm-radius);
    margin: 1.5rem 0;
}

.blog-single-post .post-body blockquote {
    border-left: 4px solid var(--rm-primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(124, 58, 237, 0.06);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--rm-heading);
}

.blog-single-post .post-body pre {
    background: #1a1a2e;
    color: #f8f8f2;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--rm-border);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.blog-single-post .post-body code {
    background: rgba(124, 58, 237, 0.1);
    color: var(--rm-primary-light);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.blog-single-post .post-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.blog-single-post .post-body ul,
.blog-single-post .post-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.blog-single-post .post-body li {
    margin-bottom: 0.5rem;
}

.blog-single-post .post-body a {
    color: var(--rm-primary-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-single-post .post-body a:hover {
    color: var(--rm-accent);
}

.blog-single-post .post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.blog-single-post .post-body th,
.blog-single-post .post-body td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--rm-border);
    text-align: left;
}

.blog-single-post .post-body th {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
    color: var(--rm-heading);
}

/* ---------- Post Tags ---------- */
.blog-single-post .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rm-border);
}

.blog-single-post .post-tags a {
    background: rgba(124, 58, 237, 0.1);
    color: var(--rm-primary-light);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-single-post .post-tags a:hover {
    background: var(--rm-primary);
    color: var(--rm-white);
}

/* ---------- Share Buttons ---------- */
.blog-share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.blog-share-buttons span {
    font-weight: 600;
    color: var(--rm-heading);
    font-size: 0.95rem;
}

.blog-share-buttons a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rm-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.blog-share-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: var(--rm-white);
}

.blog-share-buttons .btn-twitter { background: #1da1f2; }
.blog-share-buttons .btn-facebook { background: #1877f2; }
.blog-share-buttons .btn-linkedin { background: #0077b5; }
.blog-share-buttons .btn-whatsapp { background: #25d366; }
.blog-share-buttons .btn-copy { background: var(--rm-text-dim); }

/* ---------- Related Posts ---------- */
.blog-related-posts {
    margin-top: 2rem;
}

.blog-related-posts h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--rm-heading);
}

/* ---------- Author Box ---------- */
.blog-author-box {
    background: var(--rm-bg-elevated);
    border-radius: var(--rm-radius);
    border: 1px solid var(--rm-border);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.blog-author-box .author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--rm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blog-author-box .author-avatar i {
    font-size: 1.5rem;
    color: var(--rm-white);
}

.blog-author-box .author-info h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--rm-heading);
}

.blog-author-box .author-info p {
    font-size: 0.85rem;
    color: var(--rm-text-dim);
    margin-bottom: 0;
}

/* ---------- No Results ---------- */
.blog-no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.blog-no-results i {
    font-size: 4rem;
    color: var(--rm-text-dim);
    margin-bottom: 1.5rem;
}

.blog-no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--rm-heading);
}

.blog-no-results p {
    color: var(--rm-text);
    max-width: 400px;
    margin: 0 auto;
}

/* ---------- Breadcrumb ---------- */
.blog-breadcrumb {
    padding: 1rem 0;
}

.blog-breadcrumb .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.blog-breadcrumb .breadcrumb-item a {
    color: var(--rm-text-dim);
}

.blog-breadcrumb .breadcrumb-item a:hover {
    color: var(--rm-primary-light);
}

.blog-breadcrumb .breadcrumb-item.active {
    color: var(--rm-heading);
}

.blog-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: var(--rm-text-dim);
}

/* ---------- Text utilities override for dark ---------- */
.blog-page .text-muted {
    color: var(--rm-text-dim) !important;
}
.blog-page .text-muted a {
    color: var(--rm-primary-light);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .blog-hero {
        padding: calc(var(--rm-nav-height) + 32px) 0 32px;
    }

    .blog-hero h1 {
        font-size: 1.75rem;
    }

    .blog-category-hero {
        padding: calc(var(--rm-nav-height) + 24px) 0 24px;
    }

    .blog-single-post .post-content-wrapper {
        padding: 1.5rem;
    }

    .blog-single-post .post-title {
        font-size: 1.5rem;
    }

    .blog-sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    .blog-hero {
        padding: calc(var(--rm-nav-height) + 24px) 0 24px;
    }

    .blog-hero h1 {
        font-size: 1.5rem;
    }

    .blog-hero p {
        font-size: 0.95rem;
    }

    .blog-category-hero {
        padding: calc(var(--rm-nav-height) + 20px) 0 20px;
    }

    .blog-category-hero h1 {
        font-size: 1.5rem;
    }

    .blog-single-post .post-content-wrapper {
        padding: 1.25rem;
    }

    .blog-single-post .post-title {
        font-size: 1.3rem;
    }

    .blog-single-post .post-meta {
        gap: 1rem;
    }

    .blog-author-box {
        flex-direction: column;
        text-align: center;
    }

    .blog-share-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ---------- Print ---------- */
@media print {
    .blog-sidebar,
    .blog-share-buttons,
    .blog-related-posts,
    .blog-pagination {
        display: none !important;
    }

    .blog-single-post {
        border: none;
    }

    .blog-single-post .post-body {
        font-size: 12pt;
        color: #000;
    }
}
