/*
Theme Name: Funnymonitors Blog Theme
Theme URI: https://funnymonitors.com
Author: sawbanshahin
Description: Custom lightweight theme for Funny Monitors Blog
Version: 1.0
*/

@font-face {
    font-family: 'Graphik';
    src: url('./assets/fonts/Graphik-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik';
    src: url('./assets/fonts/Graphik-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik';
    src: url('./assets/fonts/Graphik-Semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Graphik', sans-serif;
}

/* =========================================================
   Funny Monitors - Gutenberg Content Fix
   Fix conflict with existing .position-cover utility
   ========================================================= */

.single-post .post-content {
    display: block;
    width: 100%;
}

/*
 * IMPORTANT:
 * Funny Monitors uses .position-cover for card overlays.
 * Gutenberg linked images can also contain this class,
 * which makes the image link absolute and breaks content flow.
 *
 * For Gutenberg content, restore the image link to normal flow.
 */
.single-post .post-content .wp-block-image > a.position-cover {
    position: static !important;
    inset: auto !important;
    display: inline-block;
    width: auto;
    height: auto;
}

/* Gutenberg image block */
.single-post .post-content .wp-block-image {
    display: block;
    position: relative;
    width: auto;
    max-width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Gutenberg image */
.single-post .post-content .wp-block-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
}

/* Linked image should remain responsive */
.single-post .post-content .wp-block-image > a.position-cover img {
    display: block;
    max-width: 100%;
    height: auto;
}


/* =========================================================
   Gutenberg Alignment
   ========================================================= */

/* Left */
.single-post .post-content .wp-block-image.alignleft {
    float: left;
    width: auto;
    max-width: 50%;
    margin: 0.5rem 1.5rem 1rem 0;
}

/* Right */
.single-post .post-content .wp-block-image.alignright {
    float: right;
    width: auto;
    max-width: 50%;
    margin: 0.5rem 0 1rem 1.5rem;
}

/* Center */
.single-post .post-content .wp-block-image.aligncenter {
    float: none;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}


/* Clear floated Gutenberg images */
.single-post .post-content::after {
    content: "";
    display: table;
    clear: both;
}


/* =========================================================
   Gutenberg Text Blocks
   ========================================================= */

.single-post .post-content .wp-block-paragraph,
.single-post .post-content .wp-block-heading {
    position: static;
    visibility: visible;
    opacity: 1;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767px) {

    .single-post .post-content .wp-block-image.alignleft,
    .single-post .post-content .wp-block-image.alignright {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 1.25rem 0;
    }

    .single-post .post-content .wp-block-image.aligncenter {
        width: 100%;
        max-width: 100%;
    }

    .single-post .post-content .wp-block-image img {
        width: 100%;
        height: auto;
    }
}


/* 
 page blog style
 */
/* FunnyMonitors blog reference-page refinements */
.fm-blog-page-header {
    position: relative;
}

.fm-blog-star {
    position: absolute;
    display: block;
    color: #050505;
    line-height: 1;
    font-family: Arial, sans-serif;
    pointer-events: none;
    z-index: 0;
}

.fm-blog-star-left {
    top: 155px;
    left: 7.5%;
    font-size: 30px;
    transform: rotate(10deg);
}

.fm-blog-star-right {
    top: 72px;
    right: 15%;
    font-size: 36px;
    transform: rotate(18deg);
}

.fm-blog-category-nav {
    margin-top: -2px;
}

.fm-blog-category-nav .nav {
    width: 100%;
}

.fm-blog-category-nav .nav-item {
    flex: 1 1 0;
    min-width: 0;
}

.fm-blog-category-nav .nav-link {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.fm-blog-posts-row {
    margin-top: 0;
}

.fm-blog-posts-row > .col-12:first-child article {
    border-radius: 22px !important;
    padding: 24px !important;
}

@media (min-width: 992px) {
    .fm-blog-page-header {
        margin-top: 8px;
    }

    .fm-blog-category-nav {
        margin-top: -6px;
    }

    .fm-blog-posts-row {
        margin-top: -100px;
    }
}

@media (max-width: 767px) {
    .fm-blog-star-left {
        left: 5%;
        top: 145px;
        font-size: 24px;
    }

    .fm-blog-star-right {
        right: 8%;
        top: 60px;
        font-size: 28px;
    }

	.fm-blog-category-nav .nav {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .fm-blog-category-nav .nav-item {
        flex: 0 0 calc(50% - 4px) !important;
        width: calc(50% - 4px) !important;
        max-width: calc(50% - 4px) !important;
        min-width: calc(50% - 4px) !important;
    }

    .fm-blog-category-nav .nav-link {
        width: 100% !important;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}