/* === Examples Grid Section === */
.examples-grid-section {
    margin-top: 2vh;
    margin-bottom: 1vh;
    width: 100%;
    /* max-width: 65vw; */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    align-items: center;
}

.examples-title {
    font-size: 1.25vh;
    font-weight: 600;
    color: #0A1C3A;
    text-align: center;
    margin-bottom: 0.2vh;
    letter-spacing: 0.057vw;
}

/* Grid Container */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12vw, 1fr));
    gap: 1vh;
    justify-content: space-around;
    
    width: 110%;/* wider than viewport */   
    position: relative;
    left: 50%;
    transform: translateX(-40%); 
    /* tweak until visually centered */

}

/* Individual Example Card */
.example-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 18vw;    /* limit card size */
    height: 9vh;
    gap: 1vh;
    padding: 0.5vh 1vh;
    background: #f9f9f9;
    border: 0.2vh solid #0A1C3A;
    border-radius: 2vh;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.example-card:hover {
    box-shadow: 0 0.4vh 0.8vh rgba(10, 28, 58, 0.15);
}

/* Image Container */
.example-image-container {
    width: 100%;
    height: 9vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.example-thumbnail {
    max-width: 100%;
    max-height: 15vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Action Buttons Container */
.example-buttons {
    display: flex;
    width: 100%;
    gap: 0.5vh;
    justify-content: flex-end;
    align-items: center;
}

/* Individual Button */
.example-btn {
    width: 2.9vw;
    height: 1.6vh;
    padding: 0;
    background: #C1B3D7;
    color: #0A1C3A;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.example-btn img {
    width: 2vw;
    height: 1vh;
    object-fit: contain;
}

.example-btn:hover, .example-btn:focus {
    background: #C1B3D7 !important;
    color: #0A1C3A !important;
}

/* Description Message*/
.example-description-message {
    position: absolute;
    top: 0;
    left: 0;

    background: #C1B3D7;
    border: 0.2vh solid #0A1C3A;
    border-radius: 1.8vh;
    padding: 1vh 1.1vw 0.6vh 1.1vw;

    box-shadow: 0 0.4vh 1.2vh rgba(0, 0, 0, 0.1);
    z-index: 10;

    max-width: 25vw;      /* limits width */
    width: max-content;   /* grows with text */

    animation: slideInUp 0.3s ease;
}
.example-description-message::before {
    content: "";
    position: absolute;
    top: -1.2vh;
    right: 0.1vh;
    width: 2vh;
    height: 2vh;
    padding: 0.2vh;
    background-image: url("/wp-content/themes/hello-child/assets/images/btn/info-pop.svg");
    background-size: 1.2vh;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0A1C3A;
    border: none;
    border-radius: 50%;
}

.desc-message-content {
    font-size: 0.8vh;
    color: #0A1C3A;
    line-height: 0.8vh;
    text-align: center;
}

.desc-message-content p {
    margin: 0;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(2vh);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Examples Popup Styles === */
.examples-popup-content {
    width: 90vw;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background-color: #FFF !important;
    border: solid 0.2vh #0A1C3A;
    padding: 0 !important;
}

.examples-popup-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 2vh;
    border-radius: 1vh;
}

.full-size-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Responsive Design */
@media (max-width: 768px) {
    .examples-grid-section {
        max-width: 95vw;
    }

    .examples-grid {
        grid-template-columns: repeat(auto-fill, minmax(16vh, 1fr));
        gap: 1.5vh;
    }

    .example-card {
        padding: 1vh;
    }

    .example-description-message {
        max-width: 85vw;
    }

    .examples-popup-content {
        width: 95vw;
        max-height: 90vh;
    }
}

/* Popup Action Buttons Container */
.popup-example-buttons {
    display: flex;
    width: 100%;
    gap: 0.5vh;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5vh 2.5vw;
}
/* Popup Individual Button */
.popup-example-btn {
    width: 5vw;
    height: 2.8vh;
    padding: 0 !important;
    margin: 0.5vw !important;
    background: #C1B3D7;
    color: #0A1C3A;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.popup-example-btn img {
    width: 3vw;
    object-fit: contain;
}

.popup-example-btn:hover, .popup-example-btn:focus {
    background: #C1B3D7 !important;
    color: #0A1C3A !important;
}

#example-popup-save-btn, #example-popup-save-btn:hover, #example-popup-save-btn:focus {
    background: #0A1C3A !important;
}

.close-examples-popup{
    margin: 2vh;
}
.example-top-popup {
    background: #C1B3D7;
    width: 100%;
    border-radius: 2.5vh 2.5vh 0 0;
    display: flex;
    align-items: center;
    gap: 2vh;
}

.example-info-text {
    flex: 1; /* makes text stretch */
    margin: 0.8vh 1vw 0.8vh 5vw !important; /* space from left, more than right */
    font-size: 1.25vh !important;
    text-align: right;
    min-height: 4vh; /* ensures space even without text */
}
