@font-face {
    font-family: 'Erasaur';
    src: url('./fonts/Erasaur-wjZ9.woff') format('woff');
    font-display: swap;
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Banner Section */
.banner {
    position: relative;
    height: 20vh;
    background-image: url('images/Dinosaur banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    width: 100%;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

/* Firefox-specific fix */
@-moz-document url-prefix() {
    .banner {
        background-attachment: scroll;
        transform: translateZ(0);
    }
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner h1 {
    font-family: 'Erasaur', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner p {
    font-size: 1.8rem;
    opacity: 0.9;
}

/* Navigation */
.nav-home {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: none;
}

.nav-home:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-home.show {
    display: block;
}

/* Main Content Layout with Sidebar */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.main-posts-area {
    min-width: 0; /* Prevents grid overflow */
}

/* Main Content */
.main-content {
    padding: 8rem 0 4rem 0;
}

.section {
    margin-bottom: 4rem;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #2c3e50;
    font-weight: 300;
}

/* Post Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Latest Posts - Vertical Layout */
.posts-grid.vertical {
    grid-template-columns: 1fr;
    max-width: none;
    margin: 2rem 0 0 0;
}

.posts-grid.vertical .post-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.posts-grid.vertical .post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.posts-grid.vertical .post-thumbnail {
    width: 150px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

.posts-grid.vertical .post-thumbnail:not([style*="background-image"]) {
    background: linear-gradient(135deg, #ffa726, #ff7043);
}

.posts-grid.vertical .post-thumbnail::after {
    display: none;
}

.posts-grid.vertical .post-info {
    padding: 0;
    flex: 1;
}

.posts-grid.vertical .post-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.posts-grid.vertical .post-excerpt {
    margin-bottom: 0.75rem;
}

/* Regular Post Cards */
.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.post-thumbnail:not([style*="background-image"]) {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.post-thumbnail:not([style*="background-image"])::after {
    content: 'ðŸ¦–';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.7;
}

.post-info {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    line-height: 1.3;
}

.post-excerpt {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.post-date {
    color: #999;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem;
}

/* Search Box */
.sidebar-search {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2d5016;
}

.search-input::placeholder {
    color: #6c757d;
}

/* About This Blog Box */
.about-blog {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	margin-top: 6rem;
}

/* Fix sidebar spacing for different contexts */
.home-sidebar .about-blog {
    margin-top: 6rem;
}

.post-sidebar .about-blog {
    margin-top: 0;
}

.about-blog h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-blog p {
    color: #555;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.about-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.about-links a {
    color: #2d5016;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.about-links a:hover {
    color: #1a3009;
    border-bottom-color: #2d5016;
}

/* Rexie's Content Box */
.rexie-content {
    background: linear-gradient(135deg, #2d5016, #3d6b1e);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
    position: relative;
    overflow: hidden;
}

.rexie-content h3 {
    font-family: 'Erasaur', serif;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.rexie-content h4 {
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem 0;
    color: white;
    font-weight: 600;
}

.rexie-content p {
    line-height: 1.5;
    margin-bottom: 0.75rem;
    color: white;
}

.rexie-content a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.rexie-content a:hover {
    color: #d4f0a7;
    border-bottom-color: #d4f0a7;
}

.rexie-content ul {
    margin-left: 1.2rem;
    margin-bottom: 0.75rem;
}

.rexie-content li {
    margin-bottom: 0.3rem;
    color: white;
}

/* Social Media Box */
.social-placeholder {
    background: linear-gradient(135deg, #4a7c59, #5d8f6a);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
    text-align: center;
    position: relative;
}

.social-placeholder::before {
    content: '';
    width: 32px;
    height: 32px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwMCIgaGVpZ2h0PSIxMDAwIiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB3aWR0aD0iMTAwMCIgaGVpZ2h0PSIxMDAwIiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNNzc4LjQgMjMxLjhMMzA4LjMgNzY4LjJIMjIxLjZMMTIxLjYgNjMxLjhMNTE2LjcgMjMxLjhINzc4LjRaTTc3OC40IDc2OC4ySDczOC4xTDY5MS44IDY5MS44SDU5MS44TDY5MS44IDMwOC4ySDc3OC40VjIzMS44SDU5MS44TDMwOC4zIDc2OC4ySDIyMS42VjY5MS44SDU5MS44TDczOC4xIDIzMS44SDc3OC40VjMwOC4ySDY5MS44TDU5MS44IDMwOC4ySDc3OC40VjY5MS44WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    margin: 0 auto 0.5rem;
    opacity: 0.9;
}

.social-placeholder h3 {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.social-placeholder p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
}

.social-placeholder.active {
    background: linear-gradient(135deg, #000000, #1a1a1a);
}

.social-placeholder.active h3,
.social-placeholder.active p {
    color: white;
}

/* Quote Box */
.quote-box {
    background: linear-gradient(135deg, #f4c430, #f0b90b);
    color: #2c3e50;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(244, 196, 48, 0.3);
    position: relative;
    overflow: hidden;
}

.quote-box h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quote-text {
    font-size: 1rem;
    line-height: 1.4;
    font-style: italic;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.quote-author {
    font-size: 0.85rem;
    color: #4a4a4a;
    font-weight: 500;
}

/* Post Content View */
.post-content {
    display: none;
	padding-top: 4rem;
}

.post-hero-image {
    height: 300px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 2rem;
}

.post-content-inner {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Comments Section Styling */
.comments-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.comments-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

/* Emote specific styling */
#emote_com {
    min-height: 200px;
}

/* Loading state for comments */
.comments-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sidebar {
        order: -1;
        position: static;
        gap: 1.2rem;
    }
    
    .banner h1 {
        font-size: 2.5rem;
    }
    
    .banner p {
        font-size: 1rem;
    }
    
    .posts-grid.vertical .post-card {
        flex-direction: column;
        text-align: center;
    }
    
    .posts-grid.vertical .post-thumbnail {
        width: 100%;
        height: 150px;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    /* Responsive comments */
    .comments-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .banner h1 {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sidebar > * {
        padding: 1.2rem;
    }
    
    .nav-home {
        top: 15px;
        left: 15px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}