
/* SAMNET Station Specifications — Corrected Layout */

.samnet-specifications .page-container {
    width: min(1200px, calc(100% - 32px));
    margin-inline: auto;
}

.samnet-specifications .spec-equipment-list {
    display: grid;
    gap: 16px;
}

.samnet-specifications .spec-equipment-card {
    display: block;
    min-width: 0;
    padding: 22px;
    border: 1px solid #dfe6eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(0,0,0,.04);
}

.samnet-specifications .spec-equipment-card__header {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.samnet-specifications .spec-sensor-photo {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 10px;
    background: #f3f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.samnet-specifications .spec-sensor-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    box-sizing: border-box;
    padding: 6px;
}

.samnet-specifications .spec-photo-placeholder {
    padding: 8px;
    font-size: 11px;
    text-align: center;
    color: #718096;
    overflow-wrap: anywhere;
}

.samnet-specifications .spec-equipment-summary {
    flex: 1;
    min-width: 0;
}

.samnet-specifications .spec-equipment-category {
    display: block;
    margin-bottom: 6px;
    color: #087f83;
    font-size: 12px;
    font-weight: 700;
}

.samnet-specifications .spec-equipment-summary h3 {
    margin: 0 0 8px;
    color: #172b43;
    font-size: 20px;
}

.samnet-specifications .spec-equipment-description {
    margin: 0;
    color: #617184;
    font-size: 14px;
    line-height: 1.5;
}

.samnet-specifications .spec-equipment-status {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 20px;
    color: #177245;
    background: #eaf7ef;
    font-size: 12px;
    font-weight: 700;
}

.samnet-specifications .spec-key-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    margin-top: 18px;
}

.samnet-specifications .spec-key-item {
    min-width: 0;
    padding: 12px;
    border-radius: 9px;
    background: #f7f9fa;
}

.samnet-specifications .spec-key-item span {
    display: block;
    color: #718096;
    font-size: 12px;
}

.samnet-specifications .spec-key-item strong {
    display: block;
    margin-top: 5px;
    color: #172b43;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.samnet-specifications .spec-expand {
    margin-top: 16px;
    border-top: 1px solid #e2e8ed;
    padding-top: 12px;
}

.samnet-specifications .spec-expand summary {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    color: #087f83;
    font-size: 14px;
    font-weight: 700;
}

.samnet-specifications .spec-expand > a {
    display: inline-block;
    margin-top: 16px;
    color: #087f83;
}

/* Station location */

.samnet-specifications .spec-map-banner {
    height: 300px;
    overflow: hidden;
    border-radius: 14px;
}

.samnet-specifications .spec-map-banner iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.samnet-specifications .spec-location-details {
    margin-top: 12px;
    color: #617184;
}

/* Station photograph gallery */

.samnet-specifications .spec-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 14px;
}

.samnet-specifications .spec-gallery-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e0e6eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.samnet-specifications .spec-gallery-item img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.samnet-specifications .spec-gallery-item span {
    padding: 10px;
    font-size: 13px;
    color: #172b43;
}

/* Responsive layout */

@media (max-width: 900px) {
    .samnet-specifications .spec-key-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 700px) {
    .samnet-specifications .spec-gallery-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .samnet-specifications .spec-equipment-card {
        padding: 16px;
    }

    .samnet-specifications .spec-equipment-card__header {
        gap: 12px;
        align-items: flex-start;
    }

    .samnet-specifications .spec-sensor-photo {
        flex: 0 0 76px;
        width: 76px;
        height: 76px;
    }

    .samnet-specifications .spec-equipment-status {
        display: none;
    }

    .samnet-specifications .spec-map-banner {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .samnet-specifications .spec-key-grid {
        grid-template-columns: 1fr;
    }

    .samnet-specifications .spec-equipment-summary h3 {
        font-size: 17px;
    }

    .samnet-specifications .spec-gallery-item img {
        height: 110px;
    }
}


/* Full-screen, viewport-fitted station photo viewer */
.spec-photo-dialog {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(1100px, 96vw);
    max-width: 96vw;
    height: min(900px, 96dvh);
    max-height: 96dvh;
    margin: auto;
    padding: 48px 14px 12px;
    border: 0;
    border-radius: 12px;
    background: #101820;
    color: #fff;
    overflow: hidden;
}
.spec-photo-dialog::backdrop { background: rgba(0,0,0,.88); }
.spec-photo-dialog[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.spec-photo-dialog #spec-photo-large {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(96dvh - 125px);
    min-height: 0;
    min-width: 0;
    object-fit: contain;
    flex: 0 1 auto;
}
.spec-photo-dialog .spec-photo-close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    border: 0;
    border-radius: 6px;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    padding: 4px 12px;
    cursor: pointer;
}
.spec-photo-dialog .spec-photo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    flex: 0 0 auto;
    text-align: center;
}
.spec-photo-dialog .spec-photo-footer span { min-width: 0; overflow-wrap: anywhere; }
.spec-photo-dialog .spec-photo-footer button {
    flex-shrink: 0;
    padding: 8px;
    cursor: pointer;
}
@media (max-width: 600px) {
    .spec-photo-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 46px 8px 12px; }
    .spec-photo-dialog #spec-photo-large { max-height: calc(100dvh - 120px); }
    .spec-photo-dialog .spec-photo-footer { gap: 5px; font-size: 12px; }
    .spec-photo-dialog .spec-photo-footer button { font-size: 12px; padding: 6px; }
}
