﻿/* ========================================
   STILI CONTENUTO CMS - ELEMENTI HTML STANDARD
   ======================================== */

/* Stili base per il contenitore del contenuto CMS */
.prose {
    /* Tipografia di base */
    line-height: 1.7;
    color: #374151; /* text-gray-700 */
}

/* TITOLI */
.prose h1 {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700; /* font-bold */
    line-height: 1.2;
    color: #1f2937; /* text-gray-800 */
    margin-top: 0;
    margin-bottom: 2rem; /* mb-8 */
    border-bottom: 3px solid #3b82f6; /* border-b-2 border-blue-500 */
    padding-bottom: 1rem;
}

.prose h2 {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700; /* font-bold */
    line-height: 1.3;
    color: #1f2937; /* text-gray-800 */
    margin-top: 3rem; /* mt-12 */
    margin-bottom: 1.5rem; /* mb-6 */
}

.prose h3 {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 600; /* font-semibold */
    line-height: 1.4;
    color: #374151; /* text-gray-700 */
    margin-top: 2rem; /* mt-8 */
    margin-bottom: 1rem; /* mb-4 */
}

.prose h4 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    line-height: 1.4;
    color: #374151; /* text-gray-700 */
    margin-top: 1.5rem; /* mt-6 */
    margin-bottom: 0.75rem; /* mb-3 */
}

.prose h5 {
    font-size: 1.125rem; /* text-lg */
    font-weight: 500; /* font-medium */
    line-height: 1.4;
    color: #4b5563; /* text-gray-600 */
    margin-top: 1.5rem; /* mt-6 */
    margin-bottom: 0.75rem; /* mb-3 */
}

.prose h6 {
    font-size: 1rem; /* text-base */
    font-weight: 500; /* font-medium */
    line-height: 1.4;
    color: #4b5563; /* text-gray-600 */
    margin-top: 1rem; /* mt-4 */
    margin-bottom: 0.5rem; /* mb-2 */
    text-transform: uppercase;
    letter-spacing: 0.05em; /* tracking-wide */
}

/* PARAGRAFI */
.prose p {
    margin-bottom: 1.25rem; /* mb-5 */
    color: #4b5563; /* text-gray-600 */
    font-size: 1.125rem; /* text-lg */
    line-height: 1.8;
}

.prose p:last-child {
    margin-bottom: 0;
}

/* LINK */
.prose a {
    color: #3b82f6; /* text-blue-500 */
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #1d4ed8; /* text-blue-700 */
    text-decoration: underline;
}

.prose a:visited {
    color: #7c3aed; /* text-purple-600 */
}

/* LISTE */
.prose ul {
    list-style: none;
    margin: 1.5rem 0; /* my-6 */
    padding-left: 0;
}

.prose ul li {
    position: relative;
    margin-bottom: 0.75rem; /* mb-3 */
    padding-left: 2rem; /* pl-8 */
    color: #4b5563; /* text-gray-600 */
    line-height: 1.7;
}

.prose ul li:before {
    content: "•";
    position: absolute;
    left: 0.75rem; /* left-3 */
    color: #3b82f6; /* text-blue-500 */
    font-weight: bold;
    font-size: 1.2em;
}

.prose ol {
    list-style: none;
    counter-reset: item;
    margin: 1.5rem 0; /* my-6 */
    padding-left: 0;
}

.prose ol li {
    position: relative;
    margin-bottom: 0.75rem; /* mb-3 */
    padding-left: 2.5rem; /* pl-10 */
    color: #4b5563; /* text-gray-600 */
    line-height: 1.7;
    counter-increment: item;
}

.prose ol li:before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    background: #3b82f6; /* bg-blue-500 */
    color: white;
    width: 1.5rem; /* w-6 */
    height: 1.5rem; /* h-6 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem; /* text-xs */
    font-weight: bold;
}

/* Liste annidate */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.prose ul ul li:before {
    content: "◦";
    color: #6b7280; /* text-gray-500 */
}

/* CITAZIONI */
.prose blockquote {
    border-left: 4px solid #3b82f6; /* border-l-4 border-blue-500 */
    background: #f8fafc; /* bg-slate-50 */
    margin: 2rem 0; /* my-8 */
    padding: 1.5rem 2rem; /* p-6 */
    font-style: italic;
    color: #475569; /* text-slate-600 */
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
    margin-bottom: 0;
    font-size: 1.125rem; /* text-lg */
}

/* CODICE */
.prose code {
    background: #f1f5f9; /* bg-slate-100 */
    color: #e11d48; /* text-rose-600 */
    font-family: 'Courier New', monospace;
    padding: 0.25rem 0.5rem; /* px-2 py-1 */
    border-radius: 0.25rem; /* rounded */
    font-size: 0.875rem; /* text-sm */
}

.prose pre {
    background: #1e293b; /* bg-slate-800 */
    color: #f8fafc; /* text-slate-100 */
    padding: 1.5rem; /* p-6 */
    border-radius: 0.5rem; /* rounded-lg */
    overflow-x: auto;
    margin: 1.5rem 0; /* my-6 */
    line-height: 1.5;
}

.prose pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* TABELLE */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0; /* my-8 */
    background: white;
    border-radius: 0.5rem; /* rounded-lg */
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); /* shadow */
}

.prose table thead {
    background: #f8fafc; /* bg-slate-50 */
}

.prose table th {
    padding: 0.75rem 1rem; /* px-4 py-3 */
    text-align: left;
    font-weight: 600; /* font-semibold */
    color: #374151; /* text-gray-700 */
    border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
}

.prose table td {
    padding: 0.75rem 1rem; /* px-4 py-3 */
    border-bottom: 1px solid #f3f4f6; /* border-gray-100 */
    color: #4b5563; /* text-gray-600 */
}

.prose table tbody tr:hover {
    background: #f9fafb; /* bg-gray-50 */
}

.prose table tbody tr:last-child td {
    border-bottom: none;
}

/* IMMAGINI */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem; /* rounded-lg */
    margin: 2rem auto; /* my-8 mx-auto */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); /* shadow-md */
}

.prose figure {
    margin: 2rem 0; /* my-8 */
    text-align: center;
}

.prose figcaption {
    margin-top: 0.5rem; /* mt-2 */
    font-size: 0.875rem; /* text-sm */
    color: #6b7280; /* text-gray-500 */
    font-style: italic;
}

/* LINEE ORIZZONTALI */
.prose hr {
    border: none;
    border-top: 2px solid #e5e7eb; /* border-gray-200 */
    margin: 3rem 0; /* my-12 */
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
}

/* ENFASI */
.prose strong {
    font-weight: 700; /* font-bold */
    color: #1f2937; /* text-gray-800 */
}

.prose em {
    font-style: italic;
    color: #374151; /* text-gray-700 */
}

/* BOTTONI IN STILE CMS */
.prose .btn,
.prose button,
.prose input[type="submit"],
.prose input[type="button"] {
    display: inline-block;
    background: #f97316; /* bg-orange-500 */
    color: white;
    padding: 0.75rem 1.5rem; /* px-6 py-3 */
    border-radius: 0.5rem; /* rounded-lg */
    font-weight: 600; /* font-semibold */
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 0.5rem 0.5rem 0.5rem 0; /* mr-2 my-2 */
}

.prose .btn:hover,
.prose button:hover,
.prose input[type="submit"]:hover,
.prose input[type="button"]:hover {
    background: #ea580c; /* bg-orange-600 */
}

.prose .btn-secondary {
    background: transparent;
    color: #3b82f6; /* text-blue-500 */
    border: 2px solid #3b82f6; /* border-blue-500 */
}

.prose .btn-secondary:hover {
    background: #eff6ff; /* bg-blue-50 */
    color: #1d4ed8; /* text-blue-700 */
}

/* ALERT BOX */
.prose .alert {
    padding: 1rem 1.5rem; /* px-6 py-4 */
    margin: 1.5rem 0; /* my-6 */
    border-radius: 0.5rem; /* rounded-lg */
    border-left: 4px solid;
}

.prose .alert-info {
    background: #eff6ff; /* bg-blue-50 */
    border-left-color: #3b82f6; /* border-blue-500 */
    color: #1e40af; /* text-blue-800 */
}

.prose .alert-warning {
    background: #fffbeb; /* bg-amber-50 */
    border-left-color: #f59e0b; /* border-amber-500 */
    color: #92400e; /* text-amber-800 */
}

.prose .alert-success {
    background: #f0fdf4; /* bg-green-50 */
    border-left-color: #10b981; /* border-green-500 */
    color: #166534; /* text-green-800 */
}

.prose .alert-danger {
    background: #fef2f2; /* bg-red-50 */
    border-left-color: #ef4444; /* border-red-500 */
    color: #991b1b; /* text-red-800 */
}

/* RESPONSIVE - Adattamenti per tablet e mobile */
@media (max-width: 768px) {
    .prose h1 {
        font-size: 2rem; /* text-3xl */
        margin-bottom: 1.5rem; /* mb-6 */
    }
    
    .prose h2 {
        font-size: 1.5rem; /* text-2xl */
        margin-top: 2rem; /* mt-8 */
        margin-bottom: 1rem; /* mb-4 */
    }
    
    .prose h3 {
        font-size: 1.25rem; /* text-xl */
        margin-top: 1.5rem; /* mt-6 */
    }
    
    .prose p {
        font-size: 1rem; /* text-base */
        margin-bottom: 1rem; /* mb-4 */
    }
    
    .prose ul li,
    .prose ol li {
        padding-left: 1.5rem; /* pl-6 */
        margin-bottom: 0.5rem; /* mb-2 */
    }
    
    .prose table {
        font-size: 0.875rem; /* text-sm */
    }
    
    .prose table th,
    .prose table td {
        padding: 0.5rem; /* p-2 */
    }
}

/* VERSIONE LARGE per schermi grandi */
@media (min-width: 1024px) {
    .prose.lg\:prose-xl h1 {
        font-size: 3rem; /* text-5xl */
    }
    
    .prose.lg\:prose-xl h2 {
        font-size: 2.25rem; /* text-4xl */
    }
    
    .prose.lg\:prose-xl h3 {
        font-size: 1.875rem; /* text-3xl */
    }
    
    .prose.lg\:prose-xl p {
        font-size: 1.25rem; /* text-xl */
        line-height: 1.8;
    }
    
    .prose.lg\:prose-xl ul li,
    .prose.lg\:prose-xl ol li {
        font-size: 1.125rem; /* text-lg */
        padding-left: 2.5rem; /* pl-10 */
    }
}

/* STILI PER ELEMENTI SPECIFICI DEL CMS */
.prose .highlight {
    background: linear-gradient(120deg, #a7f3d0 0%, #a7f3d0 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.2em;
    background-position: 0 88%;
    transition: background-size 0.25s ease-in;
    padding: 0.1em 0.2em;
}

.prose .text-center {
    text-align: center;
}

.prose .text-right {
    text-align: right;
}

.prose .font-bold {
    font-weight: 700;
}

.prose .font-medium {
    font-weight: 500;
}

/* UTILITÀ RESPONSIVE PER IMMAGINI */
.prose .img-responsive {
    width: 100%;
    height: auto;
}

.prose .img-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.prose .img-left {
    float: left;
    margin: 0 1rem 1rem 0;
    max-width: 50%;
}

.prose .img-right {
    float: right;
    margin: 0 0 1rem 1rem;
    max-width: 50%;
}

/* Clear fix per immagini flottanti */
.prose .clearfix:after {
    content: "";
    display: table;
    clear: both;
}