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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f8f6f0;
    color: #1e2b2f;
    line-height: 1.5;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* header & mobile menu */
.parish-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0 1.5rem 0;
    border-bottom: 2px solid #d9c9b0;
    margin-bottom: 1.1rem;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #3d2c1b;
}
.logo i {
    color: #b68b5c;
    margin-right: 0;
}

.church-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: contain;
    display: block;
}

.logo-fallback {
    color: #b68b5c;
    font-size: 1.5rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.logo-main {
    font-size: 1.15rem;
    font-weight: 700;
}

.logo-sub {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.92;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: #3d2c1b;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    order: -1;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem 2rem;
    font-weight: 500;
}
.nav-links a {
    text-decoration: none;
    color: #2c3e3f;
    font-size: 1.1rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
    border-bottom-color: #b68b5c;
    color: #1f2a2b;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-dropdown-toggle::after {
    content: '\25BE';
    font-size: 0.7rem;
    opacity: 0.75;
    margin-top: 1px;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid #dfd3c1;
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
    padding: 0.45rem;
    display: none;
    z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-toggle.active {
    border-bottom-color: #b68b5c;
    color: #1f2a2b;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    border-bottom: none;
    font-size: 0.95rem;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    background: #f5efe4;
    color: #3a2b1c;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 999;
}
.mobile-menu-overlay.open {
    display: block;
}
.mobile-menu {
    position: fixed;
    top: 0; left: -280px;
    width: 270px;
    height: 100%;
    background: #f5efe7;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    padding: 2rem 1.5rem;
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    border-right: 2px solid #d9c9b0;
}
.mobile-menu.open {
    left: 0;
}
.mobile-menu .close-menu {
    background: none;
    border: none;
    font-size: 2rem;
    color: #3d2c1b;
    float: right;
    cursor: pointer;
}
.mobile-menu a {
    display: block;
    padding: 0.8rem 0;
    font-size: 1.2rem;
    color: #2c3e3f;
    text-decoration: none;
    border-bottom: 1px solid #ddd0bd;
}
.mobile-menu a.active {
    color: #8b6f4c;
    font-weight: 600;
}

.mobile-submenu-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    border-bottom: 1px solid #ddd0bd;
    padding: 0.8rem 0;
    font-size: 1.2rem;
    color: #2c3e3f;
    cursor: pointer;
    text-align: left;
}

.mobile-submenu-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.mobile-submenu-toggle i:last-child {
    transition: transform 0.2s ease;
}

.mobile-submenu-toggle.open i:last-child {
    transform: rotate(180deg);
}

.mobile-submenu-toggle span i {
    transform: none !important;
}

.mobile-submenu {
    display: none;
    padding: 0.2rem 0 0.4rem 0.9rem;
}

.mobile-submenu.open {
    display: block;
}

.mobile-submenu a {
    font-size: 1.05rem;
    padding: 0.65rem 0;
}

.page {
    display: block;
}
.page.hidden {
    display: none;
}

/* hero carousel */
.hero-carousel {
    background: #e7dfd2;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    position: relative;
}

.carousel-track {
    display: flex;
    width: 100%;
    aspect-ratio: 16 / 7;
    min-height: 200px;
    max-height: 480px;
    transition: transform 0.35s ease;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;
    background: #c8bcab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #3d2c1b;
    background-size: cover;
    background-position: center;
    background-color: #d6cdbc;
    position: relative;
}
.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-featured-slide {
    cursor: pointer;
}

.carousel-featured-slide .hero-featured-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-featured-slide .empty-state {
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-featured-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.9rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28), transparent);
    color: #fff;
    text-align: left;
}

.hero-featured-caption h3 {
    font-size: 1.1rem;
    line-height: 1.25;
    margin: 0 0 0.25rem;
}

.hero-featured-caption p {
    font-size: 0.92rem;
    margin: 0;
    opacity: 0.95;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-featured-caption .hero-featured-desc {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    white-space: normal;
}

.hero-featured-caption .hero-featured-desc span {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
}

.hero-see-more-link {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 1;
}

.hero-see-more-link:hover {
    opacity: 0.85;
}

.carousel-btn {
    position: absolute;
    top: 44%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 2rem;
    padding: 0.4rem 1rem;
    cursor: pointer;
    border-radius: 16px;
    color: #1e2b2f;
    backdrop-filter: blur(4px);
    transition: 0.2s;
    z-index: 10;
}
.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0.8rem 0 1.2rem 0;
}
.carousel-indicators span {
    width: 12px;
    height: 12px;
    border-radius: 8px;
    background: #c0b3a0;
    cursor: pointer;
    transition: 0.2s;
}
.carousel-indicators span.active {
    background: #7f6a4e;
    width: 28px;
}

.home-card-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.home-media-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid #e1d6c5;
    background: #d8cebf;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.05);
}

.home-media-track {
    display: flex;
    width: 100%;
    height: clamp(120px, 20vw, 185px);
    transition: transform 0.25s ease;
}

.home-media-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-media-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-media-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    border-radius: 12px;
    padding: 0.15rem 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    color: #2a3837;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
}

.home-media-btn.prev { left: 6px; }
.home-media-btn.next { right: 6px; }

/* card grid */
.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 0.9rem 0 0.9rem 0;
    color: #2e3f3a;
    border-left: 8px solid #b68b5c;
    padding-left: 1rem;
}

.section-head {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-head .section-title {
    margin-bottom: 0.35rem;
}

.filter-inline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #4c4033;
    font-size: 0.92rem;
    margin-bottom: 0.5rem;
}

.filter-inline input {
    border: 1px solid #d7c8b1;
    background: #fff;
    border-radius: 10px;
    padding: 0.45rem 0.6rem;
    color: #253332;
    min-width: 180px;
}

.filter-clear-btn {
    border: 1px solid #d7c8b1;
    background: #fff;
    border-radius: 10px;
    padding: 0.45rem 0.65rem;
    color: #253332;
    cursor: pointer;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8rem;
}

.priests-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.contact-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.contact-card {
    display: grid;
    grid-template-columns: minmax(160px, 280px) 1fr;
    gap: 1rem;
    align-items: stretch;
}

.contact-card.has-link {
    cursor: pointer;
}

.contact-card.no-link {
    cursor: default;
}

.contact-card.no-link:hover {
    transform: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.contact-media {
    background: #dbd1c1;
    border-radius: 14px;
    overflow: hidden;
    min-height: 160px;
}

.contact-media img,
.contact-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contact-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.7rem 0.9rem 0.9rem 0;
}

.contact-body h3 {
    margin: 0;
    color: #243533;
    font-size: 1.2rem;
}

.contact-body p {
    margin: 0;
    color: #33413e;
    font-size: 1rem;
}

.contact-link-hint {
    color: #7f6a4e;
    font-size: 0.9rem;
    font-weight: 600;
}

.priest-card {
    display: grid;
    grid-template-columns: minmax(160px, 260px) 1fr;
    gap: 1rem;
    align-items: stretch;
}

.priest-media {
    background: #dbd1c1;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    min-height: 170px;
}

.priest-media .mini-carousel {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.25s ease;
}

.priest-media .slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.priest-media .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.priest-media .mini-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.75);
    border: none;
    font-size: 1rem;
    border-radius: 12px;
    padding: 0.2rem 0.55rem;
    cursor: pointer;
    z-index: 5;
}

.priest-media .mini-btn.prev { left: 6px; }
.priest-media .mini-btn.next { right: 6px; }

.priest-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.2rem 0;
}

.priest-body h3 {
    margin: 0;
    color: #243533;
    font-size: 1.3rem;
}

.priest-term {
    color: #6a5d4f;
    font-size: 0.95rem;
    font-weight: 600;
}

.priest-body p {
    margin: 0;
    color: #33413e;
    font-size: 0.95rem;
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.about-block {
    background: #fff;
    border: 1px solid #e7ddcd;
    border-radius: 16px;
    padding: 1.2rem 1.2rem 1.3rem;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.03);
}

.about-block h3 {
    font-size: 1.2rem;
    margin-bottom: 0.55rem;
    color: #2c3d3b;
}

.about-block p {
    color: #3b4a47;
    margin-bottom: 0.6rem;
}

.about-block p:last-child {
    margin-bottom: 0;
}

.card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    transition: 0.2s;
    border: 1px solid #ede6db;
    cursor: pointer;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.06);
}

.card-media {
    background: #dbd1c1;
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
}
.card-media .mini-carousel {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.25s ease;
}
.card-media .mini-carousel .slide {
    flex: 0 0 100%;
    background-size: cover;
    background-position: center;
    background-color: #cbbfad;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2f3e38;
}
.card-media .mini-carousel .slide img,
.card-media .mini-carousel .slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-placeholder {
    width: 100%;
    height: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(244, 235, 223, 0.9));
}

.media-placeholder-wireframe {
    width: min(88%, 280px);
    height: min(80%, 190px);
    border: 2px solid #b9a082;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #735a3d;
    background: rgba(255, 255, 255, 0.56);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.media-placeholder-wireframe i {
    font-size: 2.1rem;
    opacity: 0.88;
}

.media-placeholder-wireframe span {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}
.card-media .mini-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.7);
    border: none;
    font-size: 1.2rem;
    padding: 0.2rem 0.6rem;
    border-radius: 14px;
    cursor: pointer;
    backdrop-filter: blur(2px);
    z-index: 5;
}
.card-media .mini-btn.prev { left: 6px; }
.card-media .mini-btn.next { right: 6px; }

.card-body {
    padding: 1.2rem 1.2rem 1.5rem 1.2rem;
}
.card-body h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #1f2e2b;
}
.card-body .date {
    font-size: 0.85rem;
    color: #6e6253;
    margin-bottom: 0.4rem;
}
.card-body p {
    color: #33413e;
    font-size: 0.95rem;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #6f6254;
    background: #f0ebe3;
    border-radius: 18px;
}

#page-detail {
    padding: 0.3rem 0 1rem;
}

.detail-page-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 1rem;
}

.detail-back-btn {
    border: none;
    border-radius: 14px;
    background: #b68b5c;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.7rem 1.1rem;
    cursor: pointer;
    margin: 0 0 1rem;
}

.detail-back-btn:hover {
    background: #9c7345;
}

/* detail view */
.post-detail-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.post-detail-overlay.open {
    display: flex;
}
.post-detail-card {
    background: #fcf9f4;
    max-width: 720px;
    width: 100%;
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    padding: 1.8rem 1.8rem 2.2rem;
    position: relative;
    margin: 0 1rem;
}

#page-detail .post-detail-card {
    margin: 0 auto;
    max-width: 860px;
    max-height: none;
}
.post-detail-card .close-detail {
    position: sticky;
    top: 0;
    float: right;
    background: rgba(255,255,255,0.8);
    border: none;
    font-size: 2rem;
    padding: 0 0.8rem;
    border-radius: 16px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    z-index: 10;
    margin-top: -0.5rem;
}
.post-detail-card .detail-carousel {
    width: 100%;
    aspect-ratio: 16/9;
    background: #d6cdbc;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    margin: 0.5rem 0 1.2rem 0;
}
.detail-carousel .detail-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}
.detail-track .detail-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d0c4b2;
    cursor: pointer;
}
.detail-track .detail-slide img,
.detail-track .detail-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #1e1e1e;
}
.detail-carousel .detail-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.7);
    border: none;
    font-size: 1.8rem;
    padding: 0.2rem 0.8rem;
    border-radius: 16px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    z-index: 8;
}
.detail-carousel .detail-btn.prev { left: 8px; }
.detail-carousel .detail-btn.next { right: 8px; }

.detail-collage {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    display: grid;
    gap: 4px;
    background: #d6cdbc;
    margin: 0.5rem 0 0.35rem;
    cursor: pointer;
}

.detail-collage.layout-2 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: minmax(220px, 34vh);
}

.detail-collage.layout-3 {
    grid-template-columns: 1.45fr 1fr;
    grid-template-rows: repeat(2, minmax(108px, 17vh));
}

.detail-collage.layout-3 .detail-collage-tile:first-child {
    grid-row: 1 / span 2;
}

.detail-collage.layout-4plus {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, minmax(108px, 17vh));
}

.detail-collage-tile {
    position: relative;
    overflow: hidden;
    background: #cfc2af;
}

.detail-collage-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-collage-extra {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(24, 28, 30, 0.58);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.detail-collage-hint {
    font-size: 0.9rem;
    color: #5d5144;
    font-weight: 600;
    margin: 0 0 1rem;
    cursor: pointer;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
}

.detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 0.4rem;
}
.detail-meta {
    color: #6e6253;
    margin: 0.2rem 0 0.8rem;
}
.detail-description {
    font-size: 1.1rem;
    color: #1e2b2f;
    white-space: pre-wrap;
}

.detail-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 0.55rem;
    margin-bottom: 0;
}

.detail-audio {
    width: 100%;
    display: block;
    margin-top: 0.8rem;
}

.detail-pdf-btn {
    margin-left: auto;
    text-decoration: none;
    color: #fff;
    background: #7f6a4e;
    border-radius: 12px;
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.detail-pdf-btn:hover {
    background: #6d583d;
}

.detail-lyrics {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid #dacfc0;
    font-size: 1rem;
    color: #2f3e38;
    white-space: pre-wrap;
}

.detail-lyrics .label {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.detail-gallery-view {
    margin-top: 0.8rem;
}

.detail-gallery-back-btn {
    border: none;
    border-radius: 12px;
    background: #b68b5c;
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 0.95rem;
    cursor: pointer;
    margin-bottom: 0.9rem;
}

.detail-gallery-back-btn:hover {
    background: #9c7345;
}

.detail-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 0.35rem 0 0.2rem;
}

.detail-gallery-item {
    border: 1px solid #e7ddcf;
    padding: 8px;
    border-radius: 14px;
    overflow: hidden;
    background: #fffdf9;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    box-shadow: 0 8px 20px rgba(20, 20, 20, 0.09);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.detail-gallery-item:hover,
.detail-gallery-item:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(20, 20, 20, 0.14);
    border-color: #ccb18c;
}

.detail-gallery-item:focus-visible {
    outline: 2px solid #a37d4f;
    outline-offset: 2px;
}

.detail-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    background: #d6cdbc;
}

#postDetailCard.detail-gallery-mode #detailCarousel,
#postDetailCard.detail-gallery-mode #detailCollagePreview,
#postDetailCard.detail-gallery-mode #detailCollageHint,
#postDetailCard.detail-gallery-mode .detail-head,
#postDetailCard.detail-gallery-mode #detailMeta,
#postDetailCard.detail-gallery-mode #detailDescription,
#postDetailCard.detail-gallery-mode #detailAudio,
#postDetailCard.detail-gallery-mode #detailLyrics {
    display: none !important;
}

.hidden {
    display: none !important;
}

/* image viewer */
.image-viewer {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 1rem;
}
.image-viewer.open {
    display: flex;
}
.image-viewer img {
    max-width: 95%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    transition: transform 0.1s ease;
    cursor: grab;
}
.image-viewer .viewer-close {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 2.8rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
}
.image-viewer .viewer-controls {
    margin-top: 1rem;
    display: flex;
    gap: 1.5rem;
}
.image-viewer .viewer-controls button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.8rem;
    padding: 0.4rem 1.2rem;
    border-radius: 16px;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.parish-footer {
    margin-top: 3rem;
    text-align: center;
    padding: 1.5rem 0 0.5rem 0;
    border-top: 1px solid #dacfc0;
    color: #4d4236;
    font-size: 0.95rem;
}

.parish-footer p {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-parish-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .parish-header {
        flex-direction: row;
        align-items: center;
    }
    .menu-toggle {
        display: block;
    }
    .nav-links {
        display: none;
    }
    .carousel-track {
        aspect-ratio: 16 / 9;
        max-height: 300px;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .card,
    .detail-gallery-item {
        transition: none;
    }
    .card:hover,
    .detail-gallery-item:hover {
        transform: none;
    }
    .detail-gallery-item:hover {
        box-shadow: 0 8px 20px rgba(20, 20, 20, 0.09);
        border-color: #e7ddcf;
    }
    .home-card-grid {
        grid-template-columns: 1fr;
    }
    .priest-card {
        grid-template-columns: 1fr;
    }
    .contact-card {
        grid-template-columns: 1fr;
    }
    .contact-body {
        padding: 0.8rem 1rem 1rem;
    }
    .priest-body {
        padding: 0.85rem 1rem 1rem;
    }
    .about-layout {
        grid-template-columns: 1fr;
    }
    .post-detail-card {
        padding: 1.2rem;
        margin: 0;
        border-radius: 16px;
    }
    .section-head {
        align-items: stretch;
    }
    .filter-inline {
        width: 100%;
        justify-content: space-between;
    }
    .filter-inline input {
        min-width: 0;
        width: 100%;
    }
    .filter-clear-btn {
        width: 100%;
    }
    .detail-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .detail-head {
        flex-direction: column;
        gap: 0.7rem;
    }
    .detail-audio {
        width: 100%;
    }
    .detail-pdf-btn {
        margin-left: 0;
        text-align: center;
    }
    .detail-page-shell {
        padding: 0;
    }
    .detail-back-btn {
        width: 100%;
        margin-bottom: 0.9rem;
    }
    .detail-title {
        font-size: 1.6rem;
    }
    .detail-collage.layout-2 {
        grid-template-rows: 155px;
    }
    .detail-collage.layout-3,
    .detail-collage.layout-4plus {
        grid-template-rows: repeat(2, 92px);
    }
    .detail-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .parish-header {
        justify-content: center;
        row-gap: 0.9rem;
    }
    .header-left {
        width: 100%;
        justify-content: center;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
        margin-top: 0.35rem;
    }
}

@media (min-width: 641px) {
    .menu-toggle {
        display: none;
    }
    .mobile-menu-overlay,
    .mobile-menu {
        display: none !important;
    }
}