/*
 * NPL Sports Pro Theme - Base Layout Styles
 * File: Assets/css/base-layout.css
 */

/* ===================================================================
 * TABLE OF CONTENTS
 * 1. Theme Base & Boxed Layout
 * 2. Main Content & Sidebar Layout
 * 3. Archive, Pagination & Magazine Grid
 * 4. Breadcrumb-Nav
 * 5. Comments Section & Emojis
 * 6. Search and 404 Page Styles
 * 7. Scroll To Top Button
 * 8. Responsive Fixes - Global Layout
 * =================================================================== */

/* ===================================================================
 * 1. Theme Base & Boxed Layout
 * =================================================================== */
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f1f1f1;
    margin: 0;
}
#page {
    max-width: 1140px;
    margin: 10px auto;
    background-color: #fff;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 10px;
}
a { color: #0010a0; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ===================================================================
 * 2. Main Content & Sidebar Layout
 * =================================================================== */
.site-content { 
    padding: 5px 5px; 
}
.site-body-flex { 
    display: flex; 
    gap: 5px;
    align-items: flex-start;
}
.content-area { 
    flex: 1; 
    min-width: 0;
}
.widget-area { 
    flex-basis: 360px; 
    flex-shrink: 0;
}
.content-area.full-width {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    margin-right: 0;
}

/* ===================================================================
 * 3. Archive, Pagination & Magazine Grid
 * =================================================================== */
.archive-header { 
    margin-bottom: 30px; 
    padding: 20px; 
    background: #f9f9f9; 
    border: 1px solid #e5e5e5; 
    border-left: 5px solid #0010a0;
}
.archive-header .page-title { 
    margin-top: 0;
    font-size: 24px;
}
.archive-header .taxonomy-description {
    margin-top: 10px;
    font-size: 15px;
    color: #555;
}
body.archive .archive-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    margin-bottom: 40px;
}
.archive-grid-item {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    transition: box-shadow 0.2s ease-in-out;
}
.archive-grid-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.archive-item-thumbnail a {
    display: block;
}
.archive-item-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.archive-item-content {
    padding: 20px;
}
.archive-item-content .entry-title {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
}
.archive-item-content .entry-title a {
    color: #333;
}
.archive-item-content .entry-title a:hover {
    color: #0010a0;
}
.archive-item-content .entry-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}
.archive-item-content .entry-meta i {
    margin-right: 5px;
}
.archive-item-content .entry-summary p {
    margin-bottom: 0;
    font-size: 15px;
}
.pagination { 
    margin-top: 40px; 
    padding-top: 30px; 
    border-top: 1px solid #eee;
}
.nav-links { display: flex; justify-content: center; gap: 5px; }
.page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid #ddd; text-decoration: none; }
.page-numbers.current, .page-numbers:hover { background-color: #0010a0; color: #fff; border-color: #0010a0; }

.archive-post-item {
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}
.archive-post-item .archive-post-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
}
.archive-post-content {
    padding: 10px 15px 15px 15px;
}
.archive-post-content .entry-title {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 10px;
}
.archive-post-content .entry-title a {
    text-decoration: none;
    color: #222;
}
.archive-post-content .entry-title a:hover {
    color: #d13639; 
}
.archive-post-content .entry-meta {
    margin-bottom: 15px;
    font-size: 14px;
    color: #777;
}
.archive-post-content .entry-meta span {
    margin-right: 15px;
}
.archive-post-content .entry-summary {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
}
.archive-post-content .read-more-button {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s ease-in-out;
}
.archive-post-content .read-more-button:hover {
    background-color: #d13639; 
}
.archive-post-item.has-post-thumbnail .archive-post-content {
    padding-top: 20px;
}
.archive-post-item:not(.has-post-thumbnail) .archive-post-content {
    border-left: 3px solid #d13639; 
}

/* ===================================================================
 * 4. Breadcrumb-Nav
 * =================================================================== */
.breadcrumb-nav {
    background-color: #f9f9f9; 
    border: 1px solid #eeeeee;
    padding: 10px 18px;
    font-size: 13px; 
    color: #777777;
    margin-bottom: 25px;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap; 
    align-items: center;
    line-height: 1.4;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); 
}
.breadcrumb-nav a {
    color: #0010a0; 
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.breadcrumb-nav a:hover {
    color: #dd0000; 
    text-decoration: none;
}
.breadcrumb-nav .separator {
    margin: 0 10px;
    color: #cccccc;
    font-size: 12px;
}
.breadcrumb-nav .current-item {
    font-weight: 600;
    color: #333333;
    display: inline-block;
    max-width: 100%;
}
.breadcrumb-nav a::before {
    margin-right: 5px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}
.breadcrumb-nav a[href*="home"]::before {
    content: "\f015"; 
    font-size: 14px;
}

/* ===================================================================
 * 5. Comments Section & Emojis
 * =================================================================== */
.comments-area {
    margin-top: 30px;
    margin-left: 30px;
    margin-right: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}
.comments-title {
    font-size: 1.4rem;
    margin-bottom: 25px;
    text-transform: uppercase;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}
.comment-list .comment {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.comment-list .children { 
    list-style: none;
    margin-top: 20px;
    padding-left: 30px;
    border-left: 2px solid #f0f0f0;
}
.comment-body {
    display: flex;
    gap: 20px;
}
.comment-author .avatar {
    border-radius: 50%;
}
.comment-content {
    flex: 1;
}
.comment-meta {
    margin-bottom: 10px;
    font-size: 0.9rem;
}
.comment-meta .fn { 
    font-weight: bold;
    font-style: normal;
}
.comment-metadata a {
    color: #888;
    text-decoration: none;
}
.reply .comment-reply-link {
    display: inline-block;
    background-color: #f0f0f0;
    color: #555;
    padding: 4px 12px;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s ease;
}
.reply .comment-reply-link:hover {
    background-color: #0010a0;
    color: #fff;
}
#reply-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}
.comment-form p {
    margin-bottom: 15px;
}
.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.comment-form .form-submit input#submit {
    background-color: #0010a0;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.comment-form .form-submit input#submit:hover {
    background-color: #dd0000;
}

.npl-emotions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.npl-emotion-button {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 20px; 
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}
.npl-emotion-button:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
    transform: translateY(-2px); 
}

/* ===================================================================
 * 6. Search and 404 Page Styles
 * =================================================================== */
.not-found-page,
.no-results-page {
    text-align: center;
    padding: 40px 20px;
    border: 1px solid #eee;
    margin: 30px 0;
    background: #fdfdfd;
    border-radius: 4px;
}
.not-found-icon {
    font-size: 50px;
    color: var(--secondary_color, #dd0000); 
    margin-bottom: 20px;
}
.not-found-page .page-title,
.no-results-page .page-title {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 700;
}
.not-found-page .page-content p,
.no-results-page .page-content p {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 30px auto;
}
.not-found-search-form .search-form {
    max-width: 500px;
    margin: 0 auto 30px auto;
    display: flex;
}
.not-found-search-form .search-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 3px 0 0 3px;
}
.not-found-search-form .search-submit {
    padding: 12px 20px;
    background: var(--primary_color, #0010a0); 
    border: 1px solid var(--primary_color, #0010a0);
    color: #fff;
    cursor: pointer;
    border-radius: 0 3px 3px 0;
}
.not-found-home-link {
    text-align: center;
    margin-top: 30px;
    font-weight: 600;
}
.not-found-links {
    margin-top: 40px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.not-found-links .widget-title {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.not-found-links .widget-title span {
    font-size: 18px;
    font-weight: 600;
}
.not-found-links ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}
.not-found-links ul li {
    margin-bottom: 10px;
    font-size: 15px;
}
.not-found-links ul li a::before {
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    color: var(--secondary_color, #dd0000); 
}
.search-results .archive-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 30px;
}
.search-results .page-title span {
    font-style: italic;
    font-weight: 600;
    color: var(--primary_color, #0010a0); 
}

/* ===================================================================
 * 7. Scroll To Top Button
 * =================================================================== */
.npl-scroll-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}
.npl-scroll-button {
    display: block;
    width: 45px;
    height: 45px;
    background-color: #0010a0; 
    color: #ffffff;
    text-align: center;
    line-height: 45px;
    font-size: 18px;
    border-radius: 50%; 
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}
.npl-scroll-button.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.npl-scroll-button:hover {
    background-color: #dd0000; 
    color: #ffffff;
    transform: scale(1.1);
}

/* ===================================================================
 * 8. Responsive Fixes - Global Layout (7 Devices)
 * =================================================================== */

@media (max-width: 991px) {
    .container {
        padding-left: 5px;
        padding-right: 5px;        
    }
    .site-content {
        padding-left: 5px;
        padding-right: 5px;
    }
}

@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 8px 15px;
        font-size: 12px;
        margin-bottom: 20px;
    }
    .breadcrumb-nav .separator {
        margin: 0 6px;
    }
    .breadcrumb-nav .current-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px; 
    }
    .archive-grid-container { grid-template-columns: 1fr; }
    .npl-scroll-buttons {
        bottom: 20px;
        right: 20px;
    }
    .npl-scroll-button {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .site-body-flex {
        flex-direction: column;
    }
    .content-area,
    .widget-area.post-sidebar,
    .content-area.full-width {
        width: 100%;
        max-width: 100%;
        flex-basis: 100%;
        margin-right: 0;
        margin-left: 0;
    }
    .widget-area.post-sidebar {
        margin-top: 20px;
    }
}