/*
Theme Name: Tutorial JavaScript
Theme URI: https://tutorialjavascript.dev
Author: Gabriele Romanato
Author URI: https://gabrieleromanato.com
Description: Site theme
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

@import url('bootstrap/bootstrap.min.css');
@import url('highlight.css');
@import url('fontawesome/css/fontawesome.min.css');
@import url('fontawesome/css/brands.min.css');
@import url('fontawesome/css/solid.min.css');
@import url('fontawesome/css/regular.min.css');

:root {
    --font-family: system-ui, system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
	--font-family-secondary: serif;
	--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --bg-alt: #f6f6f6;
    --purple-900: #4A148C;
}

html {
	font-size: 21px;
}

@media screen and (max-width: 768px) {
	html {
		font-size: 18px;
	}
}

body {
    font-family: var(--font-family);
}

a {
    text-decoration: none;
    color: var(--purple-900);
}

code:not([class]),
kbd,
samp {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    border: none;
    font-family: var(--font-family-monospace);
}

h1 {
    font-weight: 900;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
}

pre code {
    display: block;
    padding: 1em;
    line-height: 1.5;
    border-radius: 0.3em;
}

@media screen and (min-width: 1400px) {
    .container {
        max-width: 1100px;
    }

    html, body, #site {
        height: 100%;
        min-height: 100vh;
    }

    #site {
        display: flex;
        flex-direction: column;
    }

    #site-info {
        margin-top: auto;
    }
}

.read-more,
.send-btn {
    padding: 0.6rem 1.3rem;
    border: 2px solid;
    color: var(--purple-900);
    display: inline-block;
    border-radius: 0.1rem;
    font-weight: 500;
}

.read-more:hover,
.send-btn:hover {
    background-color: var(--purple-900);
    color: #fff;
}

.read-more i {
    padding-left: 0.4em;
    position: relative;
    top: 2px;
}

button.send-btn {
    background-color: transparent;
}

.demo-share {
    margin-top: 0.5rem;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.demo-share a {
    color: #000;
    margin-right: 0.6rem;
}

#site-header,
#site-info {
    background-color: var(--bg-alt);
}

#site-header {
    padding: 1em;
}

#site-brand {
    width: 60px;
    height: 60px;
}

#site-brand a {
    display: block;
    width: 100%;
    height: 100%;
    text-indent: -9999em;
    background: url('../images/logo.png') no-repeat 0 0;
    background-size: contain;
}

#site-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#site-menu ul li {
    margin-left: 0.6rem;
}

#site-menu ul li a {
    color: #000;
    padding-bottom: 4px;
    position: relative;
}

#site-menu ul li a:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: #000;
    opacity: 0;
    transition: opacity 400ms ease-in;
}

#site-menu ul li a:hover:after,
#site-menu ul li.current-menu-item a:after {
    opacity: 1;
}

#site-menu ul li.current-menu-item a {
    font-weight: bold;
}

#toggle-search,
#close-search-form {
    padding: 0;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

#site-search-form {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    background-color: #fff;
    min-height: 100vh;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#site-search-form.visible {
    display: flex;
}

#close-search-form {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

#site-search-form .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

#site-search-form .form-group {
    flex: 1;
}

#site-search-form .btn {
    margin-left: auto;
}

#site-search-form input,
#site-search-form input:focus {
    padding: 0;
    border-radius: 0;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: #aaa;
    outline-style: none;
    box-shadow: none;
    transition: border-color 400ms ease-in;
}

#site-search-form input:focus {
    border-color: #000;
}

#site-content {
    margin-top: 1em;
}

.post,
#contact-form,
#error figure {
    margin-bottom: 2.5em;
    padding: 1.3rem;
    border: 1px solid #eee;
    border-radius: 0.3rem;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 900;
}

.post-title a {
    color: inherit;
}

.post-excerpt p {
    margin: 0;
}

.post-image {
    width: 150px;
}

.post-date {
    display: block;
    margin-bottom: 0.5em;
    font-size: 16px;
    color: #888;
}

.post-footer {
    margin-top: 1em;
}

#posts-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--purple-900);
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
}

#posts-loader:after {
    content: '...';
    font-size: 2em;
    letter-spacing: .1em;
}

#posts-loader.hide {
    display: none;
}

#pagination {
    padding: 2em 1em;
    background-color: var(--purple-900);
    color: #fff;
}

#pagination button {
    cursor: pointer;
    background-color: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
}

#pagination a,
#pagination button {
    color: inherit;
    margin: 0 1.5em;
}

#pagination .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

#section-header {
    margin-bottom: 2em;
}

#site-info {
    padding: 2em 1em;
}

#site-info a {
    color: inherit;
}

@media screen and (max-width: 768px) {
    #site-info .container {
        flex-direction: column;
    }
}


#social,
#copyright {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 16px;
}

#post-header {
    margin-bottom: 2.5rem;
}

#post-header time {
    display: block;
    color: #888;
}

.single-post-image {
    display: flex;
    padding: 2.5rem 1.5rem;
    align-items: center;
    justify-content: center;
    background-color: var(--purple-900);
    margin-bottom: 3rem;
}

.single-post-image img {
    display: block;
    max-width: 100%;
    height: auto;
    padding: 0.5rem;
    background-color: #fff;
    border-radius: 0.3rem;
}

#post-content p {
	margin-bottom: 1.5rem;
	line-height: 1.7;
}

#post-content h2,
#post-content h3,
#post-content h4,
#post-content h5 {
    font-weight: 700;
}

#post-content h2 {
	margin-bottom: 1.5rem;
	font-size: 1.5rem;
}

#post-content h3 {
	margin-bottom: 1.5rem;
	font-size: 1.25rem;
}

#post-content h4 {
	margin-bottom: 1.5rem;
	font-size: 1.1rem;
}

#post-content h5 {
	margin-bottom: 1.5rem;
	font-size: 1rem;
}

#post-content blockquote {
	margin-bottom: 1.5rem;
	padding: 1rem;
	border-left: 3px solid rgba(0, 0, 0, 0.1);
}

#post-content ul,
#post-content ol {
	margin-bottom: 1.5rem;
	padding-left: 2.5rem;
}

#post-content ul li,
#post-content ol li {
	margin-bottom: 0.5rem;
}

#post-content ul ul,
#post-content ul ol,
#post-content ol ul,
#post-content ol ol {
	margin-bottom: 0;
}

#post-content ul li {
	list-style-type: disc;
}

#post-content ol li {
	list-style-type: decimal;
}


#post-content img {
	max-width: 100%;
	height: auto;
	display: block;
	margin-bottom: 1.5rem;
}

#post-content table {
	width: 100%;
	margin-bottom: 1.5rem;
	border-collapse: collapse;
}

#post-content table th,
#post-content table td {
	padding: 0.5rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

#post-content table th {
	background: var(--bg-alt);
}

#post-content table tr:nth-child(2n) {
	background: var(--bg-alt);
}

#post-share {
    margin: 2em 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#post-share a {
    color: #fff;
    margin: 0 1em;
    padding: 0.15rem 0.25rem;
    background-color: var(--purple-900);
    border-radius: 0.15rem;
    width: 2em;
    height: 2em;
    display: block;
    text-align: center;
    line-height: 1.8em;
}

#post-navigation {
    padding: 2.5rem 1rem;
    background-color: var(--purple-900);
}

#post-navigation a,
#post-navigation a:hover {
    color: #fff;
    display: block;
    width: 45%;
}

#post-navigation .container {
    display: flex;
    flex-wrap: wrap;
}

#post-navigation a.post-navigation-next {
    margin-left: auto;
    text-align: right;
}

#post-navigation a span,
#post-navigation a figure {
    display: none;
}

@media screen and (min-width: 768px) {
    #post-navigation a span {
        display: block;
        margin-bottom: 0.5rem;
    } 
    #post-navigation a figure {
        display: block;
        margin-top: 0.5rem;
        width: 100%;
        display: flex;
        align-items: center;
    }  
    #post-navigation a figure img {
        display: block;
        width: 150px;
        height: auto;
        padding: 0.3rem;
        background-color: #fff;
        border-radius: 0.3rem;
    }

    #post-navigation a.post-navigation-next figure {
        justify-content: flex-end;
    }
}

#contact-form {
    position: relative;
}



#contact-form.sending:after {
    content: 'Invio in corso...';
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #000;
    width: 100%;
    height: 100%;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: .1em;
    border-radius: 0.3rem;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

#contact-form .form-group {
    margin-bottom: 1rem;
}

#contact-form .form-control,
#contact-form .form-control:focus {
    outline-style: none;
    border-radius: 0.1rem;
    box-shadow: none;
}

#contact-form textarea {
    height: 190px;
}