/* CSS Migliorato per dirittoeracconti */

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Container principale */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 20px;
    text-align: center;
}

.logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 10px;
}

.site-title {
    font-size: 2.5em;
    font-weight: 300;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.site-subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Navigazione */
.navigation {
    background: #34495e;
    padding: 0;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border-right: 1px solid #2c3e50;
}

.nav-link:hover {
    background-color: #2c3e50;
    color: #3498db;
}

/* Sezione motore di ricerca */
.search-section {
    background: #ecf0f1;
    padding: 30px;
    text-align: center;
    border-bottom: 3px solid #3498db;
}

.search-title {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
    font-weight: 300;
}

.search-form {
    margin-bottom: 20px;
}

.search-input {
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #bdc3c7;
    border-radius: 25px;
    width: 300px;
    max-width: 100%;
    margin-right: 10px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.search-button {
    padding: 12px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background: #2980b9;
}

/* Contenuto principale */
.main-content {
    padding: 30px;
}

/* Articoli/News */
.news-item {
    background: white;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.news-title {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 600;
    line-height: 1.4;
    display: block;
    margin-bottom: 10px;
}

.news-title:hover {
    color: #3498db;
}

.news-meta {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-style: italic;
}

.news-description {
    color: #555;
    line-height: 1.6;
}

/* Paginazione */
.pagination {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background: #2980b9;
}

.pagination .current {
    background: #2c3e50;
    color: white;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 5px;
}

/* Sidebar ricerca giuridica */
.sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sidebar h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 8px;
}

.sidebar a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        margin: 10px;
        border-radius: 0;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-link {
        border-right: none;
        border-bottom: 1px solid #2c3e50;
    }
    
    .search-input {
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .search-button {
        width: 100%;
    }
    
    .site-title {
        font-size: 2em;
    }
    
    .main-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5em;
    }
    
    .search-title {
        font-size: 1.4em;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .news-item {
        padding: 15px;
    }
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-item {
    animation: fadeIn 0.6s ease-out;
}

/* Miglioramenti per le immagini */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Stili per il contenuto RSS */
.rss-content img {
    max-width: 300px !important;
    max-height: 200px !important;
    object-fit: cover;
    border-radius: 8px;
    margin: 10px 0;
}

/* Prevenzione overflow immagini */
.content-wrapper {
    overflow: hidden;
}

.content-wrapper img {
    max-width: 100% !important;
    height: auto !important;
}

