
/* ===== Contact Page - Responsive Design ===== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    background: #f7f9fc;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

a {
    overflow-wrap: anywhere;
}

button,
input,
textarea {
    font: inherit;
}

.contact-container {
    width: min(100% - 40px, 1200px);
    margin: 0 auto;
    padding: clamp(35px, 6vw, 70px) 0;
}

/* Heading */

.contact-heading {
    text-align: center;
    margin-bottom: clamp(28px, 5vw, 48px);
}

.contact-heading h1 {
    margin: 0 0 12px;
    color: #172554;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.contact-heading p {
    max-width: 600px;
    margin: 0 auto;
    color: #64748b;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
}

/* Contact cards */

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.card {
    min-width: 0;
    padding: clamp(22px, 3vw, 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #eff6ff;
}

.icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.card h2 {
    margin: 0 0 10px;
    color: #172554;
    font-size: 1.3rem;
}

.card p {
    margin: 0 0 18px;
    color: #64748b;
    overflow-wrap: anywhere;
}

.card a {
    margin-top: auto;
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.card a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Contact form wrapper */

.contact-form-container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(22px, 5vw, 44px);
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.contact-form {
    width: 100%;
}

.contact-form h2 {
    margin: 0 0 28px;
    text-align: center;
    color: #172554;
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.3;
}

.form-group {
    width: 100%;
    min-width: 0;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 14px 15px;
    color: #1e293b;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input {
    min-height: 50px;
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

.submit-btn {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background: #1d4ed8;
}

.submit-btn:active {
    transform: scale(0.99);
}

.submit-btn:focus-visible,
.card a:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.form-status {
    margin: 14px 0 0;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Tablets */

@media (max-width: 900px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .card:last-child {
        grid-column: 1 / -1;
    }
}

/* Mobile phones */

@media (max-width: 600px) {
    .contact-container {
        width: calc(100% - 28px);
        padding-block: 32px;
    }

    .contact-heading {
        margin-bottom: 28px;
    }

    .cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        margin-bottom: 32px;
    }

    .card:last-child {
        grid-column: auto;
    }

    .card {
        padding: 24px 18px;
    }

    .contact-form-container {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .contact-form h2 {
        margin-bottom: 24px;
    }

    .form-group {
        margin-bottom: 17px;
    }

    .form-group input,
    .form-group textarea {
        padding: 13px;
        font-size: 16px;
    }

    .form-group textarea {
        min-height: 125px;
    }
}

/* Small phones */

@media (max-width: 360px) {
    .contact-container {
        width: calc(100% - 22px);
    }

    .contact-heading h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 20px 14px;
    }

    .contact-form-container {
        padding: 20px 13px;
    }

    .contact-form h2 {
        font-size: 1.4rem;
    }
}

/* Reduced motion accessibility */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
