/* ========================================
   FILE: /assets/css/main.css
   Stili CSS aggiuntivi e personalizzazioni
   ======================================== */

/* Animazioni e transizioni */
.site-header {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-stuck {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

body.loaded * {
    transition: opacity 0.3s ease;
}

/* Menu toggle animato */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Focus visibile per accessibilità */
body.keyboard-navigation *:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Stili per Elementor Full Width */
.elementor-section-stretched {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: 0;
    padding-right: 0;
    width: auto;
}

/* Grid system semplice */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 10px; }
.pt-2 { padding-top: 20px; }
.pt-3 { padding-top: 30px; }
.pt-4 { padding-top: 40px; }
.pt-5 { padding-top: 50px; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 10px; }
.pb-2 { padding-bottom: 20px; }
.pb-3 { padding-bottom: 30px; }
.pb-4 { padding-bottom: 40px; }
.pb-5 { padding-bottom: 50px; }

/* Buttons */
.button,
.wp-block-button__link {
    display: inline-block;
    padding: 12px 30px;
    background-color: #0073aa;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.button:hover,
.wp-block-button__link:hover {
    background-color: #005177;
    transform: translateY(-2px);
    color: #ffffff;
}

.button-secondary {
    background-color: transparent;
    color: #0073aa;
    border: 2px solid #0073aa;
}

.button-secondary:hover {
    background-color: #0073aa;
    color: #ffffff;
}

/* Form styling */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: #0073aa;
    outline: none;
}

/* Search form */
.search-form {
    display: flex;
    max-width: 400px;
    margin: 20px 0;
}

.search-form .search-field {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.search-form .search-submit {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 10px 20px;
}

/* Pagination */
.pagination,
.page-links {
    margin: 40px 0;
    text-align: center;
}

.pagination .nav-links,
.page-links {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination a,
.pagination span,
.page-links a,
.page-links span {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f7f7f7;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.pagination a:hover,
.page-links a:hover {
    background-color: #0073aa;
    color: #ffffff;
}

.pagination .current,
.page-links .current {
    background-color: #0073aa;
    color: #ffffff;
}

/* Comments */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.comment {
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author .avatar {
    margin-right: 15px;
    border-radius: 50%;
}

.comment-metadata {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.comment-content {
    margin: 15px 0;
}

.reply {
    text-align: right;
}

.children {
    list-style: none;
    padding-left: 30px;
    margin-top: 20px;
}

/* Widgets */
.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.widget ul li:last-child {
    border-bottom: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f7f7f7;
    font-weight: 600;
}

tr:hover {
    background-color: #f9f9f9;
}

/* Blockquotes */
blockquote {
    margin: 30px 0;
    padding: 20px 20px 20px 60px;
    background-color: #f7f7f7;
    border-left: 4px solid #0073aa;
    position: relative;
    font-style: italic;
}

blockquote:before {
    content: "\201C";
    font-size: 60px;
    position: absolute;
    left: 15px;
    top: 10px;
    color: #0073aa;
    line-height: 1;
}

/* Pre and Code */
pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 20px 0;
}

code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

pre code {
    background: none;
    padding: 0;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    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;
    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;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .navigation,
    .widget-area,
    .edit-link,
    .comment-respond {
        display: none;
    }
    
    .site-content {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
}
    