/**
 * Stile CSS per Blog Studio Professionale
 * Ispirato al design moderno e professionale
 */

/* 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 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Main content */
main {
    margin: 2rem auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.welcome {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.welcome h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.welcome p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.posts {
    padding: 2rem;
}

.posts h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 300;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
}

/* Post grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.post-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.post-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card h3 a:hover {
    color: #3498db;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
    flex-wrap: wrap;
}

.post-meta span {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.post-excerpt {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.6;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #2980b9;
}

.read-more::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.read-more:hover::after {
    transform: translateX(3px);
}

/* Forms */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* Small buttons for professional look */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
}

.btn-primary { 
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}
.btn-success { 
    background: linear-gradient(135deg, #27ae60, #229954);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}
.btn-danger { 
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}
.btn-warning { 
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}
.btn-secondary { 
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

.btn-primary:hover { 
    background: linear-gradient(135deg, #2980b9, #1f5582);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}
.btn-success:hover { 
    background: linear-gradient(135deg, #229954, #1e8449);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}
.btn-danger:hover { 
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}
.btn-warning:hover { 
    background: linear-gradient(135deg, #e67e22, #d35400);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}
.btn-secondary:hover { 
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.4);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

tr:hover {
    background: #f8f9fa;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* Breadcrumb */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb::before {
    content: '/';
    color: #6c757d;
    margin: 0 0.5rem;
}

.breadcrumb:first-child::before {
    display: none;
}

/* Dashboard */
.dashboard {
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    display: block;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Upload area */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: #fafafa;
    transition: border-color 0.3s ease;
}

.upload-area:hover {
    border-color: #3498db;
}

.upload-area.dragover {
    border-color: #3498db;
    background: #f0f8ff;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    color: #3498db;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #3498db;
    color: white;
}

.pagination .current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-professional {
        gap: 0.3rem;
    }
    
    .nav-professional a {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .welcome h2 {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    
    .form-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.5rem 0.3rem;
    }
    
    .post-card {
        padding: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-meta span {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .welcome {
        padding: 2rem 1rem;
    }
    
    .welcome h2 {
        font-size: 1.5rem;
    }
    
    .posts {
        padding: 1rem;
    }
    
    .dashboard {
        padding: 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Enhanced navigation and professional buttons */
.nav-professional {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-professional a {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-professional a:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Professional link styles */
.link-professional {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.link-professional:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

/* Icon buttons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #f8f9fa;
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-1px);
}

/* Gradient backgrounds for cards */
.card-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.text-muted { color: #6c757d; }
.text-primary { color: #3498db; }
.text-success { color: #27ae60; }
.text-danger { color: #e74c3c; }
.text-warning { color: #f39c12; }

.bg-light { background-color: #f8f9fa; }
.bg-white { background-color: white; }
.bg-primary { background-color: #3498db; }
.bg-success { background-color: #27ae60; }
.bg-danger { background-color: #e74c3c; }
.bg-warning { background-color: #f39c12; }

.border { border: 1px solid #dee2e6; }
.border-radius { border-radius: 4px; }
.shadow { box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.text-muted { color: #6c757d; }
.text-primary { color: #3498db; }
.text-success { color: #27ae60; }
.text-danger { color: #e74c3c; }
.text-warning { color: #f39c12; }

.bg-light { background-color: #f8f9fa; }
.bg-white { background-color: white; }
.bg-primary { background-color: #3498db; }
.bg-success { background-color: #27ae60; }
.bg-danger { background-color: #e74c3c; }
.bg-warning { background-color: #f39c12; }

.border { border: 1px solid #dee2e6; }
.border-radius { border-radius: 4px; }
.shadow { box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 5px 25px rgba(0,0,0,0.15); }