/* Container for the entire contact section */
.contact-container {
    margin-top: 1.5rem;
    max-width: 76rem; /* changed: widened the overall blue card slightly so the form side has more room */
    margin-left: auto;
    margin-right: auto;
    background-color: var(--dark-color);
    color: var(--white-color); /* added: makes normal text inside the dark card inherit white */
    border-radius: 0.5rem;
    padding: 2rem; /* kept: outer padding is fine */
}

/* Grid setup for content */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3.5rem;
    align-items: center;
    font-family: var(--paragraph-font);
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); /* changed: gives the form column a bit more width than the text column */
        gap: 2.75rem; /* changed: slightly reduced the space between columns */
        padding: 1.5rem 2.5rem; /* changed: reduces the large inner side padding that was shrinking the form area */
    }
}

/* Heading styles */
.contact-container h2 {
  color: var(--white-color);
}

/* Description paragraph styles */
.contact-description {
    margin-top: 1rem; /* keep spacing only */
}

/* Styles for contact info list */
.contact-info-list {
    margin-top: 3rem; /* Equivalent to mt-12 */
    list-style: none;
    padding: 0;
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.contact-info-link {
    color: inherit;
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    margin-left: 1rem;
}

/* Social links styling */
.social-links {
    display: flex;
    gap: 1rem; /* Equivalent to space-x-4 */
    margin-top: 3rem; /* Equivalent to mt-12 */
    list-style: none;
    padding: 0;
}

.social-link-item {
    background-color: var(--brand-color); /* Replacing #0073b1 with --brand-color */
    height: 2.5rem; /* Equivalent to h-10 */
    width: 2.5rem; /* Equivalent to w-10 */
    border-radius: 9999px; /* Equivalent to rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container for the contact form */
.contact-form-container {
    background-color: var(--off-white-color);
    padding: 1.75rem; /* changed: slightly more room inside the form card */
    border-radius: 0.5rem;
    width: 100%; /* added: allows the form card to fully use the width of its grid column */
    max-width: none; /* added: removes any accidental width ceiling */
    justify-self: stretch; /* added: ensures the card stretches across the available column width */
    color: var(--dark-color); /* add this line */
}

.contact-form-container form {
  display: flex; /* added: allows controlled spacing */
  flex-direction: column; /* added: stack form elements */
  gap: 0.9rem; /* added: consistent vertical spacing between fields */
}

/* Form heading */
.form-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-grey-color);
    margin-bottom: 0.9rem; /* added: gives the heading a cleaner separation from the buttons */
}

/* Toggle button group */
.button-group {
    display: flex;
    flex-wrap: nowrap; /* changed: keeps the three buttons on one row */
    gap: 0.75rem; /* changed: slightly tighter gap so they fit more comfortably */
    margin-top: 0; /* changed: heading now handles the spacing */
    margin-bottom: 1.4rem; /* added: puts clear space between the buttons and the form */
    align-items: stretch; /* added: makes the row feel cleaner */
}

/* Contact option buttons */
.toggle-btn {
    cursor: pointer;
    outline: none;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    flex: 1 1 0; /* added: makes all three buttons share the row evenly */
    min-width: 0; /* added: allows text to shrink properly inside flex items instead of forcing overflow */
    white-space: normal; /* added: allows natural wrapping inside the button if absolutely needed */
    text-align: center; /* added: keeps wrapped text centered */
    line-height: 1.25; /* added: makes two-line labels look cleaner */
    padding: 0.75rem 0.85rem; /* changed: slightly tighter than the global button padding so these fit better */
    font-size: 0.95rem; /* changed: just a touch smaller for this specific row */
}

/* Selected secondary button state */
.toggle-btn.selected.button-secondary {
    background-image: linear-gradient(180deg, var(--brand-color-gradient-light), var(--brand-color));
    color: var(--white-color);
    border-color: var(--brand-color);
}


.toggle-btn.selected.button-secondary:hover {
    background: linear-gradient(180deg, var(--brand-color-gradient-light), var(--brand-color));
    color: var(--white-color);
}

/* Contact form layout */
.contact-form {
    display: flex; /* added: makes spacing between fields controlled and consistent */
    flex-direction: column; /* added: stacks all fields vertically */
    gap: 0.85rem; /* added: gives each field consistent breathing room */
}

/* Form input fields */
.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--medium-grey-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--dark-grey-color);
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box; /* added: keeps padding/border inside the width so fields align properly */
    font-family: var(--paragraph-font);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--brand-color);
}
