:root {
    --color-background: #E3E3E3;
    --color-text: #333;
    --color-meta: #747965;
    --color-accent: #3A4237;
    --color-border: #747965;
    --font-primary: 'moulin', 'Times New Roman', serif;
    --font-secondary: 'Inter', sans-serif;
    --font-heading: 'clearfacestd', 'Times New Roman', serif;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translate3d(0, 20px, 0);
    }
    to { 
        opacity: 1; 
        transform: translate3d(0, 0, 0); 
    }
}

body {
    background-color: var(--color-background);
    font-family: var(--font-secondary);
    margin: 0;
    padding: 0;
}

.single-container {
    max-width: 800px;
    margin: 40px auto 80px;
    padding: 40px;
    background: var(--color-background);
    box-sizing: border-box;
}

.single-container > * {
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.single-container > .single-featured-image { animation-delay: 0.1s; }
.single-container > .single-meta { animation-delay: 0.2s; }
.single-container > .entry-header { animation-delay: 0.3s; }
.single-container > .entry-content { animation-delay: 0.4s; }
.single-container > .single-logo { animation-delay: 0.5s; }

.single-featured-image {
    margin-bottom: 30px;
}

.single-featured-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.single-meta {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--color-meta);
    text-transform: uppercase;
}

.single-meta .meta-date {
    font-family: var(--font-secondary);
    font-weight: 600;
}

.single-meta .meta-location {
    font-family: var(--font-secondary);
    font-weight: 600;
}

.single-meta .meta-divider {
    margin: 0 10px;
    font-family: var(--font-secondary);
    font-weight: 600;
}

.single-container .entry-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 30px;
    line-height: 1.3;
    font-family: var(--font-primary);
    text-transform: uppercase;
    font-weight: 400;
    color: var(--color-text);
}

.entry-content {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.7;
    color: var(--color-text);
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

.entry-content p { 
    margin-bottom: 1.5em; 
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 700;
    font-family: var(--font-secondary);
}

.entry-content a {
    color: var(--color-accent);
    text-decoration: underline;
}

.entry-content a:hover {
    color: #000;
}

.single-logo {
    text-align: center;
    margin: 60px 0;
    padding: 40px 0 0 0;
    border: none !important;
}

.single-logo img {
    max-width: 80px;
    height: auto;
}

.related-posts-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-top: 40px;
    padding-bottom: 40px;
    margin-top: 40px;
    background: var(--color-background);
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both 0.6s;
    overflow-x: hidden;
}

.related-title {
    text-align: center;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 40px;
    font-weight: 400;
    font-family: var(--font-heading);
    padding: 0 20px;
    color: var(--color-text);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.related-posts-grid .custom-blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    padding: 10px;
    box-sizing: border-box;
    background: var(--color-background);
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    height: 100%;
}

.related-posts-grid .custom-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.related-posts-grid .custom-blog-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: transparent;
    z-index: -1;
}

.related-posts-grid .custom-blog-card .custom-blog-image {
    display: block;
    margin-bottom: 12px;
    margin-left: -10px;
    margin-right: -10px;
    margin-top: -10px;
    text-decoration: none;
    overflow: hidden;
}

.related-posts-grid .custom-blog-card .custom-blog-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
    border-radius: 0;
    transition: transform 0.3s ease;
}

.related-posts-grid .custom-blog-card:hover .custom-blog-image img {
    transform: scale(1.05);
}

.related-posts-grid .custom-blog-card .custom-blog-date {
    margin-bottom: 4px;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 12px;
    color: var(--color-meta);
    text-transform: uppercase;
}

.related-posts-grid .custom-blog-card .custom-blog-title {
    margin: 0;
    margin-bottom: 10px;
    flex-grow: 0;
}

.related-posts-grid .custom-blog-card .custom-blog-title a {
    text-decoration: none;
    line-height: 1.3;
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 1.5rem;
    text-transform: uppercase;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--color-text);
    transition: color 0.3s ease;
}

.related-posts-grid .custom-blog-card .custom-blog-title a:hover {
    color: var(--color-accent);
}

.related-posts-grid .custom-blog-card .custom-blog-desc {
    color: #414040;
    margin: 0 0 15px 0;
    line-height: 1.5;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-family: var(--font-secondary);
    font-weight: 400;
    font-size: 12px;
}

.related-posts-grid .custom-blog-card .custom-blog-read {
    color: var(--color-accent);
    align-self: flex-start;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 4px 0;
    margin-top: auto;
}

.related-posts-grid .custom-blog-card .read-more-text {
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 1px;
    transition: border-color 0.3s ease;
}

.related-posts-grid .custom-blog-card .custom-blog-read span {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.related-posts-grid .custom-blog-card .custom-blog-read:hover {
    color: #000;
}

.related-posts-grid .custom-blog-card .custom-blog-read:hover .read-more-text {
    border-bottom-color: #000;
}

.related-posts-grid .custom-blog-card .custom-blog-read:hover span {
    transform: translateX(3px);
}

.related-posts-grid .custom-blog-card .custom-blog-title a:focus,
.related-posts-grid .custom-blog-card .custom-blog-read:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .single-container {
        padding: 20px;
        margin: 20px auto 40px;
    }
    
    .single-meta {
        padding-top: 0;
        font-size: 0.8rem;
    }
    
    .single-container .entry-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .related-title {
        font-size: 32px;
        margin-bottom: 30px;
        padding: 0 80px;
        line-height: 1.2;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }
    
    .related-posts-grid .custom-blog-card:nth-child(n+3) {
        display: none;
    }
    
    .related-posts-grid .custom-blog-card {
        padding: 10px;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-image {
        margin-left: -10px;
        margin-right: -10px;
        margin-top: -10px;
        margin-bottom: 8px;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-image img {
        height: auto;
        aspect-ratio: 4 / 3;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-title {
        margin-bottom: 8px;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-title a {
        font-size: 1.1rem;
        line-height: 1.2;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-desc {
        -webkit-line-clamp: 2;
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-read {
        font-size: 12px;
        padding: 4px 0;
    }
    
    .entry-content {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .single-logo {
        margin: 40px 0;
        padding: 30px 0 0 0;
    }
    
    .single-logo img {
        max-width: 60px;
    }
}

@media (max-width: 600px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 10px;
    }
    
    .single-container .entry-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .related-title {
        font-size: 32px;
        margin-bottom: 25px;
        padding: 0 80px;
        line-height: 1.2;
    }
    
    .single-container {
        padding: 15px;
        margin: 10px auto 30px;
    }
    
    .entry-content {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-title a {
        font-size: 1rem;
        line-height: 1.1;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-desc {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
        line-height: 1.4;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-read {
        font-size: 11px;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-date {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 8px;
    }
    
    .related-title {
        font-size: 28px;
        padding: 0 40px;
        line-height: 1.2;
    }
    
    .related-posts-grid .custom-blog-card {
        padding: 8px;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-image {
        margin-left: -8px;
        margin-right: -8px;
        margin-top: -8px;
        margin-bottom: 6px;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-title a {
        font-size: 0.9rem;
        line-height: 1.1;
        -webkit-line-clamp: 2;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-desc {
        font-size: 0.7rem;
        -webkit-line-clamp: 2;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-read {
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 5px;
    }
    
    .related-title {
        font-size: 24px;
        padding: 0 20px;
        line-height: 1.2;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-title a {
        font-size: 0.85rem;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-desc {
        font-size: 0.65rem;
    }
}

@media (hover: none) {
    .related-posts-grid .custom-blog-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-read {
        padding: 8px 0;
    }
    
    .related-posts-grid .custom-blog-card:hover .custom-blog-image img {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .single-container > * {
        animation: none;
    }
    
    .related-posts-grid .custom-blog-card {
        transition: none;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-image img {
        transition: none;
    }
    
    .related-posts-grid .custom-blog-card .custom-blog-read span {
        transition: none;
    }
}

@media print {
    .related-posts-section,
    .single-logo {
        display: none;
    }
    
    .single-container {
        max-width: none;
        margin: 0;
        padding: 0;
        background: white;
    }
    
    body {
        background: white;
    }
    
    .single-container > * {
        animation: none;
    }
}