﻿/* Article citation block */
.article-citation {
    background-color: #23232a;
    border: 1px solid #333;
    border-left: 4px solid #e86920;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    color: #ccc;
}
.article-citation .journal {
    color: #e86920;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.85rem;
}
.article-citation h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin: 0.4rem 0;
}
.article-citation h3 a {
    color: #ffffff;
    text-decoration: none;
}
.article-citation h3 a:hover {
    color: #e86920;
}
.article-citation h4 {
    margin: 0;
    font-size: 0.9rem;
}
/* Tall section blocks for article-summary pages */
.section-block {
    background-color: #d9d9d9;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    margin: 1rem 0;
    min-height: 16rem;
    color: #161619;
    overflow: hidden;
}
.section-block h2 {
    color: #161619;
    border-bottom: 1px solid #999;
    padding-bottom: 0.75rem;
    margin-top: 0;
}
/* Figure blocks: text on the left, figure on the right, vertically centered */
.section-block.has-figure {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.section-block.has-figure .section-text {
    flex: 1 1 auto;
    min-width: 0;
}
.section-block.has-figure .section-figure {
    flex: 0 0 40%;
}
.section-block.has-figure .section-figure-img {
    display: block;
    width: 100%;
    border-radius: 4px;
}
.section-block .placeholder {
    color: #555;
    font-style: italic;
}

/* Side image for section blocks: .side-image-left / .side-image-right */
.section-block .side-image {
    width: 40%;
    border-radius: 4px;
}
.section-block .side-image-right {
    float: right;
    margin: 0 0 1rem 1.5rem;
}
.section-block .side-image-left {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

/* Stack side images above text on small screens */
@media (max-width: 700px) {
    .section-block .side-image {
        float: none;
        width: 100%;
        margin: 0 0 1rem;
    }
    .section-block.has-figure {
        flex-direction: column-reverse;
        gap: 1rem;
    }
    .section-block.has-figure .section-figure {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Infocards for stomatopods */
.infocard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto 1fr 2.5rem;
    column-gap: 0.3rem;
    margin-bottom: 1.2rem;
    border-radius: 4px;
    overflow: hidden;
}

/* Title section */
.infocard-title {
    grid-column: 1;
    background-color: #d9d9d9;
    padding: 0.5rem 1.3rem;
    font-weight: bold;
}

.infocard-title h2 {
    font-size: 2rem;
    line-height: 2rem;
    margin: 0;
    text-align: left;
}

/* Image section */
.infocard-image {
    grid-column: 2;
    grid-row: 1 / -1;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.infocard-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content section */
.infocard-content {
    grid-row: 2;
    background-color: #d9d9d9;
    padding: 0.2rem 1.3rem;
}

.infocard-content h3 {
    font-size: 1.1rem;
    font-weight: lighter;
    margin: 0 0 1rem 0;
}

/* Footer section */
.infocard-footer {
    grid-row: 3;
    background-color: #d9d9d9;
    padding: 0.1rem 1rem;
    text-align: right;
}

.infocard-footer h4 {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive design for smaller screens */
@media (max-width: 700px) {
    .infocard {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        column-gap: 0;
    }

    .infocard-image {
        grid-column: 1; grid-row: 2;
    }

    .infocard-image img {
        display: block;
        margin-bottom: 0;
    }

    .infocard-title {
        grid-column: 1;
        grid-row: 1;
    }

    .infocard-title h2 {
        font-size: 1.8rem;
        text-align: center;
        padding: 0.2rem 1.3rem;
    }

    .infocard-content {
        grid-column: 1; grid-row: 3;
    }

    .infocard-content h3 {
        font-weight: normal;
        font-size: 1rem;
    }

    .infocard-footer {
        grid-column: 1; grid-row: 4;
    }

    .infocard-footer h4 {
        padding: 0.1rem 1.3rem;
        margin-top: 0.1rem;
        margin-bottom: 0.8rem;
        font-size: 0.9rem;
        text-align: left;
    }
}

/* Tutorial step: image beside text, text vertically centered with the image.
   Desktop: image sits to the right of the text. Mobile: image drops below, full width. */
.step {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin: 1.5rem 0;
}
.step-text {
    flex: 1 1 auto;
    margin: 0;
}
.step-img {
    flex: 0 0 auto;
    width: 220px;
    height: auto;
    border-radius: 4px;
}
.step-figure {
    flex: 0 0 auto;
    width: 220px;
    text-align: center;
}
.step-figure .step-img {
    width: 100%;
}
.step-caption {
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.4rem;
}

@media (max-width: 700px) {
    .step {
        flex-direction: column;
    }
    .step-img,
    .step-figure {
        width: 100%;
    }
}

/* Clickable step images */
.step-img {
    cursor: zoom-in;
}

/* Image lightbox for step images (reuses .modal-overlay / .modal-content / .modal-close) */
.step-lightbox .modal-content {
    width: fit-content;
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    overflow: visible;
}
.step-lightbox .lightbox-img {
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 8px;
}

/* ==================== Collapsible Downloads (header) ==================== */
.header-downloads {
    margin-top: 1.5rem;
    max-width: 700px;
}
.header-downloads-toggle {
    background: none;
    border: none;
    color: #e86920;
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}
.header-downloads-toggle:hover {
    opacity: 0.85;
}
.header-downloads-toggle .mdi {
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}
.header-downloads-toggle[aria-expanded="true"] .mdi {
    transform: rotate(180deg);
}
.header-downloads-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}
.header-downloads-panel.open {
    grid-template-rows: 1fr;
}
.header-downloads-inner {
    overflow: hidden;
}
.header-downloads-list {
    display: grid;
    grid-template-columns: max-content max-content;
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
    border-left: 4px solid #e86920;
    padding: 0.6rem 0 0.4rem 1rem;
    color: #ffffff;
    font-size: 0.95rem;
}
.header-downloads-item {
    display: contents;
}
.header-downloads-item .dl-name {
    color: #ffffff;
}
.header-downloads-item .dl-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.header-downloads-item a.dl-model {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.header-downloads-item a.dl-model:hover {
    color: #e86920;
    border-color: #e86920;
}
.header-downloads-item .cta-button {
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
}
@media (max-width: 700px) {
    .header-downloads-list {
        grid-template-columns: 1fr;
        row-gap: 0.75rem;
    }
}

/* ==================== Collapsible Parts & Tools (header) ==================== */
.header-parts {
    margin-top: 1.25rem;
    max-width: 760px;
}
.header-parts-toggle {
    background: none;
    border: none;
    color: #e86920;
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}
.header-parts-toggle:hover {
    opacity: 0.85;
}
.header-parts-toggle .mdi {
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}
.header-parts-toggle[aria-expanded="true"] .mdi {
    transform: rotate(180deg);
}
.header-parts-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}
.header-parts-panel.open {
    grid-template-rows: 1fr;
}
.header-parts-inner {
    overflow: hidden;
}
.parts-block {
    border-left: 4px solid #e86920;
    padding: 0.5rem 0 0.25rem 1rem;
    overflow-x: auto;
}
.parts-subhead {
    color: #e86920;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0.6rem 0 0.35rem;
}
.parts-subhead:first-child {
    margin-top: 0.15rem;
}
.parts-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9rem;
}
.parts-table th {
    text-align: left;
    padding: 0.4rem 0.75rem;
    color: #e86920;
    border-bottom: 2px solid #e86920;
    font-weight: 600;
}
.parts-table td {
    padding: 0.4rem 0.75rem;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    vertical-align: top;
}
.parts-table tr:last-child td {
    border-bottom: none;
}
.parts-table a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.parts-table a:hover {
    color: #e86920;
    border-color: #e86920;
}
.parts-table .placeholder-row td {
    color: #8a8a8a;
    font-style: italic;
}
@media (max-width: 700px) {
    .parts-table {
        font-size: 0.82rem;
    }
    .parts-table th,
    .parts-table td {
        padding: 0.4rem 0.5rem;
    }
}

/* ==================== Reuse Policy pages (imageuse / modeluse) ==================== */
.policy-header {
    text-align: center;
    color: #ffffff;
    max-width: 820px;
    margin: 0 auto;
    padding: 2.5rem 0 1.75rem;
}
.policy-header h1 {
    font-weight: 600;
    text-decoration: underline;
    margin-bottom: 0.5rem;
}
.policy-header h3 {
    font-weight: 300;
    color: #c9c9c9;
    margin: 0;
}
.policy-card {
    background-color: #d9d9d9;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    color: #161619;
    max-width: 820px;
    margin: 0 auto 2.5rem;
    padding: 2rem;
}
/* License badge */
.license-badge {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background-color: #ffffff;
    border: 1px solid #333;
    border-left: 4px solid #e86920;
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.license-badge-icon {
    font-size: 2.6rem;
    color: #e86920;
    line-height: 1;
}
.license-badge-id {
    font-size: 1.35rem;
    font-weight: 600;
    color: #161619;
    line-height: 1.2;
}
.license-badge-name {
    font-size: 0.9rem;
    color: #444;
}
.license-badge-name a {
    color: #e86920;
    text-decoration: none;
}
.license-badge-name a:hover {
    text-decoration: underline;
}
.license-badge-statement {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #444;
    margin-top: 0.5rem;
}
/* Intro */
.policy-intro {
    font-size: 1rem;
    line-height: 1.65;
    color: #222;
    margin: 0 0 1.5rem;
}
/* Permitted / Not permitted columns */
.policy-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    margin-bottom: 1.5rem;
}
.policy-col h2 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.policy-col h2 .mdi {
    font-size: 1.25rem;
}
.policy-col.permitted h2 {
    color: #2e7d32;
    border-color: #2e7d32;
}
.policy-col.not-permitted h2 {
    color: #c62828;
    border-color: #c62828;
}
.policy-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.policy-col li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #222;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.policy-col li:last-child {
    border-bottom: none;
}
.policy-col li .mdi {
    position: absolute;
    left: 0;
    top: 0.42rem;
    font-size: 1.05rem;
}
.policy-col.permitted li .mdi {
    color: #2e7d32;
}
.policy-col.not-permitted li .mdi {
    color: #c62828;
}
/* Copyright */
.policy-copyright {
    text-align: center;
    font-size: 0.85rem;
    color: #555;
    padding-top: 0.75rem;
    border-top: 1px solid #aaa;
}
@media (max-width: 700px) {
    .policy-header {
        padding: 1.75rem 0 1.25rem;
    }
    .policy-card {
        padding: 1.25rem;
    }
    .policy-columns {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .license-badge {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
}
