/* Cemetery overview / landing page */

.overview-page {
    min-height: 100vh;
    background: #f4f6f8;
}

/* Hero — flows seamlessly from the fixed navbar.
   Gradient goes straight down from the exact navbar bg (#2D3436) so
   there is no visible edge between the navbar bottom and the hero top.
   margin-top: -1px eats any sub-pixel rendering gap. */
.overview-hero {
    background: linear-gradient(to bottom, #2D3436 0%, #3a4e5a 70%, #435f6e 100%);
    color: #fff;
    padding: calc(56px + 25px) 24px 25px;
    margin-top: -1px;
    text-align: center;
}

.overview-hero .hero-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #b2bec3;
    margin-bottom: 14px;
}

.overview-hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 700;
    margin: 0 auto 14px;
    max-width: 780px;
    line-height: 1.25;
}

.overview-hero .hero-sub {
    font-size: 0.98rem;
    color: #b2bec3;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.65;
}

/* Grid section — full viewport width */
.overview-grid-section {
    padding: 32px 28px 52px;
}

.overview-grid-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 22px;
}

.overview-grid-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2D3436;
    margin: 0;
}

.overview-grid-header .cemetery-count {
    font-size: 0.85rem;
    color: #636e72;
}

/* Responsive card grid — large cards by default */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    gap: 28px;
}

/* 2 cemeteries → 2 very large cards side-by-side */
.overview-grid.count-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

/* 3 cemeteries → 3 equal columns */
.overview-grid.count-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Cemetery card */
.cemetery-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.09);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.cemetery-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.cemetery-card:focus {
    outline: 2px solid #74b9ff;
    outline-offset: 2px;
}

/* Card image — tall enough to feel substantial */
.cemetery-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 66%; /* ~3:2 landscape ratio */
    overflow: hidden;
    background: #2D3436;
}

.cemetery-card-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cemetery-card:hover .cemetery-card-img-wrap img {
    transform: scale(1.05);
}

.cemetery-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: #2D3436;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}

/* Card body */
.cemetery-card-body {
    padding: 22px 22px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cemetery-card-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2D3436;
    margin: 0 0 6px;
    line-height: 1.3;
}

.cemetery-card-details {
    font-size: 0.9rem;
    color: #636e72;
    margin: 0 0 18px;
    flex: 1;
}

.cemetery-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #2D3436;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    transition: background 0.15s ease;
    text-decoration: none;
}

.cemetery-card-btn:hover {
    background: #3d4b52;
    color: #fff;
    text-decoration: none;
}

/* Tablet: 2-column grid */
@media (max-width: 900px) {
    .overview-grid,
    .overview-grid.count-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile: 1-column stack or 2 tight columns */
@media (max-width: 560px) {
    .overview-hero {
        padding: calc(56px + 26px) 16px 28px;
    }

    .overview-grid-section {
        padding: 20px 14px 36px;
    }

    .overview-grid,
    .overview-grid.count-2,
    .overview-grid.count-3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cemetery-card-img-wrap {
        padding-top: 60%;
    }

    .cemetery-card-details {
        display: none;
    }

    .cemetery-card-btn {
        font-size: 0.88rem;
        padding: 11px 14px;
    }
}

/* Navbar home icon */
.nav-home-link {
    padding-right: 4px !important;
    opacity: 0.8;
}

.nav-home-link:hover {
    opacity: 1;
    color: #ffffff !important;
}
