
/*
 * Shahverdy.ir
 * Responsive Layout — Phase 1
 *
 * Main container: 1140px
 * Article reading width: 720px
 * Framework: Bootstrap 4
 */


/* -----------------------------------------
   1. Global box sizing
----------------------------------------- */

html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    min-width: 320px;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
}


/* -----------------------------------------
   2. Main site containers
----------------------------------------- */

.site-content > .container,
.footer > .container,
.mediumnavigation > .container {

    width: calc(100% - 32px);
    max-width: 1140px;

    margin-left: auto;
    margin-right: auto;

    padding-left: 16px;
    padding-right: 16px;
}


/* -----------------------------------------
   3. Main content spacing
----------------------------------------- */

.site-content {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.main-content {
    width: 100%;
    min-width: 0;
}

.mainheading {
    width: 100%;
    margin-bottom: 2rem;
}


/* -----------------------------------------
   4. Article reading width
----------------------------------------- */

.layout-post .article-post,
.layout-page .article-post {

    width: 100%;
    max-width: 720px;

    min-width: 0;
}

.layout-post .mainheading h1.posttitle {
    max-width: 720px;
}


/* -----------------------------------------
   5. Nested container correction
----------------------------------------- */

.layout-post .main-content > .container {

    width: 100%;
    max-width: none;

    padding-left: 0;
    padding-right: 0;
}


/* -----------------------------------------
   6. Article media
----------------------------------------- */

.article-post img,
.article-post video {

    max-width: 100%;
    height: auto;
}

.article-post iframe {
    max-width: 100%;
}

.featured-image {
    max-width: min(300px, 100%);
    height: auto;
}


/* -----------------------------------------
   7. Tables and code blocks
----------------------------------------- */

.article-post table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.article-post pre,
pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
}


/* -----------------------------------------
   8. Medium screens
----------------------------------------- */

@media (max-width: 991px) {

    .site-content {
        margin-top: 80px;
    }

    .site-content > .container,
    .footer > .container,
    .mediumnavigation > .container {

        width: calc(100% - 32px);
        padding-left: 12px;
        padding-right: 12px;
    }

    .layout-post .article-post,
    .layout-page .article-post {

        max-width: 720px;
    }

}


/* -----------------------------------------
   9. Mobile screens
----------------------------------------- */

@media (max-width: 767px) {

    .site-content {
        margin-top: 75px;
        padding-top: 1rem;
    }

    .site-content > .container,
    .footer > .container,
    .mediumnavigation > .container {

        width: calc(100% - 24px);
        padding-left: 10px;
        padding-right: 10px;
    }

    .mainheading {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .mainheading h1.sitetitle {
        font-size: 1.8rem;
    }

    .mainheading h1.posttitle {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .layout-post .article-post,
    .layout-page .article-post {

        max-width: 100%;
        font-size: 1rem;
        line-height: 1.8;
    }

    .featured-image {
        float: none;
        display: block;
        max-width: 100%;
        margin: 0 auto 1.5rem;
    }

    .article-post img {
        display: block;
        max-width: 100%;
        height: auto;
    }

    .section-title h2 {
        font-size: 1.25rem;
    }

}


/* -----------------------------------------
   10. Small mobile screens
----------------------------------------- */

@media (max-width: 400px) {

    .mainheading h1.sitetitle {
        font-size: 1.55rem;
    }

    .mainheading h1.posttitle {
        font-size: 1.5rem;
    }

    .site-content > .container,
    .footer > .container,
    .mediumnavigation > .container {

        width: calc(100% - 20px);
        padding-left: 8px;
        padding-right: 8px;
    }

}











/* -----------------------------------------
   11. Book and Note card appearance
----------------------------------------- */

/* Book cards */
.featured-posts .listfeaturedtag .card {
    background-color: #F6F2E9;
    border: 1px solid #E6DFD2;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.featured-posts .listfeaturedtag .card-body {
    background-color: transparent;
}

/* Note cards */
.recent-posts .card {
    background-color: #F3F6F7;
    border: 1px solid #E1E7E9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.recent-posts .card-body,
.recent-posts .card-footer {
    background-color: transparent;
}

