/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Child allineato al SILO PHP di Stock-Abbigliamento.it.
 Author:       Stock-Abbigliamento.it
 Template:     generatepress
 Version:      1.1.7
 Text Domain:  generatepress-child
*/

/* I colori e Montserrat arrivano da tokens.css. Qui solo i componenti del blog. */

body.generate-is-using-flexbox,
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#page {
    flex: 1 0 auto;
    width: 100%;
}

.site-footer {
    margin-top: auto;
    width: 100%;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-header h1 {
    font-family: var(--font-sans);
    color: var(--title-color);
    font-weight: 700;
}

a {
    color: var(--link-color);
}

a:hover,
a:focus {
    color: var(--link-hover);
}

.site-content {
    padding-top: calc(var(--navbar-height) + 8px);
}

.admin-bar .navbar {
    top: 32px;
}

.admin-bar .site-content {
    padding-top: calc(var(--navbar-height) + 40px);
}

@media screen and (max-width: 782px) {
    .admin-bar .navbar {
        top: 46px;
    }

    .admin-bar .site-content {
        padding-top: calc(var(--navbar-height) + 54px);
    }
}

.grid-container {
    max-width: 1170px;
}

/* --- Navbar SILO (fissa, stessa del PHP) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background-color: var(--navbar-bg);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.navbar .container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    height: var(--navbar-height);
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.logo img {
    height: calc(var(--navbar-height) - 12px);
    width: auto;
    max-height: calc(var(--navbar-height) - 12px);
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    font-family: var(--font-sans);
    color: var(--navbar-link-color);
    font-size: var(--navbar-link-size);
    font-weight: var(--navbar-link-weight);
    text-decoration: none;
    display: block;
    line-height: var(--navbar-height);
    padding: 0 15px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li a:focus {
    color: var(--navbar-link-hover);
    background-color: var(--navbar-link-hover-bg);
}

.nav-menu li a.is-active,
.nav-menu li.is-active > a {
    color: #ffffff;
    background-color: var(--navbar-link-active-bg);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #ffffff;
    margin-bottom: 4px;
}

.menu-toggle .icon-bar:last-child {
    margin-bottom: 0;
}

@media (max-width: 979px) {
    .navbar nav {
        display: contents;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background-color: rgba(27, 27, 27, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li a {
        line-height: 48px;
        font-size: 16px;
        padding-left: 20px;
    }
}

/* --- Skip + focus --- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1100;
    padding: 12px 18px;
    background: #ffffff;
    color: var(--title-color);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Chrome GeneratePress da spegnere --- */
.site-header,
#masthead,
.main-navigation {
    display: none;
}

.site-footer {
    display: block;
    background: transparent;
    padding: 0;
    border: none;
}

#comments,
.comment-respond,
.comments-area,
.comments-link {
    display: none;
}

.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.one-container .site-content {
    background: var(--surface);
    box-shadow: none;
    border: none;
}

/* --- Fascia titolo archivio / articolo --- */
.page-header,
.single .entry-header {
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: center;
    padding: 40px 20px;
    margin: 0 0 40px;
    width: 100%;
}

.page-header h1,
.single .entry-title {
    color: #ffffff;
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
}

.single .entry-meta,
.page-header .page-description {
    color: rgba(255, 255, 255, 0.82);
    margin-top: 10px;
}

.single .entry-meta a {
    color: #ffffff;
}

.single .sa-back {
    margin: 0 0 14px;
}

.single .sa-back a {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.single .sa-back a:hover,
.single .sa-back a:focus {
    text-decoration: underline;
}

/* --- Articolo --- */
.single-post .inside-article,
.page .inside-article {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.entry-content {
    font-size: 17px;
    line-height: 1.7;
}

.entry-content p {
    margin-bottom: 16px;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.6em;
}

.post-image img,
.featured-image img,
.page-header-image-single img {
    width: 100%;
    height: auto;
    border-radius: 0;
}

/* --- Elenco articoli --- */
.blog .inside-article,
.archive .inside-article,
.search .inside-article {
    max-width: 820px;
    margin: 0 auto 28px;
    padding: 0 0 28px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
}

.blog .entry-title,
.archive .entry-title {
    font-size: 26px;
    margin-bottom: 8px;
}

.blog .entry-title a,
.archive .entry-title a {
    color: var(--title-color);
    text-decoration: none;
}

.blog .entry-title a:hover,
.archive .entry-title a:hover {
    color: var(--primary-color);
}

.entry-summary {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-color);
}

.read-more,
.more-link {
    color: var(--primary-color);
    font-weight: 600;
}

.blog .tags-links,
.archive .tags-links,
.search .tags-links,
.blog .cat-links,
.archive .cat-links {
    display: none;
}

/* --- 404 --- */
.error404 .sa-404 {
    max-width: 820px;
    margin: 0 auto;
    padding: 64px 20px 80px;
    text-align: center;
}

.sa-404__code {
    margin: 0 0 8px;
    font-size: clamp(96px, 18vw, 160px);
    line-height: 0.9;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--primary-color);
}

.sa-404 .entry-title {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 36px);
    color: var(--title-color);
}

.sa-404__lead {
    margin: 0 auto 28px;
    max-width: 28em;
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-color);
}

.sa-404__actions {
    margin: 0;
}

/* --- CTA e pulsanti: stesso layout del SILO --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    min-height: 40px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-orange,
.btn-primary,
.btn-warning {
    color: var(--accent-fill-text);
    background-color: var(--accent-fill);
    border-color: transparent;
}

.btn-orange:hover,
.btn-orange:focus,
.btn-primary:hover,
.btn-primary:focus,
.btn-warning:hover,
.btn-warning:focus {
    color: var(--accent-fill-text);
    background-color: var(--accent-fill-hover);
    text-decoration: none;
}

.btn-large {
    padding: 10px 20px;
    min-height: 44px;
    font-size: 14px;
}

.cc-cta {
    display: block;
    margin: 48px 0 0;
    padding: 40px 28px;
    text-align: center;
    background: var(--surface-muted);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
}

.cc-cta h2,
.cc-cta h3 {
    margin: 0 0 12px;
    font-size: 26px;
    line-height: 1.25;
    color: var(--title-color);
}

.cc-cta__lead {
    margin: 0 auto 24px;
    max-width: 36em;
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-color);
}

.cc-cta__action {
    margin: 0;
}

@media (max-width: 767px) {
    .cc-cta {
        padding: 32px 16px;
    }

    .cc-cta h2,
    .cc-cta h3 {
        font-size: 22px;
    }
}

/* --- Footer SILO --- */
#footer-section {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 30px 0;
    font-size: 14px;
}

#footer-section .container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

#footer-section a {
    color: var(--footer-link);
    text-decoration: none;
}

#footer-section a:hover {
    text-decoration: underline;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.footer-row .copyright.left {
    flex: 0 0 33.333%;
    text-align: left;
}

.footer-row .copyright.center {
    flex: 0 0 66.666%;
    text-align: center;
}

@media (max-width: 767px) {
    .footer-row .copyright.left,
    .footer-row .copyright.center {
        flex: 0 0 100%;
        text-align: center;
        margin-bottom: 8px;
    }
}

.whatsapp-float {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.whatsapp-float__icon {
    display: block;
    width: 32px;
    height: 32px;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
    background-color: #128C7E;
    color: #fff;
}

@media (max-width: 767px) {
    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 20px;
        right: 16px;
    }

    .whatsapp-float__icon {
        width: 28px;
        height: 28px;
    }
}
