/**
 * Jun88 Theme - Additional Styles
 * 
 * @package Jun88_SEO_Theme
 */

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.post-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.post-card .entry-title {
    font-size: 1.4rem;
    margin: 15px;
}

.post-card .entry-title a {
    color: var(--text-color);
    text-decoration: none;
}

.post-card .entry-title a:hover {
    color: var(--primary-color);
}

.post-card .entry-summary {
    padding: 0 15px 15px;
    color: #666;
}

.post-card .entry-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* Entry Meta */
.entry-meta {
    color: #666;
    font-size: 0.9rem;
    margin: 10px 0;
}

.entry-meta span {
    margin-right: 15px;
}

/* Page Header */
.page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.page-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.archive-description {
    color: #666;
    font-size: 1.1rem;
}

/* Comments */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.comments-title {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    margin-bottom: 20px;
}

.comment-author {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.comment-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.comment-respond {
    margin-top: 40px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 15px;
    font-family: inherit;
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    background: var(--secondary-color);
}

/* Post Navigation */
.post-navigation {
    margin-top: 40px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
}

.nav-next {
    text-align: right;
}

.nav-subtitle {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.nav-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* Categories and Tags */
.categories,
.tags {
    margin: 20px 0;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 4px;
}

.categories a,
.tags a {
    color: var(--primary-color);
    text-decoration: none;
    margin-right: 10px;
    display: inline-block;
    margin-bottom: 5px;
}

.categories a:hover,
.tags a:hover {
    text-decoration: underline;
}

/* Footer Menu */
.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: var(--accent-color);
}

/* Widget Styles */
.widget {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
}

.widget-title {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
    border-bottom: none;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.search-form input[type="submit"] {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form input[type="submit"]:hover {
    background: var(--secondary-color);
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 60px 0;
}

.error-404 h1 {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.error-404 h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.error-404 p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #999;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 2rem;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-next {
        text-align: left;
    }

    .comment-list .children {
        margin-left: 20px;
    }

    .search-form {
        flex-direction: column;
    }

    .error-404 h1 {
        font-size: 3rem;
    }

    .error-404 h2 {
        font-size: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}
