.reference-detail-page {
    background:
        radial-gradient(circle at 12% 0%, rgba(53, 230, 214, 0.14), transparent 34rem),
        radial-gradient(circle at 88% 16%, rgba(239, 52, 52, 0.14), transparent 32rem),
        linear-gradient(180deg, #05080d 0%, #081019 52%, #05080d 100%);
}

.reference-detail-main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 126px 0 92px;
}

.reference-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.reference-breadcrumbs a {
    color: #eaf0f7;
    text-decoration: none;
}

.reference-breadcrumbs a:hover {
    color: var(--teal);
}

.reference-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
    gap: clamp(30px, 5vw, 68px);
    align-items: center;
    min-height: 610px;
}

.reference-detail-copy h1 {
    max-width: 820px;
    margin: 0 0 22px;
    font-size: clamp(2.8rem, 5.8vw, 6rem);
    line-height: 0.96;
}

.reference-detail-lead {
    max-width: 730px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1.02rem, 1.6vw, 1.2rem);
    line-height: 1.72;
}

.reference-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 26px 0 30px;
}

.reference-detail-tags span {
    padding: 8px 11px;
    border: 1px solid rgba(53, 230, 214, 0.24);
    border-radius: 8px;
    color: #dffcf9;
    background: rgba(53, 230, 214, 0.07);
    font-size: 0.8rem;
    font-weight: 850;
}

.reference-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.reference-detail-visual {
    position: relative;
    overflow: hidden;
    margin: 0;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: #070c12;
    box-shadow: 0 34px 110px rgba(0, 0, 0, 0.42);
}

.reference-detail-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 54%, rgba(3, 6, 10, 0.82));
}

.reference-detail-visual img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.reference-detail-visual figcaption {
    position: absolute;
    z-index: 1;
    right: 18px;
    bottom: 18px;
    left: 18px;
    color: #edf7f8;
    font-size: 0.82rem;
    font-weight: 800;
}

.reference-detail-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 20px;
    margin-top: clamp(52px, 8vw, 100px);
}

.reference-detail-panel {
    padding: clamp(26px, 4vw, 48px);
    border: 1px solid var(--line);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        rgba(10, 17, 26, 0.9);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.24);
}

.reference-detail-panel h2,
.reference-detail-section h2 {
    margin: 0 0 20px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
}

.reference-detail-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.78;
}

.reference-detail-list {
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.reference-detail-list li {
    position: relative;
    padding: 13px 14px 13px 42px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    color: #edf3f8;
    background: rgba(255, 255, 255, 0.035);
    line-height: 1.52;
}

.reference-detail-list li::before {
    content: "✓";
    position: absolute;
    top: 12px;
    left: 14px;
    color: var(--teal);
    font-weight: 950;
}

.reference-detail-section {
    margin-top: clamp(56px, 8vw, 100px);
}

.reference-detail-section-heading {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 26px;
}

.reference-detail-section-heading h2 {
    max-width: 780px;
    margin-bottom: 0;
}

.reference-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.reference-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 280px;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #070c12;
}

.reference-gallery-item:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 8;
}

.reference-gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.reference-gallery-item:hover img {
    transform: scale(1.025);
    filter: saturate(1.08) contrast(1.03);
}

.reference-detail-note {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
    margin-top: clamp(54px, 8vw, 96px);
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid rgba(53, 230, 214, 0.28);
    border-radius: 10px;
    background:
        radial-gradient(circle at 0% 0%, rgba(53, 230, 214, 0.14), transparent 28rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        rgba(8, 14, 22, 0.94);
}

.reference-detail-note h2 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.reference-detail-note p {
    max-width: 800px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.reference-faq {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.reference-faq article {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(12, 20, 30, 0.82);
}

.reference-faq h3 {
    margin: 0 0 12px;
    font-size: 1.08rem;
}

.reference-faq p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.reference-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.reference-related-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: inherit;
    background: rgba(12, 20, 30, 0.86);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.reference-related-card:hover {
    transform: translateY(-5px);
    border-color: rgba(53, 230, 214, 0.42);
}

.reference-related-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
}

.reference-related-card div {
    padding: 20px;
}

.reference-related-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--teal);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reference-related-card strong {
    display: block;
    font-size: 1.08rem;
    line-height: 1.35;
}

@media (max-width: 980px) {
    .reference-detail-hero,
    .reference-detail-overview {
        grid-template-columns: 1fr;
    }

    .reference-detail-hero {
        min-height: 0;
    }

    .reference-detail-visual {
        max-height: 720px;
    }

    .reference-faq,
    .reference-related-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .reference-detail-main {
        width: min(100% - 28px, 1180px);
        padding-top: 104px;
    }

    .reference-detail-copy h1 {
        font-size: clamp(2.45rem, 13vw, 4.2rem);
    }

    .reference-detail-visual {
        aspect-ratio: 4 / 3;
    }

    .reference-gallery-grid,
    .reference-faq,
    .reference-related-grid {
        grid-template-columns: 1fr;
    }

    .reference-gallery-item:first-child {
        grid-column: auto;
        aspect-ratio: 4 / 3;
    }

    .reference-gallery-item {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .reference-detail-section-heading,
    .reference-detail-note {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .reference-detail-section-heading {
        display: grid;
    }

    .reference-detail-actions .btn,
    .reference-detail-note .btn {
        width: 100%;
    }
}
