/*
Theme Name: mv-tema-uno
Theme URI: 
Author: Marco Vaccaro
Author URI: 
Description: Tema nativo, astrazione zero, indipendente da framework esterni. Sviluppato per U.G.O. System.
Version: 1.0
Text Domain: mv-tema-uno
*/

:root {
    --mv-text: #363636;
    --mv-link: #1a5f7a;
    --mv-link-hover: #124052;
    --mv-bg: #ffffff;
    --mv-bg-light: #f9f9f9;
    --mv-border: #eeeeee;
    --mv-danger: #f14668;
    --mv-font: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
}

/* ==========================================================
   RESET & BASE
   ========================================================== */
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--mv-font); color: var(--mv-text); background: var(--mv-bg); line-height: 1.6; padding-top: 60px; }
a { color: var(--mv-link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--mv-link-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ==========================================================
   LAYOUT E CONTENITORI
   ========================================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.site-content { padding: 3rem 0; }
.layout-grid { display: flex; flex-wrap: wrap; gap: 3rem; }
.main-column { flex: 1; min-width: 0; }
.sidebar-column { width: 300px; flex-shrink: 0; border-left: 1px solid var(--mv-border); padding-left: 2rem; }

@media (max-width: 900px) {
    .layout-grid { flex-direction: column; gap: 2rem; }
    .sidebar-column { width: 100%; border-left: none; padding-left: 0; border-top: 1px solid var(--mv-border); padding-top: 2rem; }
}

/* ==========================================================
   HEADER & NAVBAR
   ========================================================== */
.site-header { position: fixed; top: 0; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--mv-border); z-index: 1000; min-height: 60px; display: flex; align-items: center; }
.navbar-layout { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.site-branding { display: flex; align-items: center; }
.site-logo img { max-height: 35px; width: auto; }
.site-title { font-size: 1.5rem; font-weight: bold; margin: 0; color: var(--mv-text); }
.site-title a { color: inherit; text-decoration: none; }

/* Navigazione */
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.main-navigation a { color: var(--mv-text); font-weight: 500; text-decoration: none; }
.main-navigation a:hover { color: var(--mv-link); }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 0.5rem; }

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-navigation { display: none; position: absolute; top: 60px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--mv-border); padding: 1rem; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
    .main-navigation.is-active { display: block; }
    .main-navigation ul { flex-direction: column; gap: 1rem; }
}

/* ==========================================================
   ARTICOLI E CONTENUTO
   ========================================================== */
.post-article { margin-bottom: 4rem; }
.post-title { font-size: 2rem; margin: 0 0 1rem 0; line-height: 1.2; color: #222; }
.post-title a { color: inherit; text-decoration: none; }
.post-meta { font-size: 0.85rem; color: #666; padding-bottom: 0.5rem; border-bottom: 1px solid var(--mv-border); margin-bottom: 1.5rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.post-content { font-size: 1.15rem; line-height: 1.8; }
.post-content h2 { font-size: 1.75rem; margin-top: 2rem; }
.post-content h3 { font-size: 1.5rem; margin-top: 1.5rem; }
.post-content p { margin-bottom: 1.5rem; }
.post-content ul, .post-content ol { margin: 0 0 1.5rem 2rem; }
.post-content blockquote { border-left: 4px solid var(--mv-link); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--mv-bg-light); font-style: italic; }

/* Video e Media */
.post-content iframe, .post-content video { width: 100%; height: auto; aspect-ratio: 16 / 9; max-width: 100%; margin: 2rem 0; }
.mv-video-footer { max-width: 300px; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.mv-video-footer iframe { width: 100%; aspect-ratio: 16 / 9; border: none; display: block; }

/* ==========================================================
   PAGINAZIONE
   ========================================================== */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin: 3rem 0; list-style: none; padding: 0; }
.pagination .page-numbers { padding: 0.5rem 1rem; border: 1px solid var(--mv-border); border-radius: 4px; color: var(--mv-text); text-decoration: none; }
.pagination .page-numbers:hover { background: var(--mv-bg-light); }
.pagination .current { background: var(--mv-link); color: #fff; border-color: var(--mv-link); }

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer { background: var(--mv-bg-light); border-top: 1px solid var(--mv-border); padding: 3rem 0; margin-top: 4rem; }
.footer-layout { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2rem; }
.footer-text p { margin: 0 0 0.5rem 0; }
.footer-text .legal-notice { font-size: 0.8rem; color: #777; font-style: italic; margin-top: 1rem; }

/* ==========================================================
   WIDGETS & EXTRA
   ========================================================== */
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 1.1rem; text-transform: uppercase; color: #666; margin-bottom: 1rem; border-bottom: 2px solid var(--mv-border); padding-bottom: 0.5rem; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { margin-bottom: 0.5rem; }
.message-box { padding: 1rem; border-radius: 4px; background: var(--mv-bg-light); border: 1px solid var(--mv-border); margin-bottom: 2rem; }
.message-box.warning { border-color: #ffdd57; background: #fffbeb; }

/* Pre e Code (U.G.O. System Style) */
pre, code, .wp-block-verse { font-family: Consolas, Monaco, 'Courier New', Courier, monospace; background: var(--mv-bg-light); }
pre { padding: 1rem; border-left: 3px solid #ccc; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; }

/* Fix WP Admin Bar */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }