/* ========================================
   BLOG STYLES
   ========================================
   This file contains all blog-related styles
   Loaded conditionally on blog archive and single post pages
   */

/* ========================================
   BLOG ARCHIVE STYLES
   ======================================== */

.blog-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Blog Header */
.blog-header {
    margin-bottom: 60px;
}

body.single-post .blog-header {
    margin-bottom: 0;
}

.blog-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.blog-header-left {
    flex: 1;
    max-width: 650px;
}

.blog-title {
    font-family: "Delight", sans-serif;
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 20px 0;
    color: #000;
}

.blog-description {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

.blog-header-right {
    flex-shrink: 0;
    width: 400px;
    padding-top: 10px;
}

.blog-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.blog-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 0 !important;
    border-bottom: 1px solid #000 !important;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    outline: none;
    transition: border-color 0.3s;
}

.blog-search-input:focus {
    border-color: #999;
}

.blog-search-input::placeholder {
    color: #999;
    text-align: right;
}

.blog-search-button {
    position: relative;
    background: none;
    border: none;
    padding: 8px;
    margin-left: 10px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-search-button:hover {
    color: #000;
}

/* Categories Section */
.blog-tags-section {
    margin-bottom: 60px;
}

.tags-heading {
    font-family: "Delight", sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: #000;
}

.blog-tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.tag-button {
    padding: 4px 12px;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    background: transparent;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.tag-button:hover {
    border-color: #c45a3b;
    color: #c45a3b;
}

.tag-button.active {
    border-color: #c45a3b;
    background: #fbeae2;
    color: #c45a3b;
    font-weight: 900;
}

/* Featured Post */
.featured-post {
    margin-bottom: 80px;
    border-top: 1px solid #a9a9a9;
    border-bottom: 1px solid #a9a9a9;
    padding: 40px 0 60px 0;
}

.featured-post-content {
    display: flex;
    gap: 60px;
    align-items: center;
}

.featured-post-left {
    flex: 1;
}

.featured-post-tag {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 20px;
}

.featured-post-title {
    font-family: "Delight", sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
}

.featured-post-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
    text-transform: uppercase;
}

.featured-post-title a:hover {
    color: #d4534f;
}

.featured-post-excerpt {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 30px;
}

.featured-post-right {
    flex-shrink: 0;
    width: 450px;
}

.featured-post-image,
.featured-post-placeholder {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.featured-post-placeholder {
    background: #c4c4c4;
}

/* Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 80px;
}

.blog-post-card {
    display: flex;
    flex-direction: column;
}

.blog-post-image {
    margin-bottom: 25px;
}

.blog-post-image a {
    display: block;
}

.post-thumbnail,
.post-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.post-placeholder {
    background: #c4c4c4;
}

.blog-post-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-post-title {
    font-family: "Delight", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.blog-post-title a {
    color: #000;
    text-decoration: none;
}

.blog-post-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    margin: 0 0 auto 0;
    text-align: justify;
    padding-bottom: 25px;
}

.blog-post-link {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    font-weight: 400;
    color: #c45a3b;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-top: auto;
    transition: gap 0.3s ease, color 0.3s ease;
}

.blog-post-link:hover {
    color: #a04830;
    gap: 16px;
}

.blog-post-link svg {
    flex-shrink: 0;
}

.no-posts-message {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 18px;
    color: #666;
    padding: 40px 0;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.blog-pagination .page-numbers {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
    align-items: center;
}

.blog-pagination .page-numbers li {
    display: inline-block;
}

.blog-pagination .page-numbers a,
.blog-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: #000;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-pagination .page-numbers a:hover {
    color: #c45a3b;
}

.blog-pagination .page-numbers .current {
    color: #000;
    font-weight: 700;
}

.blog-pagination .page-numbers .dots {
    font-weight: 700;
    letter-spacing: 2px;
}

.blog-pagination .page-numbers .prev,
.blog-pagination .page-numbers .next {
    font-size: 20px;
    font-weight: 700;
}

/* Blog Archive Responsive */
@media (max-width: 1200px) {
    .blog-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .blog-header-content {
        flex-direction: column;
    }

    .blog-header-right {
        width: 100%;
        max-width: 400px;
    }

    .featured-post {
        padding: 40px 0 20px 0;
        margin-bottom: 0;
        border-bottom: 0;
    }

    .featured-post-content {
        flex-direction: column;
        gap: 40px;
    }

    .featured-post-tag {
        display: none;
    }

    .featured-post-link {
        float: right;
    }

    .featured-post-right {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        order: -1;
    }

    .featured-post-image,
    .featured-post-placeholder {
        width: 100%;
        height: auto;
    }

    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 0;
    }

    .blog-post-card {
        padding: 40px 0;
        border-top: 1px solid #a9a9a9;
    }
}

@media (max-width: 768px) {

    .blog-search-input {
        border-bottom: none !important;
        padding: 0 !important;
    }

    .blog-search-input::placeholder {
        text-align: left;
    }

    .blog-header-right {
        border-bottom: 1px solid #000;
    }

    .tags-heading {
        text-align: center;
    }

    .blog-archive-container {
        padding: 40px 0;
    }

    .blog-title {
        font-size: 48px;
    }

    .featured-post-title {
        font-size: 36px;
    }

    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .blog-post-title {
        font-size: 14px;
    }

    .blog-post-excerpt {
        font-size: 13px;
    }

    .blog-pagination {
        padding: 40px 0;
    }

    .blog-pagination .page-numbers {
        gap: 15px;
    }

    .blog-pagination .page-numbers a,
    .blog-pagination .page-numbers span {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }

    .post-thumbnail,
    .post-placeholder {
        aspect-ratio: 4 / 3;
    }
}

/* ========================================
   BLOG ARCHIVE FULL WIDTH STYLES
   ======================================== */

/* Force full width and hide sidebar */
.ac-blog-archive .site-main {
    width: 100%;
    max-width: 100%;
}

.ac-blog-archive .inside-article,
.ac-blog-archive .site-content {
    max-width: 100%;
    padding: 0;
}

.ac-blog-archive #secondary {
    display: none !important;
}

.ac-blog-archive .grid-container {
    max-width: 100%;
}

/* Hide default post entries */
.ac-blog-archive article.post,
.ac-blog-archive .generate-columns-container,
.ac-blog-archive .post-image,
.ac-blog-archive .entry-summary,
.ac-blog-archive .entry-header,
.ac-blog-archive .entry-content,
.ac-blog-archive .paging-navigation {
    display: none !important;
}

/* Show only our custom template */
.ac-blog-archive .blog-archive-container {
    display: block !important;
}

/* ========================================
   BLOG VIDEO SECTION STYLES
   ======================================== */

.blog-video-section {
    padding: 40px 0;
    background-color: #ffffff;
}

.video-section-title {
    font-family: "Delight", sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 60px 0;
    color: #000;
    text-align: left;
    border-top: 2px solid #a9a9a9;
    display: inline-block;
    padding: 20px 40px;
}

.video-container {
    width: 70%;
    max-width: 1040px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #c4c4c4;
    margin-bottom: 30px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-title {
    font-family: "Delight", sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: #000;
    text-align: center;
}

/* Video Section Responsive */
@media (max-width: 1024px) {
    .blog-video-section {
        padding: 20px 0;
    }

    .video-section-title {
        font-size: 36px;
        margin-bottom: 40px;
        padding: 20px 0;
    }

    .video-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .blog-video-section {
        padding: 20px 0;
    }

    .video-section-title {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .video-container {
        width: 100%;
    }

    .video-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .video-section-title {
        font-size: 24px;
    }

    .video-title {
        font-size: 16px;
    }
}

/* ========================================
   BLOG SINGLE POST CONTENT STYLES
   ======================================== */

/* Blog Content Container */
.blog-content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Post Hero Section */
.blog-post-hero {
    padding: 40px 0;
}

.blog-post-hero-content {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.blog-post-hero-left {
    flex: 1;
    position: relative;
}

/* Back Arrow Link */
.blog-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.blog-back-link-desktop {
    margin-bottom: 30px;
}

.blog-back-link:hover {
    color: #c45a3b;
    transform: translateX(-5px);
}

.blog-back-link svg {
    width: 24px;
    height: 24px;
}

.blog-back-link-mobile {
    display: none;
}

/* Post Hero Title */
.blog-post-hero-title {
    font-family: "Delight", sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 30px 0;
    color: #000;
    text-transform: uppercase;
}

/* Post Hero Abstract */
.blog-post-hero-abstract {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 60px;
    text-align: justify;
}

/* Post Number */
.blog-post-number {
    font-family: "Delight", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-top: auto;
}

/* Post Hero Right (Featured Image) */
.blog-post-hero-right {
    flex-shrink: 0;
    width: 450px;
}

.blog-post-hero-image,
.blog-post-hero-placeholder {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.blog-post-hero-placeholder {
    background: #c4c4c4;
}

/* Post Content Section */
.blog-post-content-section {
    padding: 60px 0;
}

.blog-post-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Post Content Typography */
.blog-post-content-wrapper p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 24px;
    text-align: justify;
}

.blog-post-content-wrapper h2 {
    font-family: "Delight", sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin: 48px 0 24px 0;
    color: #000;
}

.blog-post-content-wrapper h3 {
    font-family: "Delight", sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin: 36px 0 20px 0;
    color: #000;
}

.blog-post-content-wrapper h4 {
    font-family: "Delight", sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 30px 0 16px 0;
    color: #000;
}

.blog-post-content-wrapper ul,
.blog-post-content-wrapper ol {
    margin: 24px 0;
    padding-left: 30px;
}

.blog-post-content-wrapper li {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 12px;
}

.blog-post-content-wrapper blockquote {
    margin: 40px 0;
    padding: 30px 40px;
    border-left: 4px solid #c45a3b;
    background: #f9f9f9;
    font-style: italic;
}

.blog-post-content-wrapper blockquote p {
    font-size: 18px;
    margin-bottom: 0;
}

.blog-post-content-wrapper img {
    max-width: 100%;
    height: auto;
    margin: 40px 0;
    display: block;
}

.blog-post-content-wrapper a {
    color: #c45a3b;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.blog-post-content-wrapper a:hover {
    color: #a04830;
}

/* WordPress Block Styles */
.blog-post-content-wrapper .wp-block-image {
    margin: 40px 0;
}

.blog-post-content-wrapper .wp-block-image img {
    margin: 0;
}

.blog-post-content-wrapper .wp-block-image figcaption {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 12px;
}

.blog-post-content-wrapper .wp-block-gallery {
    margin: 40px 0;
}

/* ========================================
   BLOG SINGLE POST FULL WIDTH STYLES
   ======================================== */

/* Force full width and hide sidebar */
.ac-blog-single .site-main {
    width: 100%;
    max-width: 100%;
}

.ac-blog-single .inside-article,
.ac-blog-single .site-content {
    max-width: 100%;
    padding: 0;
}

.ac-blog-single #secondary {
    display: none !important;
}

.ac-blog-single .grid-container {
    max-width: 100%;
}

/* Hide default post elements */
.ac-blog-single article.post > .inside-article > .entry-header,
.ac-blog-single article.post > .inside-article > .featured-image,
.ac-blog-single article.post > .inside-article > .entry-content,
.ac-blog-single article.post > .inside-article > .entry-meta,
.ac-blog-single .post-navigation,
.ac-blog-single .comments-area {
    display: none !important;
}

/* Show only our custom template */
.ac-blog-single .blog-content-container {
    display: block !important;
}

/* ========================================
   BLOG SINGLE POST RESPONSIVE STYLES
   ======================================== */

@media (max-width: 1024px) {
    .blog-post-hero {
        padding: 40px 0 20px 0;
        margin-bottom: 0;
        border-bottom: 0;
    }

    .blog-post-hero-content {
        flex-direction: column;
        gap: 40px;
    }

    .blog-post-hero-right {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        order: -1;
    }

    .blog-post-hero-image,
    .blog-post-hero-placeholder {
        width: 100%;
        height: auto;
    }

    .blog-back-link-desktop {
        display: none;
    }

    .blog-back-link-mobile {
        display: block;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 20px;
        margin-left: 30px;
    }

    .blog-back-link-mobile svg {
        width: 32px;
        height: 32px;
    }

    .blog-post-content-section {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .blog-content-container {
        padding: 40px 0;
    }

    .blog-post-hero-title {
        font-size: 36px;
    }

    .blog-post-hero-abstract {
        font-size: 15px;
        margin-bottom: 40px;
    }

    .blog-post-content-wrapper p {
        font-size: 15px;
    }

    .blog-post-content-wrapper h2 {
        font-size: 28px;
    }

    .blog-post-content-wrapper h3 {
        font-size: 22px;
    }

    .blog-post-content-wrapper h4 {
        font-size: 18px;
    }

    .blog-post-content-wrapper blockquote {
        padding: 20px 25px;
    }

    .blog-post-content-wrapper blockquote p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .blog-post-hero-title {
        font-size: 28px;
    }

    .blog-post-hero-abstract {
        font-size: 14px;
    }

    .blog-post-content-wrapper p,
    .blog-post-content-wrapper li {
        font-size: 14px;
    }

    .blog-post-content-wrapper h2 {
        font-size: 24px;
    }

    .blog-post-content-wrapper h3 {
        font-size: 20px;
    }

    .blog-post-content-wrapper h4 {
        font-size: 16px;
    }
}

/* ========================================
   BLOG NEXT ARTICLE SECTION STYLES
   ======================================== */

.blog-next-article-section {
    border-top: 1px solid #a9a9a9;
    padding: 40px 0 60px 0;
    margin-top: 40px;
}

.next-article-header {
    margin-bottom: 60px;
}

.next-article-label {
    font-family: "Delight", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.next-article-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.next-article-title {
    font-family: "Delight", sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 24px 0;
    text-align: left;
    text-transform: uppercase;
}

.next-article-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.next-article-title a:hover {
    color: #c45a3b;
}

.next-article-excerpt {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 40px;
    text-align: justify;
}

/* ========================================
   BLOG RELATED POSTS SECTION STYLES
   ======================================== */

.blog-related-posts-section {
    padding: 60px 0;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.related-post-card {
    display: flex;
    flex-direction: column;
}

.related-post-image {
    margin-bottom: 25px;
}

.related-post-image a {
    display: block;
}

.related-post-thumbnail,
.related-post-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.related-post-placeholder {
    background: #c4c4c4;
}

.related-post-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.related-post-title {
    font-family: "Delight", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.related-post-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: #c45a3b;
}

.related-post-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    margin: 0 0 auto 0;
    text-align: justify;
    padding-bottom: 25px;
}

.related-post-link {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    font-weight: 400;
    color: #c45a3b;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-top: auto;
    transition: gap 0.3s ease, color 0.3s ease;
}

.related-post-link:hover {
    color: #a04830;
    gap: 16px;
}

.related-post-link svg {
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .blog-related-posts-section {
        padding: 20px 0;
    }
}

/* ========================================
   BLOG NEXT ARTICLE & RELATED POSTS RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
    .related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .blog-next-article-section {
        padding: 30px 0 40px 0;
    }

    .next-article-title {
        font-size: 36px;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .related-post-card {
        padding: 40px 0;
        border-top: 1px solid #a9a9a9;
    }

    .related-post-card:first-child,
    .related-post-card:nth-child(2) {
        border-top: 1px solid #a9a9a9;
    }
}

@media (max-width: 768px) {
    .next-article-label {
        font-size: 20px;
    }

    .next-article-title {
        font-size: 28px;
    }

    .next-article-excerpt {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .next-article-button {
        padding: 14px 30px;
        font-size: 13px;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .related-post-title {
        font-size: 14px;
    }

    .related-post-excerpt {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .next-article-title {
        font-size: 24px;
    }

    .next-article-excerpt {
        font-size: 14px;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .related-post-thumbnail,
    .related-post-placeholder {
        aspect-ratio: 4 / 3;
    }
}
