:root {
    --color-light: #8ecae6;
    --color-dark: #212121;
    --color-signal: #fab700;
    --color-background: var(--color-light);
    --color-text: var(--color-dark);
    --color-accent: var(--color-signal);
    --size-bezel: 0.5rem;
    --size-radius: 4px;
}

.h3, h3 {
    font-size: 1.2rem;
}

.container-grid {
    display: grid;
    gap: 1.5rem;
    padding: 1%;
    column-gap: 50px;
    row-gap: 50px;
    grid-auto-columns: 1fr;
    grid-template-areas: var(--css);
    flex-wrap: wrap;
}

.grid-item {
    position: relative;
    background-color: var(--color1);
    width: 100%;
    height: 30rem;
    border-radius: 45px;
    padding: 10px;
    font-size: 1rem;
}

.grid-item svg {
    width: 100%;
    display: inline-block;
    text-align: center;
    font-size: 100px;
    margin-top: 5%;
}

.grid-item p {
    padding-top: 10%;
    text-align: center;
}

.map {
    position: relative;
    background-color: var(--color1);
    width: 98%;
    height: 30rem;
    border-radius: 45px;
    margin: auto;
    margin-left: 1%;
}

.grid-item iframe {
    width: 100%;
    height: 100%;
    border-radius: 35px;
    border: 0;
    margin: auto;
    padding: 10px;
    margin-top: 0.25%;
}

/* Improved design for contact panels */
.grid-item.contact-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.25rem;
    gap: 0.75rem;
    min-height: auto;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(29, 33, 41, 0.08), 0 1px 3px rgba(29,33,41,0.06);
    color: var(--color-text, #222);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.grid-item.contact-info:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(29,33,41,0.12), 0 4px 8px rgba(29,33,41,0.08);
}

.grid-item.contact-info .contact-card {
    width: 100%;
}

.grid-item.contact-info .contact-title {
    border-bottom: 2px solid var(--text-color);
    margin: 0 0 0.35rem 0;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.1;
    text-align: center; /* center the title */
    display: block;
}

.grid-item.contact-info .contact-entries {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.grid-item.contact-info .contact-row {
    display: flex;
    gap: 0.75rem;
    align-items: center; /* keep both parts vertically centered */
    width: 100%;
}

/* Primary layout: type + desc on the same line with graceful truncation */
.grid-item.contact-info .contact-type {
    flex: 0 0 40%;
    max-width: 40%;
    min-width: 96px; /* reserve space for the label */
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-item.contact-info .contact-desc {
    flex: 1 1 auto;
    min-width: 0; /* allow flex children to shrink properly */
    color: var(--text-color, #333);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* On hover allow the description to wrap so the full text becomes visible */
.grid-item.contact-info .contact-row:hover .contact-desc {
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 640px) {
    .grid-item.contact-info {
        padding: 0.85rem;
        border-radius: 14px;
    }
    .grid-item.contact-info .contact-type {
        flex-basis: 40%;
        max-width: 40%;
        font-size: 0.95rem;
    }
    .grid-item.contact-info .contact-title {
        font-size: 1rem;
    }
}

@media screen and (min-width: 630px) {
     :root {
        --cols: 2;
    }
}

@media screen and (min-width: 1108px) {
     :root {
        --cols: 3;
    }
}

@media screen and (min-width: 1465px) {
     :root {
        --cols: 4;
    }
}

.icon {
    margin: auto;
    padding: 10px;
    background-color: white !important;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    text-align: center;
    top: 20px;
}

.icon svg {
    color: black !important;
    font-size: 80px !important;
    padding-top: 2px;
}

.main {
    width: 60%;
    text-align: center;
    font-size: 20px;
    word-wrap: break-word;
    margin: auto;
    padding: 10px;
}

.flow>*:where(:not(:first-child)) {
    margin-top: var(--flow-spacer, 4em);
}

.input {
    position: relative;
    margin: 3%;
    display: block;
    transition: 240ms ease-out;
}

.input__label {
    position: absolute;
    left: 0;
    top: 0;
    padding: calc(var(--size-bezel) * 0.75) calc(var(--size-bezel) * 0.5);
    margin: calc(var(--size-bezel) * 0.75 + 3px);
    white-space: nowrap;
    transform: translate(0, 0);
    transform-origin: 0 0;
    background: var(--color1);
    transition: 120ms ease-in;
    font-weight: bold;
    line-height: 0.3;
}

.input__field {
    box-sizing: border-box;
    display: block;
    width: 100%;
    border: 3px solid currentColor;
    padding: calc(var(--size-bezel) * 1.5) var(--size-bezel);
    color: currentColor;
    background: transparent;
    border-radius: var(--size-radius);
    max-height: 200px;
    min-height: 60px;
}

.input__field+.input__label,
.input__field:not(:placeholder-shown)+.input__label {
    transform: translate(0.25rem, -65%) scale(0.8);
    color: var(--color-accent);
    font-weight: bold;
}

.send {
    position: relative;
    left: calc(50% - 75px);
    /* 40% default */
    background-image: linear-gradient( 55.88deg, #ffb703 9.16%, #fd9e02 43.89%, #fb8500 64.72%);
    border-radius: 5px;
    transition: 240ms ease-in;
}

.send:hover {
    background-image: linear-gradient( 110.88deg, #ffb703 9.16%, #fd9e02 43.89%, #fb8500 64.72%);
    box-shadow: #fd9e02 0px 0px 5px;
    transition-duration: 0.1s;
    cursor: pointer;
}

.send:focus {
    outline: none;
    transform: translateY(var(--height));
}

.send:active {
    box-shadow: 0 5px 10px rgb(130, 88, 159, 0.3);
    transform: scale(0.9);
}

::selection {
    color: #fb8500;
}


.send.success {
    background-color: #28a745;
}

.send.error {
    background-color: #dc3545;
}