:root {
    --primary-color: #701414;
    --secondary-color: #aa1c1c;
    --text-color: #333;
    --light-bg: #f8f4f1;
    --white-bg: #ffffff;
}

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

body, html {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', 'Segoe UI', Tahoma, Verdana, sans-serif;
    background-color: var(--white-bg);
    color: var(--text-color);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color);
    z-index: 101;
}

@media (max-width: 1024px) {
    .intro-text h1 {
        font-size: clamp(1.5rem, 6vw, 3rem);
    }
    .intro-text p {
        font-size: clamp(1.2rem, 3vw, 1.5rem);
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    main {
        padding-top: 80px;
        transition: padding-top 0.2s ease;
    }
    .main-nav ul.active + main {
        padding-top: 250px;
    }
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white-bg);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 1.5rem;
        z-index: 100;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.2s ease, transform 0.2s ease;
        pointer-events: none
    }
    .main-nav ul.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .main-nav li {
        margin: 0.75rem 0;
        padding: 0.5rem;
        border-bottom: 1px solid #eee;
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    .main-nav ul.active li {
        opacity: 1;
        transform: translateX(0);
    }
    .main-nav li:nth-child(1) { transition-delay: 0.1s; }
    .main-nav li:nth-child(2) { transition-delay: 0.2s; }
    .main-nav li:nth-child(3) { transition-delay: 0.3s; }
    .main-nav li:nth-child(4) { transition-delay: 0.4s; }
    .main-nav a {
        display: block;
        padding: 1rem;
        border-radius: 4px;
        font-size: clamp(1rem, 3vw, 1.2rem);
        font-weight: 400;
        color: var(--text-color);
        background-color: var(--light-bg);
        transition: background-color 0.2s ease, color 0.2s ease;
    }
    .main-nav a:hover {
        background-color: var(--primary-color);
        color: var(--white-bg);
    }
    .hamburger {
        display: block;
        font-size: clamp(1.8rem, 4vw, 2rem);
        padding: 0.5rem;
        border-radius: 4px;
        background-color: var(--light-bg);
    }
    .intro-video {
        filter: brightness(0.6);
    }
}

@media (max-width: 600px) {
    .content-section,
    .msze-section,
    .news-section,
    .slowo-section,
    .kancelaria-sekcja,
    .gallery-section,
    .map-section {
        padding: 1.5rem 1rem;
    }
    .gallery-grid,
    .footer-grid,
    .kancelaria-grid,
    .msze-grid {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0 0.5rem;
        box-sizing: border-box;
    }
    .kancelaria-grid {
        padding: 0 1rem;
        justify-content: center;
    }
    .kancelaria-karta,
    .msza-karta,
    .news-card,
    .parafia-karta {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    .kancelaria-contact {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0rem;
        box-sizing: border-box;
    }
    .image-divider img {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        display: block;
    }
    .hero-section,
    .intro-video {
        width: 100%;
        max-width: 100%;
        left: 0;
        right: 0;
        margin: 0 auto;
    }
    .intro-text {
        width: 90%;
        max-width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
    .intro-text h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
        text-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
    }
    .intro-text p {
        font-size: clamp(1rem, 2vw, 1.2rem);
    }
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    #map {
        height: 250px;
    }
}

@media (max-width: 400px) {
    .intro-text h1 {
        font-size: clamp(1.8rem, 4.5vw, 2.2rem);
    }
    .intro-text p {
        font-size: clamp(0.9rem, 2vw, 1rem);
    }
    .news-card {
        min-width: clamp(250px, 80vw, 280px);
    }
    .main-nav a {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        padding: 0.8rem;
    }
    .hamburger {
        font-size: clamp(1.5rem, 3.5vw, 1.8rem);
    }
}

@media (max-width: 320px) {
    .intro-text h1 {
        font-size: clamp(1.5rem, 5vw, 1.8rem);
    }
    .hamburger {
        font-size: 1.2rem;
    }
}

@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (min-width: 769px) {
    .main-nav a {
        font-family: 'Inter', sans-serif;
        font-size: clamp(1rem, 2vw, 1.1rem);
        font-weight: 400;
    }
}

main {
    padding-top: 80px;
}

.content-section,
.msze-section,
.news-section,
.kancelaria-sekcja,
.slowo-section,
.gallery-section,
.map-section {
    padding: 4rem 2rem;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

h2 {
    font-size: clamp(2rem, 3vw, 2.2rem);
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    padding-bottom: 0.3rem;
    display: block;
    margin-inline: auto;
}

.map-section {
    margin-top: 20px;
}

#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--white-bg);
    border-bottom: 5px solid var(--primary-color);
    z-index: 10;
}

.logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 400;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease-in-out;
}

.main-nav a.active {
    color: var(--primary-color);
    font-weight: bold;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.hero-section {
    position: relative;
    width: 100vw;
    height: calc(100vh - 80px);
    overflow: hidden;
    margin-top: 0;
}

.intro-video {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 80px);
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.7);
}

.intro-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white-bg);
    text-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 1.5s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.intro-text h1 {
    font-size: clamp(2.5rem, 6vw, 3rem);
    margin-bottom: 1rem;
}

.intro-text p {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

.slowo-section {
    background: linear-gradient(to bottom, var(--white-bg), var(--light-bg));
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.quote-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background-color: rgba(255,255,255,0.8);
    border-left: 6px solid var(--primary-color);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border-radius: 12px;
    backdrop-filter: blur(6px);
}

blockquote {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    color: var(--text-color);
    margin: 0;
}

blockquote p {
    font-size: clamp(2rem, 4vw, 2rem);
    color: var(--primary-color);
}

blockquote footer {
    margin-top: 1rem;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    font-style: normal;
    font-family: 'Inter', sans-serif;
}

.news-section {
    width: 100%;
    margin: 0;
    padding: 4rem 1rem 4rem;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.news-controls {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.news-cards {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.5rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-height: 300px; 
    overflow: visible;
    max-width: 1000px;
    justify-content: center;
}

.news-cards::-webkit-scrollbar {
    display: none;
}

.news-card {
    flex: 0 0 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
    min-width: clamp(280px, 40vw, 360px);
    background: var(--white-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.5s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease;
    max-height: 700px;
}

.news-card.slide-left {
    animation: slideLeftNews 0.5s cubic-bezier(0.4,0,0.2,1);
}
.news-card.slide-right {
    animation: slideRightNews 0.5s cubic-bezier(0.4,0,0.2,1);
}

#ogloszenia #najnowsze-ogloszenie article.news-card {
  width: 100%;
  max-width: 1200px;   /* ustaw identycznie jak mapa */
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}


@keyframes slideLeftNews {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideRightNews {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.news-viewport { overflow: hidden; width: 100%; }

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    image-rendering: optimizeQuality;
    flex-shrink: 0;
}

.news-content {
    padding: 1.5rem;
    text-align: left;
    flex-grow: 1;
}

.news-content h3 {
    font-size: clamp(1.3rem, 2vw, 1.5rem);
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.news-date {
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    color: #666;
    margin-bottom: 0.75rem;
}

.news-description {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: #444;
    line-height: 1.6;
}

.news-prev, .news-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.news-prev img,
.news-next img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.news-prev {
    left: 1.5rem;
}

.news-next {
    right: 1.5rem;
}

.news-prev:hover,
.news-next:hover {
    background-color: var(--secondary-color);
}

@media (max-width: 1024px) {
    .news-controls {
        padding: 0 80px;;
    }
    .news-card {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
        min-width: clamp(300px, 45vw, 360px);
    }
    .news-cards {
        max-width: 90vw;
    }
}

@media (max-width: 768px) {
    .news-controls {
        padding: 0 70px;
    }
    .news-card {
        flex: 0 0 calc(80% - 1rem);
        max-width: calc(80% - 1rem);
        min-width: clamp(280px, 80vw, 320px);
    }
    .news-prev, .news-next {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    .news-cards {
        max-width: 98vw;
    }
}

@media (max-width: 600px) {
    .news-controls {
        padding: 0 40px;
    }
    .news-prev {
        left: -10px;
    }
    .news-next {
        right: -10px;
    }
    .news-card {
        flex: 0 0 calc(100% - 1rem);
        max-width: calc(100% - 1rem);
        min-width: clamp(240px, 90vw, 300px);
    }
    .news-prev, .news-next {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        margin: 0 5px; /* Dodano margines dla oddalenia */
    }
}

@media (max-width: 400px) {
    .news-card {
        min-width: clamp(220px, 85vw, 280px);
    }
    .news-prev, .news-next {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
        margin: 0 8px; /* Dodatkowe oddalenie na bardzo małych ekranach */
    }
}

.announcement {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-left: 6px solid var(--primary-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(6px);
    text-align: left;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .announcement {
        padding: 1.5rem;
        margin: 0 1rem;
    }
}

/* === O G Ł O S Z E N I A  P A R A F I A L N E === */

/* Lista ogłoszeń — upewniamy się, że jest jedna kolumna */
#ogloszenia #najnowsze-ogloszenie .news-cards {
  display: block; /* zamiast grida/flexa z kilkoma kolumnami */
}

/* KAFEL OGŁOSZENIA (cała bryła z cieniem i zaokrągleniami) */
#ogloszenia #najnowsze-ogloszenie article.news-card {
  width: 100%;
  max-width: 1200px;   /* ← USTAW IDENTYCZNĄ WARTOŚĆ CO MAPA */
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  border-radius: 1rem;        /* opcjonalnie: spójne z mapą */
  box-shadow: 0 4px 16px rgba(0,0,0,0.08); /* opcjonalnie */
  background: #fff;           /* upewniamy się, że tło jest białe */
}

/* Wnętrze kafla (tekst, padding) */
#ogloszenia #najnowsze-ogloszenie .news-card .news-content {
  padding: 1.5rem;
  text-align: left;
  width: auto;         /* resetuje wcześniejsze błędne wymuszenia */
  max-width: none;
  flex: initial;
  box-sizing: border-box;
}

/* Teksty w kaflu */
#ogloszenia #najnowsze-ogloszenie .news-card .news-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

#ogloszenia #najnowsze-ogloszenie .news-card .news-date {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 0.75rem;
}

#ogloszenia #najnowsze-ogloszenie .news-card .news-text {
  font-size: 1rem;
  line-height: 1.5;
}


#ogloszenia.is-single #najnowsze-ogloszenie .ogloszenie {
    min-height: 10rem;
    align-items: stretch;
}
#ogloszenia.is-single #najnowsze-ogloszenie .news-card {
    max-width: 1200px;
    margin: 0 auto;
}
#ogloszenia.is-single #najnowsze-ogloszenie .news-content {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.ogloszenie-tytul,
.news-title,
.ogloszenie .title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.ogloszenie h3 {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    margin-bottom: 0.5rem;
    color: #222;
}

.ogloszenie-data {
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    color: #999;
    margin-bottom: 1rem;
}

.ogloszenie-tresc {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: #444;
    line-height: 1.6;
}

/* Style dla obrazków w ogłoszeniach */
.ogloszenie-obrazek {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsywność obrazków */
@media (max-width: 768px) {
    .ogloszenie-obrazek {
        margin: 0.75rem auto;
    }
}

/* Zapobieganie rozciąganiu obrazków */
.ogloszenie-tresc img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.ogloszenia-lista .news-card {
  margin-bottom: 2rem;
}

.ogloszenia-lista {
    justify-items: center;
}

@media (min-width: 769px) {
    .ogloszenia-lista .ogloszenie {
        width: 100%;
        max-width: 1200px;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

.ogloszenia-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white-bg);
    text-decoration: none;
    border-radius: 8px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.ogloszenia-btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

.content-section {
    background-color: var(--white-bg);
    color: var(--text-color);
    text-align: center;
}

.bullet-list {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    list-style-type: disc;
    padding-left: 2rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.6;
}

.msze-section {
    text-align: center;
}

.msze-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.msza-karta {
    background-color: var(--white-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: clamp(260px, 30vw, 280px);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.msza-karta:hover {
    transform: translateY(-5px);
}

.msza-karta h3 {
    font-size: clamp(1.2rem, 2vw, 1.3rem);
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.godzina-mszy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
}

.godzina-mszy p {
    font-size: clamp(1.8rem, 3vw, 2rem);
    font-weight: bold;
    color: #222;
    margin: 0;
}

.godzina-mszy.single {
    flex: 1;
    justify-content: center;
}

.spowiedz-info {
    margin-top: 3rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: #444;
    font-style: italic;
    background-color: #f7f7f7;
    padding: 1rem 2rem;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px); /* stałe tory po 300px */
    gap: 1.5rem;
    justify-content: center;   /* <— centrowanie całej grupy kolumn */
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}


.gallery-grid a {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid a:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-grid a:hover img {
    transform: scale(1.1);
}

.mapa-lokalizacja {
    margin: 2rem auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    border-left: 6px solid var(--primary-color);
    max-width: 1200px;
}

#map {
    height: 300px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.church-marker {
    background: transparent;
    border: none;
}

.church-marker-icon {
    font-size: 24px;
    color: var(--primary-color);
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

.church-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background-color: var(--white-bg);
}

.church-popup .leaflet-popup-content {
    margin: 8px;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
}

.church-popup .leaflet-popup-tip {
    background-color: var(--white-bg);
}

.kancelaria-sekcja {
    max-width: 100%;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--white-bg) 100%);
    text-align: center;
}

.kancelaria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 30vw, 280px), 1fr));
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
    align-items: stretch;
    justify-content: center;
    box-sizing: border-box;
}

.kancelaria-karta {
    background: linear-gradient(45deg, var(--white-bg) 0%, #f9f9f9 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-left: 6px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.kancelaria-karta:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary-color);
}

.kancelaria-karta:not(.kancelaria-contact) h3 {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kancelaria-karta:not(.kancelaria-contact) p {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: #444;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.kancelaria-contact {
    grid-column: span 3;
}

.kancelaria-contact h3 {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: var(--white-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    flex-grow: 1;
    border-left: 6px solid var(--primary-color);
}

@media (max-width: 768px) {
    .kancelaria-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .kancelaria-karta {
        width: 100%;
        max-width: none;
        padding: 2rem;
    }
    .kancelaria-contact {
        grid-column: auto;
        width: 100%;
        max-width: none;
        padding: 0rem;
        margin: 0 auto;
        box-sizing: border-box;
    }
    #contact-form {
        width: 100%;
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    .kancelaria-karta h3 {
        font-size: clamp(1rem, 2vw, 1.2rem);
    }
    .kancelaria-karta p {
        font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    }
}

.parafia-karta {
    background: linear-gradient(45deg, var(--white-bg) 0%, #f9f9f9 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-left: 6px solid var(--primary-color);
    min-height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.parafia-karta:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    border-color: var(--secondary-color);
}

.parafia-karta h3 {
    font-size: clamp(1.4rem, 2vw, 1.6rem);
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.parafia-karta p {
    font-size: clamp(0.9rem, 1.5vw, 0.95rem);
    color: #444;
    line-height: 1.8;
    margin-bottom: 0.5rem;
    max-width: 600px;
}

.parafia-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.image-divider {
    text-align: center;
    padding: 2rem 0;
}

.image-divider img {
    width: clamp(300px, 90vw, 1160px);
    height: 240px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    object-fit: cover;
}

@media (max-width: 600px) {
    .image-divider img {
        width: 100%;
        max-width: 90%;
        min-height: 200px;
    }
}

#contact-form label {
    font-weight: 600;
    color: var(--text-color);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    font-family: 'Inter', sans-serif;
}

#contact-form input,
#contact-form textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(112, 20, 20, 0.2);
}

#contact-form input:invalid:focus,
#contact-form textarea:invalid:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 8px rgba(211, 47, 47, 0.2);
}

#contact-form input.error,
#contact-form textarea.error {
    border-color: #d32f2f;
    box-shadow: 0 0 8px rgba(211, 47, 47, 0.2);
}

#contact-form button {
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white-bg);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

#contact-form button:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
}

#contact-form button:active {
    transform: translateY(0);
}

#contact-form #form-error {
    color: #d32f2f;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    font-family: 'Inter', sans-serif;
    margin-top: 0.5rem;
    text-align: left;
}

.kontakt-section {
    background-color: var(--primary-color);
    color: var(--white-bg);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(180px, 25vw, 200px), 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.footer-column h3 {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    margin-bottom: 1rem;
    color: var(--white-bg);
}

.footer-column p,
.footer-column a {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: #ddd;
    line-height: 1.6;
    text-decoration: none;
}

.footer-column a:hover {
    color: var(--white-bg);
    text-decoration: underline;
}

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

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-copy {
    margin-top: 2rem;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: #ccc;
}

#cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(6px);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s ease forwards;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    max-width: 600px;
    min-width: 300px;
}

#cookie-consent p {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: var(--text-color);
    margin: 0;
}

#cookie-consent button {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white-bg);
    border: none;
    border-radius: 8px;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

#cookie-consent button:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    #cookie-consent {
        flex-direction: column;
        max-width: 90%;
        padding: 1rem 1.5rem;
        bottom: 10px;
        left: 10px;
    }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.polityka-tekst {
    text-align: left;
    padding: 1rem;
}

/* === Cookie banner === */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  background: #ffffff; color: var(--text-color);
  border: 1px solid #e6e6e6; border-radius: 12px;
  padding: 14px 16px; display: none; z-index: 9999;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.cookie-banner.show {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.cookie-banner p { flex: 1; margin: 0; font-size: .95rem; line-height: 1.4; }
.cookie-banner a { color: var(--primary-color); text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; }
.cookie-btn { border: none; border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.cookie-accept { background: var(--primary-color); color: #fff; }
.cookie-decline { background: #efefef; color: #333; }