/*
Theme Name: Boże Ciało Theme
Theme URI: https://bozecialo.org/
Author: basianiedbal
Author URI: https://basianiedbal.pl/
Description: autorski motyw strony parafialnej
Version: 2.1.7
Text Domain: bozecialo
*/

/* Kolor zaznaczenia tekstu — ciepły złoty */
::selection {
    background: rgba(197, 160, 89, 0.3);
    color: #2B251F;
}
::-moz-selection {
    background: rgba(197, 160, 89, 0.3);
    color: #2B251F;
}

/* Długie adresy URL i wyrazy w treści wpisów/stron zawijają się zamiast poszerzać stronę (szczególnie na telefonie) */
.prose,
.prose a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Obrazki w treści wpisów/stron: wyrównanie z edytora bloków i odstępy od tekstu */
.prose figure {
    margin: 2rem 0;
}
.prose figure.aligncenter,
.prose img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.prose figure.aligncenter img {
    margin-left: auto;
    margin-right: auto;
}
.prose figure.alignleft,
.prose img.alignleft {
    float: left;
    margin: 0.5rem 2rem 1rem 0;
}
.prose figure.alignright,
.prose img.alignright {
    float: right;
    margin: 0.5rem 0 1rem 2rem;
}

/* Linki w treści wpisów i stron (zwykłe linki z edytora, bez przycisków) */
.prose a:not([class]) {
    color: #775a19;
    text-decoration: underline !important; /* globalna reguła a { text-decoration: none !important } */
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .2s ease;
}
.prose a:not([class]):hover,
.prose a:not([class]):focus-visible {
    color: #5d4201;
    text-decoration-thickness: 2px;
}

/* Przyciski z edytora bloków (Przycisk, Plik do pobrania) w stylu strony */
.prose .wp-block-buttons,
.prose .wp-block-file {
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.prose .wp-block-button__link:not(.has-background),
.prose .wp-block-file__button:not(.has-background) {
    background-color: #775a19;
}
.prose .wp-block-button__link:not(.has-text-color),
.prose .wp-block-file__button:not(.has-text-color) {
    color: #fff;
}
.prose .wp-block-button__link,
.prose .wp-block-file__button {
    display: inline-block;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
    text-decoration: none !important;
    padding: 0.95rem 1.9rem;
    border: 1px solid #775a19;
    border-radius: 4px;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.prose .wp-block-button__link:not(.has-background):hover,
.prose .wp-block-file__button:not(.has-background):hover {
    background-color: #5d4201;
    border-color: #5d4201;
}
.prose .wp-block-button__link:not(.has-text-color):hover,
.prose .wp-block-file__button:not(.has-text-color):hover {
    color: #fff;
}
/* Wariant „Kontur” */
.prose .is-style-outline > .wp-block-button__link:not(.has-background) {
    background-color: transparent;
}
.prose .is-style-outline > .wp-block-button__link:not(.has-text-color) {
    color: #775a19;
}
.prose .is-style-outline > .wp-block-button__link:not(.has-background):hover {
    background-color: #775a19;
}
.prose .is-style-outline > .wp-block-button__link:not(.has-text-color):hover {
    color: #fff;
}

/* ===== Tablet i telefon: mniejsze przerwy i odstępy ===== */

/* Duże przerwy między kontenerami (np. 48 px) skracamy na tablecie i telefonie; mniejsze zostają bez zmian */
@media (max-width: 1024px) {
    .elementor .e-con,
    .elementor .e-con > .e-con-inner {
        gap: min(var(--row-gap, 20px), 20px) min(var(--column-gap, 20px), 20px) !important;
    }
}
@media (max-width: 767px) {
    .elementor .e-con,
    .elementor .e-con > .e-con-inner {
        gap: min(var(--row-gap, 20px), 16px) min(var(--column-gap, 20px), 16px) !important;
    }
}

/* Oś czasu (Historia): pełna szerokość na tablecie, węższy margines na telefonie */
@media (min-width: 768px) and (max-width: 1023px) {
    .timeline-line-wrapper { left: 16px !important; transform: none !important; }
    .timeline-item { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 2.75rem !important; padding-right: 0 !important; justify-content: space-between !important; }
    .timeline-item .timeline-point { left: 8px !important; right: auto !important; transform: none !important; }
}
@media (max-width: 767px) {
    .timeline-item { padding-left: 2.5rem !important; }
    .timeline-card { padding: 1rem !important; }
}

/* Notki z ikoną i ramką: mniejsze wcięcia na telefonie */
@media (max-width: 767px) {
    .kh-note { padding: 1rem !important; }
    .kh-note > .flex { gap: .75rem !important; }
    .vacation-box { padding: 1rem !important; }
}

/* Dekalog: węższa kolumna z numerem na tablecie i telefonie */
@media (max-width: 1024px) {
    .dekalog-rule-item { align-items: baseline; }
    .dekalog-number { width: 2.6rem; min-width: 2.6rem; flex-shrink: 0; margin-right: 12px; margin-top: 0; font-size: 1.75rem; line-height: 1.4; }
    .dekalog-text { padding-top: 0; }
}
@media (max-width: 767px) {
    .dekalog-number { width: 2.25rem; min-width: 2.25rem; margin-right: 8px; font-size: 1.5rem; }
}

/* Elementor Global Typography integration for Boże Ciało widgets */
.elementor-widget[class*="elementor-widget-bozecialo_"] {
    font-family: var(--e-global-typography-text-font-family, 'EB Garamond', Georgia, serif);
}

.elementor-widget[class*="elementor-widget-bozecialo_"] p,
.elementor-widget[class*="elementor-widget-bozecialo_"] .widget-desc,
.elementor-widget[class*="elementor-widget-bozecialo_"] .card-desc,
.elementor-widget[class*="elementor-widget-bozecialo_"] .item-desc,
.elementor-widget[class*="elementor-widget-bozecialo_"] .item-text,
.elementor-widget[class*="elementor-widget-bozecialo_"] .post-card-excerpt,
.elementor-widget[class*="elementor-widget-bozecialo_"] .lso-item-desc,
.elementor-widget[class*="elementor-widget-bozecialo_"] .widget-section-content,
.elementor-widget[class*="elementor-widget-bozecialo_"] .contact-info,
.elementor-widget[class*="elementor-widget-bozecialo_"] .contact-value,
.elementor-widget[class*="elementor-widget-bozecialo_"] .hours-value,
.elementor-widget[class*="elementor-widget-bozecialo_"] .hours-note,
.elementor-widget[class*="elementor-widget-bozecialo_"] .priest-desc,
.elementor-widget[class*="elementor-widget-bozecialo_"] .dekalog-text {
    font-size: var(--e-global-typography-text-font-size, 20px);
    line-height: var(--e-global-typography-text-line-height, 1.7);
}

/* Elementor SVG & FontAwesome Icon Sizing across all custom widgets */
.e-font-icon-svg,
svg.e-font-icon-svg {
    width: 1em;
    height: 1em;
    display: inline-block;
    fill: currentColor;
    vertical-align: -0.125em;
    box-sizing: content-box;
}

.kh-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.kh-icon svg,
.kh-icon .e-font-icon-svg {
    width: 1em;
    height: 1em;
    display: inline-block;
    fill: currentColor;
}

.kh-icon i {
    display: inline-block;
    font-size: 1em;
    line-height: 1;
}

/* Optymalizacja wydajności animacji i płynności przewijania (GPU Compositing) */
.animate-fade-in-up,
.animate-fadeInUp,
.home-hero-anim,
.grid-anim-item,
.kronika-anim-item,
[class*="animate-fade"] {
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translate3d(0, 24px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translate3d(0, 24px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Globalne usunięcie podkreśleń przy hover - tylko zmiana koloru */
a,
a:hover,
a:focus,
a:active {
    text-decoration: none !important;
}

/* Stopka - dodatkowe zabezpieczenie i zwarte odstępy */
footer a,
footer a:hover,
footer a:focus,
footer a:active,
footer a span {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

footer .site-footer-container p,
footer .site-footer-container div,
footer .site-footer-container a,
footer .site-footer-container span,
footer .site-footer-container li {
    line-height: 1.42;
}