/*
Theme Name: Erreciweb.com
Author: Roberto Chiapparelli
Description: Tema WordPress generico, leggero e riutilizzabile per progetti diversi. Include header, footer, menu, logo, loop base e opzioni di personalizzazione.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: erreciweb-com
Tags: custom-logo, custom-menu, featured-images, translation-ready, blog
*/

:root {
    --erreciweb-primary: #1b3664;
    --erreciweb-secondary: #2c89be;
    --erreciweb-background: #ffffff;
    --erreciweb-surface: #f6f7f9;
    --erreciweb-text: #4d4b49;
    --erreciweb-muted: #667085;
    --erreciweb-border: #d9dee7;
    --erreciweb-footer: #151922;
    --erreciweb-footer-text: #ffffff;
    --erreciweb-body-font: "Roboto", Arial, sans-serif;
    --erreciweb-body-size: 18px;
    --erreciweb-body-weight: 100;
    --erreciweb-heading-font: "Oswald", "Arial Narrow", Arial, sans-serif;
    --erreciweb-font: var(--erreciweb-body-font);
    --erreciweb-radius: 8px;
    --erreciweb-container: 100%;
}

* {
    box-sizing: border-box;
}

html {
    line-height: 1.15;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--erreciweb-background);
    color: var(--erreciweb-text);
    font-family: var(--erreciweb-body-font);
    font-size: var(--erreciweb-body-size);
    font-weight: var(--erreciweb-body-weight);
    line-height: 1.65;
}

strong,
b {
    font-weight: 500;
}

h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.site-footer__brand {
    font-family: var(--erreciweb-heading-font);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

img,
svg,
video {
    display: block;
    height: auto;
    max-width: 100%;
}

a {
    color: var(--erreciweb-primary);
    text-decoration: none;
    text-underline-offset: 0.18em;
}

a:hover,
a:focus {
    color: var(--erreciweb-secondary);
    text-decoration: underline;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.wp-block-button__link {
    border: 0;
    border-radius: var(--erreciweb-radius);
    background: var(--erreciweb-primary);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--erreciweb-heading-font);
    font-weight: 700;
    min-height: 44px;
    padding: 0.7rem 1rem;
    text-decoration: none;
    text-transform: uppercase;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
    background: var(--erreciweb-secondary);
    color: #ffffff;
    text-decoration: none;
}

input,
select,
textarea {
    border: 1px solid var(--erreciweb-border);
    border-radius: var(--erreciweb-radius);
    color: var(--erreciweb-text);
    max-width: 100%;
    padding: 0.7rem 0.8rem;
}

textarea {
    min-height: 150px;
}

.container {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--erreciweb-container);
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.screen-reader-text:focus {
    clip: auto;
    background: #ffffff;
    border: 2px solid var(--erreciweb-primary);
    border-radius: var(--erreciweb-radius);
    color: var(--erreciweb-primary);
    height: auto;
    left: 20px;
    padding: 0.75rem 1rem;
    top: 20px;
    width: auto;
    z-index: 100000;
}

.site-header {
    background: var(--erreciweb-primary);
    color: #ffffff;
    position: relative;
    z-index: 100;
}

.erreciweb-header-is-sticky .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

body.admin-bar.erreciweb-header-is-sticky .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar.erreciweb-header-is-sticky .site-header {
        top: 46px;
    }
}

.site-header__inner {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    justify-content: space-between;
    min-height: 84px;
    padding-bottom: 1rem;
    padding-top: 1rem;
}

.site-branding {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.site-title {
    color: inherit;
    display: inline-block;
    font-size: 1.35rem;
    line-height: 1.2;
}

.site-title:hover,
.site-title:focus {
    color: inherit;
}

.site-description {
    color: currentColor;
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.82;
}

.custom-logo-link,
.custom-logo-link:hover,
.custom-logo-link:focus {
    color: inherit;
    display: inline-flex;
    text-decoration: none;
}

.site-logo,
.custom-logo {
    height: auto;
    max-height: 96px;
    max-width: 100%;
}

.main-navigation {
    margin-left: auto;
}

.menu-toggle {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: var(--erreciweb-radius);
    color: inherit;
    display: none;
    flex-direction: column;
    gap: 5px;
    height: 44px;
    justify-content: center;
    padding: 0;
    width: 44px;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
}

.menu-toggle__line {
    background: currentColor;
    border-radius: 999px;
    display: block;
    height: 2px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    width: 21px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.primary-menu,
.footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    color: inherit;
    display: block;
    font-family: var(--erreciweb-heading-font);
    font-weight: 700;
    padding: 0.35rem 0;
    position: relative;
    text-transform: uppercase;
}

.primary-menu > .current-menu-item > a,
.primary-menu > .current-menu-ancestor > a,
.primary-menu > .current_page_item > a,
.primary-menu > .current_page_ancestor > a {
    text-decoration: none;
}

.primary-menu > .current-menu-item > a::after,
.primary-menu > .current-menu-ancestor > a::after,
.primary-menu > .current_page_item > a::after,
.primary-menu > .current_page_ancestor > a::after {
    background: currentColor;
    bottom: -0.28rem;
    content: "";
    height: 2px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 24px;
}

.primary-menu .sub-menu {
    background: #ffffff;
    border: 1px solid var(--erreciweb-border);
    border-radius: var(--erreciweb-radius);
    box-shadow: 0 18px 40px rgba(21, 25, 34, 0.14);
    color: var(--erreciweb-text);
    display: none;
    left: 0;
    list-style: none;
    margin: 0;
    min-width: 220px;
    padding: 0.45rem;
    position: absolute;
    top: 100%;
    z-index: 20;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
    display: block;
}

.primary-menu .sub-menu a {
    border-radius: calc(var(--erreciweb-radius) - 2px);
    color: var(--erreciweb-text);
    padding: 0.55rem 0.65rem;
}

.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu a:focus {
    background: var(--erreciweb-surface);
    color: var(--erreciweb-primary);
}

.header-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.header-social-links__item {
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    color: inherit;
    font-family: var(--erreciweb-heading-font);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.5rem 0.75rem;
    text-transform: uppercase;
}

.header-social-links__item:hover,
.header-social-links__item:focus {
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    text-decoration: none;
}

.header-mini-cart {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.header-mini-cart__summary,
.header-mini-cart__button {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    color: inherit;
    display: inline-flex;
    font-family: var(--erreciweb-heading-font);
    font-size: 0.82rem;
    font-weight: 700;
    gap: 0.45rem;
    line-height: 1;
    min-height: 34px;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    text-transform: uppercase;
}

.header-mini-cart__summary:hover,
.header-mini-cart__summary:focus,
.header-mini-cart__button:hover,
.header-mini-cart__button:focus {
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    text-decoration: none;
}

.header-mini-cart__count {
    align-items: center;
    background: #ffffff;
    border-radius: 999px;
    color: var(--erreciweb-primary);
    display: inline-flex;
    font-size: 0.75rem;
    height: 22px;
    justify-content: center;
    min-width: 22px;
    padding: 0 0.35rem;
}

.header-mini-cart__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.header-mini-cart__button--checkout {
    background: rgba(255, 255, 255, 0.92);
    color: var(--erreciweb-primary);
}

.header-mini-cart__button--checkout:hover,
.header-mini-cart__button--checkout:focus {
    background: #ffffff;
    color: var(--erreciweb-primary);
}

.site-content {
    min-height: 58vh;
}

.site-main {
    padding-bottom: 4rem;
    padding-top: 4rem;
}

.post-card,
.page,
.post {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.post-card {
    border-bottom: 1px solid var(--erreciweb-border);
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
}

.post-card:last-of-type {
    border-bottom: 0;
}

.entry-header {
    margin-bottom: 1.2rem;
}

.entry-title {
    color: var(--erreciweb-text);
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.08;
    margin: 0;
}

.post-card .entry-title {
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.entry-title a {
    color: inherit;
}

.entry-content > * {
    margin-bottom: 0;
    margin-top: 0;
}

.entry-content > * + * {
    margin-top: 1.1rem;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--erreciweb-primary);
    color: var(--erreciweb-muted);
    margin-left: 0;
    padding-left: 1rem;
}

.post-thumbnail,
.post-card__thumbnail {
    border-radius: var(--erreciweb-radius);
    display: block;
    margin-bottom: 1.4rem;
    overflow: hidden;
}

.post-thumbnail img,
.post-card__thumbnail img {
    width: 100%;
}

.page-links,
.pagination,
.posts-navigation,
.post-navigation {
    margin-top: 2rem;
}

.nav-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.page-numbers {
    border: 1px solid var(--erreciweb-border);
    border-radius: var(--erreciweb-radius);
    color: var(--erreciweb-text);
    min-width: 40px;
    padding: 0.45rem 0.7rem;
    text-align: center;
}

.page-numbers.current {
    background: var(--erreciweb-primary);
    border-color: var(--erreciweb-primary);
    color: #ffffff;
}

.alignwide {
    max-width: min(100%, var(--erreciweb-container));
}

.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

.site-footer {
    background: var(--erreciweb-footer);
    color: var(--erreciweb-footer-text);
}

.site-footer__inner {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    padding-bottom: 2rem;
    padding-top: 2.5rem;
}

.site-footer a {
    color: inherit;
}

.site-footer__brand {
    font-size: 1.1rem;
}

.site-footer__column h2 {
    font-size: 1rem;
    margin: 0 0 0.75rem;
}

.site-footer__column p {
    margin: 0;
    opacity: 0.86;
}

.site-footer__column p + p {
    margin-top: 0.75rem;
}

.footer-menu {
    flex-direction: column;
    gap: 0.45rem;
}

.site-footer__copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    padding: 1rem 0 0;
}

.site-footer__copyright p {
    margin: 0;
}

@media (max-width: 1024px) {
    :root {
        --erreciweb-body-size: 17px;
    }
}

@media (max-width: 720px) {
    :root {
        --erreciweb-body-size: 16px;
    }
}

.site-footer__copyright--left {
    text-align: left;
}

.site-footer__copyright--center {
    text-align: center;
}

.site-footer__copyright--right {
    text-align: right;
}

@media (max-width: 768px) {
    .site-main {
        padding-bottom: 3rem;
        padding-top: 3rem;
    }
}
