@keyframes lazy-flash {
    0%, 100% { background-color: rgba(255, 255, 255, 0); }
    50%       { background-color: rgba(255, 255, 255, 0.35); }
}

.lazy-image-wrapper {
    position: relative;
    display: block;
    width: fit-content;
    max-width: 80%;
    margin: 20px 0;
}

.lazy-image-wrapper .lazy-image {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.lazy-loader-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lazy-flash 1.5s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lazy-loader-overlay.lazy-loader-fadeout {
    opacity: 0;
    animation: none;
}

.lazy-loader-icon {
    max-width: 100px;
    max-height: 100px;
}

@keyframes blog-modal-in {
    from { opacity: 0; transform: scale(0.94) translateY(20px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

@keyframes blog-modal-out {
    from { opacity: 1; transform: scale(1)    translateY(0); }
    to   { opacity: 0; transform: scale(0.94) translateY(20px); }
}

@keyframes blog-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes blog-backdrop-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.blog-section-header {
    margin-top: 5vw;
    margin-bottom: 50px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
    padding: 0 2rem;
    box-sizing: border-box;
}

.blog-grid.blog-grid-3col {
    grid-template-columns: repeat(3, 1fr);
}

.blog-grid.blog-grid-3col .blog-card-img {
    height: 200px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    border-radius: 20px 5px;
    overflow: hidden;
    background-image:
        linear-gradient(rgba(19, 22, 36, 0.88), rgba(19, 22, 36, 0.88)),
        url('../images/grid.png');
    border: 2px solid rgba(205, 208, 255, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.4s ease, box-shadow 0.2s ease, opacity 0.5s ease !important;
}

.blog-card:hover {
    transform: scale(1.03) !important;
    border-color: rgba(255, 255, 255, 1);
}

.blog-card-img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    object-position: center;
    transform: scale(1.08);
    display: block;
    border-bottom: 2px solid rgba(205, 208, 255, 0.2);
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 18px;
    gap: 12px;
    justify-content: space-between;
}

.blog-card-title {
    font-family: Azonix, sans-serif;
    font-size: 1em;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.35;
    margin: 20px 0 0;
    letter-spacing: 0.02em;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(255, 255, 255, 0.4);
}

.blog-card-divider {
    width: 100%;
    border: none;
    border-top: 1px solid rgba(205, 208, 255, 0.2);
    margin: 0;
}

.blog-card-excerpt {
    font-family: 'Raleway', sans-serif;
    font-size: 0.8em;
    font-weight: 500;
    color: rgba(150, 168, 210, 0.75) !important;
    line-height: 1.85;
    margin: 0;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-tag {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    color: #1D2238;
    width: fit-content;
}

.blog-tag-pink { background-color: #ff66cc; }
.blog-tag-purple { background-color: #ba66ff; }
.blog-tag-darkblue { background-color: #3e62da; }
.blog-tag-blue { background-color: #73c0ff; }
.blog-tag-yellow { background-color: #ffe551; }
.blog-tag-green { background-color: #7dff56; }
.blog-tag-orange { background-color: #ff9838; }
.blog-tag-red { background-color: #ff5650; }
.blog-tag-discord { background-color: #5662F6; }
.blog-tag-white { background-color: #ffffff; }

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.blog-card-date {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75em;
    color: rgba(200, 214, 248, 0.65);
    font-weight: 600;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    margin-left: 0;
}

.blog-card-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.blog-card-author-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #3b4673;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #c8d6f8;
    flex-shrink: 0;
}

.blog-card-author-name {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75em;
    font-weight: 700;
    color: rgba(200, 214, 248, 0.75);
}

.blog-card-author-sep {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75em;
    font-weight: 400;
    color: rgba(180, 188, 220, 0.35);
}

.blog-card-author-title {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75em;
    font-weight: 600;
    color: rgba(175, 182, 210, 0.5);
}

.blog-modal-body .blog-card-author-avatar {
    width: 29px;
    height: 29px;
}

.blog-modal-body .blog-card-author-icon {
    width: 29px;
    height: 29px;
    font-size: 14px;
}

.blog-modal-body .blog-card-author-name {
    font-size: 0.9em;
}

.blog-modal-body .blog-card-author-sep {
    font-size: 0.9em;
}

.blog-modal-body .blog-card-author-title {
    font-size: 0.9em;
}

.blog-viewmore-row {
    display: flex;
    justify-content: center;
    margin-top: 36px;
    margin-bottom: 10px;
}

/* Blog Modal */
.blog-modal-backdrop {
    --modal-tag-color: 255, 255, 255;
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: rgba(10, 12, 24, 0.88);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.blog-modal-backdrop.active {
    display: flex;
    border-bottom: none;
    background-image: linear-gradient(rgba(var(--modal-tag-color), 0.25), rgba(var(--modal-tag-color), 0.25));
    animation: blog-backdrop-in 0.25s ease forwards;
}

.blog-modal-backdrop.closing {
    display: flex;
    border-bottom: none;
    background-image: linear-gradient(rgba(var(--modal-tag-color), 0.25), rgba(var(--modal-tag-color), 0.25));
    animation: blog-backdrop-out 0.25s ease forwards;
}

.blog-modal-backdrop.closing .blog-modal-dialog {
    animation: blog-modal-out 0.25s ease forwards;
}

.blog-modal-dialog {
    background-image:
        linear-gradient(rgba(19, 22, 36, 0.88), rgba(19, 22, 36, 1)),
        url('../images/grid.png');
    border: 2px solid rgba(205, 208, 255, 0.3);
    border-top: none;
    border-bottom: none;
    border-radius: 0;
    flex: 1;
    min-width: 0;
    max-width: 975px;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
    animation: blog-modal-in 0.25s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--modal-tag-color), 1) rgba(0,0,0,0);
}

.blog-modal-header-img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.blog-modal-post-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.blog-modal-navbtn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 17px 4px;
    border-radius: 20px 5px;
    background-color: rgba(19, 22, 36, 0.925);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.blog-modal-navbtn:hover,
.blog-modal-share:hover,
.blog-modal-close:hover {
    background-image: linear-gradient(124deg, #fe6952, #e75555, #e9be33, #f1f44c, #55f855, #69f7fe, #57a0f2, #ce63ff, #ff41d6) !important;
    background-size: 1200% 1200% !important;
    background-color: transparent !important;
    animation: rainbow 12s ease infinite, b-bounce 2.5s ease infinite;
    border-color: white;
    color: #1D2238 !important;
}

.blog-modal-navbtn:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 768px) {
    .lazy-image-wrapper {
        max-width: 100%;
    }
    .blog-card-author-modal { flex-wrap: wrap; }
    .blog-modal-post-nav {
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
}

.blog-card-author-modal {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.blog-card-author-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-author-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-author-socials .blog-author-social:first-child {
    margin-left: 5px;
}

.blog-author-social {
    color: white;
    font-size: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.blog-author-social--twitter:hover   { color: #55ACEE; }
.blog-author-social--instagram:hover { color: #D50060; }
.blog-author-social--bluesky:hover   { color: #1185FE; }
.blog-author-social--youtube:hover   { color: #FF0000; }
.blog-author-social--tiktok:hover    { color: #EE1D52; }
.blog-author-social--site:hover      { color: rgb(var(--modal-tag-color, 255,255,255)); }

.blog-author-social-img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    transition: filter 0.15s;
}

.blog-author-social--bluesky:hover .blog-author-social-img {
    filter: none;
}

.blog-modal-btn-row {
    position: sticky;
    top: 12px;
    float: right;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
    margin-top: -62px;
    z-index: 10;
}

.blog-modal-close {
    width: 46px;
    height: 46px;
    border-radius: 20px 5px;
    background-color: rgba(19, 22, 36, 0.925);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s;
    flex-shrink: 0;
}


.blog-modal-content {
    padding: 28px 80px 86px;
    margin-top: 50px;
}

.blog-modal-title {
    font-family: Azonix, sans-serif;
    font-size: 1.5em;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-modal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(205, 208, 255, 0.2);
}

.blog-modal-date {
    font-family: 'Raleway', sans-serif;
    font-size: 0.8em;
    color: rgba(200, 214, 248, 0.6);
    font-weight: 600;
}

.blog-modal-author {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
}

.blog-modal-author-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #3b4673;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #c8d6f8;
    flex-shrink: 0;
}

.blog-modal-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.blog-modal-author-name {
    font-family: 'Raleway', sans-serif;
    font-size: 0.85em;
    font-weight: 700;
    color: rgba(200, 214, 248, 0.8);
}

.blog-modal-body {
    font-family: 'Raleway', sans-serif;
    font-size: 0.95em;
    line-height: 2;
    color: #c8d6f8;
}

.blog-modal-body p {
    font-family: 'Raleway', sans-serif;
    font-size: 0.95em;
    line-height: 2;
    color: #c8d6f8 !important;
    margin-bottom: 24px;
}

.p-link
{
    color: inherit; 
    text-decoration: underline; 
    text-underline-offset: 3px;
}

.p-emphasize
{
    font-size: 1.9em;
}

.blog-modal-body h3 {
    font-size: 1em !important;
    background: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-bottom: 8px !important;
}

.blog-modal-body ul {
    margin: 0 0 14px 20px;
    color: #c8d6f8;
}

.blog-modal-body li {
    margin-bottom: 5px;
    font-size: 0.95em;
}

.blog-modal-body a:not(.blog-author-social) {
    color: #73c0ff;
}

.blog-modal-body img {
    max-width: 80%;
    height: auto;
    display: block;
    margin-top: 30px;
    margin-bottom: 30px;
}

.blog-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 36px;
    padding: 0 2rem;
    box-sizing: border-box;
}

.blog-search-input {
    flex: 1;
    min-width: 200px;
    background-image:
        linear-gradient(rgba(19, 22, 36, 0.85), rgba(19, 22, 36, 0.85)),
        url('../images/grid.png');
    border: 2px solid rgba(205, 208, 255, 0.3);
    border-radius: 20px 5px;
    color: #c8d6f8;
    font-family: 'Raleway', sans-serif;
    font-size: 0.95em;
    padding: 10px 18px;
    outline: none;
    transition: border-color 0.15s;
}

.blog-search-input::placeholder {
    color: rgba(200, 214, 248, 0.4);
}

.blog-search-input:focus {
    border-color: rgba(115, 192, 255, 0.6);
}

.blog-filter-select {
    background-image:
        linear-gradient(rgba(19, 22, 36, 0.85), rgba(19, 22, 36, 0.85)),
        url('../images/grid.png');
    border: 2px solid rgba(205, 208, 255, 0.3);
    border-radius: 20px 5px;
    color: #c8d6f8;
    font-family: 'Raleway', sans-serif;
    font-size: 0.95em;
    padding: 10px 18px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23c8d6f8'/%3E%3C/svg%3E"),
        linear-gradient(rgba(19,22,36,.85),rgba(19,22,36,.85)),
        url('../images/grid.png');
    background-repeat: no-repeat, repeat, repeat;
    background-position: right 14px center, 0 0, 0 0;
    background-size: 10px, auto, auto;
    padding-right: 36px;
}

.blog-filter-select:focus {
    border-color: rgba(115, 192, 255, 0.6);
}

.blog-filter-select option {
    background-color: #1D2238;
    color: #c8d6f8;
}

.blog-no-results {
    font-family: 'Raleway', sans-serif;
    color: rgba(200, 214, 248, 0.5);
    text-align: center;
    padding: 40px 0;
    font-size: 1.1em;
    width: 100%;
}

.blog-section-label {
    font-family: Azonix, sans-serif;
    font-size: 1.6em;
    letter-spacing: 0.04em;
    color: rgba(200, 214, 248, 0.85) !important;
    margin: 18px 0 !important;
}

.blog-section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
}

.blog-section-rule {
    flex: 1;
    border: none;
    border-top: 1px solid rgba(205, 208, 255, 0.15);
    margin: 0;
}

.blog-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    padding: 0 2rem;
    box-sizing: border-box;
}

.blog-grid-3 .blog-card-img {
    height: 189px;
}

@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .blog-search-bar {
        padding: 0 1rem;
    }

    .blog-modal-content {
        padding: 20px 18px 128px;
        margin-top: 10px;
    }

    .blog-modal-body img {
        max-width: 100%;
    }

    .blog-modal-header-img {
        height: 200px;
    }

    .blog-modal-title {
        font-size: 1.1em;
    }

    .blog-card-img {
        height: 150px;
    }

    .blog-grid.blog-grid-3col {
        grid-template-columns: 1fr;
    }

    .blog-grid.blog-grid-3col .blog-card-img {
        height: 150px;
    }
}

.blog-modal-share {
    height: 46px;
    padding: 0 17px 4px;
    border-radius: 20px 5px;
    background-color: rgba(19, 22, 36, 0.925);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s;
    flex-shrink: 0;
}

