/* ===== REFERENZEN PAGE - Römmich-Style Design ===== */

/* ===== ALLGEMEIN ===== */
.rr {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
    width: 100%;
}

/* ===== HEADER ===== */
.rr-head { padding-top: 2.5rem; padding-bottom: 0.5rem; }
.rr-head h1 {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.6rem;
    line-height: 1.15;
}
.rr-head h2 {
    font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.45;
    margin: 0 0 0.65rem;
}
.rr-head .rr-lead {
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--color-text-primary);
    line-height: 1.55;
    margin: 0;
}

/* ===== DETAIL-PANEL (oberhalb des Grids) ===== */
.rr-detail {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.55s cubic-bezier(.4,0,.2,1),
                opacity 0.4s ease 0.08s,
                margin 0.55s cubic-bezier(.4,0,.2,1);
    margin-top: 0;
    margin-bottom: 0;
}
.rr-detail.is-open {
    opacity: 1;
    margin-bottom: 1.5rem;
}
.rr-detail .rr-detail-body { max-width: 100%; }
.rr-detail-body {
    display: flex;
    gap: 1.75rem;
    padding: 1.25rem 0 1rem;
}

/* -- Bilder links -- */
.rr-dl { flex: 0 0 60%; min-width: 0; }
.rr-dl-main {
    width: 100%;
    overflow: hidden;
    background: var(--color-gray-100);
    position: relative;
    cursor: zoom-in;
}
.rr-dl-main img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.35s ease;
}
.rr-dl-main img.fade { opacity: 0; }

/* ===== VOLLBILD-LIGHTBOX (z-index über Navigation) ===== */
.rr-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: zoom-out;
}
.rr-lightbox.is-open { display: flex; }
.rr-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
}
.rr-lb-close {
    position: absolute;
    top: 1rem; right: 1.25rem;
    width: 44px; height: 44px;
    background: var(--color-primary);
    border: none; border-radius: 50%;
    color: #fff; font-size: 1.5rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    z-index: 10000000;
}
.rr-lb-close:hover { background: var(--color-primary-dark); }
.rr-lb-prev, .rr-lb-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px;
    background: var(--color-primary);
    border: none; border-radius: 50%;
    color: #fff; font-size: 1.4rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    z-index: 10000000;
}
.rr-lb-prev { left: 1rem; }
.rr-lb-next { right: 1rem; }
.rr-lb-prev:hover, .rr-lb-next:hover { background: var(--color-primary-dark); }
.rr-lb-counter {
    position: absolute;
    bottom: 1rem; left: 50%; transform: translateX(-50%);
    color: #fff; font-size: 0.85rem;
    background: rgba(0,0,0,0.5);
    padding: 0.3rem 0.9rem;
    border-radius: 99px;
    z-index: 10000000;
}

/* ===== THUMBNAILS ===== */
.rr-thumbs {
    display: flex; gap: 0.4rem;
    margin-top: 0.55rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;
    padding-bottom: 3px;
}
.rr-thumbs::-webkit-scrollbar { height: 4px; }
.rr-thumbs::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 2px; }
.rr-th {
    flex: 0 0 85px; height: 60px;
    overflow: hidden; cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
}
.rr-th:hover, .rr-th.on { border-color: var(--color-primary); transform: scale(1.04); }
.rr-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rr-th-tip {
    position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%);
    background: var(--color-secondary-dark); color: #fff;
    font-size: 0.7rem; white-space: nowrap; padding: 2px 8px;
    border-radius: 3px; pointer-events: none;
    opacity: 0; transition: opacity 0.2s;
    z-index: 5;
}
.rr-th:hover .rr-th-tip { opacity: 1; }

/* ===== INFO RECHTS ===== */
.rr-dr { flex: 1; min-width: 0; position: relative; padding-top: 0.15rem; }
.rr-nav {
    display: flex; gap: 0.3rem;
    position: absolute; top: 0; right: 0;
}
.rr-nav button {
    width: 30px; height: 30px;
    border: 1px solid var(--color-gray-300);
    background: var(--color-bg-primary);
    cursor: pointer; font-size: 1rem;
    color: var(--color-text-secondary);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border-radius: 2px;
}
.rr-nav button:hover {
    background: var(--color-primary); color: #fff; border-color: var(--color-primary);
}
.rr-dtitle {
    font-size: 1.15rem; font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.75rem;
    padding-right: 110px;
    line-height: 1.3;
}
.rr-dmeta { font-size: 0.82rem; color: var(--color-text-primary); line-height: 1.75; margin: 0 0 0.85rem; }
.rr-dmeta strong { display: inline-block; min-width: 110px; color: var(--color-text-secondary); font-weight: 400; }
.rr-dwork { font-size: 0.82rem; color: var(--color-text-primary); margin: 0 0 0.4rem; }
.rr-dtasks { list-style: disc; padding-left: 1.2rem; margin: 0; }
.rr-dtasks li { font-size: 0.82rem; color: var(--color-primary); line-height: 1.85; }

/* ===== 3-SPALTEN GRID ===== */
.rr-grid-wrap { padding-top: 1rem; padding-bottom: 3rem; }
.rr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem 1.15rem;
}
.rr-card { cursor: pointer; position: relative; }
.rr-card.on { outline: 3px solid var(--color-primary); outline-offset: 3px; border-radius: 2px; }
.rr-card-img {
    width: 100%; aspect-ratio: 4 / 3;
    overflow: hidden; background: var(--color-gray-100);
    margin-bottom: 0.45rem;
}
.rr-card-img img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.35s ease;
}
.rr-card:hover .rr-card-img img { transform: scale(1.04); }
.rr-card h3 { font-size: 0.9rem; font-weight: 700; color: var(--color-text-primary); margin: 0 0 0.15rem; line-height: 1.3; }
.rr-card p { font-size: 0.76rem; color: var(--color-text-secondary); line-height: 1.5; margin: 0; }

/* ===== SERVICE-TEASER ===== */
.rr-svc { padding-bottom: 3rem; }
.rr-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem 1.15rem;
    border-top: 1px solid var(--color-gray-200);
    padding-top: 1.75rem;
}
.rr-svc-grid h3 { font-size: 0.9rem; font-weight: 700; color: var(--color-text-primary); margin: 0 0 0.15rem; }
.rr-svc-grid p { font-size: 0.76rem; color: var(--color-text-secondary); line-height: 1.5; margin: 0; }

/* ===== GOOGLE REVIEWS SECTION ===== */
.google-reviews-section {
    padding: var(--spacing-16) 0;
    background: var(--color-bg-primary);
}
.google-reviews-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
}
.google-reviews-section h2 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: var(--spacing-3);
}
.google-reviews-subtitle {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: var(--spacing-8);
}
.google-reviews-banner { margin-bottom: var(--spacing-8); }
.google-reviews-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    padding: var(--spacing-6);
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: all 0.3s ease;
    max-width: 400px;
    margin: 0 auto;
}
.google-reviews-link:hover {
    background: var(--color-gray-100);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.15);
}
.google-reviews-logo { flex-shrink: 0; }
.google-reviews-banner-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-1);
}
.google-reviews-banner-text strong {
    font-size: var(--font-size-lg);
    color: var(--color-secondary);
}
.google-reviews-banner-text span {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: var(--spacing-16) 0;
    background: var(--color-secondary);
    color: var(--color-text-inverse);
    text-align: center;
}
.cta-section .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
}
.cta-section h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-4);
}
.cta-section p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-8);
    opacity: 0.95;
}
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-4);
    justify-content: center;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 1200px) {
    .rr { max-width: 1060px; }
}
@media (max-width: 900px) {
    .rr-detail-body { flex-direction: column; gap: 1rem; }
    .rr-dl { flex: none; width: 100%; }
}
@media (max-width: 768px) {
    .rr-grid, .rr-svc-grid { grid-template-columns: repeat(2, 1fr); }
    .rr-th { flex: 0 0 72px; height: 52px; }
    .google-reviews-link { flex-direction: column; text-align: center; }
    .google-reviews-banner-text { align-items: center; }
    .cta-buttons { flex-direction: column; }
}
@media (max-width: 480px) {
    .rr { padding: 0 1rem; }
    .rr-grid, .rr-svc-grid { grid-template-columns: 1fr; }
    .rr-head { padding-top: 1.5rem; }
    .rr-detail-body { padding: 0.75rem 0; }
    .rr-dtitle { font-size: 1rem; padding-right: 95px; }
    .rr-nav button { width: 26px; height: 26px; font-size: 0.9rem; }
    .rr-th { flex: 0 0 60px; height: 44px; }
}
