/*
Theme Name: VELTH Theme
Theme URI: https://example.com/
Author: Paweł Ambroży
Author URI: https://example.com/
Description: Nowoczesny motyw blogowy o tematyce AI i nowych technologii.
Version: 1.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, custom-background, custom-logo, custom-menu, featured-images, theme-options
Text Domain: velth-theme
*/

/* --- Style Globalne --- */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
}
html {
    scroll-behavior: smooth;
}
.theme-transition {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --- Nawigacja i Menu Rozwijane --- */
.menu-item-has-children {
    position: relative;
}
.menu-item-has-children > a {
    display: flex;
    align-items: center;
}
.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 8px;
    transition: transform 0.2s ease-in-out;
}
.menu-item-has-children.submenu-open > a::after {
    transform: rotate(180deg);
}
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    padding: 0.5rem;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.dark .sub-menu {
    background-color: #1f2937;
    border-color: #374151;
}
.menu-item-has-children.submenu-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.sub-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.sub-menu li a:hover {
    background-color: #f3f4f6;
    color: #111827;
}
.dark .sub-menu li a:hover {
    background-color: #374151;
    color: #ffffff;
}


/* --- Style dla treści (Prose) --- */
.prose p {
    line-height: 1.8;
}
.prose a {
    color: #308AF0;
    font-weight: 500;
    text-decoration: none;
}
.prose a:hover {
    text-decoration: underline;
}
.prose ul {
    list-style-type: none;
    padding-left: 0;
}
.prose ul > li {
    display: block;
    align-items: flex-start;
    padding-left: 0;
    margin-bottom: 0.5em;
    line-height: 2;
}
.prose ul > li::before {
    content: '•';
    color: #308AF0;
    font-weight: bold;
    font-size: 1.1em;
    margin-right: 12px;
    flex-shrink: 0;
    margin-top: 0.15em;
}

.prose h1 {
    font-size: 2.25em;
    font-weight: 800;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #e5e7eb;
}
.dark .prose h1 {
    border-bottom-color: #4b5563;
}

.prose h2 {
    font-size: 1.8em;
    font-weight: 800;
    margin-top: 2em;
    margin-bottom: 1em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #e5e7eb;
}
.dark .prose h2 {
    border-bottom-color: #374151;
}
.prose h3 {
    font-size: 1.4em;
    font-weight: 700;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
}
.prose blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: 0.5em 1.5em;
    border-left: 4px solid #308AF0;
    background-color: #f9fafb;
    font-style: italic;
    color: #1f2937;
}
.dark .prose blockquote {
    background-color: #1f2937;
    color: #d1d5db;
}

/* --- Style Paginacji --- */
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    min-width: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
.dark .pagination .page-numbers {
    border-color: #374151;
    color: #d1d5db;
}
.pagination .page-numbers:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}
.dark .pagination .page-numbers:hover {
    background-color: #374151;
    border-color: #4b5563;
}
.pagination .page-numbers.current {
    background-color: #308AF0;
    color: #ffffff;
    border-color: #308AF0;
    font-weight: bold;
}
.pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* --- Style Menu Mobilnego --- */
#mobile-menu-nav ul li a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.dark #mobile-menu-nav ul li a {
    color: white;
}
#mobile-menu-overlay.is-active #mobile-menu-nav ul li a {
    opacity: 1;
    transform: translateY(0);
}
#mobile-menu-overlay.is-active #mobile-menu-nav ul li:nth-child(1) a { transition-delay: 0.1s; }
#mobile-menu-overlay.is-active #mobile-menu-nav ul li:nth-child(2) a { transition-delay: 0.2s; }
#mobile-menu-overlay.is-active #mobile-menu-nav ul li:nth-child(3) a { transition-delay: 0.3s; }
#mobile-menu-overlay.is-active #mobile-menu-nav ul li:nth-child(4) a { transition-delay: 0.4s; }

/* --- Style Przycisków Funkcyjnych --- */
#back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    z-index: 40;
}
#back-to-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

/* --- Style Wyszukiwarki --- */
.search-field {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #4b5563;
    background-color: #1f2937;
    color: white;
    outline: none;
    transition: all 0.2s ease-in-out;
}
.search-field:focus {
    border-color: #308AF0;
    box-shadow: 0 0 0 3px rgba(48, 138, 240, 0.5);
}

/* --- Style dla Timera Pomodoro --- */
body.page-template-template-pomodoro .pomodoro-container,
body.page-template-template-pomodoro .stats-container {
    text-align: center;
}
body.page-template-template-pomodoro .pomodoro-count {
    margin-bottom: 25px;
    font-size: 0.9rem;
    min-height: 20px;
}
body.page-template-template-pomodoro #timer-display {
    font-family: 'Roboto Mono', monospace;
    font-size: clamp(4rem, 15vw, 6.5rem);
    font-weight: 700;
    margin: 20px 0;
    color: #308AF0;
}
body.page-template-template-pomodoro .mode-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    background-color: #f3f4f6;
    padding: 8px;
    border-radius: 12px;
}
.dark body.page-template-template-pomodoro .mode-buttons {
    background-color: rgba(255,255,255,0.1);
}
body.page-template-template-pomodoro .mode-buttons button {
    flex-grow: 1;
    background-color: transparent;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4b5563;
}
.dark body.page-template-template-pomodoro .mode-buttons button {
    color: #9ca3af;
}
body.page-template-template-pomodoro .mode-buttons button.active {
    background-color: #308AF0;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(48, 138, 240, 0.3);
}
body.page-template-template-pomodoro .control-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}
body.page-template-template-pomodoro .control-buttons button {
    background-color: #308AF0;
    color: white;
    border: none;
    padding: 15px 0;
    width: 120px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
body.page-template-template-pomodoro .control-buttons button:hover {
    background-color: #2563eb;
}
body.page-template-template-pomodoro .control-buttons button:active {
    transform: scale(0.97);
}
body.page-template-template-pomodoro .hidden {
    display: none;
}

/* ZMIANA: Ograniczenie wysokości wykresu na urządzeniach mobilnych */
@media (max-width: 767px) {
    body.page-template-template-pomodoro .stats-container {
        /* Użycie !important jest konieczne, aby nadpisać style inline dodawane przez JavaScript,
           które powodują niekontrolowane rozciąganie się kontenera na widoku mobilnym. */
        height: 420px !important; 
        display: flex !important;
        flex-direction: column !important;
    }
}

/* --- Style dla Modala Potwierdzenia Resetu --- */
#reset-confirm-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}
#reset-confirm-modal.visible {
    opacity: 1;
    pointer-events: auto;
}
#reset-confirm-modal.visible > div {
    transform: scale(1);
}
#reset-confirm-modal > div {
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
