/*
 * Blog List, Post Card, and Post Detail Styles
 */

/* Post Card Traditional Style (Used in Home and filtered Blog) */
.post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

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

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Reusing card-content from toolpage.css, but adding post-specific meta */
.post-meta {
    font-size: 0.8em;
    color: #999;
    font-family: 'Poppins', sans-serif;
    margin-top: 10px;
}

/* Blog Layout (List and Sidebar) */
.blog-layout {
    display: flex;
    gap: 40px;
    padding-top: 50px;
}
.blog-main {
    flex: 3;
}
.blog-sidebar {
    flex: 1;
    min-width: 250px;
}
.sidebar-widget {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.sidebar-widget h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.sidebar-widget ul {
    list-style: none;
}
.sidebar-widget ul li a {
    display: block;
    padding: 5px 0;
    text-decoration: none;
    color: #555;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
}

/* Blog Grid Hero Styles */
.blog-grid-hero {
    display: grid;
    grid-gap: 1px;
    grid-auto-rows: minmax(150px, auto);
    border: 1px solid #ccc; 
    margin-bottom: 40px;
}

.blog-grid-hero > a {
    text-decoration: none;
}

.blog-grid-hero > * {
    padding: 15px;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-color: #333;
    color: #fff;
    transition: transform 0.3s ease;
    cursor: pointer;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
    height: 100%;
    width: 100%;
    overflow: hidden; 
}

.blog-grid-hero > *:hover {
    transform: scale(1.01);
}

.special,
.amazing {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
}

.special h3,
.amazing h3,
.feature h3,
.news h3,
.photos h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5em;
    margin: 0 0 5px 0;
}
.special p,
.amazing p,
.feature p,
.news p,
.photos p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    margin-top: 0;
    color: #ccc;
}

.cta {
    background-color: #000; 
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.cta p {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    margin-bottom: 15px;
    color: #fff; 
}

a.spam-button {
    border: 1px solid #F7A400;
    border-radius: 8px;
    text-decoration: none;
    background-color: #F7A400;
    color: #000;
    display: block;
    padding: 8px 15px;
    margin: 0 auto;
    width: 90%;
    max-width: 200px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}
a.spam-button:hover {
    background-color: #fce7b0;
}


/* Responsive Grid Layout */

@media (min-width: 500px) {
    .blog-grid-hero {
        grid-template-columns: 1fr 1fr;
    }
    
    .feature {
        grid-column: 1 / 3;
        grid-row: 1 / 3;
    }
    
    .special {
        grid-column: 1;
        grid-row: 3 / 6;
    }
    .amazing {
        grid-column: 1;
        grid-row: 6;
    }
    .news {
        grid-column: 2;
        grid-row: 3 / 5;
    }
    .photos {
        grid-column: 2;
        grid-row: 5;
    }
    .cta {
        grid-column: 2;
        grid-row: 6;
    }
}

@media (min-width: 800px) {
    .blog-grid-hero {
        grid-template-columns: 1fr 1fr 1fr;
        grid-auto-rows: minmax(100px, auto); 
    }
    .feature { 
        grid-column: 1 ;
        grid-row: 1 / 6;
    }
    
    .special { 
        grid-column: 2;
        grid-row: 1 / 4;
    }
    .amazing { 
        grid-column: 2;
        grid-row: 4 / 6;
    }
    .news { 
        grid-column: 3;
        grid-row: 1 / 3;
    }
    .photos { 
        grid-column: 3;
        grid-row: 3 / 5;
    }
    .cta { 
        grid-column: 3;
        grid-row: 5 / 6;
    }
}
/* End Blog Grid Hero Styles */


/* Blog Card Traditional Style (Used for secondary list) */
.blog-card-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px; 
    padding: 40px 0 0 0;
    margin: 0 auto;
    width: 100%;
}

.blog-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    box-shadow: 0 3px 7px -1px rgba(0, 0, 0, .1);
    background: #fff;
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
    border-radius: 5px;
    overflow: hidden;
    z-index: 0;
    max-width: 90%;
    width: 700px;
}

.blog-card a {
    color: inherit;
    text-decoration: none;
}
.blog-card a:hover {
    color: #F7A400; 
}

.blog-card:hover .photo {
    transform: scale(1.3) rotate(3deg);
}

.blog-card .meta {
    position: relative;
    z-index: 0;
    height: 200px;
}

.blog-card .photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-size: cover;
    background-position: center;
    transition: transform .2s;
}

.blog-card .details,
.blog-card .details ul {
    margin: auto;
    padding: 0;
    list-style: none;
}

.blog-card .details {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -100%;
    margin: auto;
    transition: left .2s;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    padding: 10px;
    width: 100%;
    font-size: .9rem;
}
.blog-card .details a {
    text-decoration: dotted underline;
    color: #fff;
}

.blog-card .details ul li {
    display: inline-block;
}

.blog-card .tags li {
    margin-right: 5px;
    display: inline-block;
    background: #F7A400; 
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    color: #000;
    font-family: 'Poppins', sans-serif;
    border: none;
}
.blog-card .tags li a {
    text-decoration: none;
    color: inherit;
}

.blog-card .description {
    padding: 1rem;
    background: #fff;
    position: relative;
    z-index: 1;
}

.blog-card .description h1 {
    font-family: 'Playfair Display', serif;
    line-height: 1;
    margin: 0;
    font-size: 1.7rem;
}
.blog-card .description h2 {
    font-size: 1rem;
    font-weight: 300;
    text-transform: uppercase;
    color: #a2a2a2; 
    margin-top: 5px;
    font-family: 'Poppins', sans-serif;
}

.blog-card .read-more {
    text-align: right;
    margin-top: 15px;
    font-family: 'Poppins', sans-serif;
}
.blog-card .read-more a {
    color: #F7A400;
    display: inline-block;
    position: relative;
    font-weight: 600;
}

.blog-card .read-more a ion-icon {
    font-size: 1.2em;
    vertical-align: middle;
    margin-left: -5px; 
    opacity: 0;
    transition: margin .3s, opacity .3s;
}
.blog-card .read-more a:hover ion-icon {
    margin-left: 5px;
    opacity: 1;
}

.blog-card p {
    position: relative;
    margin: 1rem 0 0;
    font-family: 'Poppins', sans-serif;
    color: #555;
}
.blog-card p:first-of-type {
    margin-top: 1.25rem;
}
.blog-card p:first-of-type:before {
    content: "";
    position: absolute;
    height: 5px;
    background: #F7A400;
    width: 35px;
    top: -0.75rem;
    border-radius: 3px;
}

.blog-card:hover .details {
    left: 0%;
}


/* Media query for desktop layout */
@media (min-width: 640px) {
    .blog-card {
        flex-direction: row;
    }
    .blog-card .meta {
        flex-basis: 40%;
        height: auto;
    }
    .blog-card .description {
        flex-basis: 60%;
    }
    .blog-card .description:before {
        transform: skewX(-3deg);
        content: "";
        background: #fff;
        width: 30px;
        position: absolute;
        left: -10px;
        top: 0;
        bottom: 0;
        z-index: -1;
    }
    .blog-card.alt {
        flex-direction: row-reverse;
    }
    .blog-card.alt .description:before {
        left: inherit;
        right: -10px;
        transform: skew(3deg);
    }
    .blog-card.alt .details {
        padding-right: 25px; 
        padding-left: 10px;
    }
}


/* Post Detail Styling */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 100px;
}
.post-detail h1 {
    font-size: 3em;
    margin-bottom: 10px;
}
.post-meta-detail {
    font-family: 'Poppins', sans-serif;
    color: #777;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.post-content {
    line-height: 1.8;
    font-family: 'Poppins', sans-serif;
}
.post-content p {
    margin-bottom: 1em;
}

/* New style for embedded images in post content */
.content-image-wrapper {
    margin: 30px auto;
    text-align: center;
}
.content-image-wrapper img {
    max-width: 80%; 
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Media Queries for Blog/Post */
@media screen and (width < 950px) {
    .blog-layout {
        flex-direction: column;
    }
    .blog-sidebar {
        min-width: 100%;
        order: -1;
    }
}

/* Small adjustments for post detail */
@media screen and (max-width: 600px) {
    .post-detail {
        padding-top: 90px;
    }
    .post-detail h1 {
        font-size: 2em;
    }
}