:root {
    --primary-color: #2d5a27;
    --secondary-color: #4a7c59;
    --accent-color: #f4f7f4;
    --text-color: #2c3e50;
    --border-color: #e8ede8;
    --shadow-color: rgba(74, 124, 89, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f8fbf8 0%, #e8f4e8 100%);
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Menu nel body */
.nav-menu {
    display: flex;
    gap: 0rem;
    margin: 0.1rem 0;
    justify-content: left;
}

.nav-menu a {
    color: white;
    text-decoration: none;
	background: #2d5a27;
    padding: 0.40rem 1rem;
    border-radius: 0px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background: #1a3319;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #4a7c59;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 0.5rem;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Titolo */
.title-detail {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.title-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

.title-title {
    font-size: 2.5rem;
    color: #2d5a27;
    margin-bottom: 0.5rem;
}

.title-sub {
    font-style: italic;
    color: #322f2f;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.title-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.title-date {
    color: #6d6969;
    font-size: 0.80rem;
}

.contenitore {
  overflow: hidden; 
}

.img-sinistra {
  float: right; 
  margin-left: 15px;
  margin-bottom: 10px;
  margin-top: 10px;
  max-width: 350px;
  height: auto;
}

.contenitore p {
  text-align: justify; 
}

/* Contenuti */
.article-detail {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.detail-section {
    margin-bottom: 2rem;
    background: white;
    border-radius: 15px;
    padding: 1rem 1rem;
}

.detail-section h3
.detail-section h4 {
    color: #2d5a27;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #e8f5e8;
    padding-bottom: 0.5rem;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.content-text p {
    margin-bottom: 1rem;
}

.content-text ul {
    list-style: none;
    padding: 0;
}

.content-text ul li {
    padding-left: 1rem;
    position: relative;
}

.content-text ul li:before {
    content: "•";
    color: black;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.content-text ol {
  counter-reset: item;
  padding: 0;
  list-style: none;
}

.content-text ol li {
  counter-increment: item;
  padding-left: 2rem;
  position: relative;
}

.content-text ol li:before {
  content: counter(item) ".";
  position: absolute;
  left: 0;
  font-weight: bold;
  color: black;
}

/* Warning (yellow) */

.warning-section {
  background: #fff3cd; 
  border-left: 4px solid red; 
  padding: 1.5rem; margin: 1rem 0; 
  border-radius: 5px;
}

.warning-section strong {
    color: #721c24;
}

.warning-title {
  color: #721c24; 
  font-weight: bold; 
  font-size: 1.1rem; 
  margin-bottom: 1rem;
}

.warning-text {
  color: #721c24;
}

/* Stile base dei link */
a {
  color: #3a2f1c;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  border-bottom: 2px dotted transparent; 
}

/* Effetto hover */
a:hover {
  color: #a67c52; 
  border-bottom: 2px dotted #a67c52; 
  text-shadow: 0 0 5px rgba(166,124,82,0.5); 
  transform: scale(1.02);  
}

/* Effetto focus per accessibilità */
a:focus {
  outline: none;
  border-bottom: 2px dotted #a67c52;
  box-shadow: 0 0 5px rgba(166,124,82,0.5);
}


.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #4a7c59;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #2d5a27;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 124, 89, 0.4);
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: 3rem;
}

/* ========================================
   SEZIONE RESPONSIVE - MEDIA QUERIES
   ======================================== */

/* Tablet landscape e desktop piccoli */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 1.5rem;
    }
    
    .title-title {
        font-size: 2.2rem;
    }
    
    .title-sub {
        font-size: 1.3rem;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    /* Header */
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    /* Container */
    .container {
        padding: 0 1rem;
    }
    
    /* Menu navigazione */
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin: 0.5rem 0;
    }
    
    .nav-menu a {
        font-size: 0.85rem;
        padding: 0.35rem 0.8rem;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.85rem;
        padding: 0.8rem 0;
    }
    
    /* Titolo */
    .title-header {
        padding: 1.5rem 1rem;
    }
    
    .title-title {
        font-size: 1.8rem;
    }
    
    .title-sub {
        font-size: 1.2rem;
    }
    
    .title-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Immagini */
    .img-sinistra {
        float: none;
        display: block;
        margin: 1rem auto;
        max-width: 100%;
    }
    
    /* Sezioni contenuto */
    .article-detail,
    .title-detail {
        margin: 1.5rem 0;
        border-radius: 10px;
    }
    
    .detail-section {
        padding: 1rem;
    }
    
    .detail-section h3,
    .detail-section h4 {
        font-size: 1.3rem;
    }
    
    /* Testo contenuto */
    .content-text {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .content-text ul li,
    .content-text ol li {
        padding-left: 1.5rem;
    }
    
    /* Warning section */
    .warning-section {
        padding: 1rem;
        margin: 0.8rem 0;
    }
    
    .warning-title {
        font-size: 1rem;
    }
    
    /* Back to top button */
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: 20px;
        right: 20px;
    }
    
    /* Footer */
    footer {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
    }
}

/* Smartphone large */
@media (max-width: 480px) {
    /* Header */
    .header {
        padding: 1.5rem 0;
    }
    
    .header h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    /* Menu navigazione */
    .nav-menu {
        gap: 0.3rem;
    }
    
    .nav-menu a {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Titolo */
    .title-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .title-sub {
        font-size: 1rem;
    }
    
    .title-date {
        font-size: 0.75rem;
    }
    
    /* Sezioni */
    .detail-section h3,
    .detail-section h4 {
        font-size: 1.2rem;
    }
    
    /* Contenuto testuale */
    .content-text {
        font-size: 0.95rem;
    }
    
    .content-text p {
        margin-bottom: 0.8rem;
    }
    
    /* Back to top */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Smartphone small */
@media (max-width: 360px) {
    .header h1 {
        font-size: 1.4rem;
    }
    
    .title-title {
        font-size: 1.3rem;
    }
    
    .title-sub {
        font-size: 0.95rem;
    }
    
    .nav-menu a {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .content-text {
        font-size: 0.9rem;
    }
}

/* Orientamento landscape per smartphone */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 1rem 0;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .title-header {
        padding: 1rem;
    }
    
    .title-title {
        font-size: 1.6rem;
    }
}

/* Print styles */
@media print {
    .nav-menu,
    .back-to-top,
    .breadcrumb {
        display: none;
    }
    
    .header {
        background: none;
        color: black;
        border-bottom: 2px solid #000;
    }
    
    .article-detail,
    .title-detail {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .warning-section {
        border: 2px solid #000;
    }
    
    a {
        color: inherit;
        text-decoration: underline;
    }
}