/* Contact page (ContactController::show). The legacy-derived version had a
   plain h1, a dark rounded form panel, a full-bleed map that broke out of the
   container and an edge-to-edge department list. Rebuilt with scoped .cnt-*
   classes on the same red-hero + white-card language as the article/school
   pages. */

:root { --cnt-brand: #E32D44; --cnt-ink: #2c2c38; --cnt-muted: #5A5A67; }

.cnt-wrap {
    position: relative;
    z-index: 2;
    margin-top: -46px;
    padding-bottom: 90px;
}

.cnt-card {
    background: #fff;
    border: 1px solid #ebebf0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(30, 22, 40, .07);
    padding: 30px 32px;
}
.cnt-card__title {
    margin: 0 0 22px;
    font-size: 19px;
    color: var(--cnt-ink);
}

/* ---------- top: details + form ---------- */
.cnt-top {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 22px;
    align-items: start;
}

.cnt-list { margin: 0; padding: 0; list-style: none; }
.cnt-list__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f4;
    font-size: 15px;
    line-height: 1.55;
    color: var(--cnt-muted);
}
.cnt-list__item:last-child { border-bottom: 0; }
.cnt-list__icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(227, 45, 68, .08);
}
.cnt-list__link { color: var(--cnt-brand); text-decoration: none; word-break: break-word; }
.cnt-list__link:hover { text-decoration: underline; }
.cnt-list__text { word-break: break-word; }

.cnt-social {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}
.cnt-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f6f6f9;
    color: var(--cnt-muted);
    font-size: 18px;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}
.cnt-social a:hover { background: var(--cnt-brand); color: #fff; }

/* ---------- form ---------- */
.cnt-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}
.cnt-field { display: flex; flex-direction: column; gap: 7px; }
.cnt-field--full { grid-column: 1 / -1; }
.cnt-label { font-size: 13px; color: var(--cnt-muted); }
.cnt-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e2ea;
    border-radius: 10px;
    background: #fbfbfd;
    color: var(--cnt-ink);
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.cnt-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--cnt-brand);
    box-shadow: 0 0 0 3px rgba(227, 45, 68, .12);
}
textarea.cnt-input { resize: vertical; min-height: 128px; }

.cnt-send {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 13px 40px;
    border: 0;
    border-radius: 10px;
    background: var(--cnt-brand);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.cnt-send:hover {
    background: #c92238;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(227, 45, 68, .28);
}

.cnt-alert {
    margin-bottom: 18px;
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 14.5px;
    line-height: 1.5;
}
.cnt-alert--ok  { background: rgba(32, 150, 92, .1); color: #1c7a4c; }
.cnt-alert--err { background: rgba(227, 45, 68, .1); color: var(--cnt-brand); }
.cnt-alert ul { margin: 0; padding-left: 18px; }

/* ---------- map ---------- */
.cnt-map {
    margin-top: 22px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #ebebf0;
    box-shadow: 0 10px 30px rgba(30, 22, 40, .07);
    line-height: 0;
}
.cnt-map iframe { display: block; width: 100%; }

/* ---------- department directory ---------- */
.cnt-dir { margin-top: 46px; }
.cnt-dir__title {
    margin: 0 0 20px;
    font-size: 22px;
    color: var(--cnt-ink);
}
.cnt-dir__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.cnt-dep {
    background: #fff;
    border: 1px solid #ebebf0;
    border-left: 3px solid var(--cnt-brand);
    border-radius: 12px;
    padding: 20px 22px;
    transition: box-shadow .2s ease, transform .2s ease;
}
.cnt-dep:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(30, 22, 40, .09);
}
.cnt-dep__name {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.4;
    color: var(--cnt-ink);
}
.cnt-dep__row {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}
.cnt-dep__row a { color: var(--cnt-brand); text-decoration: none; }
.cnt-dep__row a:hover { text-decoration: underline; }
.cnt-dep__row--muted { color: var(--cnt-muted); }

@media (max-width: 900px) {
    .cnt-top { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .cnt-wrap { margin-top: -30px; padding-bottom: 56px; }
    .cnt-card { padding: 22px 20px; border-radius: 12px; }
    .cnt-form { grid-template-columns: 1fr; }
    .cnt-send { width: 100%; justify-self: stretch; text-align: center; }
    .cnt-map { border-radius: 12px; }
    .cnt-map iframe { height: 320px; }
    .cnt-dir__grid { grid-template-columns: 1fr; }
}
