/* ==========================================================================
   Blog Custom CSS — Tag N Trak It
   ========================================================================== */

/* Blog Content Gate (Teaser Fade) */
.blog-content-fade {
    position: relative;
    margin-top: -120px;
    padding-top: 120px;
}
.blog-content-fade-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
}
.blog-content-gate {
    background: linear-gradient(135deg, #f8f9fe 0%, #ffffff 100%);
    border-radius: 1rem;
    border: 2px dashed #e2e8f0;
    padding: 3rem 2rem;
}

/* Blog Article Typography */
.blog-article p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}
.blog-article h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.blog-article h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}
.blog-article h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.blog-article img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}
.blog-article ul,
.blog-article ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.blog-article li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}
.blog-article hr {
    margin: 2rem 0;
    border-color: #e2e8f0;
}
.blog-article a {
    color: #008aff;
    text-decoration: underline;
}
.blog-article a:hover {
    color: #006fd6;
}

/* Callout Blocks */
.callout {
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}
.callout-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.callout-info {
    background: rgba(0, 138, 255, 0.08);
    border-left: 4px solid #008aff;
}
.callout-warning {
    background: rgba(255, 190, 61, 0.08);
    border-left: 4px solid #ffbe3d;
}
.callout-tip {
    background: rgba(92, 201, 167, 0.08);
    border-left: 4px solid #5cc9a7;
}
.callout-danger {
    background: rgba(242, 87, 103, 0.08);
    border-left: 4px solid #f25767;
}

/* Code Blocks */
.blog-code-block {
    position: relative;
    margin: 1.5rem 0;
}
.blog-code-block pre {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}
.blog-code-block code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
.blog-code-language {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #a6adc8;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0 0.5rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.blog-code-caption {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
}

/* Blockquote */
.blog-blockquote {
    border-left: 4px solid #008aff;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f8f9fe;
    border-radius: 0 0.5rem 0.5rem 0;
}
.blog-blockquote p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 0.5rem;
    color: #2d3748;
}
.blog-blockquote-attribution {
    font-size: 0.9rem;
    color: #718096;
    font-style: normal;
}
.blog-blockquote-attribution::before {
    content: "\2014\00a0";
}

/* Image Block */
.blog-image-block {
    margin: 1.5rem 0;
}
.blog-image-block img {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}
.blog-image-block figcaption {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 0.75rem;
    text-align: center;
    font-style: italic;
}
.blog-image-block.image-left {
    float: left;
    max-width: 50%;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}
.blog-image-block.image-right {
    float: right;
    max-width: 50%;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
.blog-image-block.image-center {
    text-align: center;
}
.blog-image-block.image-center img {
    max-width: 80%;
}

/* Image Gallery */
.blog-gallery {
    margin: 1.5rem 0;
}
.blog-gallery-item {
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 0.5rem;
}
.blog-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 0.5rem;
}
.blog-gallery-item:hover img {
    transform: scale(1.05);
}

/* Document Download */
.blog-document-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.blog-document-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.blog-document-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 138, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #008aff;
}
.blog-document-info {
    flex: 1;
    min-width: 0;
}
.blog-document-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.blog-document-desc {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 0;
}

/* Accordion */
.blog-accordion .card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem !important;
    margin-bottom: 0.5rem;
}
.blog-accordion .card-header {
    background: #f8f9fe;
    border-bottom: none;
    padding: 0;
}
.blog-accordion .card-header button {
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #2d3748;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.blog-accordion .card-header button:hover {
    color: #008aff;
}
.blog-accordion .card-header button::after {
    content: '';
    width: 0.8em;
    height: 0.8em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d3748' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.blog-accordion .card-header button[aria-expanded="true"]::after {
    transform: rotate(180deg);
}
.blog-accordion .card-body {
    padding: 1rem 1.25rem;
}

/* Badge soft variant */
.badge-soft-primary {
    background-color: rgba(0, 138, 255, 0.1);
    color: #008aff;
}
.badge-soft-primary:hover {
    background-color: rgba(0, 138, 255, 0.2);
    color: #006fd6;
}

/* Responsive Table */
.blog-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    -webkit-overflow-scrolling: touch;
}
.blog-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}
.blog-table-wrapper th,
.blog-table-wrapper td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
}
.blog-table-wrapper th {
    background: #f8f9fe;
    font-weight: 600;
    text-align: left;
}
.blog-table-wrapper tr:hover td {
    background: #fafbff;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .blog-image-block.image-left,
    .blog-image-block.image-right {
        float: none;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .blog-image-block.image-center img {
        max-width: 100%;
    }
    .blog-content-gate {
        padding: 2rem 1rem;
    }
    .blog-article p {
        font-size: 1rem;
    }
}
