/* CSS per la sezione blog */

/* Blog Hero */
.blog-hero {
    background-color: white;
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../images/blog/blog-hero-bg.jpg');
    background-size: cover;
    background-position: center;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-gray-900);
}

.blog-subtitle {
    font-size: 1.25rem;
    color: var(--color-gray-600);
    max-width: 48rem;
    margin: 0 auto 2rem;
}

.blog-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.category-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.category-pill:nth-child(1) {
    background-color: var(--color-purple-100);
    color: var(--color-purple-800);
}

.category-pill:nth-child(2) {
    background-color: var(--color-indigo-light);
    color: var(--color-indigo);
}

.category-pill:nth-child(3) {
    background-color: var(--color-pink-light);
    color: var(--color-pink);
}

.category-pill:nth-child(4) {
    background-color: #e0f2fe;
    color: #0369a1;
}

.category-pill:nth-child(5) {
    background-color: #dcfce7;
    color: #15803d;
}

.category-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Breadcrumb styling */
.breadcrumb {
    margin: 0.5rem 0 1.5rem;
    padding: 0.5rem 1rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    color: var(--color-gray-600);
    font-size: 0.875rem;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
    color: var(--color-gray-400);
}

.breadcrumb a {
    color: var(--color-purple);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--color-purple-dark);
    text-decoration: underline;
}

/* Featured Post */
.featured-post {
    margin-bottom: 3rem;
}

.featured-article {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.article-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-image img:hover {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem 2rem 2rem;
}

.category-label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--color-purple-100);
    color: var(--color-purple-800);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-content h2 a {
    color: var(--color-gray-900);
    text-decoration: none;
    transition: color 0.2s;
}

.article-content h2 a:hover {
    color: var(--color-purple);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: var(--color-purple);
    color: white;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.5rem;
    margin-top: 1rem;
    transition: all 0.2s;
}

.read-more:hover {
    background-color: var(--color-purple-dark);
    transform: translateY(-1px);
}

/* Recent Posts */
.recent-posts {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-gray-900);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.post-card {
    background-color: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-image img:hover {
    transform: scale(1.05);
}

.post-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.75rem 0;
    line-height: 1.4;
}

.post-content h3 a {
    color: var(--color-gray-900);
    text-decoration: none;
    transition: color 0.2s;
}

.post-content h3 a:hover {
    color: var(--color-purple);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-gray-500);
    margin-top: auto;
}

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

.pagination .current-page {
    padding: 0.5rem 1rem;
    background-color: var(--color-purple);
    color: white;
    border-radius: 0.25rem;
    font-weight: 500;
}

.pagination .page-link {
    padding: 0.5rem 1rem;
    background-color: var(--color-gray-100);
    color: var(--color-gray-700);
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background-color: var(--color-gray-200);
}

.pagination .next-page {
    padding: 0.5rem 1rem;
    background-color: var(--color-gray-100);
    color: var(--color-gray-700);
    border-radius: 0.25rem;
    text-decoration: none;
    margin-left: 0.5rem;
    transition: all 0.2s;
}

.pagination .next-page:hover {
    background-color: var(--color-gray-200);
}

/* Newsletter Section */
.newsletter-section {
    margin-bottom: 3rem;
}

.newsletter-container {
    background: linear-gradient(to right, var(--color-purple), var(--color-indigo));
    border-radius: 1rem;
    padding: 2.5rem;
    color: white;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    align-items: center;
}

.newsletter-content {
    flex: 1;
    min-width: 300px;
}

.newsletter-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter-content p {
    opacity: 0.9;
    line-height: 1.6;
}

.newsletter-form {
    flex: 1;
    min-width: 300px;
}

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

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.privacy-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.privacy-label a {
    color: white;
    text-decoration: underline;
}

.subscribe-btn {
    width: 100%;
    padding: 0.75rem 0;
    background-color: white;
    color: var(--color-purple);
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-note {
    text-align: center;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    opacity: 0.8;
}

/* Extended Footer */
.footer {
    background-color: white;
    border-radius: 1rem 1rem 0 0;
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: space-between;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-column h3 {
    font-size: 1.125rem;
    color: var(--color-gray-800);
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--color-gray-600);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--color-purple);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--color-gray-200);
    padding-top: 1.5rem;
    color: var(--color-gray-500);
    font-size: 0.875rem;
}

/* Single Article Page */
.article-header {
    margin-bottom: 2rem;
}

.article-meta-full {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: var(--color-gray-900);
}

.article-date {
    color: var(--color-gray-500);
    font-size: 0.875rem;
}

.article-featured-image {
    width: 100%;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-gray-800);
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 2.5rem 0 1rem;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 2rem 0 1rem;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    border-left: 4px solid var(--color-purple);
    padding-left: 1rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-gray-700);
}

.table-of-contents {
    background-color: var(--color-gray-50);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.table-of-contents h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-gray-900);
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.table-of-contents li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-purple);
}

.table-of-contents a {
    color: var(--color-gray-700);
    text-decoration: none;
    transition: color 0.2s;
}

.table-of-contents a:hover {
    color: var(--color-purple);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0;
}

.article-tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--color-gray-100);
    color: var(--color-gray-700);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}

.article-tag:hover {
    background-color: var(--color-gray-200);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-gray-200);
}

.share-label {
    font-weight: 600;
    color: var(--color-gray-800);
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.share-button:hover {
    transform: translateY(-2px);
}

.share-button.twitter {
    background-color: #1DA1F2;
    color: white;
}

.share-button.facebook {
    background-color: #1877F2;
    color: white;
}

.share-button.linkedin {
    background-color: #0A66C2;
    color: white;
}

.share-button.whatsapp {
    background-color: #25D366;
    color: white;
}

.article-author-bio {
    background-color: var(--color-gray-50);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 3rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.author-bio-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-bio-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-bio-content h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-gray-900);
}

.author-bio-content p {
    color: var(--color-gray-700);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.related-articles {
    margin-top: 4rem;
}

.related-articles h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-gray-900);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.article-comments {
    margin-top: 4rem;
}

.article-comments h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-gray-900);
}

.comment-form {
    background-color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-gray-800);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--color-purple);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    background-color: var(--color-purple-dark);
}

.comments-list {
    margin-top: 2rem;
}

.comment {
    background-color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--color-gray-900);
}

.comment-date {
    color: var(--color-gray-500);
    font-size: 0.875rem;
}

.comment-content p {
    color: var(--color-gray-800);
    line-height: 1.6;
}

.comment-reply {
    margin-top: 1rem;
    margin-left: 2.5rem;
}

/* Category Page */
.category-description {
    background-color: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.category-description h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-gray-900);
}

.category-description p {
    color: var(--color-gray-700);
    line-height: 1.6;
}

/* Responsive */
@media (min-width: 768px) {
    .featured-article {
        flex-direction: row;
    }
    
    .article-image {
        width: 50%;
        height: auto;
    }
    
    .table-of-contents {
        float: right;
        width: 280px;
        margin-left: 2rem;
    }
}

@media (max-width: 767px) {
    .blog-title {
        font-size: 2rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .newsletter-container {
        padding: 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
    }
}