/* ========================
   Contact Page
   ======================== */

.main-im-container {
    display: flex;
    width: 100%;
    gap: 12px;
}

.im-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid gray;
    background-color: #fcfcfc;
    margin: 0.5em;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: box-shadow 250ms ease;
}

.im-container:hover {
    animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    box-shadow:
        rgba(255, 255, 255, 0.1) 0 1px 1px 0 inset,
        rgba(50, 50, 93, 0.25) 0 50px 100px -20px,
        rgba(0, 0, 0, 0.3) 0 30px 60px -30px;
}

.im-container img {
    width: 36px;
    height: 36px;
    margin: 0.5em;
}

.im-container h3 {
    font-size: 0.85em;
    text-align: center;
}

.left-im-container {
    width: 40%;
    flex-shrink: 0;
}

.left-im-container h1 {
    margin: 0 0 12px;
    font-size: 1.4em;
}

.right-im-container {
    width: 60%;
}

.im-map {
    width: 100%;
    height: 160px;
    margin-top: 0;
    margin-bottom: 12px;
}

.im-map iframe {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: 0;
}

.contactor {
    display: flex;
    gap: 10px;
}

.left-contactor {
    width: 50%;
}

.message-contactor {
    width: 50%;
}

/* ========================
   Form Elements (scoped to contact form)
   ======================== */
.left-contactor input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
    border-radius: 7px;
    border: 1px solid #ccc;
    font-size: 0.9em;
    outline: none;
    transition: border-color 200ms ease;
}

.left-contactor input:focus {
    border-color: var(--dcol);
}

/* ========================
   Form Validation Error State
   ======================== */
@keyframes input-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.input-error {
    border-color: #ef4444 !important;
    animation: input-shake 0.35s ease both;
}

/* ========================
   Click-to-Copy Card Hint
   ======================== */
.im-container[data-copy] {
    cursor: copy;
    user-select: none;
    transition: box-shadow 250ms ease, transform 200ms ease;
}

.im-container[data-copy]:active {
    transform: scale(0.96);
}

.message-contactor textarea {
    border-radius: 7px;
    padding: 10px 12px;
    width: 100%;
    height: 100%;
    min-height: 120px;
    box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
    border: 1px solid #ccc;
    font-size: 0.9em;
    outline: none;
    resize: vertical;
    transition: border-color 200ms ease;
}

.message-contactor textarea:focus {
    border-color: var(--dcol);
}

.help-you {
    margin: 12px 0;
    font-size: 1.1em;
}

/* ========================
   Contact Button
   ======================== */
.right-im-container button {
    color: var(--dcol);
    background-color: white;
    border-radius: 25px;
    border: 2px solid var(--dcol);
    font-size: 15px;
    cursor: pointer;
    padding: 8px 28px;
    margin-bottom: 16px;
    transition: color 250ms ease, background-color 250ms ease;
}

.right-im-container button:hover {
    color: white;
    background-color: var(--dcol);
}

/* ========================
   Animations
   ======================== */
@keyframes slide-in-elliptic-left-fwd {
    0% {
        transform: translateX(-800px) rotateY(30deg) scale(0);
        transform-origin: -100% 50%;
        opacity: 0;
    }
    100% {
        transform: translateX(0) rotateY(0) scale(1);
        transform-origin: 1800px 50%;
        opacity: 1;
    }
}

.slide-in-elliptic-left-fwd {
    animation: slide-in-elliptic-left-fwd 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* ========================
   RESPONSIVE — Tablet (768px – 1024px)
   ======================== */
@media (max-width: 1024px) {
    .left-im-container h1 {
        font-size: 1.2em;
    }

    .im-map {
        height: 140px;
    }

    .im-container {
        margin: 0.3em;
    }

    .im-container img {
        width: 28px;
        height: 28px;
    }

    .im-container h3 {
        font-size: 0.75em;
    }
}

/* ========================
   RESPONSIVE — Mobile (≤ 768px)
   ======================== */
@media (max-width: 768px) {
    .main-im-container {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .left-im-container {
        width: 100%;
    }

    /* Horizontal scroll row of contact cards on mobile */
    .left-im-container > .im-container,
    .left-im-container > div.im-container {
        flex-direction: row;
        justify-content: flex-start;
        margin: 4px 0;
        padding: 8px 12px;
    }

    /* Show 2 contact cards per row with a flex-wrap */
    .left-im-container {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .left-im-container h1 {
        width: 100%;
        font-size: 1.3em;
        margin: 0 0 8px;
    }

    .left-im-container .im-container {
        width: calc(50% - 3px);
        margin: 0;
        flex-direction: column;
    }

    .im-container img {
        width: 28px;
        height: 28px;
        margin: 4px;
    }

    .im-container h3 {
        font-size: 0.75em;
    }

    .right-im-container {
        width: 100%;
    }

    .im-map {
        height: 180px;
        margin-top: 12px;
    }

    .contactor {
        flex-direction: column;
        gap: 8px;
    }

    .left-contactor {
        width: 100%;
    }

    .message-contactor {
        width: 100%;
    }

    .message-contactor textarea {
        min-height: 100px;
        height: 100px;
    }

    .left-contactor input {
        margin-bottom: 8px;
    }
}

/* ========================
   RESPONSIVE — Small Mobile (≤ 400px)
   ======================== */
@media (max-width: 400px) {
    .left-im-container .im-container {
        width: 100%;
    }
}
