/* =========================================
   NAGŁÓWEK (HEADER)
   ========================================= */
header {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 20px 80px;
    position: relative;
}

/* =========================================
   NAWIGACJA (NAVBAR)
   ========================================= */
.nawigacja-wrapper {
    background: var(--kolor-glowny);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.nawigacja {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px; /* Increased breathing room */
    max-width: 1400px;
    margin: 0 auto;
}

.nav-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-links, .nav-actions {
    display: flex;
    align-items: center;
    gap: 25px; /* More space between links */
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nav-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 50%;
    margin-right: 12px;
    background-color: white;
    padding: 2px;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.1) rotate(15deg);
}


.nav-title {
    color: white;
    font-size: 1.3em;
    font-family: 'Playfair Display', serif;
    line-height: 1.1;
}

.nav-subtitle {
    color: var(--kolor-zloto);
    font-size: 0.65em;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}


.nawigacja a:not(.nav-brand a), .dropbtn {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    font-size: 1.05em; /* Slightly larger typography */
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s;
    border-radius: 0;
    position: relative;
}

@media (min-width: 901px) {
    .nawigacja a:not(.nav-brand a) {
        text-transform: uppercase;
        font-family: 'Inter', sans-serif;
        font-weight: 500;
        font-size: 1em;
        padding: 8px 15px;
        white-space: nowrap; /* Prevent "STRONA GŁÓWNA" from wrapping */
    }

    .nawigacja a:not(.nav-brand a)::after, .dropbtn::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--kolor-zloto);
        transition: width 0.3s ease;
    }

    .nawigacja a:not(.nav-brand a).active-link-desktop::after {
        width: 100%;
    }

    @media (hover: hover) and (pointer: fine) {
        .nawigacja a:not(.nav-brand a):hover, .dropbtn:hover {
            color: var(--kolor-zloto);
        }

        .nawigacja a:not(.nav-brand a):hover::after, .dropbtn:hover::after {
            width: 100%;
        }
    }
}

@media (max-width: 900px) {
    .nawigacja a:not(.nav-brand a)::after, .dropbtn::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--kolor-zloto);
        transition: width 0.3s ease;
    }

    @media (hover: hover) and (pointer: fine) {
        .nawigacja a:not(.nav-brand a):hover, .dropbtn:hover {
            color: var(--kolor-zloto);
        }

        .nawigacja a:not(.nav-brand a):hover::after, .dropbtn:hover::after {
            width: 100%;
        }
    }
}


/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn .arrow {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s;
}


@media (hover: hover) and (pointer: fine) {
    .dropdown-content a:hover {
        background-color: #f1f1f1;
        color: var(--kolor-glowny);
        transform: none;
    }
}

/* Hamburger */
.hamburger {
    display: none; /* Hidden on desktop */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    width: 30px;
    height: 24px;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--kolor-zloto);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* User Menu */
.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.user-dropdown button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 10px;
    cursor: pointer;
    font-size: 0.95em;
    color: #333;
    border-radius: 4px;
    transition: background 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .user-dropdown button:hover {
        background: #f1f1f1;
    }
}

.dropdown-header {
    padding: 10px;
    font-weight: bold;
    color: var(--kolor-glowny);
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
    font-size: 0.9em;
}

@media (max-width: 900px) {
    .nav-links, .nav-actions {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .desktop-text {
        display: inline;
    }

    .nawigacja.active {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 20px;
    }

    .nav-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nawigacja.active .hamburger {
        align-self: center;
        margin-bottom: 0;
    }

    .nawigacja {
        justify-content: space-between;
        flex-direction: column;
    }

    .nawigacja:not(.active) {
        flex-direction: row;
    }

    .dropdown {
        width: 100%;
        display: block;
    }

    .dropdown-content {
        display: none;
        position: relative;
        transform: none;
        width: 100%;
        box-shadow: none;
        background: rgba(0,0,0,0.2);
        margin-top: 5px;
        z-index: 10;
        padding: 5px 0;
    }

    .dropdown.active .dropdown-content {
        display: flex;
        flex-direction: column;
    }

    .dropdown-content a {
        color: white;
        padding-left: 40px;
    }

    @media (hover: hover) and (pointer: fine) {
        .dropdown-content a:hover {
            background: rgba(255,255,255,0.1);
            color: white;
        }
    }

    .user-dropdown {
        right: -50px;
        min-width: 200px;
    }
}

.nawigacja.active {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 20px;
}

.nawigacja.active .nav-links,
.nawigacja.active .nav-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 15px;
    animation: slideDownMenu 0.3s ease forwards;
    margin-top: 15px;
}

.nawigacja.active .nav-actions {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
}

/* Staggered animation for links */
.nawigacja.active .nav-links > *,
.nawigacja.active .nav-actions > * {
    opacity: 0;
    animation: slideInRight 0.3s ease forwards;
}

.nawigacja.active .nav-links > *:nth-child(1) { animation-delay: 0.1s; }
.nawigacja.active .nav-links > *:nth-child(2) { animation-delay: 0.15s; }
.nawigacja.active .nav-links > *:nth-child(3) { animation-delay: 0.2s; }
.nawigacja.active .nav-links > *:nth-child(4) { animation-delay: 0.25s; }

.nawigacja.active .nav-actions > *:nth-child(1) { animation-delay: 0.3s; }
.nawigacja.active .nav-actions > *:nth-child(2) { animation-delay: 0.35s; }
.nawigacja.active .nav-actions > *:nth-child(3) { animation-delay: 0.4s; }

.nawigacja.active a:not(.nav-brand a),
.nawigacja.active button:not(.hamburger),
.nawigacja.active .dropbtn {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: white;
}

.nawigacja.active button.btn-cta {
    background: var(--kolor-akcent);
    color: #ffffff;
    font-weight: bold;
}

@media (max-width: 600px) {
    header { padding-top: 40px; }
    .nawigacja a { padding: 6px 12px; font-size: 0.85em; }
}

/* MOBILE RESPONSIVE NAV */
/* =========================================
   GŁÓWNY KONTENER TREŚCI (MAIN)
   ========================================= */
main {
    max-width: 1200px;
    width: 95%;
    margin: -40px auto 30px;
    position: relative;
    z-index: 10;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

@media (max-width: 600px) {
    main {
        width: 100%;
        padding: 15px;
        margin-top: -20px;
        border-radius: 0;
    }
}

@media (min-width: 768px) {
    main {
        padding: 45px;
    }
}

/* =========================================
   O NASZEJ PARAFII (ABOUT SECTION)
   ========================================= */
.statystyki {
    margin-top: 60px;
    text-align: center;
}

.o-parafii-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.o-parafii-line {
    height: 1px;
    width: 40px;
    background-color: var(--kolor-zloto);
}

.o-parafii-icon {
    color: var(--kolor-zloto);
}

.o-parafii-title {
    color: var(--kolor-glowny);
    font-family: 'Playfair Display', serif;
    font-size: 2em;
    margin: 0 0 20px 0;
    border: none;
}

.parafia-opis {
    max-width: 800px;
    margin: 0 auto;
    color: #64748b; /* clean gray sans-serif typography */
    font-family: 'Inter', sans-serif;
    font-size: 1.05em;
    line-height: 1.8;
}

.parafia-opis p {
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.info-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--kolor-glowny);
    font-size: 0.9em;
}

.opis-wsi {
    font-style: italic;
    color: #555;
    background: #fffdf0;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ffeeba;
    margin-bottom: 30px;
}

h2,
section {
    scroll-margin-top: 120px;
}

h2 {
    color: var(--kolor-ciemny);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
}

/* =========================================
   BOTTOM NAVIGATION (MOBILE APP STYLE)
   ========================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--kolor-glowny);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); /* iOS safe area */
    z-index: 1000;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
}

@media (min-width: 901px) {
    .bottom-nav {
        display: none;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #94a3b8; /* Muted gray for inactive */
    font-size: 0.75em;
    font-weight: 500;
    gap: 5px;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
}

.bottom-nav-item svg {
    stroke-width: 1.5;
    transition: stroke-width 0.3s ease, color 0.3s ease;
}

.bottom-nav-item.active {
    color: var(--kolor-zloto);
}

.bottom-nav-item.active svg {
    stroke-width: 2;
}

body {
    padding-bottom: 80px; /* Space for the fixed bottom nav */
}

@media (min-width: 901px) {
    body {
        padding-bottom: 0;
    }
}

/* =========================================
   STOPKA (FOOTER)
   ========================================= */
.stopka-wrapper {
    background: #fff;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.stopka {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9em;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--kolor-ciemny);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .footer-links a:hover {
        color: var(--kolor-glowny);
    }
}

.separator {
    color: #ccc;
    font-size: 0.8em;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    background: url('../img/kosciol-karnkowo.jpg') center/cover no-repeat;
    /* Margin adjustments to make it full width if inside main, or just pull it up */
    margin: -30px -30px 0;
    padding: 60px 30px 100px;
    color: white;
    border-radius: 12px 12px 0 0;
}

@media (max-width: 600px) {
    .hero-section {
        margin: -15px -15px 0;
        padding: 40px 20px 80px;
        border-radius: 0;
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-radius: inherit;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 600px;
}

.hero-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-title {
    font-size: min(2.5em, 10vw);
    font-family: 'Playfair Display', serif;
    margin: 0;
    line-height: 1.1;
    color: white;
    word-break: normal;
    hyphens: none;
}

.hero-title-gold {
    color: var(--kolor-zloto);
}

.hero-patron {
    font-size: 0.9em;
    color: white;
    font-family: 'Inter', sans-serif;
    letter-spacing: 2px;
    margin: 0;
    font-weight: 500;
}

.hero-separator {
    width: 60px;
    height: 2px;
    background-color: var(--kolor-zloto);
    margin-top: 5px;
}

.btn-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--kolor-zloto);
    color: var(--kolor-glowny);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    border-radius: 30px;
    transition: transform 0.3s ease, background 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-hero-cta:hover {
    transform: translateY(-2px);
    background: #e6c245;
}

@media (max-width: 600px) {
    .btn-hero-cta svg {
        width: 24px;
        height: 24px;
    }
}

/* Diagonal cut at bottom */
.hero-diagonal-cut {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--kolor-tla);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
    z-index: 2;
}

/* =========================================
   HERO DESKTOP – układ dwukolumnowy
   ========================================= */
@media (min-width: 901px) {
    .hero-section {
        min-height: 88vh;
        padding: 80px 60px 120px;
        margin: -45px -45px 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 60px;
        border-radius: 12px 12px 0 0;
    }

    .hero-content {
        max-width: 580px;
        flex: 1;
        flex-shrink: 0;
    }

    .hero-title {
        font-size: min(4em, 4.5vw);
        line-height: 1.05;
    }
}

/* =========================================
   BIBLE QUOTE COMPONENT
   ========================================= */
.cytat-dnia-karta {
    background: transparent;
    max-width: 500px;
    width: 100%;
}

.cytat-dnia-karta span {
    font-size: 1.05em;
    color: #e2e8f0;
    font-weight: 300;
}

#cytat-tekst {
    display: inline;
}
#cytat-tekst::before {
    content: '"';
}
#cytat-tekst::after {
    content: '" ';
}

#cytat-siglum {
    color: var(--kolor-zloto);
    font-weight: 500;
    white-space: nowrap;
}


/* =========================================
   DROPDOWN MENU
   ========================================= */
@media (min-width: 901px) {
    .dropdown {
        position: relative;
        display: inline-block;
    }

    .dropdown-content {
        display: none;
        position: absolute;
        background-color: white;
        min-width: 200px;
        box-shadow: var(--shadow-deep);
        z-index: 1000;
        border-radius: 8px;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 1px solid #eee;
        padding: 10px 0;
    }

    .nawigacja .nav-links .dropdown-content a {
        color: var(--kolor-tekstu);
        background: transparent;
        padding: 12px 20px;
        text-decoration: none;
        display: block;
        font-weight: 500;
        transition: background-color 0.2s, color 0.2s;
        box-shadow: none;
        border: none;
        backdrop-filter: none;
        border-radius: 0;
    }

    .nawigacja .nav-links .dropdown-content a:hover {
        background: #f9f9f9;
        color: var(--kolor-glowny);
        transform: none;
        box-shadow: none;
        border-color: transparent;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }
}

.dropdown.active .dropdown-content {
    display: block;
}
