:root {
    /* Palette: eggshell / burnt-sienna / delft-blue / celestial-blue / reseda-green */
    --brand: #3d405b;         /* delft-blue */
    --brand-dark: #2a2c40;    /* darkened delft */
    --brand-light: #e8e9f0;   /* pale delft tint */
    --accent: #e07a5f;        /* burnt-sienna */
    --text: #2b2d3f;
    --muted: #555;
    --bg-alt: #eef0f4;
    --border: #e6e8ec;
}

html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text);
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

a {
    color: var(--brand);
    text-decoration: none;
}

    a:hover {
        color: var(--brand-dark);
    }

main {
    padding-top: 70px;
}

/* ---------- Navbar ---------- */
.top-nav {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(180%) blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    min-height: 70px;
}

    .top-nav .navbar-brand {
        font-weight: 700;
        color: var(--brand-dark);
        font-size: 1.15rem;
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

    .top-nav .brand-logo {
        height: 44px;
        width: auto;
        object-fit: contain;
    }

    @media (max-width: 480px) {
        .top-nav .navbar-brand span { font-size: 1rem; }
        .top-nav .brand-logo { height: 36px; }
    }

    .top-nav .nav-link {
        color: var(--text) !important;
        font-weight: 500;
        padding: 0.5rem 0.9rem !important;
    }

        .top-nav .nav-link:hover {
            color: var(--brand) !important;
        }

    .top-nav .nav-cta {
        background: var(--brand);
        color: #fff !important;
        border-radius: 999px;
        padding: 0.5rem 1.1rem !important;
        margin-left: 0.5rem;
    }

        .top-nav .nav-cta:hover {
            background: var(--brand-dark);
            color: #fff !important;
        }

/* ---------- Buttons ---------- */
.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--brand-dark);
        border-color: var(--brand-dark);
    }

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

    .btn-outline-primary:hover {
        background-color: var(--brand);
        border-color: var(--brand);
    }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    height: 75vh;
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -70px;
}

    .hero img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: brightness(0.55);
    }

.hero-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 780px;
    padding: 0 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

    .hero-overlay h1 {
        font-size: clamp(2rem, 5vw, 3.6rem);
        margin-bottom: 1rem;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    }

    .hero-overlay p {
        font-size: clamp(1rem, 2vw, 1.3rem);
        margin-bottom: 2rem;
        font-weight: 300;
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    }

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Sections ---------- */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    text-align: center;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    margin-bottom: 0.75rem;
    color: var(--brand-dark);
}

    .section-title::after {
        content: "";
        display: block;
        width: 60px;
        height: 3px;
        background: var(--brand);
        margin: 0.75rem auto 0;
        border-radius: 2px;
    }

.section-lead {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    color: var(--muted);
    font-size: 1.05rem;
}

/* ---------- About ---------- */
.owner-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    align-items: center;
    max-width: 860px;
    margin: 2rem auto 0;
    background: #fff;
    padding: 2rem;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.profile-picture {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--brand-light);
}

.owner-bio p {
    margin-bottom: 1rem;
    line-height: 1.65;
}

@media (max-width: 680px) {
    .owner-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem;
    }
    .profile-picture {
        width: 170px;
        height: 170px;
        margin: 0 auto;
    }
}

/* ---------- Services ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    margin-top: 2.5rem;
}

.service-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

    .service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
    }

    .service-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .service-card h3 {
        color: var(--brand-dark);
        font-size: 1.25rem;
        padding: 1.25rem 1.25rem 0.5rem;
        margin: 0;
    }

    .service-card p {
        padding: 0 1.25rem 1.5rem;
        color: var(--muted);
        line-height: 1.6;
        margin: 0;
    }

/* ---------- Testimonials ---------- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    margin-top: 2.5rem;
}

.testimonial {
    background: #fff;
    padding: 2rem;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .testimonial .stars {
        color: var(--accent);
        font-size: 1.15rem;
        letter-spacing: 2px;
    }

    .testimonial blockquote {
        margin: 0;
        color: var(--text);
        line-height: 1.6;
        font-style: italic;
    }

    .testimonial figcaption {
        font-weight: 600;
        color: var(--brand-dark);
    }

/* ---------- Portfolio preview ---------- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.portfolio-item {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    aspect-ratio: 4 / 3;
}

    .portfolio-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.35s ease;
    }

    .portfolio-item:hover img {
        transform: scale(1.05);
    }

/* ---------- Gallery page ---------- */
.gallery-page {
    padding-top: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    display: block;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.35s ease;
    }

    .gallery-item:hover img {
        transform: scale(1.06);
    }

.photo-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

    .photo-modal img {
        max-width: 95%;
        max-height: 92vh;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

.photo-modal:focus { outline: none; }

.photo-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.75rem;
}

.photo-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 3rem;
    line-height: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0 0 0.35rem 0;
}

    .photo-modal-nav:hover {
        background: rgba(255, 255, 255, 0.25);
    }

.photo-modal-prev { left: 1.25rem; }
.photo-modal-next { right: 1.25rem; }

.photo-modal-counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 600px) {
    .photo-modal-nav {
        width: 44px;
        height: 44px;
        font-size: 2.2rem;
    }
    .photo-modal-prev { left: 0.5rem; }
    .photo-modal-next { right: 0.5rem; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- Contact ---------- */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    max-width: 1000px;
    margin: 2rem auto 0;
    background: #fff;
    padding: 2.5rem;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.contact-info h3 {
    color: var(--brand-dark);
    margin-bottom: 0.75rem;
}

.contact-info .phone {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-form .form-label {
    font-weight: 500;
}

.contact-form .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(61, 64, 91, 0.18);
}

@media (max-width: 768px) {
    .contact-wrap {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }
}

/* ---------- Thanks page ---------- */
.thanks-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.thanks-card {
    max-width: 620px;
    margin: 0 auto;
    background: #fff;
    padding: 3rem 2rem;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.thanks-check {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thanks-card .phone {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--brand-dark);
    color: #fff;
    padding: 2rem 1rem;
    margin-top: 0;
}

    .site-footer a {
        color: #fff;
    }

/* ---------- Blazor boilerplate (loading / errors) ---------- */
h1:focus { outline: none; }

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid red; }
.validation-message { color: red; }

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--brand);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }
