/* ============================================================
   MALERGESCHÄFT BERTENGHI — "Swiss Craft Luxury"
   Premium Handwerker-Ästhetik: Dunkel/Warm, Elegant, Lebendig
   ============================================================ */

/* ---------- VARIABLES ---------- */
:root {
    /* Brand */
    --blue: #13b5c7;
    --blue-dark: #0e97a6;
    --blue-glow: rgba(19, 181, 199, 0.15);
    --pink: #ce006f;
    --pink-dark: #a80059;
    --pink-glow: rgba(206, 0, 111, 0.15);

    /* Neutrals */
    --dark: #0c0c0e;
    --dark-card: #18181c;
    --dark-border: rgba(255, 255, 255, 0.08);
    --cream: #f7f5f0;
    --cream-dark: #eee9e0;
    --warm-white: #fdfcfa;
    --text: #1a1a1e;
    --text-muted: #6b6b74;
    --text-inv: #e8e6e1;
    --text-inv-muted: rgba(255, 255, 255, 0.55);

    /* Type */
    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Outfit', 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --section-pad: clamp(5rem, 10vw, 8rem);

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Radius */
    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-pill: 100px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- GRAIN OVERLAY ---------- */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px;
}

/* ---------- CONTAINER ---------- */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- SECTION SHARED ---------- */
.section { padding: var(--section-pad) 0; position: relative; }
.section--light { background: var(--cream); color: var(--text); }
.section--dark { background: var(--dark); color: var(--text-inv); }
.section--cream { background: var(--warm-white); }

.section-intro { text-align: center; margin-bottom: 4rem; }

.label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--pink);
    margin-bottom: 1rem;
}
.label--light { color: var(--blue); }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 500;
    line-height: 1.15;
    color: var(--text);
}
.section-title--light { color: var(--text-inv); }
.section-title em {
    font-style: italic;
    color: var(--blue);
}
.section--dark .section-title em { color: var(--pink); }

.title-line {
    width: 60px;
    height: 3px;
    background: var(--blue);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}
.title-line--pink { background: var(--pink); }

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.anim-up {
    opacity: 0;
    transform: translateY(50px);
}
.anim-up.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

/* ============================================================
   HEADER
   ============================================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}

header.is-top {
    background: transparent;
}

header.is-scrolled {
    background: rgba(12, 12, 14, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 1px 40px rgba(0, 0, 0, 0.25);
}

nav {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.4s var(--ease);
}

header.is-scrolled nav { padding-top: 0.75rem; padding-bottom: 0.75rem; }

.logo img {
    height: 48px;
    width: auto;
    transition: height 0.4s var(--ease), filter 0.3s;
}

header.is-top .logo img {
    filter: brightness(0) invert(1);
    height: 52px;
}

header.is-scrolled .logo img {
    filter: brightness(0) invert(1);
    height: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a[data-nav] {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.45rem 1rem;
    border-radius: var(--r-pill);
    position: relative;
    transition: color 0.3s, background 0.3s;
}

header.is-top .nav-links a[data-nav] { color: rgba(255, 255, 255, 0.8); }
header.is-top .nav-links a[data-nav]:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
header.is-top .nav-links a[data-nav].active { color: #fff; background: rgba(255, 255, 255, 0.12); }

header.is-scrolled .nav-links a[data-nav] { color: var(--text-inv-muted); }
header.is-scrolled .nav-links a[data-nav]:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
header.is-scrolled .nav-links a[data-nav].active { color: #fff; background: rgba(255, 255, 255, 0.1); }

.nav-cta {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    padding: 0.55rem 1.5rem !important;
    background: var(--pink);
    color: #fff !important;
    border-radius: var(--r-pill) !important;
    margin-left: 0.75rem;
    transition: background 0.3s, transform 0.3s !important;
}
.nav-cta:hover {
    background: var(--pink-dark) !important;
    transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 22px;
    position: relative;
    z-index: 200;
}
.hamburger span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: all 0.35s var(--ease);
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(15px); }
.hamburger.open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.mobile-nav-overlay.open { opacity: 1; visibility: visible; }

.mobile-nav-content { text-align: center; }

.mobile-nav-link {
    display: block;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--text-inv);
    padding: 0.5rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), color 0.3s;
}
.mobile-nav-overlay.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-nav-link:hover { color: var(--pink); }

/* Stagger mobile links */
.mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

.mobile-nav-footer {
    margin-top: 3rem;
    opacity: 0;
    transition: opacity 0.4s 0.3s;
}
.mobile-nav-overlay.open .mobile-nav-footer { opacity: 1; }
.mobile-nav-footer p {
    font-size: 0.9rem;
    color: var(--text-inv-muted);
    margin-bottom: 0.3rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    transition: transform 8s linear;
}
.hero.loaded .hero-bg {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(12, 12, 14, 0.55) 0%,
        rgba(12, 12, 14, 0.45) 40%,
        rgba(12, 12, 14, 0.75) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 820px;
    padding: 0 1.5rem;
}

.hero-eyebrow {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--pink);
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 1.5rem;
}

.hero-title span {
    display: block;
}

.hero-title span:first-child {
    font-size: clamp(3rem, 8vw, 5.5rem);
}

.hero-title span:last-child {
    font-size: clamp(2rem, 5vw, 3.4rem);
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.2rem;
}

.hero-title em {
    font-style: italic;
    color: var(--blue);
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.75;
}

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

.hero-badges {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
}

.hero-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--pink);
    border-radius: 50%;
    font-size: 0.65rem;
    color: #fff;
    font-weight: 700;
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}
.hero-scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}
.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: var(--r-pill);
    border: none;
    cursor: pointer;
    transition: all 0.35s var(--ease);
    text-decoration: none;
}

.btn-primary {
    background: var(--pink);
    color: #fff;
}
.btn-primary:hover {
    background: var(--pink-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--pink-glow);
}
.btn-primary svg { transition: transform 0.3s var(--ease); }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--pink);
    border: 2px solid var(--pink);
    padding: 12px 28px;
}
.btn-outline:hover {
    background: var(--pink);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--pink-glow);
}

.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   SERVICES (LEISTUNGEN)
   ============================================================ */
.services-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.service-item {
    background: var(--warm-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--r-md);
    padding: 2rem 1.75rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}

.service-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--pink));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease);
}

.service-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.08);
}

.service-item:hover::after { transform: scaleX(1); }

.service-item--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto 1fr auto;
    gap: 0 1.5rem;
    padding: 2.5rem 2.5rem;
    background: linear-gradient(135deg, var(--dark) 0%, #1e1e24 100%);
    color: var(--text-inv);
    border: 1px solid var(--dark-border);
}

.service-item--featured .service-number { color: var(--pink); grid-row: 1; }
.service-item--featured .service-icon-wrap { grid-row: 1 / 5; align-self: start; }
.service-item--featured h3 { grid-column: 2; color: #fff; }
.service-item--featured p { grid-column: 2; color: var(--text-inv-muted); }
.service-item--featured .service-tags { grid-column: 2; }

.service-number {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.service-icon-wrap {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    background: var(--blue-glow);
    margin-bottom: 1.25rem;
    transition: background 0.3s, transform 0.3s;
}
.service-icon-wrap i {
    font-size: 1.3rem;
    color: var(--blue);
    transition: color 0.3s;
}

.service-item:hover .service-icon-wrap { background: var(--blue); transform: scale(1.05); }
.service-item:hover .service-icon-wrap i { color: #fff; }
.service-item--featured .service-icon-wrap { background: var(--pink-glow); width: 64px; height: 64px; }
.service-item--featured .service-icon-wrap i { color: var(--pink); font-size: 1.5rem; }
.service-item--featured:hover .service-icon-wrap { background: var(--pink); }
.service-item--featured:hover .service-icon-wrap i { color: #fff; }

.service-item h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text);
}

.service-item p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
    list-style: none;
}
.service-tags li {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: var(--r-pill);
    background: rgba(19, 181, 199, 0.1);
    color: var(--blue);
    border: 1px solid rgba(19, 181, 199, 0.2);
}

/* ============================================================
   ABOUT (ÜBER UNS)
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-inv-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.stat-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-md);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s var(--ease), border-color 0.3s;
}
.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-card--accent {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--pink), var(--pink-dark));
    border: none;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--blue);
    line-height: 1;
}
.stat-card--accent .stat-value { color: #fff; }

.stat-plus {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--blue);
}
.stat-card--accent .stat-plus { color: #fff; }

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-inv-muted);
    margin-top: 0.5rem;
    font-weight: 500;
}
.stat-card--accent .stat-label { color: rgba(255, 255, 255, 0.85); }

/* ============================================================
   REFERENCES (REFERENZEN)
   ============================================================ */
.ref-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.ref-filter {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 1.5rem;
    border: 1.5px solid var(--text);
    border-radius: var(--r-pill);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s var(--ease);
}
.ref-filter:hover { background: var(--text); color: var(--cream); }
.ref-filter.active { background: var(--text); color: var(--cream); }

.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
}

/* Reference Card */
.ref-card {
    background: #fff;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
    animation: cardIn 0.6s var(--ease-out) both;
}
.ref-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1);
}

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

.ref-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
}

.ref-card-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
}

.ref-card-category {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--blue);
    background: var(--blue-glow);
    padding: 4px 12px;
    border-radius: var(--r-pill);
    white-space: nowrap;
}

/* Carousel */
.ref-carousel {
    position: relative;
    height: 420px;
    overflow: hidden;
    background: #f0efec;
    cursor: pointer;
}

.ref-carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}
.ref-carousel img.active { opacity: 1; z-index: 1; }

.ref-carousel:hover .carousel-nav { opacity: 1; }

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s var(--ease);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.carousel-nav:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }

/* Carousel Dots */
.carousel-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 6px;
}
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}
.carousel-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* Fullscreen expand hint */
.ref-carousel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.25) 0%, transparent 40%);
    z-index: 2;
    pointer-events: none;
}

.ref-expand-icon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
}
.ref-carousel:hover .ref-expand-icon { opacity: 1; }
.ref-expand-icon:hover { background: rgba(0,0,0,0.55); }

/* Thumbnails */
.ref-thumbs {
    display: flex;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    overflow-x: auto;
    scrollbar-width: thin;
}
.ref-thumbs::-webkit-scrollbar { height: 3px; }
.ref-thumbs::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 2px; }

.ref-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.3s, border-color 0.3s;
    flex-shrink: 0;
    border: 2px solid transparent;
}
.ref-thumb:hover { opacity: 0.7; }
.ref-thumb.active { opacity: 1; border-color: var(--blue); }

/* Card Description */
.ref-card-body {
    padding: 1rem 1.5rem 1.5rem;
}
.ref-card-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}
.ref-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.ref-meta li {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.ref-meta li i { color: var(--blue); font-size: 0.7rem; }

/* Load More */
.ref-load-more { text-align: center; margin-top: 3rem; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
}
.lightbox.open { opacity: 1; visibility: visible; }

.lightbox-img-wrap {
    max-width: 90vw;
    max-height: 85vh;
}
.lightbox-img-wrap img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--r-sm);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    z-index: 10;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }

.lightbox-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

/* ============================================================
   KONTAKT
   ============================================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 1rem;
}

.contact-locations { display: flex; flex-direction: column; gap: 1.5rem; }

.location-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color 0.3s;
}
.location-card:hover { border-color: rgba(255, 255, 255, 0.15); }

.location-badge {
    padding: 0.9rem 1.5rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid var(--dark-border);
}

.location-body { padding: 1.25rem 1.5rem; }

.location-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    font-size: 0.9rem;
    color: var(--text-inv-muted);
}
.location-detail i {
    color: var(--blue);
    margin-top: 3px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.location-detail a { color: var(--text-inv-muted); transition: color 0.3s; }
.location-detail a:hover { color: var(--blue); }

.location-map { border-top: 1px solid var(--dark-border); }
.location-map iframe { width: 100%; height: 180px; display: block; border: 0; }

/* Contact Form */
.contact-form-wrap {
    position: sticky;
    top: 100px;
}

.contact-form {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-md);
    padding: 2.5rem;
}

.contact-form h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-inv-muted);
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-field {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--dark-border);
    border-radius: var(--r-sm);
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--blue);
    background: rgba(19, 181, 199, 0.05);
}

.form-field label {
    position: absolute;
    left: 16px;
    top: 14px;
    font-size: 0.9rem;
    color: var(--text-inv-muted);
    pointer-events: none;
    transition: all 0.25s var(--ease);
    background: var(--dark-card);
    padding: 0 4px;
}

.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
    top: -9px;
    font-size: 0.75rem;
    color: var(--blue);
    font-weight: 500;
}

.form-field textarea { resize: vertical; min-height: 120px; }

.contact-form .btn-primary {
    margin-top: 0.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: #0a0a0c;
    color: var(--text-inv-muted);
    padding: 4rem 0 1.5rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.footer-brand p {
    font-size: 0.9rem;
    max-width: 280px;
    line-height: 1.6;
}

footer h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

.footer-nav a,
.footer-legal a,
.footer-contact p {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}
.footer-nav a:hover,
.footer-legal a:hover { color: var(--blue); }

.footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
}
.footer-bottom p { font-size: 0.8rem; opacity: 0.4; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.btt {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--dark);
    color: #fff;
    border: 1px solid var(--dark-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.35s var(--ease);
    z-index: 90;
}
.btt.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.btt:hover { background: var(--pink); border-color: var(--pink); transform: translateY(-2px); }

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 80px 2rem 60px;
    line-height: 1.8;
}

.back-to-home { margin-bottom: 2.5rem; }
.back-to-home a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    padding: 10px 20px;
    border: 1.5px solid rgba(0,0,0,0.12);
    border-radius: var(--r-pill);
    transition: all 0.3s;
}
.back-to-home a:hover { background: var(--text); color: #fff; border-color: var(--text); }

.legal-page h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}
.legal-page h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}
.legal-page h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.legal-page p { margin-bottom: 1rem; color: var(--text-muted); }
.legal-page ul { margin-bottom: 1rem; padding-left: 1.5rem; }
.legal-page li { margin-bottom: 0.3rem; color: var(--text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .services-masonry { grid-template-columns: repeat(2, 1fr); }
    .service-item--featured { grid-column: 1 / -1; }
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .contact-layout { grid-template-columns: 1fr; }
    .contact-form-wrap { position: static; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }

    .hero-title span:first-child { font-size: clamp(2.4rem, 10vw, 3.5rem); }
    .hero-title span:last-child { font-size: clamp(1.4rem, 5vw, 2rem); }

    .services-masonry { grid-template-columns: 1fr; }
    .service-item--featured {
        grid-template-columns: 1fr;
    }
    .service-item--featured .service-icon-wrap { grid-row: auto; }
    .service-item--featured h3,
    .service-item--featured p,
    .service-item--featured .service-tags { grid-column: 1; }

    .about-stats { grid-template-columns: 1fr 1fr; }

    .ref-grid { grid-template-columns: 1fr; }
    .ref-carousel { height: 300px; }

    .form-row { grid-template-columns: 1fr; }

    .footer-top { grid-template-columns: 1fr; gap: 2rem; }

    .hero-scroll-indicator { display: none; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-badges { flex-direction: column; align-items: center; }
    .ref-carousel { height: 240px; }
    .about-stats { grid-template-columns: 1fr; }
    .contact-form { padding: 1.75rem; }
    .stat-card { padding: 1.5rem 1rem; }
}
