/* AIWS Home Page — Popup Bubble System */

.card-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    align-items: center;
    justify-content: center;
}

.card-popup-overlay.is-open {
    display: flex;
}

.card-popup {
    background: #fff;
    border: 1.5px solid var(--primary, #337ab7);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    width: 300px;
    max-width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

/* ── Home Page Grids ── */
.home-service-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.home-supporting-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Triangle pointer at top of popup */
.card-popup::before {
    content: '';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 11px solid var(--primary, #337ab7);
}

.card-popup::after {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid #fff;
}

.card-popup-body {
    padding: 1.25rem 1.25rem 0;
}

.card-popup-title {
    color: var(--primary, #337ab7);
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.75rem;
    padding-right: 1.5rem;
}

.card-popup-section {
    margin-bottom: 0.75rem;
}

.card-popup-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.card-popup-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.card-popup-section ul li {
    font-size: 0.85rem;
    padding: 0.2rem 0;
    color: #333;
}

.card-popup-section ul li::before {
    content: '— ';
    color: var(--primary, #337ab7);
    font-weight: 600;
}

.card-popup-cta {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--primary, #337ab7);
    color: #fff;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    border-radius: 0 0 6px 6px;
    margin-top: 1rem;
    transition: background 0.15s;
}

.card-popup-cta:hover {
    background: var(--primary-dark, #275a86);
    color: #fff;
    text-decoration: none;
}

.card-popup-close {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
    padding: 0;
}

.card-popup-close:hover {
    color: #333;
}

@media (max-width: 768px) {
    .home-service-cards {
        grid-template-columns: 1fr;
    }

    .home-supporting-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .card-popup {
        width: 92vw;
        max-width: 260px;
    }
}
