/* single-work.css */
@font-face {
    font-family: 'Octagram';
    src: url('../uploads/fonts/Octagram.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Octagram';
    src: url('../uploads/fonts/Octagram-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* Apply Octagram font to the whole page and headings */
body,
.single-work-page,
.single-work-page h1,
.single-work-page h2,
.single-work-page h3,
.single-work-page h4,
.single-work-page h5,
.single-work-page h6 {
    font-family: 'Octagram', 'Arial Medium', sans-serif;
}

.single-work-page {
    padding: 2rem 0;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
}

.container {
    padding: 4rem 0.5rem;
}

/* Back link */
.back-to-work {
    margin-bottom: 2rem;
}

.back-to-work a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s;
}

.back-to-work a:hover {
    color: #3498db;
}

.back-to-work a::before {
    content: "←";
    margin-right: 0.5rem;
}

/* Work header */
.work-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.work-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.work-category {
    text-transform: capitalize;
    font-weight: 600;
}

.work-title {
    font-size: 2.5rem;
    margin: 0;
    color: #2c3e50;
    line-height: 1.2;
}

/* Featured media */
.work-featured-media {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.work-featured-media img,
.work-featured-media video {
    width: 100%;
    height: auto;
    display: block;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-link {
    display: block;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.video-link:hover {
    background: #e8f4fc;
}

/* Work content */
.work-content {
    margin: 3rem 0;
    padding-left: 0;
    padding-right: 0;
}

.work-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #34495e;
}

.work-full-content {
    font-size: 1rem;
    line-height: 1.8;
}

.work-full-content p {
    margin-bottom: 1.5rem;
}

.work-full-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
}

/* Gallery */
.work-gallery {
    margin: 4rem 0;
}

.work-gallery h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item.video {
    position: relative;
}

.gallery-item iframe {
    width: 100%;
    height: 200px;
    border: none;
}

.gallery-caption {
    padding: 1rem;
    background: #f8f9fa;
    margin: 0;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Related works */
.related-works {
    margin: 4rem 0;
}

.related-works h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.work-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.work-image {
    height: 180px;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.work-card:hover .work-image img {
    transform: scale(1.05);
}

.work-content {
    padding: 0;
}

.work-content .work-title {
    font-size: 27px;
    margin: 0 0 0.5rem;
}

.work-content .work-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.work-content .work-title a:hover {
    color: #3498db;
}

.work-category {
    display: inline-block;
    font-size: 0.8rem;
    color: #7f8c8d;
    background: #f8f9fa;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .work-title {
        font-size: 2rem;
    }
    
    .gallery-grid,
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .back-to-work,
    .work-category,
    .work-content {
        text-align: left !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
    .back-to-work a {
        justify-content: flex-start !important;
    }
}

@media (max-width: 480px) {
    .work-title {
        font-size: 1.8rem;
    }
    
    .gallery-grid,
    .works-grid {
        grid-template-columns: 1fr;
    }
}
.back-to-news {
    margin-bottom: 30px;
}

.back-to-news a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
}
/* CKEditor Image Alignment Styles */
.image-style-side {
    float: right;
    margin-left: 20px;
    max-width: 50%;
}

.image-style-align-left {
    float: left;
    margin-right: 20px;
}

.image-style-align-right {
    float: right;
    margin-left: 20px;
}

.image-style-align-center {
    display: block;
    margin: 0 auto;
}

.image-style-full {
    width: 100%;
    height: auto;
}

/* Media embed responsive */
.media {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.media iframe,
.media object,
.media embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}