/**
 * Utility Classes & Print Styles
 * La Monna Theme
 */

/* Utility Classes */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacing Utilities */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 10px !important; }
.mt-2 { margin-top: 20px !important; }
.mt-3 { margin-top: 30px !important; }
.mt-4 { margin-top: 40px !important; }
.mt-5 { margin-top: 50px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 10px !important; }
.mb-2 { margin-bottom: 20px !important; }
.mb-3 { margin-bottom: 30px !important; }
.mb-4 { margin-bottom: 40px !important; }
.mb-5 { margin-bottom: 50px !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 10px !important; }
.pt-2 { padding-top: 20px !important; }
.pt-3 { padding-top: 30px !important; }
.pt-4 { padding-top: 40px !important; }
.pt-5 { padding-top: 50px !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 10px !important; }
.pb-2 { padding-bottom: 20px !important; }
.pb-3 { padding-bottom: 30px !important; }
.pb-4 { padding-bottom: 40px !important; }
.pb-5 { padding-bottom: 50px !important; }

/* Visibility */
.hidden { display: none !important; }
.visible { display: block !important; }

/* Images */
.alignleft {
    display: inline;
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
}

.alignright {
    display: inline;
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 20px;
}

.wp-caption img[class*="wp-image-"] {
    display: block;
    margin: 0;
}

.wp-caption-text {
    text-align: center;
    padding: 10px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Gallery */
.gallery {
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-item {
    display: inline-block;
    text-align: center;
    width: 100%;
}

.gallery-caption {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

/* WordPress Core */
.sticky {
    /* Stili per post in evidenza */
}

.bypostauthor {
    /* Stili per commenti dell'autore */
}

/* Pagination */
.post-navigation,
.posts-navigation {
    margin: 40px 0;
    padding: 20px 0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.page-links {
    margin: 30px 0;
    text-align: center;
}

.page-links a,
.page-links > span {
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
}

.page-links a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Comments */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.comment-list .children {
    list-style: none;
    margin-left: 40px;
}

.comment-author {
    margin-bottom: 10px;
    font-weight: bold;
}

.comment-metadata {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 15px;
}

.comment-metadata a {
    color: #999;
    text-decoration: none;
}

.reply {
    margin-top: 10px;
}

.reply a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9em;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Print Styles */
@media print {
    *,
    *:before,
    *:after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }

    .site-header,
    .site-footer,
    .main-navigation,
    .hero-section,
    .comments-area,
    .post-navigation {
        display: none;
    }
}

/* Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100000;
}

.skip-link:focus {
    top: 0;
}

/* Loading States */
img {
    opacity: 1;
    transition: opacity 0.3s;
}

img:not(.loaded) {
    opacity: 0.5;
}

/* Custom Scrollbar (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a3a28;
}

/* Selection */
::selection {
    background: var(--accent-color);
    color: var(--text-dark);
}

::-moz-selection {
    background: var(--accent-color);
    color: var(--text-dark);
}

