/* Post Template Styles */
.post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    color: #ffffff;
}

.post-feature-image {
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
}

.post-feature-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-header {
    margin-bottom: 2rem;
    text-align: center;
}

.post-title {
    font-family: "Geist-Black", sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: "Geist-Regular", sans-serif;
    color: #cccccc;
    margin-bottom: 1rem;
}

.post-authors a {
    color: var(--rosso-terna);
    text-decoration: none;
}

.post-authors a:hover {
    text-decoration: underline;
}

.post-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background-color: var(--rosso-terna);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.tag:hover {
    background-color: #a01520;
}

.post-content {
    font-family: "Geist-Regular", sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #ffffff;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: "Geist-Medium", sans-serif;
    color: #ffffff;
    margin: 2rem 0 1rem 0;
}

.post-content h1 {
    font-size: 2.5rem;
}

.post-content h2 {
    font-size: 2rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin: 1rem 0;
}

.post-content a {
    color: var(--rosso-terna);
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content blockquote {
    border-left: 4px solid var(--rosso-terna);
    padding-left: 1rem;
    margin: 2rem 0;
    font-style: italic;
    color: #cccccc;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

.post-content code {
    background-color: var(--sfondo-scuro);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
}

.post-content pre {
    background-color: var(--sfondo-scuro);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-actions {
    text-align: center;
    margin: 3rem 0;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--rosso-terna);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-family: "Geist-Medium", sans-serif;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #a01520;
}

.post-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #575757;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #575757;
}

.nav-prev,
.nav-next {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #ffffff;
    padding: 1rem;
    border-radius: 5px;
    background-color: var(--sfondo-scuro);
    transition: background-color 0.3s ease;
    max-width: 45%;
}

.nav-prev:hover,
.nav-next:hover {
    background-color: #404040;
}

.nav-label {
    font-family: "Geist-Regular", sans-serif;
    font-size: 0.9rem;
    color: #cccccc;
    margin-bottom: 0.5rem;
}

.nav-title {
    font-family: "Geist-Medium", sans-serif;
    font-size: 1.1rem;
    color: #ffffff;
}

.nav-next {
    text-align: right;
}

/* Author and Tag Pages */
.author-container,
.tag-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.author-header,
.tag-header {
    text-align: center;
    margin-bottom: 3rem;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    text-align: left;
}

.author-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name,
.tag-name {
    font-family: "Geist-Black", sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 1rem 0;
}

.author-bio,
.tag-description {
    font-family: "Geist-Regular", sans-serif;
    font-size: 1.2rem;
    color: #cccccc;
    margin: 0 0 1rem 0;
}

.author-location,
.author-website {
    font-family: "Geist-Regular", sans-serif;
    color: #cccccc;
    text-decoration: none;
    margin: 0.5rem 0;
}

.author-website:hover {
    color: var(--rosso-terna);
}

.tag-feature-image {
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
}

.tag-feature-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

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

.post-card {
    background-color: var(--sfondo-scuro);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 2px solid #575757;
}

.post-card:hover {
    transform: translateY(-5px);
}

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

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

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

.post-card-content {
    padding: 1.5rem;
}

.post-card-title {
    font-family: "Geist-Medium", sans-serif;
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
}

.post-card-title a {
    color: #ffffff;
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--rosso-terna);
}

.post-card-meta {
    font-family: "Geist-Regular", sans-serif;
    font-size: 0.9rem;
    color: #cccccc;
    margin-bottom: 1rem;
}

.post-card-authors a {
    color: var(--rosso-terna);
    text-decoration: none;
}

.post-card-authors a:hover {
    text-decoration: underline;
}

.post-card-excerpt {
    font-family: "Geist-Regular", sans-serif;
    color: #cccccc;
    line-height: 1.6;
    margin: 0;
}

/* Page Template */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    color: #ffffff;
}

.page-feature-image {
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
}

.page-feature-image img {
    width: 100%;
    height: auto;
    display: block;
}

.page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.page-title {
    font-family: "Geist-Black", sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.page-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: "Geist-Regular", sans-serif;
    color: #cccccc;
    margin-bottom: 1rem;
}

.page-authors a {
    color: var(--rosso-terna);
    text-decoration: none;
}

.page-authors a:hover {
    text-decoration: underline;
}

.page-content {
    font-family: "Geist-Regular", sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #ffffff;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    font-family: "Geist-Medium", sans-serif;
    color: #ffffff;
    margin: 2rem 0 1rem 0;
}

.page-content h1 {
    font-size: 2.5rem;
}

.page-content h2 {
    font-size: 2rem;
}

.page-content h3 {
    font-size: 1.5rem;
}

.page-content p {
    margin: 1rem 0;
}

.page-content a {
    color: var(--rosso-terna);
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content blockquote {
    border-left: 4px solid var(--rosso-terna);
    padding-left: 1rem;
    margin: 2rem 0;
    font-style: italic;
    color: #cccccc;
}

.page-content ul,
.page-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

.page-content code {
    background-color: var(--sfondo-scuro);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
}

.page-content pre {
    background-color: var(--sfondo-scuro);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.page-content pre code {
    background: none;
    padding: 0;
}

/* Koenig Editor Required Classes */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin: auto calc(50% - 50vw);
    transform: translateX(calc(50vw - 50%));
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.kg-card {
    margin: 2rem 0;
}

.kg-card figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #cccccc;
    margin-top: 1rem;
    font-style: italic;
}

.kg-image-card {
    margin: 2rem 0;
}

.kg-image-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.kg-gallery-card {
    margin: 2rem 0;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kg-gallery-row {
    display: flex;
    gap: 1rem;
}

.kg-gallery-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-embed-card {
    margin: 2rem 0;
}

.kg-embed-card iframe {
    width: 100%;
    border-radius: 10px;
}

/* Responsive adjustments for wide content */
@media (max-width: 768px) {
    .kg-width-wide {
        width: 100%;
        margin: auto;
        transform: none;
    }
    
    .kg-width-full {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
    }
    
    .kg-gallery-row {
        flex-direction: column;
    }
}
