﻿/* Database-backed project previews and enquiry feedback. */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
.project-placeholder {
    background: var(--soft);
    padding: 22px;
    position: relative;
}
.preview-bar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: .7rem;
    color: var(--accent);
    border-bottom: 1px solid #2b296925;
    padding-bottom: 16px;
}
.preview-layout {
    padding: 35px 12px;
    position: relative;
    height: 260px;
    isolation: isolate;
    overflow: hidden;
}
.preview-label {
    display: block;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .15em;
    color: var(--accent);
}
.preview-layout h3 {
    font-size: clamp(2rem, 3vw, 3rem);
    color: var(--accent);
    margin-top: 20px;
    max-width: 75%;
}
.preview-layout>i {
    position: absolute;
    right: -20px;
    top: 45px;
    color: var(--green);
    font-size: 11rem;
    z-index: -1;
    line-height: 1;
    opacity: .7;
}
.preview-lines { width: 45%; }
.preview-lines span {
    display: block;
    height: 7px;
    background: #2b296917;
    margin-bottom: 10px;
    border-radius: 20px;
}
.preview-lines span:nth-child(2) { width: 80%; }
.preview-lines span:nth-child(3) { width: 55%; }
.project-launch, .project-dashboard { background: var(--accent); }
.project-launch .preview-bar, .project-dashboard .preview-bar { color: #ffffffa0; border-color: #ffffff30; }
.project-launch h3, .project-dashboard h3 { color: var(--white); }
.project-launch .preview-label, .project-dashboard .preview-label { color: var(--green); }
.project-launch .preview-lines span, .project-dashboard .preview-lines span { background: #ffffff25; }
.public-notice { padding: 20px; border-radius: 8px; margin: 20px 0; font-size: .9rem; }
.public-success { background: #5fcf801c; color: #256d3c; border: 1px solid #5fcf8070; }
.public-error { background: #fff0f0; color: #8b2929; border: 1px solid #e4baba; }
.public-notice ul { padding-left: 20px; margin: 0; }
.spam-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 800px) {
    .preview-layout h3 { font-size: 2.6rem; }
}
@media (max-width: 480px) {
    .preview-layout { padding: 28px 0; height: 230px; }
    .preview-layout h3 { font-size: 2rem; }
    .preview-layout>i { font-size: 8rem; top: 70px; }
}
.hero, .page-hero { position: relative; isolation: isolate; }
.page-banner-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .17;
    z-index: -1;
    pointer-events: none;
}
/* Responsive safeguards for editable content and narrow screens. */
img {
    max-width: 100%;
}
.hero-grid > *,
.split > *,
.contact-grid > *,
.form-grid > *,
.footer-grid > *,
.showcase-grid > *,
.service-grid > * {
    min-width: 0;
}
h1, h2, h3,
.card p,
.animated-service p,
.project-description,
.project-tags span,
.preview-layout h3,
.brand > span {
    overflow-wrap: anywhere;
}
.preview-layout h3 {
    max-width: 100%;
}
@media (max-width: 1024px) {
    .header-inner {
        min-height: 80px;
    }
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
    }
    #primary-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 18px 24px;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 15px 20px #2b29690d;
        max-height: calc(100vh - 80px);
        max-height: calc(100dvh - 80px);
        overflow-y: auto;
    }
    #primary-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    #primary-nav a:not(.button) {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 0;
        font-size: .95rem;
    }
    #primary-nav .button {
        align-self: flex-start;
        margin-top: 12px;
    }
}
@media (max-width: 480px) {
    .project-form input,
    .project-form select,
    .project-form textarea {
        min-width: 0;
        font-size: 16px;
    }
    .brand {
        min-width: 0;
    }
    .brand img {
        flex-shrink: 0;
    }
    .contact-item > div {
        min-width: 0;
    }
    .hero h1 {
        font-size: clamp(2.5rem, 11.8vw, 2.95rem);
    }
}
