/**
 * Fun88 Theme - Additional Styles
 * 
 * @package Fun88_Theme
 */

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table-responsive table th,
.table-responsive table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.table-responsive table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #1a1a1a;
}

.table-responsive table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table-responsive table tr:hover {
    background-color: #f0f0f0;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f5f5f5;
    color: #333;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tag-cloud a:hover {
    background-color: #ff6600;
    color: #fff;
}

/* Header scrolled state */
.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Post navigation */
.post-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

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

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
    background: #f0f0f0;
}

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

.post-navigation .nav-title {
    display: block;
    color: #1a1a1a;
    font-weight: 600;
}

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

/* Comments */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #1a1a1a;
}

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

.comment-list li {
    margin-bottom: 30px;
}

.comment-body {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.comment-author {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

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

.comment-content {
    color: #444;
    line-height: 1.6;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #ff6600;
    color: #fff;
    border-radius: 5px;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.comment-reply-link:hover {
    background-color: #e65c00;
}

/* Comment form */
.comment-form {
    margin-top: 30px;
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
}

.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 #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #ff6600;
}

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

.comment-form input[type="submit"] {
    padding: 12px 30px;
    background-color: #ff6600;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    background-color: #e65c00;
}

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

.search-form label {
    flex: 1;
    margin: 0;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.search-form input[type="submit"] {
    padding: 12px 25px;
    background-color: #ff6600;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form input[type="submit"]:hover {
    background-color: #e65c00;
}

/* Blockquotes */
blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    background-color: #f9f9f9;
    border-left: 4px solid #ff6600;
    border-radius: 5px;
    font-style: italic;
}

blockquote p {
    margin-bottom: 10px;
    color: #444;
}

blockquote cite {
    font-size: 0.9rem;
    color: #666;
}

/* Code blocks */
pre, code {
    background-color: #f5f5f5;
    font-family: 'Courier New', Courier, monospace;
}

pre {
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

code {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

pre code {
    padding: 0;
    background: none;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.gallery-item {
    background: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-caption {
    padding: 15px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* Alignment */
.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.aligncenter {
    display: block;
    margin: 20px auto;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .post-navigation .nav-links {
        flex-direction: column;
    }

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

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

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .alignleft,
    .alignright {
        float: none;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Loading state */
body.loaded {
    opacity: 1;
}

body:not(.loaded) {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Accessibility */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #ff6600;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .site-sidebar,
    .menu-toggle,
    .header-auth,
    .cta-section {
        display: none;
    }

    .site-main {
        padding: 0;
    }

    .main-content-area {
        box-shadow: none;
        padding: 0;
    }
}
