/*
Theme Name: Erreciweb
Theme URI: https://erreciweb.com/
Author: Roberto Chiapparelli
Author URI: https://erreciweb.com/
Description: A lightweight, fast, 0-plugin WordPress theme based on Bootstrap 5. Compatible with WooCommerce, WPML, and Contact Form 7. Includes custom header and footer logo settings.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: erreciweb
Tags: bootstrap, responsive-layout, woocommerce, translation-ready, fast
*/

/* Custom styles can be added here or in the child theme */

/* ============== SINGLE BLOG POST ================ */
body.single-post #content.site-content {
    width: 100%;
    max-width: none;
    margin-top: 0 !important;
    padding-right: 0;
    padding-left: 0;
}

.single-post-reading-progress {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    height: 2px;
    overflow: hidden;
    background: rgba(27, 54, 100, 0.12);
    box-shadow: 0 2px 8px rgba(17, 40, 79, 0.22);
}

body.single-post #content.site-content .single-post-reading-progress {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.single-post-reading-progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: var(--primary-color, var(--bs-primary, #1b3664));
    transition: transform 0.08s linear;
}

body.admin-bar .single-post-reading-progress {
    top: 32px;
}

.single-post-main {
    padding: 64px 20px 80px;
}

.single-post-article {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.single-post-header {
    max-width: 900px;
    margin: 0 auto 34px;
    text-align: center;
}

.single-post-title {
    margin: 0;
    color: var(--primary-color, var(--bs-primary, #1b3664));
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.08;
    font-weight: 800;
}

.single-post-featured {
    margin: 0 auto 48px;
    text-align: center;
}

.single-post-featured-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}

.single-post-featured-caption {
    max-width: 860px;
    margin: 12px auto 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.single-post-content {
    max-width: 860px;
    margin: 0 auto;
    color: #243145;
    font-size: 18px;
    line-height: 1.85;
    text-align: justify;
    hyphens: auto;
    overflow-wrap: break-word;
}

.single-post-content p,
.single-post-content ul,
.single-post-content ol {
    margin: 0 0 1.35em;
}

.single-post-content ul,
.single-post-content ol {
    padding-left: 1.5rem;
    text-align: left;
}

.single-post-content ul {
    list-style: disc;
}

.single-post-content ol {
    list-style: decimal;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4,
.single-post-content h5,
.single-post-content h6 {
    margin: 1.8em 0 0.75em;
    color: var(--primary-color, var(--bs-primary, #1b3664));
    line-height: 1.2;
    text-align: left;
}

.single-post-content a {
    color: var(--primary-color, var(--bs-primary, #1b3664));
    text-decoration: underline;
    text-underline-offset: 3px;
}

.single-post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 32px auto;
}

.single-post-content blockquote {
    margin: 32px 0;
    padding: 4px 0 4px 24px;
    border-left: 4px solid var(--primary-color, var(--bs-primary, #1b3664));
    color: #4b5563;
    text-align: left;
}

.single-post-share {
    max-width: 860px;
    margin: 48px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(27, 54, 100, 0.14);
    text-align: center;
}

.single-post-share-title {
    margin: 0 0 18px;
    color: #5f7293;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.single-post-share-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.single-post-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid rgba(27, 54, 100, 0.22);
    border-radius: 4px;
    background: #ffffff;
    color: var(--primary-color, var(--bs-primary, #1b3664));
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

button.single-post-share-link {
    font-family: inherit;
}

.single-post-share-link:hover,
.single-post-share-link:focus {
    border-color: var(--primary-color, var(--bs-primary, #1b3664));
    background: var(--primary-color, var(--bs-primary, #1b3664));
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(17, 40, 79, 0.16);
    transform: translateY(-1px);
}

.single-post-share-link--copy.is-copied {
    border-color: var(--secondary-color, var(--bs-secondary, #2c89be));
    background: var(--secondary-color, var(--bs-secondary, #2c89be));
    color: #ffffff;
}

.single-post-contact-form {
    width: 100%;
    max-width: 860px;
    margin: 64px auto 0;
    padding: 32px;
    border: 1px solid rgba(27, 54, 100, 0.12);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(17, 40, 79, 0.08);
}

.single-post-contact-form .wpcf7 {
    margin: 0;
}

.single-post-contact-form p:last-child {
    margin-bottom: 0;
}

.single-post-contact-form .wpcf7-form-control.wpcf7-text,
.single-post-contact-form .wpcf7-form-control.wpcf7-email,
.single-post-contact-form .wpcf7-form-control.wpcf7-textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.single-post-contact-form .wpcf7-submit {
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 4px;
    background: var(--primary-color, var(--bs-primary, #1b3664));
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.single-post-contact-form .wpcf7-submit:hover,
.single-post-contact-form .wpcf7-submit:focus {
    background: #12284b;
}

@media (max-width: 782px) {
    body.admin-bar .single-post-reading-progress {
        top: 46px;
    }
}

@media (max-width: 767px) {
    .single-post-main {
        padding: 42px 16px 56px;
    }

    .single-post-header {
        margin-bottom: 26px;
    }

    .single-post-featured {
        margin-bottom: 34px;
    }

    .single-post-content {
        font-size: 16px;
        line-height: 1.78;
    }

    .single-post-share {
        margin-top: 38px;
    }

    .single-post-share-actions {
        flex-direction: column;
    }

    .single-post-share-link {
        width: 100%;
    }

    .single-post-contact-form {
        margin-top: 44px;
        padding: 24px 18px;
    }
}
