/* Bento Grid template (patch 06: content-fit boxes + optional mascot watermark) */
body.template-bento .feature-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: min-content;
    grid-auto-flow: row dense;
    gap: 1rem;
    align-items: start;
}
body.template-bento .feature-grid > .feature-card { grid-column: span 2; }
body.template-bento .feature-card {
    border-radius: 16px;
    height: auto;
    align-self: start;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(0, 14, 35, 0.06);
}
/* Mascot watermark: only takes the empty half-row left by an odd number of cards */
body.template-bento .feature-grid > .bento-wm {
    display: none;
    grid-column: span 2;
    align-self: center;
    justify-self: center;
    pointer-events: none;
    user-select: none;
}
body.template-bento .feature-grid > .bento-wm:nth-child(even) { display: block; }
body.template-bento .bento-wm img { display: block; max-height: 240px; width: auto; height: auto; opacity: 0.16; filter: grayscale(15%); }
body.template-bento .hero,
body.template-bento .page-hero { border-radius: 0 0 28px 28px; }
body.template-bento .hero-content { max-width: 720px; }
body.template-bento .projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; }
body.template-bento .projects-grid .project-card:first-child { grid-column: span 2; }
body.template-bento .section-header { margin-bottom: 1.75rem; }
body.template-bento .section .container > .feature-grid { padding: 0.25rem; }
@media (max-width: 900px) {
    body.template-bento .feature-grid,
    body.template-bento .projects-grid { grid-template-columns: 1fr 1fr !important; }
    body.template-bento .feature-grid > .feature-card,
    body.template-bento .feature-grid > .bento-wm { grid-column: span 1; }
    body.template-bento .projects-grid .project-card:first-child { grid-column: span 2; }
    body.template-bento .bento-wm img { max-height: 200px; }
}
@media (max-width: 600px) {
    body.template-bento .feature-grid,
    body.template-bento .projects-grid { grid-template-columns: 1fr !important; }
    body.template-bento .feature-grid > .feature-card,
    body.template-bento .projects-grid .project-card:first-child { grid-column: span 1 !important; }
    body.template-bento .feature-grid > .bento-wm { display: none !important; }
}
