/*
 * Contact page (/contact). Loaded after cards.css, which provides the shared
 * page shell (.pc-page, .pc-header, .pc-lead). Built on the shared tokens; logical
 * properties only; Persian has its own larger type scale; no letter-spacing.
 */

.ct {
    --ct-small: 0.875rem;
    --ct-text: 1rem;
    --ct-title: 1.375rem;
    --ct-line: 1.65;
    font-size: var(--ct-text);
    line-height: var(--ct-line);
}

html[lang="fa"] .ct {
    --ct-small: 0.96875rem;
    --ct-text: 1.0625rem;
    --ct-title: 1.5rem;
    --ct-line: 1.95;
}

/* Quick actions: the three things people do most on a phone. */
.ct-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    margin: var(--space-4) 0 0;
    padding: 0;
    list-style: none;
}

.ct-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
}

@media (min-width: 992px) {
    .ct-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

.ct-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
}

.ct-card > .ct-list,
.ct-card > .ct-social,
.ct-person {
    margin-inline: var(--space-4);
}

.ct-person {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-block: var(--space-4) var(--space-3);
}

.ct-person img {
    flex: none;
    inline-size: 72px;
    block-size: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.ct-person h2,
.ct-card-body h2,
.ct-map h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--ct-title);
    font-weight: 800;
    line-height: 1.35;
}

html[lang="fa"] .ct-person h2,
html[lang="fa"] .ct-card-body h2,
html[lang="fa"] .ct-map h2 {
    line-height: 1.6;
}

.ct-person p {
    margin: var(--space-1) 0 0;
    color: var(--text-secondary);
    font-size: var(--ct-small);
}

/* Label / value rows */
.ct-list {
    margin-block: 0;
    padding: 0;
}

.ct-list > div {
    display: grid;
    gap: var(--space-1);
    padding-block: var(--space-3);
    border-block-start: 1px solid var(--border-light);
}

.ct-list dt {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--ct-small);
    font-weight: 600;
}

.ct-list dt i {
    flex: 0 0 1.25em;
    color: var(--swiss-red);
    text-align: center;
}

.ct-list dd {
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
}

.ct-list a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--border-light);
    text-underline-offset: 4px;
}

.ct-list a:hover {
    text-decoration-color: currentColor;
}

.ct-messengers {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
}

.ct-messengers i {
    margin-inline-end: 6px;
}

/* Social */
.ct-social {
    padding-block: var(--space-3) var(--space-4);
    border-block-start: 1px solid var(--border-light);
}

.ct-social p {
    margin: 0 0 var(--space-2);
    color: var(--text-secondary);
    font-size: var(--ct-small);
    font-weight: 600;
}

.ct-social ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.ct-social a {
    display: grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ct-social a:hover {
    border-color: var(--text-primary);
    background: var(--surface-muted);
}

/* Visit card */
.ct-photo {
    aspect-ratio: 16 / 9;
    background: var(--surface-muted);
}

.ct-photo img {
    display: block;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

.ct-card-body {
    padding: var(--space-4);
}

.ct-card-body .ct-list {
    margin-block-start: var(--space-3);
}

.ct-card-body .ct-list > div:last-child {
    padding-block-end: 0;
}

/* Map */
.ct-map {
    margin-block-start: 64px;
}

.ct-map h2 {
    margin-block-end: var(--space-3);
}

.ct-map iframe {
    display: block;
    inline-size: 100%;
    block-size: clamp(320px, 50vw, 460px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--surface-muted);
}

@media (prefers-reduced-motion: reduce) {
    .ct-social a {
        transition: none;
    }
}

/* Phones: the three quick actions share one row. */
@media (max-width: 575px) {
    .ct-actions {
        flex-wrap: nowrap;
        gap: var(--space-2);
    }

    .ct-actions li {
        flex: 1 1 0;
        min-inline-size: 0;
    }

    .ct-actions .btn {
        inline-size: 100%;
        padding-inline: var(--space-2);
        font-size: 0.875rem;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .ct-actions .btn i {
        display: none;
    }
}
