/* =========================================================
   FAYADH WEBSITE — CONTACT US
   Four cards: email, phone, WhatsApp (links) and location.
   On phones each card is a compact row (icon beside text).
========================================================= */


/* =========================================================
   1. SECTION & GRID
========================================================= */

.contact {
    background: var(--background);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 16px;

    list-style: none;
}

/* Hidden items (empty in the API, or still loading) take no space. */

.contact-grid li:has(> [hidden]) {
    display: none;
}


/* =========================================================
   2. CARD
========================================================= */

.contact-card {
    height: 100%;

    padding: 20px 16px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 2px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 16px;

    text-align: center;

    transition: var(--transition);
}

.contact-card[hidden] {
    display: none;
}

a.contact-card:hover {
    border-color: var(--primary-light);

    box-shadow: var(--shadow-md);

    transform: translateY(-2px);
}

.contact-icon {
    width: 44px;
    height: 44px;

    margin-bottom: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary-light);
    color: var(--primary);

    border-radius: 50%;
}

.contact-icon svg {
    width: 21px;
    height: 21px;
}

.contact-label {
    color: var(--heading);

    font-size: 15px;
    font-weight: 800;
}

.contact-value {
    color: var(--text);

    font-size: 14px;
    line-height: 1.5;

    /* Long email addresses wrap instead of overflowing. */
    overflow-wrap: anywhere;
}

a.contact-card .contact-value {
    color: var(--primary);

    font-weight: 600;
}


/* =========================================================
   3. RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 480px) {

    .contact-grid {
        grid-template-columns: 1fr;

        gap: 10px;
    }

    .contact-card {
        padding: 14px 16px;

        display: grid;
        grid-template-columns: auto minmax(0, 1fr);

        column-gap: 14px;
        row-gap: 0;

        text-align: start;
    }

    .contact-icon {
        grid-row: 1 / 3;

        margin-bottom: 0;
    }

    /* The phone number is written left-to-right: keep it on the
       label's side in Arabic too (the card's start edge). */
    .contact-value[dir="ltr"] {
        justify-self: start;
    }

}
