
/*
Theme Name: Minimal Blog by Enree.co
Theme URI: https://blog.enree.co
Author: Enrico Murru
Author URI: https://enree.co
Description: Minimalist WordPress theme in black/white/gray with multi-level menu, header banner, sidebar widgets below the menu and configurable footer.
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: minimal-blog-by-enreeco
Tags: minimal, responsive, accessibility-ready, two-columns, custom-header, custom-logo, custom-menu
*/

/* Reset & base */
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
body {
  margin: 0;
  color: #111;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: #111; text-decoration: underline; text-decoration-color: #bbb; }
a:hover, a:focus { text-decoration-color: #111; }

/* Layout */
.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 0 0;
}
.site-header {
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
}
.site-branding { display:flex; align-items:center; gap:.75rem; }
.site-title { font-size: 1.25rem; margin: 0; font-weight: 700; letter-spacing: .2px; }
.site-description { margin: 0; color:#666; font-size:.95rem; }

/* Banner (custom header) */
.header-banner { width: 100%; border-top: 1px solid #eee; border-bottom: 1px solid #eee; background: #f8f8f8; }
.header-banner img { display:block; width:100%; height:auto; }

/* Menu principale (multilivello) */
.primary-nav { border-bottom: 1px solid #eee; background:#fff; }
.menu-toggle { display:none; }
.menu { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:.25rem; }
.menu > li { position:relative; }
.menu > li > a {
  display:block; padding:.75rem .9rem; text-decoration:none; color:#111;
}
.menu > li:hover > a, .menu > li.focus > a { background:#f1f1f1; }
.menu li ul {
  position:absolute; left:0; top:100%; min-width: 220px;
  background:#fff; border:1px solid #e5e5e5; padding:.25rem; display:none; z-index:1000;
}
.menu li:hover > ul, .menu li:focus-within > ul { display:block; }
.menu li ul li a { display:block; padding:.6rem .7rem; }
.menu li ul li { position:relative; }
.menu li ul li ul { left:100%; top:0; }
.menu .menu-item-has-children > a:after {
  content:"▾"; font-size:.75rem; margin-left:.35rem; color:#666;
}

/* Sidebar below the menu */
.main-area { display:grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; padding: 1.2rem 0 2rem; }
.sidebar { border-left: 1px solid #eee; padding-left: 1.5rem; }
.sidebar .widget { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px dashed #ddd; }
.sidebar .widget-title { font-size: 1rem; margin:.2rem 0 .6rem; color:#333; }

/* Footer */
.site-footer { border-top: 1px solid #e5e5e5; background:#f9f9f9; padding: 2rem 0; color:#333; }
.footer-widgets { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:1.25rem; margin-bottom:1rem; }
.site-info { font-size:.9rem; color:#666; }

/* Tipografia contenuto */
.entry-title { font-size: clamp(1.6rem, 2vw, 2rem); line-height:1.25; margin: .8rem 0 .6rem; }
.entry-meta { color:#666; font-size:.9rem; margin-bottom: .8rem; }
.entry-content { font-size: 1.02rem; }
.entry-content h2, .entry-content h3 { margin-top: 1.6rem; }
.entry-content p { margin: .8rem 0; }
.entry-content blockquote {
  margin: 1rem 0; padding: .75rem 1rem; background:#fafafa; border-left:4px solid #ddd;
}

/* Tabelle */
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th, .entry-content td { border: 1px solid #e5e5e5; padding: .5rem .6rem; }
.entry-content th { background:#f5f5f5; text-align:left; }

/* Form inputs coerenti */
input[type=text], input[type=email], input[type=url], input[type=search], input[type=tel],
input[type=password], input[type=number], textarea, select {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #111;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
textarea { min-height: 140px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 1rem; height: 1rem; vertical-align: middle; }
input:focus, textarea:focus, select:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
button, input[type=submit], input[type=button], .button {
  display:inline-block; padding:.55rem .9rem; border-radius: 8px;
  border:1px solid #111; background:#111; color:#fff; cursor:pointer;
}
button:hover, input[type=submit]:hover, input[type=button]:hover, .button:hover {
  filter: contrast(1.1);
}

/* Search Form */
.search-form {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.search-field {
  min-width: 200px;
  padding: .5rem .7rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: .9rem;
}
.search-submit {
  padding: .5rem .8rem;
  font-size: .9rem;
  white-space: nowrap;
}

/* Commenti */
.comment-list { list-style:none; padding:0; }
.comment { border-top:1px solid #eee; padding:1rem 0; }
.comment-author { font-weight:600; }
.comment-meta { color:#777; font-size:.9rem; }

/* Responsive */
@media (max-width: 960px) {
  .main-area { grid-template-columns: 1fr; }
  .sidebar { border-left: none; padding-left: 0; border-top:1px solid #eee; padding-top:1rem; }
  .footer-widgets { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .header-actions { display: none; }
  .menu-toggle { 
    display: block; 
    padding: .8rem 1rem; 
    border: 2px solid #111; 
    background: #fff url('images/menu.png') no-repeat center center; 
    background-size: 24px 24px;
    color: #fff; 
    width: 100%; 
    height: 50px;
    text-align: center; 
    font-size: 1rem; 
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s ease;
    margin: .5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    text-indent: -9999px;
    overflow: hidden;
    position: relative;
  }
  .menu-toggle:hover {
    background: #fff url('images/menu.png') no-repeat center center;
    background-size: 24px 24px;
    border-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
  }
  .menu-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,.2);
  }
  .menu { display:none; flex-direction:column; gap:0; border-top:1px solid #eee; }
  .menu.open { display:flex; }
  .menu > li > a { padding:.8rem .6rem; }
  .footer-widgets { grid-template-columns: 1fr; }
}

/* Paginazione (coordinata con gli input) */
.pagination { margin: 1.5rem 0 0; }
.pagination ul.page-numbers {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: 0;
  margin: 0;
  justify-content: center;
  align-items: center;
}
.pagination ul.page-numbers li { margin: 0; }
.pagination a.page-numbers,
.pagination span.page-numbers {
  display: inline-block;
  padding: .5rem .75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: #111;
  text-decoration: none;
  line-height: 1;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease, transform .05s ease;
}
.pagination a.page-numbers:hover { border-color: #111; transform: translateY(-1px); }
.pagination a.page-numbers:focus-visible {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
.pagination .page-numbers.current {
  background: #111;
  color: #fff;
  border-color: #111;
}
.pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  padding: .5rem .25rem;
}
.pagination .prev, .pagination .next { font-weight: 600; }

/* Post Navigation */
.post-navigation {
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.nav-previous, .nav-next {
  display: flex;
  flex-direction: column;
}
.nav-next {
  text-align: right;
}
.post-navigation a {
  display: block;
  padding: .75rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
  text-decoration: none;
  color: #111;
  transition: all .15s ease;
}
.post-navigation a:hover {
  background: #f1f1f1;
  border-color: #ccc;
  transform: translateY(-1px);
}
.nav-subtitle {
  display: block;
  font-size: .85rem;
  color: #666;
  margin-bottom: .25rem;
  font-weight: 500;
}
.nav-title {
  display: block;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
}
.nav-previous .nav-title {
  text-align: left;
}
.nav-next .nav-title {
  text-align: right;
}

/* Responsive adjustments for post navigation */
@media (max-width: 720px) {
  .nav-links {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .nav-next {
    text-align: left;
  }
  .nav-next .nav-title {
    text-align: left;
  }
}

