/*
Theme Name: KJ Custom Theme
Theme URI: https://konradjedrosz.com/
Author: Konrad Jędrosz
Author URI: https://konradjedrosz.com/
Description: Nowoczesny szablon WordPress oparty na Bootstrap 5, jQuery i HTML5 z pełnym wsparciem dla Gutenberga
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kj-custom-theme
Tags: bootstrap, responsive, gutenberg, custom-menu, featured-images, threaded-comments
*/

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.site-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.site-main {
    padding: 2rem 0;
    min-height: 60vh;
}

.site-footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #dee2e6;
}

.footer-bottom {
    padding-top: 1rem;
}

.footer-custom-text {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
}

.footer-custom-text p {
    margin-bottom: 0.5rem;
}

.footer-custom-text p:last-child {
    margin-bottom: 0;
}

.footer-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-menu li {
    display: inline-block;
    margin: 0 0.75rem;
    padding: 0.25rem 0;
}

.footer-menu li a {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-menu li a:hover {
    opacity: 0.7;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
}

/* Header Layout 2 - Centered Logo */
.navbar-brand-centered {
    display: inline-block;
}

.navbar-brand-centered a {
    text-decoration: none;
    color: inherit;
}

.navbar-brand-centered img {
    max-height: 80px;
    width: auto;
}

/* Centered menu styling */
.navbar-nav.justify-content-center {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
}

.navbar-nav.justify-content-center .nav-item {
    margin: 0 0.5rem;
    white-space: nowrap;
}

/* Layout 2 - Always show menu (no collapse on mobile) */
.header-layout-2 .navbar-collapse {
    display: block !important;
}

.header-layout-2 .navbar-toggler {
    display: none !important;
}

/* Layout 2 - Ensure horizontal menu on all devices */
.header-layout-2 .navbar-nav {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

/* Layout 2 - Mobile adjustments */
@media (max-width: 991.98px) {
    .header-layout-2 .navbar-nav.justify-content-center {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding: 0.5rem 0;
    }
    
    .header-layout-2 .navbar-nav.justify-content-center .nav-item {
        flex: 0 0 auto;
    }
    
    .header-layout-2 .navbar-nav.justify-content-center .nav-link {
        padding: 0.5rem 0.75rem;
    }
}

/* Layout 2 - Dropdown menu positioning */
.header-layout-2 .dropdown-menu {
    position: absolute !important;
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 991.98px) {
    .header-layout-2 .dropdown-menu {
        left: 0;
        transform: none;
    }
}

/* Layout 2 - Scrollbar styling for mobile horizontal menu */
.header-layout-2 .navbar-nav.justify-content-center::-webkit-scrollbar {
    height: 4px;
}

.header-layout-2 .navbar-nav.justify-content-center::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.header-layout-2 .navbar-nav.justify-content-center::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.header-layout-2 .navbar-nav.justify-content-center::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ==========================================================================
   CONTENT
   ========================================================================== */

.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.entry-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
}

.entry-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

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

/* ==========================================================================
   POSTS & PAGES
   ========================================================================== */

.post-thumbnail {
    margin-bottom: 1.5rem;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 0.25rem;
}

.posts-navigation,
.post-navigation {
    margin-top: 2rem;
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #dee2e6;
}

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

.comment-body {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-metadata {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* ==========================================================================
   GUTENBERG BLOCKS SUPPORT
   ========================================================================== */

.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.wp-block-quote {
    border-left: 4px solid #0d6efd;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.wp-block-button__link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
}

/* Alignment Classes */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: 100%;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .entry-title {
        font-size: 2rem;
    }
    
    .site-main {
        padding: 1rem 0;
    }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}