@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* =========================================================
   VTUBERKOWY.PL — PURPLE / LIGHT THEME
========================================================= */

:root {
    --bg: #f2f4ff;
    --surface: #ffffff;
    --surface-soft: #f8f8ff;

    --purple: #7469f1;
    --purple-dark: #5148c7;
    --purple-light: #e8e9ff;
    --purple-hover: #6257df;

    --text: #403b70;
    --text-light: #7773a0;

    --border: #dcdcf3;
}


/* =========================================================
   GLOBALNA CZCIONKA — MONTSERRAT
   Bez nadpisywania czcionek ikon dropdownu
========================================================= */

html,
body,
p,
span,
div,
a,
li,
ul,
ol,
h1,
h2,
h3,
h4,
h5,
h6,
button,
input,
textarea,
select,
label,
td,
th,
blockquote,
code,
pre {
    font-family: 'Montserrat', sans-serif !important;
}


/* =========================================================
   CAŁA STRONA
========================================================= */

html,
body {
    background: var(--bg) !important;
    color: var(--text) !important;
}

body {
    background-image: none !important;
}


/* =========================================================
   HEADER
========================================================= */

#masthead {
    width: 100% !important;
    background: var(--bg) !important;

    border-top: 4px solid var(--purple) !important;
    border-bottom: 1px solid var(--border) !important;

    box-shadow: none !important;

    position: relative !important;
    overflow: visible !important;
}


/* =========================================================
   SEPARATOR POD HEADEREM
========================================================= */

#masthead::before {
    display: none !important;
    content: none !important;
}

#masthead::after {
    content: "" !important;
    display: block !important;

    position: absolute !important;

    left: 0 !important;
    right: 0 !important;

    bottom: -2px !important;

    width: 100% !important;
    height: 1px !important;

    background: var(--border) !important;

    border: none !important;
    box-shadow: none !important;

    z-index: 10 !important;

    pointer-events: none !important;
}


/* =========================================================
   USUNIĘCIE STARYCH LINII Z POSTÓW I WIDGETÓW
========================================================= */

.post::before,
.post::after,
#content .post::before,
#content .post::after,
.sidebar .widget::before,
.sidebar .widget::after,
#sidebar .widget::before,
#sidebar .widget::after,
#side-bar .widget::before,
#side-bar .widget::after {
    display: none !important;
    content: none !important;

    background: none !important;
    border: none !important;

    box-shadow: none !important;

    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}


/* =========================================================
   LOGO
========================================================= */

#masthead #header {
    background: transparent !important;
    color: var(--purple) !important;
}

#masthead #header-inner {
    background: transparent !important;
}

#masthead h1.title,
#masthead h1.title a {
    color: var(--purple) !important;
    text-shadow: none !important;
}

#masthead h1.title a:hover {
    color: var(--purple-dark) !important;
}


/* =========================================================
   MENU
========================================================= */

#masthead #menu-primary > li > a {
    color: var(--purple) !important;

    background: transparent !important;
    background-image: none !important;

    text-shadow: none !important;

    border: none !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

#masthead #menu-primary > li > a:hover,
#masthead #menu-primary > li > a:focus {
    color: #ffffff !important;

    background: var(--purple) !important;
    background-image: none !important;

    border-color: transparent !important;

    box-shadow: none !important;
}

#masthead #menu-primary > li.current > a,
#masthead #menu-primary > li.active > a {
    color: #ffffff !important;

    background: var(--purple) !important;
    background-image: none !important;

    border-color: transparent !important;

    box-shadow: none !important;
}

#masthead #menu-primary > li.current > a:hover,
#masthead #menu-primary > li.active > a:hover {
    background: var(--purple-hover) !important;
}


/* =========================================================
   DROPDOWN TOGGLE
========================================================= */

#masthead #menu-primary li.dropdown {
    position: relative !important;
}

#masthead #menu-primary li.dropdown > a.dropdown-toggle {
    color: var(--purple) !important;

    background: transparent !important;
    background-image: none !important;

    border: none !important;

    text-shadow: none !important;

    box-shadow: none !important;

    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

#masthead #menu-primary li.dropdown:hover > a.dropdown-toggle,
#masthead #menu-primary li.dropdown.open > a.dropdown-toggle,
#masthead #menu-primary li.dropdown.current > a.dropdown-toggle,
#masthead #menu-primary li.dropdown.active > a.dropdown-toggle {
    color: #ffffff !important;

    background: var(--purple) !important;
    background-image: none !important;

    border-color: transparent !important;

    text-shadow: none !important;

    box-shadow: none !important;

    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}


/* =========================================================
   USUNIĘCIE TYLKO TŁA / RAMKI PSEUDO-ELEMENTÓW
   Nie zmieniamY ich content, bo może być ikoną strzałki
========================================================= */

#masthead #menu-primary li.dropdown > a.dropdown-toggle::before,
#masthead #menu-primary li.dropdown > a.dropdown-toggle::after,
#masthead #menu-primary li.dropdown:hover > a.dropdown-toggle::before,
#masthead #menu-primary li.dropdown:hover > a.dropdown-toggle::after,
#masthead #menu-primary li.dropdown.open > a.dropdown-toggle::before,
#masthead #menu-primary li.dropdown.open > a.dropdown-toggle::after {
    background: none !important;

    border: none !important;

    box-shadow: none !important;

    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}


/* =========================================================
   DROPDOWN MENU — WYRÓWNANIE
========================================================= */

#masthead #menu-primary li.dropdown .dropdown-menu {
    left: 0 !important;
    right: auto !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    transform: none !important;
    -webkit-transform: none !important;

    background: var(--surface) !important;
    background-image: none !important;

    border: 1px solid var(--purple-light) !important;
    border-top: 3px solid var(--purple) !important;

    border-radius: 0 0 4px 4px !important;

    box-shadow: 0 8px 20px rgba(81, 72, 199, 0.15) !important;

    -webkit-box-shadow: 0 8px 20px rgba(81, 72, 199, 0.15) !important;
    -moz-box-shadow: 0 8px 20px rgba(81, 72, 199, 0.15) !important;
}

#masthead #menu-primary .dropdown-menu::before,
#masthead #menu-primary .dropdown-menu::after {
    display: none !important;
    content: none !important;

    background: none !important;

    border: none !important;

    box-shadow: none !important;
}


/* =========================================================
   ELEMENTY DROPDOWNU
========================================================= */

#masthead #menu-primary .dropdown-menu > li {
    background: transparent !important;

    border: none !important;

    box-shadow: none !important;
}

#masthead #menu-primary .dropdown-menu > li::before,
#masthead #menu-primary .dropdown-menu > li::after {
    display: none !important;
    content: none !important;

    background: none !important;

    border: none !important;

    box-shadow: none !important;
}

#masthead #menu-primary .dropdown-menu > li > a {
    display: block !important;

    color: var(--purple-dark) !important;

    background: transparent !important;
    background-image: none !important;

    border: none !important;

    text-shadow: none !important;

    box-shadow: none !important;
}


/* =========================================================
   HOVER DROPDOWNU — JAŚNIEJSZY FIOLET
========================================================= */

#masthead #menu-primary .dropdown-menu > li > a:hover,
#masthead #menu-primary .dropdown-menu > li > a:focus {
    color: #ffffff !important;

    background: rgba(116, 105, 241, 0.65) !important;
    background-image: none !important;

    border-color: transparent !important;

    text-shadow: none !important;

    box-shadow: none !important;
}


/* =========================================================
   AKTUALNA STRONA W DROPDOWNIE
========================================================= */

#masthead #menu-primary .dropdown-menu > li.current > a,
#masthead #menu-primary .dropdown-menu > li.active > a {
    color: var(--purple-dark) !important;

    background: var(--purple-light) !important;
    background-image: none !important;

    border: none !important;

    box-shadow: none !important;
}

#masthead #menu-primary .dropdown-menu > li.current > a:hover,
#masthead #menu-primary .dropdown-menu > li.active > a:hover {
    color: #ffffff !important;

    background: rgba(116, 105, 241, 0.65) !important;
}


/* =========================================================
   MOBILE MENU
========================================================= */

#masthead .btn-navbar {
    background: var(--purple) !important;
    background-image: none !important;

    border-color: var(--purple-dark) !important;

    box-shadow: none !important;
}

#masthead .btn-navbar:hover {
    background: var(--purple-hover) !important;
}


/* =========================================================
   GŁÓWNE TŁO
========================================================= */

#content-wrapper,
#primary {
    background: transparent !important;
}


/* =========================================================
   GŁÓWNY CONTENT / KARTA
========================================================= */

#content .post,
#content .post-wrap,
#content .post-head,
#content .block-box,
.entry-container {
    background: var(--surface) !important;
    color: var(--text) !important;
}

#content .post {
    border: 1px solid var(--border) !important;

    box-shadow: 0 3px 12px rgba(116, 105, 241, 0.10) !important;
}


/* =========================================================
   NAGŁÓWKI
========================================================= */

#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6,
#content .entry-title {
    color: var(--purple-dark) !important;
}


/* =========================================================
   TEKST
========================================================= */

#content,
#content p,
#content li,
#content td,
#content th {
    color: var(--text) !important;
}


/* =========================================================
   LINKI
========================================================= */

#content a {
    color: var(--purple) !important;
}

#content a:hover {
    color: var(--purple-dark) !important;
}


/* =========================================================
   OBRAZKI
========================================================= */

#content img {
    border-color: var(--border) !important;
}


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

#side-bar,
#sidebar {
    background: transparent !important;
}

.sidebar {
    width: 30% !important;
    margin-left: 70% !important;
    box-sizing: border-box !important;
}

#side-bar .widget,
#sidebar .widget {
    background: var(--surface) !important;

    color: var(--text) !important;

    border-color: var(--border) !important;

    box-shadow: 0 2px 10px rgba(116, 105, 241, 0.07) !important;
}

#side-bar .widget h2,
#side-bar .widget h3,
#sidebar .widget h2,
#sidebar .widget h3 {
    color: var(--purple-dark) !important;

    border-color: var(--purple-light) !important;
}

#side-bar .widget a,
#sidebar .widget a {
    color: var(--purple) !important;
}

#side-bar .widget a:hover,
#sidebar .widget a:hover {
    color: var(--purple-dark) !important;
}


/* =========================================================
   BUTTONY
========================================================= */

.btn,
.btn-primary {
    background: var(--purple) !important;
    background-image: none !important;

    border-color: var(--purple-dark) !important;

    color: #ffffff !important;

    text-shadow: none !important;

    box-shadow: none !important;
}

.btn:hover,
.btn:focus,
.btn:active,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--purple-hover) !important;
    background-image: none !important;

    border-color: var(--purple-dark) !important;

    color: #ffffff !important;

    box-shadow: none !important;
}


/* =========================================================
   FORMULARZE
========================================================= */

input,
textarea,
select {
    background: var(--surface) !important;

    color: var(--text) !important;

    border-color: var(--border) !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--purple) !important;

    box-shadow: 0 0 3px rgba(116, 105, 241, 0.25) !important;
}


/* =========================================================
   BLOCKQUOTE
========================================================= */

blockquote {
    border-left-color: var(--purple) !important;

    background: var(--surface-soft) !important;

    color: var(--text-light) !important;
}


/* =========================================================
   TABELKI
========================================================= */

.table th,
.table td {
    border-color: var(--border) !important;
}

.table-hover tbody tr:hover > td,
.table-hover tbody tr:hover > th {
    background-color: var(--purple-light) !important;
}


/* =========================================================
   ELEMENTY BOOTSTRAPA
========================================================= */

.nav > li > a:hover,
.nav > li > a:focus {
    background-color: var(--purple-light) !important;

    color: var(--purple-dark) !important;
}


/* =========================================================
   POST TYPE / AKCENTY
========================================================= */

.post:hover .post-type {
    background-color: var(--purple) !important;
}

.post-type {
    color: #ffffff !important;
}


/* =========================================================
   PAGINACJA / AKTYWNE ELEMENTY
========================================================= */

.pagination ul > .active > a,
.pagination ul > .active > span {
    background: var(--purple) !important;

    color: #ffffff !important;

    border-color: var(--purple) !important;
}

.pagination ul > li > a:hover,
.pagination ul > li > span:hover {
    background: var(--purple-light) !important;

    color: var(--purple-dark) !important;
}


/* =========================================================
   FOOTER
========================================================= */

#colophon,
#footer {
    background: var(--purple-dark) !important;

    color: #f2f4ff !important;

    border-top: 4px solid var(--purple) !important;
}

#footer a {
    color: #ffffff !important;
}

#footer a:hover {
    color: var(--purple-light) !important;
}

#footer .go-top a {
    background: var(--purple) !important;

    color: #ffffff !important;
}

#footer .go-top a:hover {
    background: #ffffff !important;

    color: var(--purple) !important;
}


/* =========================================================
   SELECTION
========================================================= */

::selection {
    background: var(--purple) !important;

    color: #ffffff !important;
}


/* =========================================================
   HR — 3 PX, PEŁNA CIĄGŁA LINIA
========================================================= */

hr {
    display: block !important;

    width: 100% !important;
    height: 3px !important;

    margin-top: 20px !important;
    margin-bottom: 20px !important;

    border: none !important;

    background: var(--border) !important;

    opacity: 1 !important;

    box-shadow: none !important;
}


/* =========================================================
   CODE / PRE
========================================================= */

code,
pre {
    background: var(--surface-soft) !important;

    color: var(--purple-dark) !important;

    border-color: var(--border) !important;
}

.muted {
    color: var(--text-light) !important;
}


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

.sidebar {
    background: var(--surface) !important;

    color: var(--text) !important;

    border: 1px solid var(--border) !important;

    box-shadow: 0 3px 12px rgba(116, 105, 241, 0.10) !important;

    box-sizing: border-box !important;
    margin-left: 70% !important;
}

/* =========================================================
   TYTUŁ SIDEBARA
========================================================= */

.sidebar h3 {
    margin: 0 !important;
    padding: 14px 16px !important;

    color: var(--purple-dark) !important;

    background: var(--purple-light) !important;

    border-bottom: 1px solid var(--border) !important;

    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;

    box-sizing: border-box !important;
}


/* =========================================================
   POJEDYNCZY POST
========================================================= */

.sidebar-post {
    margin: 0 !important;
    padding: 0 !important;

    border-bottom: 1px solid var(--border) !important;

    background: var(--surface) !important;
}

.sidebar-post:last-child {
    border-bottom: none !important;
}


/* =========================================================
   LINK DO POSTA
========================================================= */

.sidebar-post a {
    display: block !important;

    padding: 12px 16px !important;

    color: var(--text) !important;

    background: var(--surface) !important;

    font-weight: 500 !important;

    text-decoration: none !important;

    line-height: 1.45 !important;

    transition:
        background-color 0.15s ease,
        color 0.15s ease !important;
}


/* =========================================================
   HOVER
========================================================= */

.sidebar-post a:hover,
.sidebar-post a:focus {
    color: var(--purple-dark) !important;

    background: var(--purple-light) !important;

    text-decoration: none !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }
}

#sidebar-gallery .owl-item {
    width: 349px !important;
    box-sizing: border-box !important;
}

#sidebar-gallery .sidebar-gallery-item {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

#sidebar-gallery .sidebar-gallery-item img {
    display: inline-block !important;
    width: 90% !important;
    max-width: 90% !important;
    height: auto !important;
}
/* =========================================================
   GALERIA — PEŁNA SZEROKOŚĆ
========================================================= */

body.gallery-page #content-wrapper {
    width: auto !important;
}

body.gallery-page #primary {
    width: 100% !important;
    margin-left: 0 !important;
}

body.gallery-page #content {
    width: 100% !important;
    margin-left: 0 !important;
}

body.gallery-page #side-bar {
    display: none !important;
}

.post-date {
    text-align: right !important;
    margin-top: -10px !important;
    margin-bottom: 20px !important;

    color: var(--text-light) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

/* =========================================================
   =========================================================
   MOBILE OPTIMIZATION — DODATKOWE REGUŁY RESPONSYWNE
   Wszystko poniżej DOKŁADA się do istniejących reguł —
   nic wyżej nie zostało ruszone. Działa na zasadzie kaskady:
   te reguły są niżej w pliku, więc przy danej szerokości
   ekranu wygrywają z regułami "desktopowymi" powyżej.
   =========================================================
========================================================= */

/* ---------------------------------------------------------
   ZABEZPIECZENIA GLOBALNE (wszystkie szerokości)
   - blokują poziomy scroll wynikający z elementów
     "wystających" poza viewport (np. sztywne px-y, tabele)
   - box-sizing na wszystkim, żeby padding/border nie psuły
     szerokości 100%
--------------------------------------------------------- */

*, *::before, *::after {
    box-sizing: border-box !important;
}

html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

img,
video,
iframe,
embed,
object {
    max-width: 100% !important;
    height: auto !important;
}


/* ---------------------------------------------------------
   BREAKPOINT 1 — DUŻY TABLET (≤ 992px)
   Tu sidebar jest JESZCZE widoczny (chowa się dopiero
   poniżej 768px), więc dajemy mu układ jednokolumnowy
   zamiast sztywnych 30% / margin-left: 70%.
--------------------------------------------------------- */

@media (max-width: 992px) {

    #content-wrapper,
    #primary {
        width: 100% !important;
    }

    #content {
        width: 100% !important;
        margin-left: 0 !important;
        margin-bottom: 24px !important;
    }

    .sidebar {
        width: 100% !important;
        margin-left: 0 !important;
    }
}


/* ---------------------------------------------------------
   BREAKPOINT 2 — TABLET / MOBILE (≤ 768px)
--------------------------------------------------------- */

@media (max-width: 768px) {

    /* --- Kontener główny --- */
    #content-wrapper,
    #primary,
    #content {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* --- Header / logo --- */
    #masthead #header-inner {
        padding: 10px 16px !important;
    }

    #masthead h1.title,
    #masthead h1.title a {
        font-size: 22px !important;
    }

    /* --- Menu mobilne: większe pola dotykowe, dropdown na pełną szerokość --- */
    #masthead #menu-primary > li > a,
    #masthead #menu-primary li.dropdown > a.dropdown-toggle {
        padding: 12px 16px !important;
        font-size: 15px !important;
    }

    #masthead #menu-primary li.dropdown .dropdown-menu {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    #masthead .btn-navbar {
        padding: 9px 12px !important;
    }

    /* --- Karta posta --- */
    #content .post,
    #content .post-wrap,
    #content .block-box,
    .entry-container {
        padding: 16px !important;
    }

    /* --- Typografia --- */
    #content h1,
    #content .entry-title {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    #content h2 { font-size: 20px !important; }
    #content h3 { font-size: 18px !important; }

    #content,
    #content p,
    #content li {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    /* --- Tabele: scroll poziomy zamiast rozjeżdżania layoutu --- */
    .table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
    }

    /* --- Galeria w sidebarze (owl-carousel) ---
       Oryginał ma sztywne 349px, co na węższych telefonach
       (np. 320–375px) wystaje poza ekran i powoduje poziomy
       scroll całej strony. Nadpisujemy na procenty. */
    #sidebar-gallery .owl-item {
        width: 100% !important;
    }

    #sidebar-gallery .sidebar-gallery-item img {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* --- Formularze: pełna szerokość, 16px żeby iOS Safari
       nie robił auto-zoomu po kliknięciu w pole --- */
    input,
    textarea,
    select {
        width: 100% !important;
        font-size: 16px !important;
        padding: 10px 12px !important;
    }

    .btn,
    .btn-primary {
        width: 100% !important;
        padding: 12px !important;
        font-size: 15px !important;
    }

    /* --- Paginacja: zawijanie zamiast wychodzenia poza ekran --- */
    .pagination ul {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .pagination ul > li {
        margin-bottom: 6px !important;
    }

    /* --- Footer --- */
    #colophon,
    #footer {
        padding: 20px 16px !important;
        text-align: center !important;
        font-size: 13px !important;
    }

    /* --- Data posta: po lewej, żeby nie kolidowała z tytułem --- */
    .post-date {
        text-align: left !important;
        font-size: 12px !important;
    }
}


/* ---------------------------------------------------------
   BREAKPOINT 3 — MAŁY TELEFON (≤ 480px)
--------------------------------------------------------- */

@media (max-width: 480px) {

    #masthead h1.title,
    #masthead h1.title a {
        font-size: 18px !important;
    }

    #content h1,
    #content .entry-title {
        font-size: 20px !important;
    }

    #content h2 { font-size: 18px !important; }
    #content h3 { font-size: 16px !important; }

    #content .post,
    #content .post-wrap,
    #content .block-box,
    .entry-container {
        padding: 12px !important;
    }

    #content-wrapper,
    #primary,
    #content {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .sidebar-post a {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
}
