/* Base Styles */
.med-tech-container {
    font-family: Arial, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 10px 0;
}

/* Full-width section styling */
.full-width-section {
    width: 100%;
    margin: 0;
    padding: 0;
}

.white-bg {
    background-color: white;
}

.gray-bg {
    background-color: #f7f7f7;
}

/* Diagram Container */
.diagram-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 15px 30px;
    overflow: visible;
}

.med-tech-card {
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 0;
    background-color: transparent;
    box-shadow: none;
}

.med-tech-image {
    border-radius: 5px;
    width: 100%;
    max-height: 420px;
    object-fit: contain;
}

/* Banner Style */
.green-banner {
    background-color: rgba(24, 118, 54, 0.9);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 0;
}

.green-banner h2 {
    font-size: 28px;
    margin-bottom: 0;
    font-weight: 600;
}

/* Layout Structure */
.med-tech-block-first {
    display: flex;
    flex-direction: column;
}

.med-tech-images {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

/* Adsorb item = image + label */
.adsorb-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.adsorb-image-label {
    text-align: center;
    color: #fff;
    background-color: rgba(24, 118, 54, 0.9);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 0;
    padding: 10px 16px;
    border-radius: 0 0 6px 6px;
}

/* Image zoom and popup styles */
.image-zoom-container {
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
    background-color: #f5f5f5;
}

.image-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.image-popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-popup-img {
    max-width: 100%;
    max-height: 90vh;
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.image-popup-close {
    position: absolute;
    top: -35px;
    right: -35px;
    color: white;
    background-color: #187635;
    border: 2px solid white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════
   CARTRIDGE CARDS SECTION
═══════════════════════════════════════════ */
.cartridge-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 30px 60px;
}

.cartridge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.cartridge-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cartridge-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.cartridge-img-wrap {
    background-color: #f0f4f0;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
}

.cartridge-img {
    width: 100%;
    max-height: 270px;
    object-fit: contain;
}

.cartridge-info {
    padding: 20px 24px 24px;
}

.cartridge-title {
    color: #187635;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.cartridge-desc {
    color: #455a64;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* ═══════════════════════════════════════════
   MEDIA QUERIES
═══════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1199px) {
    .diagram-container {
        padding: 30px 0 30px;
    }

    .med-tech-images {
        width: 100%;
        flex-direction: column;
        margin-right: 0;
        margin-bottom: 0;
    }

    .med-tech-image {
        width: 100%;
        max-height: 350px;
        object-fit: contain;
    }

    .cartridge-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .med-tech-block-first {
        flex-direction: column;
    }

    .med-tech-images {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .med-tech-image {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .med-tech-card {
        padding: 15px;
    }

    .image-popup-close {
        top: -25px;
        right: -25px;
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .cartridge-grid {
        grid-template-columns: 1fr;
    }

    .cartridge-container {
        padding: 30px 15px 40px;
    }
}

@media (min-width: 1200px) {
    .med-tech-block-first {
        flex-direction: row;
    }

    .med-tech-images {
        flex: 1.5;
        flex-direction: column;
    }

    .med-tech-image {
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .diagram-container {
        padding: 0;
    }

    .med-tech-card {
        padding: 5px;
    }

    .med-tech-images {
        margin-bottom: 0;
    }
}