/* Referenzen Page Styles */

/* Header Adjustments for Ref Page */
.ref-page .service-hero {
    padding-top: 10rem;
    padding-bottom: 5rem;
}

/* Visibility Insurance */
.subpage-content {
    opacity: 1 !important;
    visibility: visible !important;
}

.ref-grid {
    opacity: 1 !important;
    visibility: visible !important;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.ref-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.ref-filter-btn {
    background: rgba(4, 28, 44, 0.4);
    border: 1px solid rgba(86, 172, 230, 0.2);
    color: var(--text);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ref-filter-btn:hover {
    border-color: rgba(86, 172, 230, 0.5);
    transform: translateY(-2px);
}

.ref-filter-btn.active {
    background: linear-gradient(135deg, rgba(86, 172, 230, 0.2), rgba(0, 114, 188, 0.4));
    border-color: rgba(86, 172, 230, 0.5);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 114, 188, 0.3);
}



.ref-card {
    background: rgba(4, 28, 44, 0.4);
    border: 1px solid rgba(86, 172, 230, 0.15);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.ref-card:hover {
    transform: translateY(-8px);
    border-color: rgba(86, 172, 230, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 114, 188, 0.2);
}

/* Load More Button Styling Removed for Global Premium Button */

.ref-card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66%;
    /* 3:2 Aspect Ratio */
    overflow: hidden;
}

.ref-card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.ref-card:hover .ref-card-img-wrapper img {
    transform: scale(1.05);
}

.ref-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4, 28, 44, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 2rem;
}

.ref-card:hover .ref-card-overlay {
    opacity: 1;
}

.view-btn {
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ref-card:hover .view-btn {
    transform: translateY(0);
}

.ref-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ref-badge {
    align-self: flex-start;
    background: rgba(86, 172, 230, 0.15);
    color: var(--secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.ref-card h3 {
    font-size: 1.2rem;
    line-height: 1.4;
    margin: 0;
    color: #fff;
    font-family: var(--font-heading);
}

/* Fullscreen Modal / Lightbox */
.ref-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.ref-modal.active {
    opacity: 1;
    visibility: visible;
}

.ref-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 15, 24, 0.85);
    backdrop-filter: blur(15px);
}

.ref-modal-content {
    position: relative;
    width: 90%;
    max-width: 1400px;
    height: 85vh;
    background: var(--bg);
    border: 1px solid rgba(86, 172, 230, 0.2);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ref-modal.active .ref-modal-content {
    transform: scale(1) translateY(0);
}

.ref-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.ref-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.ref-modal-layout {
    display: flex;
    flex-direction: row;
    height: 100%;
}

/* Slider Section (Left) */
.ref-modal-slider {
    flex: 1.5;
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.slider-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.slider-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.slider-nav.prev {
    left: 20px;
}

.slider-nav.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* Text Section (Right) */
.ref-modal-text {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
    background: rgba(4, 28, 44, 0.95);
    border-left: 1px solid rgba(86, 172, 230, 0.1);
    display: flex;
    flex-direction: column;
}

.ref-modal-category {
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

.ref-modal-header h2 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 2rem;
    line-height: 1.3;
    color: #ffffff;
}

.ref-modal-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.ref-modal-description p {
    margin-bottom: 1.5rem;
}

/* Responsive constraints */
@media (max-width: 991px) {
    .ref-modal-layout {
        flex-direction: column;
    }

    .ref-modal-slider {
        flex: 1;
        min-height: 40vh;
    }

    .ref-modal-text {
        flex: 1;
        padding: 2rem;
    }

    .ref-modal-content {
        height: 95vh;
        width: 95%;
    }
}