/* 
* Custom styles for the blog listing page
* Based on InstantAIGuru main website styling
*/

/* Font face declarations */
@font-face {
    font-family: 'Roc Grotesk';
    src: url('/fonts/fonnts.com-Roc_Grotesk_Wide.otf') format('opentype');
    font-weight: normal;
    font-display: swap;
}
  
@font-face {
    font-family: 'Roc Grotesk';
    src: url('/fonts/fonnts.com-Roc_Grotesk_Wide_Medium.otf') format('opentype');
    font-weight: 500;
    font-display: swap;
}
  
@font-face {
    font-family: 'Roc Grotesk';
    src: url('/fonts/fonnts.com-Roc_Grotesk_Wide_Bold.otf') format('opentype');
    font-weight: bold;
    font-display: swap;
}
  
@font-face {
    font-family: 'ABC Diatype';
    src: url('/fonts/ABCDiatype-Regular.otf') format('opentype');
    font-weight: normal;
    font-display: swap;
}
  
@font-face {
    font-family: 'ABC Diatype';
    src: url('/fonts/ABCDiatype-Medium.otf') format('opentype');
    font-weight: 500;
    font-display: swap;
}
  
@font-face {
    font-family: 'ABC Diatype';
    src: url('/fonts/ABCDiatype-Bold.otf') format('opentype');
    font-weight: bold;
    font-display: swap;
}

/* Base styles */
body {
    font-family: 'ABC Diatype', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #FFFFFF;
    background-color: #050506;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1rem;
    line-height: 1.5;
    padding-top: 20px;
}

img {
    margin-bottom: 20px;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.24);
}

h1 {
    font-size: 2.5em;
    color: #FFFFFF;
    margin-bottom: 20px;
    font-family: 'Roc Grotesk', sans-serif;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-align: left;
}

h2 {
    font-size: 2em;
    color: #FFFFFF;
    margin-top: 40px;
    margin-bottom: 20px;
    font-family: 'Roc Grotesk', sans-serif;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

p {
    font-size: 1.1em;
    line-height: 1.5;
    text-align: left;
    margin-bottom: 1rem;
    color: #FFFFFF;
}

ul, ol {
    text-align: left;
    margin: 20px 0;
    line-height: 1.5;
    padding-left: 2rem;
    color: #FFFFFF;
}

ul li, ol li {
    margin-bottom: 10px;
    color: #FFFFFF;
}

strong {
    color: #7F47FF;
    font-weight: 700;
}

hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 40px 0;
}

/* Base link styles */
a {
    color: #7F47FF;
    text-decoration: none;
    transition: color 150ms ease;
    font-family: 'Roc Grotesk', sans-serif;
    font-weight: 500;
    position: relative;
}

a:hover {
    color: #FFFFFF;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #7F47FF;
    transition: width 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

a:hover::after {
    width: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: left;
    width: 100%;
    padding-top: 20px;
    padding-bottom: 60px;
    box-sizing: border-box;
}

/* Blog Listing Styles */
.blog-listing {
    margin: 40px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    text-align: left;
}

.blog-item {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.04);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 300ms cubic-bezier(0.16, 1, 0.3, 1),
                border-color 300ms cubic-bezier(0.16, 1, 0.3, 1),
                background-color 300ms cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    cursor: pointer;
    height: auto;
    text-decoration: none;
    color: inherit;
}

.blog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(127, 71, 255, 0.3);
    background-color: rgba(127, 71, 255, 0.05);
}

.blog-item:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(127, 71, 255, 0.1), transparent 60%);
    opacity: 0;
    transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1;
}

.blog-item:hover:after {
    opacity: 1;
}

.thumbnail {
    width: 100%;
    height: 180px;
    margin-right: 0;
    margin-bottom: 16px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 300ms cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    max-width: 100%;
}

.thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    pointer-events: none;
}

.blog-item:hover .thumbnail {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
}

.blog-content {
    flex-grow: 1;
    height: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
}

.blog-link {
    font-size: 1.3rem;
    color: #FFFFFF;
    font-family: 'Roc Grotesk', sans-serif;
    font-weight: 500;
    line-height: 1.2;
    position: relative;
    width: fit-content;
    transition: color 300ms cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 8px;
    margin-top: 0;
    display: block;
    text-decoration: none;
}

.blog-item:hover .blog-link {
    color: #7F47FF;
}

.blog-link::after {
    display: none;
}

.blog-item:hover .blog-link::after {
    display: none;
}

.blog-date {
    color: #9798a1;
    font-size: 0.875rem;
    margin-bottom: 0;
    margin-top: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    letter-spacing: 0.01em;
}

.blog-date i {
    color: #7F47FF;
    margin-right: 8px;
    font-size: 0.9rem;
}

/* Media Queries */
@media (max-width: 1024px) {
    .blog-listing {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 20px;
    }
    
    .container {
        max-width: 100%;
        padding: 0 1.25rem;
        padding-top: 20px;
        padding-bottom: 40px;
    }
    
    h1 {
        font-size: 2em;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    h2 {
        font-size: 1.8em;
        margin-top: 30px;
        margin-bottom: 15px;
    }
    
    p {
        font-size: 1em;
        line-height: 1.5;
    }
    
    .blog-listing {
        margin: 30px 0;
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .blog-item {
        padding: 20px;
        height: auto;
        border-radius: 12px;
    }
    
    .thumbnail {
        height: 200px;
        margin-bottom: 16px;
    }
    
    .blog-content {
        gap: 10px;
        width: 100%;
    }
    
    .blog-link {
        font-size: 1.25rem;
        margin-bottom: 0;
        line-height: 1.3;
    }
    
    .blog-date {
        margin-bottom: 0;
    }
    
    /* Main page link at bottom */
    .container > a {
        display: inline-block;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 15px;
    }
    
    .container {
        padding: 0 1rem;
        padding-top: 15px;
        padding-bottom: 30px;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 12px;
    }
    
    .blog-listing {
        margin: 20px 0;
        gap: 20px;
    }
    
    .blog-item {
        padding: 16px;
        border-radius: 10px;
    }
    
    .thumbnail {
        height: 180px;
        margin-bottom: 16px;
        border-radius: 8px;
    }
    
    .blog-content {
        gap: 8px;
    }
    
    .blog-link {
        font-size: 1.15rem;
        line-height: 1.25;
    }
    
    .blog-date {
        font-size: 0.8rem;
    }
    
    /* Main page link at bottom */
    .container > a {
        font-size: 0.95rem;
        margin-top: 15px;
    }
}