/* ============================================================
   Contact Page Styles
   ============================================================ */

/* Hero */
.contact-hero {
    padding: calc(var(--nav-height) + 80px) 0 60px;
    text-align: center;
}

.contact-hero-inner {
    max-width: 680px;
    margin: 0 auto;
}

.contact-hero-inner h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 1rem 0;
    line-height: 1.15;
}

.contact-hero-inner p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.ch-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.ch-stat i {
    color: var(--primary);
    font-size: 1rem;
}

/* Main Layout */
.contact-main {
    padding: 0 0 80px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ---- Sidebar ---- */
.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: calc(var(--nav-height) + 24px);
}

/* Department Cards */
.dept-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dept-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
    color: var(--text-primary);
    font-family: inherit;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dept-card:hover {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.06);
}

.dept-card.active {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.2);
}

.dept-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(6, 182, 212, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.dept-card.active .dept-icon {
    background: var(--primary);
    color: white;
}

.dept-text {
    flex: 1;
    min-width: 0;
}

.dept-text strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

.dept-text span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.dept-arrow {
    color: var(--text-secondary);
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.dept-card.active .dept-arrow,
.dept-card:hover .dept-arrow {
    color: var(--primary);
    transform: translateX(2px);
}

/* Contact Info Card */
.contact-info-card {
    padding: 1.5rem;
}

.contact-info-card h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.contact-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ci-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.contact-info-list li > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-info-list strong {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}

.contact-info-list a,
.contact-info-list span {
    font-size: 0.88rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-info-list a:hover {
    color: var(--primary);
}

.social-row {
    display: flex;
    gap: 0.5rem;
}

.social-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

.social-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Trust Row */
.trust-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.trust-item i {
    color: #10b981;
    font-size: 0.85rem;
}

/* ---- Form Panel ---- */
.contact-form-wrap {
    padding: 2.5rem;
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.req {
    color: #ef4444;
}

.optional {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Input Wrap */
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap i {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    pointer-events: none;
    transition: var(--transition);
}

.input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.input-wrap input:focus + i,
.input-wrap:focus-within i {
    color: var(--primary);
}

/* Fix icon order — icon is before input in DOM but visually overlaid */
.input-wrap input:focus ~ i { color: var(--primary); }

.input-wrap input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-wrap input.is-valid {
    border-color: #10b981;
}

/* Textarea */
.textarea-wrap {
    position: relative;
}

.textarea-wrap textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 140px;
    transition: var(--transition);
    line-height: 1.6;
}

.textarea-wrap textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.textarea-wrap textarea.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.char-count {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    pointer-events: none;
    background: var(--bg-secondary);
    padding: 2px 4px;
    border-radius: 4px;
}

/* Field Errors */
.field-error {
    display: block;
    font-size: 0.78rem;
    color: #ef4444;
    margin-top: 4px;
    min-height: 16px;
}

/* Checkbox */
.checkbox-group {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.checkbox-label input:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked ~ .checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Form Alert */
.form-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.form-alert--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.form-alert i {
    flex-shrink: 0;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(6, 182, 212, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success State */
.form-success {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    border: 2px solid rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #10b981;
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.form-success h3 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.form-success p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* FAQ Grid */
.contact-faq {
    padding: 60px 0 100px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 0;
}

.faq-mini {
    padding: 1.5rem;
    transition: var(--transition);
}

.faq-mini:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.12);
}

.faq-mini > i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: block;
}

.faq-mini h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.faq-mini p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-mini a {
    color: var(--primary);
    text-decoration: none;
}

.faq-mini a:hover {
    text-decoration: underline;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Small desktop (<=1100px) */
@media (max-width: 1100px) {
    .contact-layout {
        grid-template-columns: 300px 1fr;
    }
}

/* Tablet portrait (<=900px) — sidebar stacks above form */
@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-sidebar {
        position: static;
    }

    .dept-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile landscape (<=640px) */
@media (max-width: 640px) {
    .contact-hero-inner h1 {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .contact-form-wrap {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dept-cards {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .contact-hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .trust-row {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .trust-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .contact-info-card {
        padding: 1.25rem;
    }

    .social-row {
        flex-wrap: wrap;
    }
}

/* Mobile (<=480px) */
@media (max-width: 480px) {
    .contact-hero {
        padding-top: calc(var(--nav-height) + 50px);
        padding-bottom: 40px;
    }

    .contact-hero-inner p {
        font-size: 0.95rem;
    }

    .contact-form-wrap {
        padding: 1.25rem;
    }

    .form-header h2 {
        font-size: 1.3rem;
    }

    .dept-card {
        padding: 12px 14px;
    }

    .dept-icon {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .dept-text strong {
        font-size: 0.85rem;
    }

    .dept-text span {
        font-size: 0.74rem;
    }

    .input-wrap input,
    .textarea-wrap textarea {
        font-size: 0.9rem;
        padding: 10px 12px 10px 36px;
    }

    .textarea-wrap textarea {
        padding: 10px 12px;
    }

    .btn-submit {
        padding: 13px;
        font-size: 0.95rem;
    }

    .faq-mini {
        padding: 1.25rem;
    }

    .trust-item {
        min-width: 100px;
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* Extra small (<=360px) */
@media (max-width: 360px) {
    .contact-hero-inner h1 {
        font-size: 1.5rem;
    }

    .contact-form-wrap {
        padding: 1rem;
    }

    .contact-info-card {
        padding: 1rem;
    }

    .dept-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .dept-icon {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        border-radius: 8px;
    }

    .form-group label {
        font-size: 0.82rem;
    }

    .input-wrap input {
        font-size: 0.85rem;
    }

    .checkbox-label {
        font-size: 0.82rem;
    }

    .faq-mini {
        padding: 1rem;
    }

    .faq-mini h4 {
        font-size: 0.9rem;
    }

    .faq-mini p {
        font-size: 0.8rem;
    }

    .trust-row {
        flex-direction: column;
    }

    .trust-item {
        min-width: unset;
        width: 100%;
    }
}
