/* =========================================================
   SP Base Template v1.0 - Maler Unterrainer
   ========================================================= */

:root {
    --sp-primary: #263440;
    --sp-primary-2: #1b2630;
    --sp-accent: #c79a47;
    --sp-accent-2: #a9792e;
    --sp-bg: #ffffff;
    --sp-bg-soft: #f7f3ec;
    --sp-bg-muted: #eef1f3;
    --sp-text: #20262c;
    --sp-muted: #66717c;
    --sp-border: #e8dfd1;
    --sp-white: #ffffff;
    --sp-radius-sm: 12px;
    --sp-radius: 22px;
    --sp-radius-lg: 34px;
    --sp-shadow: 0 20px 55px rgba(18, 30, 40, .12);
    --sp-shadow-soft: 0 10px 32px rgba(18, 30, 40, .08);
    --sp-container: 1180px;
    --sp-font: Arial, Helvetica, sans-serif;
}

/* Reset / Base */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body.sp-site {
    margin: 0;
    font-family: var(--sp-font);
    color: var(--sp-text);
    background: var(--sp-bg);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
}

img, svg, video {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--sp-accent-2);
    text-underline-offset: 3px;
}

p { margin: 0 0 1.15rem; }

h1, h2, h3, h4, h5 {
    margin: 0 0 1rem;
    color: var(--sp-primary-2);
    line-height: 1.15;
    letter-spacing: -.035em;
}

h1 { font-size: clamp(2.55rem, 5.8vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.45rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -.02em; }

ul, ol { padding-left: 1.25rem; }

.sp-container {
    width: min(var(--sp-container), calc(100% - 32px));
    margin-inline: auto;
}

.sp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--sp-accent-2);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-size: .78rem;
    margin-bottom: .9rem;
}

.sp-eyebrow::before {
    content: "";
    width: 32px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

/* Buttons */
.sp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    align-items: center;
    margin-top: 1.8rem;
}

.sp-btn,
.button,
.btn,
.readmore a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: .82rem 1.32rem;
    border-radius: 999px;
    border: 2px solid transparent;
    background: var(--sp-accent);
    color: var(--sp-white) !important;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 14px 34px rgba(199, 154, 71, .28);
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}

.sp-btn:hover,
.button:hover,
.btn:hover,
.readmore a:hover {
    transform: translateY(-2px);
    background: var(--sp-accent-2);
    box-shadow: 0 18px 44px rgba(199, 154, 71, .36);
}

.sp-btn--small {
    min-height: 42px;
    padding: .65rem 1rem;
    font-size: .92rem;
}

.sp-btn--ghost {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.35);
    color: #fff !important;
    box-shadow: none;
}

.sp-btn--ghost:hover {
    background: #fff;
    border-color: #fff;
    color: var(--sp-primary-2) !important;
}

.sp-btn--ghost-dark {
    background: transparent;
    border-color: rgba(255,255,255,.35);
    color: #fff !important;
    box-shadow: none;
}

/* Header */
.sp-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,.06);
}

.sp-topbar {
    background: var(--sp-primary-2);
    color: rgba(255,255,255,.9);
    font-size: .92rem;
    padding: .45rem 0;
}

.sp-topbar a {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.sp-topbar__inner,
.sp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.sp-navwrap {
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
}

.sp-nav {
    min-height: 86px;
}

.sp-brand {
    min-width: 190px;
}

.sp-brand img {
    max-height: 66px;
    width: auto;
    display: block;
}

.sp-brand__text {
    color: var(--sp-primary-2);
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: 950;
    letter-spacing: -.03em;
}

.sp-menu ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-menu li {
    position: relative;
}

.sp-menu a,
.sp-menu span {
    display: flex;
    align-items: center;
    padding: .78rem .9rem;
    border-radius: 999px;
    color: var(--sp-primary-2);
    font-weight: 850;
    text-decoration: none;
    line-height: 1.1;
    transition: background .2s ease, color .2s ease;
}

.sp-menu a:hover,
.sp-menu .active > a,
.sp-menu .current > a {
    background: var(--sp-bg-soft);
    color: var(--sp-accent-2);
}

.sp-headercta {
    min-width: 160px;
    display: flex;
    justify-content: flex-end;
}

.sp-navtoggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 1px solid var(--sp-border);
    border-radius: 14px;
    background: #fff;
    padding: 10px;
    cursor: pointer;
}

.sp-navtoggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--sp-primary-2);
}

/* Hero */
.sp-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 18%, rgba(199,154,71,.28), transparent 28rem),
        linear-gradient(135deg, var(--sp-primary-2), var(--sp-primary));
    color: #fff;
}

.sp-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -40% 45%;
    height: 520px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    transform: rotate(-12deg);
}

.sp-hero--auto,
.sp-hero--module {
    padding: clamp(4.8rem, 10vw, 8.5rem) 0;
}

.sp-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: end;
}

.sp-hero h1,
.sp-hero h2,
.sp-hero h3 {
    color: #fff;
}

.sp-hero p {
    max-width: 760px;
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    color: rgba(255,255,255,.86);
}

.sp-hero .sp-eyebrow {
    color: var(--sp-accent);
}

.sp-hero__card {
    padding: 1.65rem;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--sp-radius);
    background: rgba(255,255,255,.11);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 55px rgba(0,0,0,.22);
}

.sp-hero__card strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: .45rem;
}

.sp-hero__card span {
    display: block;
    color: rgba(255,255,255,.82);
}

.sp-pagehero {
    padding: clamp(3rem, 7vw, 5.6rem) 0;
    background:
        linear-gradient(135deg, rgba(247,243,236,.92), rgba(238,241,243,.95));
    border-bottom: 1px solid var(--sp-border);
}

/* Layout */
.sp-main {
    padding: 0 0 3.5rem;
}

.sp-section {
    padding: clamp(3.3rem, 7vw, 6.2rem) 0;
}

.sp-section--compact {
    padding: 2rem 0;
}

.sp-sectionhead {
    max-width: 780px;
    margin-bottom: 2rem;
}

.sp-sectionhead p {
    color: var(--sp-muted);
    font-size: 1.05rem;
}

.sp-breadcrumb {
    margin: 1.6rem 0 0;
    font-size: .92rem;
    color: var(--sp-muted);
}

.sp-contentlayout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.2rem;
    align-items: start;
}

.sp-contentlayout:has(.sp-sidebar) {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.sp-content {
    min-width: 0;
}

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

.sp-sidebar,
.sp-card,
.moduletable {
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 1.6rem;
    background: #fff;
    box-shadow: var(--sp-shadow-soft);
}

/* Cards */
.sp-cardgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
}

.sp-service {
    position: relative;
    min-height: 245px;
    display: flex;
    flex-direction: column;
    padding: 1.65rem;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    background: #fff;
    box-shadow: var(--sp-shadow-soft);
    overflow: hidden;
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.sp-service::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--sp-accent), var(--sp-accent-2));
}

.sp-service:hover {
    transform: translateY(-6px);
    border-color: rgba(199,154,71,.5);
    box-shadow: var(--sp-shadow);
}

.sp-service p {
    color: var(--sp-muted);
}

.sp-service a {
    margin-top: auto;
    font-weight: 900;
    text-decoration: none;
}

.sp-split {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.sp-split__media,
.sp-placeholder {
    min-height: 360px;
    display: grid;
    place-items: center;
    border-radius: var(--sp-radius-lg);
    background:
        linear-gradient(135deg, rgba(38,52,64,.78), rgba(38,52,64,.45)),
        var(--sp-bg-muted);
    color: rgba(255,255,255,.8);
    box-shadow: var(--sp-shadow);
    overflow: hidden;
}

.sp-split__media img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.sp-gallerygrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.sp-galleryitem {
    min-height: 230px;
    display: grid;
    place-items: center;
    border-radius: var(--sp-radius);
    background:
        linear-gradient(135deg, rgba(38,52,64,.76), rgba(199,154,71,.34)),
        var(--sp-bg-muted);
    color: #fff;
    font-weight: 900;
    box-shadow: var(--sp-shadow-soft);
    overflow: hidden;
}

.sp-galleryitem img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
}

/* CTA */
.sp-cta {
    position: relative;
    overflow: hidden;
    padding: clamp(2.2rem, 6vw, 4.6rem);
    border-radius: var(--sp-radius-lg);
    background:
        radial-gradient(circle at 86% 16%, rgba(199,154,71,.35), transparent 23rem),
        linear-gradient(135deg, var(--sp-primary-2), var(--sp-primary));
    color: #fff;
    box-shadow: var(--sp-shadow);
}

.sp-cta h2,
.sp-cta h3 {
    color: #fff;
    max-width: 820px;
}

.sp-cta p {
    color: rgba(255,255,255,.86);
    max-width: 760px;
}

.sp-cta .sp-eyebrow {
    color: var(--sp-accent);
}

/* Footer */
.sp-footer {
    background: var(--sp-primary-2);
    color: rgba(255,255,255,.78);
    padding-top: 3.5rem;
}

.sp-footer__grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 2rem;
}

.sp-footer h3,
.sp-footer h4 {
    color: #fff;
    margin-bottom: .85rem;
}

.sp-footer a {
    color: rgba(255,255,255,.88);
    text-decoration: none;
}

.sp-footer a:hover {
    color: var(--sp-accent);
}

.sp-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-footer li + li {
    margin-top: .45rem;
}

.sp-footerbottom {
    margin-top: 2.5rem;
    padding: 1rem 0;
    background: rgba(0,0,0,.2);
    color: rgba(255,255,255,.68);
    font-size: .92rem;
}

.sp-totop {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 950;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--sp-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 16px 32px rgba(0,0,0,.22);
}

/* Joomla content cleanup */
.com-content-article.item-page {
    max-width: 920px;
}

.sp-home .com-content-article.item-page {
    max-width: none;
}

.com-content-article.item-page h1:first-child,
.page-header h1 {
    margin-top: 0;
}

.page-header {
    margin-bottom: 1.3rem;
}

/* Utility classes for Custom HTML modules */
.sp-bg-soft {
    background: var(--sp-bg-soft);
}

.sp-box {
    padding: 1.6rem;
    border-radius: var(--sp-radius);
    background: #fff;
    box-shadow: var(--sp-shadow-soft);
    border: 1px solid var(--sp-border);
}

.sp-muted {
    color: var(--sp-muted);
}

.sp-two {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.35rem;
}

.sp-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
}

.sp-list-check {
    list-style: none;
    padding: 0;
}

.sp-list-check li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: .65rem;
}

.sp-list-check li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--sp-accent-2);
    font-weight: 900;
}

/* Responsive */
@media (max-width: 1080px) {
    .sp-headercta {
        display: none;
    }

    .sp-brand {
        min-width: auto;
    }
}

@media (max-width: 940px) {
    .sp-nav {
        min-height: 76px;
    }

    .sp-navtoggle {
        display: block;
    }

    .sp-menu {
        position: fixed;
        top: 116px;
        left: 16px;
        right: 16px;
        display: none;
        max-height: calc(100vh - 140px);
        overflow: auto;
        padding: 1rem;
        border: 1px solid var(--sp-border);
        border-radius: var(--sp-radius);
        background: #fff;
        box-shadow: var(--sp-shadow);
    }

    body.sp-navopen .sp-menu {
        display: block;
    }

    .sp-menu ul {
        display: block;
    }

    .sp-menu a,
    .sp-menu span {
        padding: .9rem 1rem;
        border-radius: 14px;
    }

    .sp-topbar__inner {
        justify-content: center;
        text-align: center;
        flex-wrap: wrap;
        gap: .25rem 1rem;
    }

    .sp-hero__grid,
    .sp-cardgrid,
    .sp-split,
    .sp-gallerygrid,
    .sp-footer__grid,
    .sp-two,
    .sp-three,
    .sp-contentlayout:has(.sp-sidebar) {
        grid-template-columns: 1fr;
    }

    .sp-hero__card {
        max-width: 520px;
    }

    .sp-contentlayout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .sp-container {
        width: min(100% - 24px, var(--sp-container));
    }

    .sp-topbar {
        font-size: .86rem;
    }

    .sp-hero--auto,
    .sp-hero--module,
    .sp-pagehero {
        padding: 3.5rem 0;
    }

    .sp-section {
        padding: 2.8rem 0;
    }

    .sp-service,
    .sp-card,
    .moduletable,
    .sp-sidebar {
        padding: 1.25rem;
    }

    .sp-cta {
        padding: 1.7rem;
    }

    .sp-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .sp-btn,
    .button,
    .btn,
    .readmore a {
        width: 100%;
    }
}
