/* ==========================================================================
   PVM West - Common Styles for Public Pages
   Merged from home.blade.php and layouts/public.blade.php
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --ink: #1f2d3b;
    --muted: #67768a;
    --paper: #f6f8fa;
    --card: #ffffff;
    --line: #d6dde5;
    --hero-top: #264a77;
    --hero-bottom: #101f34;
    --blue-block: #93d8f9;
    --footer-pink: #f397bb;
    --menu-blue: #155b98;
}

/* ---------- Reset & Base ---------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- Container ---------- */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==========================================================================
   HERO / SUBHERO (home.blade.php uses .hero, public.blade.php uses .subhero)
   ========================================================================== */

.hero,
.subhero {
    position: relative;
    min-height: 68vh;
    background:
        linear-gradient(0deg, rgba(16, 31, 52, 0.25), rgba(16, 31, 52, 0.25)),
        radial-gradient(circle at 78% 20%, rgba(146, 215, 247, 0.25), transparent 36%),
        linear-gradient(130deg, var(--hero-top), var(--hero-bottom));
    color: #ffffff;    
}

/* hero-only glow effect */
.hero::after {
    content: "";
    position: absolute;
    inset: auto -4rem -6rem auto;
    width: 33rem;
    height: 33rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(147, 216, 249, 0.48), transparent 66%);
    pointer-events: none;
}

/* Hero Image Carousel */
.hero-image-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.carousel-image.active {
    opacity: 1;
    z-index: 2;
}

/* Subhero variant with lighter gradient */
.subhero {
    min-height: 16rem;
    background:
        linear-gradient(0deg, rgba(16, 31, 52, 0.34), rgba(16, 31, 52, 0.46)),
        radial-gradient(circle at 78% 20%, rgba(146, 215, 247, 0.34), transparent 38%),
        linear-gradient(130deg, var(--hero-top), var(--hero-bottom));
}

/* ---------- Topbar ---------- */
.topbar {
    padding-top: 1rem;
    position: relative;
    z-index: 3;
}

.topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    gap: 1rem;
}

.brand img {
    width: min(200px, 48vw);
    height: auto;
    display: block;
}

/* ---------- Top Actions (search + menu button) ---------- */
.top-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--hero-top);
    border-radius: 18px;
    box-shadow: 0 0 10px var(--hero-top);
}

.search-form {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    min-height: 2.2rem;
    padding: 0.18rem 0.2rem 0.18rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
}

.search-form:focus-within {
    background: rgba(255, 255, 255, 0.16);
}

.search-input {
    width: min(17rem, 42vw);
    border: 0;
    outline: none;
    background: transparent;
    color: #ffffff;
    font-size: 0.82rem;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.search-submit {
    border: 0;
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
    border-radius: 999px;
    min-height: 1.75rem;
    min-width: 1.9rem;
    padding: 0 0.48rem;
    line-height: 1;
    cursor: pointer;
}

.search-submit:hover {
    background: rgba(255, 255, 255, 0.36);
}

.action-btn {
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    background: transparent;
    border-radius: 999px;
    min-height: 2.2rem;
    padding: 0.35rem 0.92rem;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   HERO CONTENT (home.blade.php only)
   ========================================================================== */

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: clamp(3rem, 13vw, 9rem);
    padding-bottom: clamp(3rem, 11vw, 8rem);
    background:
        linear-gradient(0deg, rgba(16, 31, 52, 0.25), rgba(16, 31, 52, 0.25)),
        radial-gradient(circle at 78% 20%, rgba(146, 215, 247, 0.25), transparent 36%),
        linear-gradient(130deg, var(--hero-top), var(--hero-bottom), transparent 50%);
    border-radius: 20px;
    margin-top: 2rem;
}

.hero-content h1 {
    margin: 0;
    max-width: 12ch;
    font-size: clamp(2rem, 4.8vw, 3.35rem);
    line-height: 1.1;
    font-weight: 700;
}

.hero-content p {
    margin: 1rem 0 0;
    max-width: 58ch;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* ==========================================================================
   SUBHERO TITLE & BREADCRUMB (public.blade.php only)
   ========================================================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 1rem 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.72);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb-sep {
    opacity: 0.55;
}

.breadcrumb-current {
    color: #ffffff;
    font-weight: 600;
}

.subhero-title {
    padding: 1.5rem 0 1.9rem;
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.15;
    font-weight: 700;
    margin: 0;
    max-width: 24ch;
}

/* ==========================================================================
   SECTIONS & COMMON LAYOUT
   ========================================================================== */

.page {
    overflow-x: hidden;
}

.section {
    padding: 3rem 0;
}

.section h2 {
    margin: 0 0 1.25rem;
    font-size: clamp(1.7rem, 2.1vw, 2.05rem);
    line-height: 1.2;
}

.quick-links {
    margin-top: -1.2rem;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill-row a,
.pill-row span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.36rem 0.85rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #455464;
    background: #ffffff;
}

/* ==========================================================================
   FEATURE CARD (home.blade.php only)
   ========================================================================== */

.feature-card {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 1.2rem;
    padding: 1.5rem;
    background: #f6ecdf;
    border-radius: 14px;
}

.feature-copy h3 {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.2;
}

.feature-copy p {
    margin: 0.9rem 0 0;
    color: #46566a;
    line-height: 1.6;
    max-width: 58ch;
}

.feature-media {
    border-radius: 10px;
    overflow: hidden;
    min-height: 15rem;
    background: linear-gradient(140deg, #c8def5, #89c5ec);
}

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

.cta {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #74859a;
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   NEWS SECTION (home.blade.php only)
   ========================================================================== */

.news-section {
    background: var(--blue-block);
    margin: 0;
}

.news-board {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 1.15rem;
}

.news-card {
    display: block;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(17, 43, 70, 0.14);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.news-card-media img {
    max-height: 15rem;
}

.news-card--lead {
    padding: 1.2rem;
    display: grid;
    gap: 0.75rem;
}

.news-card h3 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.2;
}

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

.news-grid article {
    padding: 1rem;
    min-height: 11.5rem;
}

/* ==========================================================================
   MASSES LIST (home.blade.php only)
   ========================================================================== */

.masses-list {
    display: grid;
    gap: 0;
}

.mass-item {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.mass-item--highlighted {
    background: #fef9ec;
    border-left: 3px solid #e6a817;
}

.mass-item--konrad {
    border-left: 4px solid #3b82f6; /* blue-500 */
}

.mass-item--lukas {
    border-left: 4px solid #eab308; /* yellow-500 */
}

.mass-item--markus {
    border-left: 4px solid #ef4444; /* red-500 */
}

.mass-item:first-child {
    border-radius: 12px 12px 0 0;
}

.mass-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.mass-time {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.82rem;
}

.mass-date {
    font-weight: 700;
    color: var(--ink);
}

.mass-hour {
    color: var(--muted);
}

.mass-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mass-title {
    font-size: 0.95rem;
}

.mass-church,
.mass-presider {
    font-size: 0.82rem;
    color: var(--muted);
}

.mass-description {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: #536476;
    line-height: 1.45;
}

/* ==========================================================================
   MAIN CONTENT AREA (public.blade.php only)
   ========================================================================== */

main {
    padding: 2.2rem 0 2.8rem;
}

.page-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.page-card h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-family: "Merriweather", Georgia, serif;
}

.page-card .meta {
    margin-bottom: 1rem;
    color: #64748b;
    font-size: 0.92rem;
}

.featured-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: block;
}

.page-card--post {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.post-cover-layout {
    max-width: 66rem;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: minmax(18rem, 29rem) minmax(0, 1fr);
    gap: clamp(1.4rem, 3vw, 2.8rem);
    align-items: start;
}

.post-cover-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.post-title {
    margin: 0;
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    line-height: 1.05;
    font-family: "Merriweather", Georgia, serif;
    font-weight: 400;
}

.post-meta {
    margin-top: 0.8rem;
    margin-bottom: 0;
}

.post-excerpt {
    margin: 1.2rem 0 0;
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    line-height: 1.55;
    color: #2b3b4c;
    max-width: 30ch;
}

.post-content {
    max-width: 48rem;
    margin: 0 auto;
}

.post-content > :first-child {
    margin-top: 0;
}

.content,
.legacy-content {
    overflow-wrap: anywhere;
    line-height: 1.65;
}

/* ==========================================================================
   CARD GRID (shared)
   ========================================================================== */

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

.small-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.small-card a {
    display: block;
}

.small-card-media {
    width: 100%;
    aspect-ratio: 5 / 3;
    background: linear-gradient(130deg, #d9eaf6, #c0daee);
}

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

.small-card:nth-child(2n) .small-card-media {
    background: linear-gradient(130deg, #e8ecf5, #d3dcf0);
}

.small-card:nth-child(3n) .small-card-media {
    background: linear-gradient(130deg, #dce9dd, #c5ddc7);
}

.small-card-body {
    padding: 0.75rem;
}

.small-card h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

.page-subpages {
    margin-top: 2.5rem;
}

/* ==========================================================================
   SOCIAL STRIP (shared)
   ========================================================================== */

.social-strip {
    margin-top: 2rem;
    background: var(--footer-pink);
    color: #1f2d3b;
}

.social-wrap {
    min-height: 6.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.social-links a {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(31, 45, 59, 0.42);
    font-size: 0.8rem;
    font-weight: 700;
}

/* ==========================================================================
   FOOTER (shared)
   ========================================================================== */

footer {
    background: #ffffff;
    padding: 2.5rem 0 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
}

.footer-column h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.4rem;
    color: #536476;
    font-size: 0.92rem;
}

/* ==========================================================================
   MENU OVERLAY & PANEL (shared)
   ========================================================================== */

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 39, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 20;
}

.menu-overlay[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
}

.menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(32rem, 100vw);
    height: 100vh;
    background: var(--menu-blue);
    color: #ffffff;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 30;
    overflow-y: auto;
    padding: 1.3rem 1.35rem 1.8rem;
}

.menu-panel[data-open="true"] {
    transform: translateX(0);
}

.menu-list {
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.65rem;
}

.menu-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 0.45rem 0;
}

.menu-shortcuts {
    margin-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    padding-top: 1.2rem;
}

.menu-shortcuts .pill-row a,
.menu-shortcuts .pill-row span {
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.menu-social {
    margin-top: 1.4rem;
    display: flex;
    gap: 0.6rem;
}

.menu-social a {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* ==========================================================================
    BLOG LIST MODULE (blog module with list display_style)
    ========================================================================== */

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-list-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.blog-list-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.blog-list-item__link {
    display: grid;
    grid-template-columns: minmax(0, 280px) 1fr;
    gap: 1.2rem;
    padding: 1.2rem;
    color: inherit;
    text-decoration: none;
}

.blog-list-item__media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(130deg, #d9eaf6, #c0daee);
}

.blog-list-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-list-item__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.blog-list-item__title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.3;
    font-weight: 700;
}

.blog-list-item__meta {
    font-size: 0.82rem;
    color: var(--muted);
}

.blog-list-item__excerpt {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #46566a;
}

.mass-all-link{
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #74859a;
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mass-all-link:hover{
    background: rgba(22, 19, 19, 0.14);    
}

.mass-pdf-download{
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #10b981; /* green border */
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #10b981;
    background: #ffffff;
    text-decoration: none;
}

.mass-pdf-download:hover{
    background: rgba(16, 185, 129, 0.1);    
}

/* ==========================================================================
    MEDIA QUERIES
    ========================================================================== */

@media (max-width: 1080px) {
    .card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .hero {
        min-height: 58vh;
    }

    .feature-card {
        grid-template-columns: 1fr;
    }

    .news-board {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .social-wrap {
        min-height: 7.4rem;
        padding: 0.7rem 0;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }

    .menu-list a {
        font-size: 1.3rem;
    }

    .post-cover-layout {
        grid-template-columns: 1fr;
        max-width: 48rem;
    }

    .post-excerpt {
        max-width: none;
    }
}

@media (max-width: 700px) {
    .section {
        padding: 2.7rem 0;
    }

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

@media (max-width: 640px) {
    .topbar-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-actions {
        width: 100%;
    }

    .search-form {
        flex: 1;
    }

    .search-input {
        width: 100%;
        min-width: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .topbar-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-actions {
        width: 100%;
    }

    .search-form {
        flex: 1;
    }

    .search-input {
        width: 100%;
        min-width: 0;
    }

    .action-btn {
        width: auto;
    }

    .hero-content h1 {
        max-width: 9ch;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .blog-list-item__link {
        grid-template-columns: 1fr;
    }

    .blog-list-item__media {
        aspect-ratio: 16 / 9;
    }
}
