/**
 * BAHO Contact Form - Professional Two-Card Layout
 * Version: 2.0
 */

/* ===== RESET & BASE ===== */
.baho-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.baho-wrapper {
    width: 100%;
    background: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}

/* ===== MAIN CONTAINER - 80% WIDTH ===== */
.baho-container {
    max-width: 1200px;
    width: 80%;
    margin: 0 auto;
    padding: 40px 0;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    align-items: stretch; /* CRITICAL: Ensures both cards stretch to same height */
}

/* ===== CARDS - PERFECTLY ALIGNED ===== */
.baho-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%; /* Ensures full height */
    display: flex;
    flex-direction: column;
}

/* ===== CONTACT CARD (LEFT) ===== */
.contact-card {
    background: linear-gradient(145deg, #1a472a, #2d5a27);
    color: white;
    border: none;
}

.contact-card .card-head {
    padding: 30px 30px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-card .card-head i {
    font-size: 28px;
    background: rgba(255, 255, 255, 0.15);
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.contact-card .card-head h2 {
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.contact-card .card-sub {
    padding: 15px 30px 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.5;
}

/* Contact List */
.contact-list {
    padding: 15px 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.contact-row {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: all 0.3s ease;
    min-width: 0; /* CRITICAL for text wrapping */
}

.contact-row:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.row-icon {
    background: rgba(255, 255, 255, 0.15);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.row-content {
    flex: 1;
    min-width: 0; /* CRITICAL for text wrapping */
}

.row-content h4 {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
}

.row-content p {
    font-size: 17px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* FIX FOR EMAIL OVERFLOW */
.row-content .email-fix {
    word-break: break-all !important;
    font-size: 16px;
}

.row-content a {
    color: white;
    text-decoration: none;
    word-break: break-all;
    transition: opacity 0.2s;
}

.row-content a:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.row-content span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
}

/* Social Box */
.social-box {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: auto;
}

.social-box h5 {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.social-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

/* Card Note */
.card-note {
    padding: 15px 30px 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-note i {
    color: #fbbf24;
    font-size: 18px;
    margin-top: 2px;
}

/* ===== FORM CARD (RIGHT) - PERFECTLY ALIGNED ===== */
.form-card {
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%; /* Matches left card height */
}

.form-card .card-head {
    padding: 30px 30px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid #f0f4f8;
}

.form-card .card-head i {
    font-size: 28px;
    background: #e8f0e8;
    color: #1a472a;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.form-card .card-head h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
}

.form-card .card-sub {
    padding: 15px 30px 10px;
    color: #5a6a7a;
    font-size: 15px;
}

/* Form Container */
.baho-form {
    padding: 10px 30px 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* UNIFORM FIELD SIZES - ALL SAME HEIGHT & STYLE */
.field-group {
    margin-bottom: 0;
    width: 100%;
}

.field-group.full {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.field-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

.field-group label i {
    color: #1a472a;
    width: 18px;
}

/* UNIFORM FIELD STYLING */
.uniform-field {
    width: 100%;
    height: 52px; /* UNIFORM HEIGHT for all inputs and selects */
    padding: 0 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8fafc;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.uniform-field:focus {
    outline: none;
    border-color: #1a472a;
    background: white;
    box-shadow: 0 0 0 4px rgba(26,71,42,0.1);
}

.uniform-field:hover {
    border-color: #94a3b8;
    background: white;
}

/* SELECT field - match height */
select.uniform-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

/* MESSAGE FIELD - taller but same styling base */
.message-field {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8fafc;
    transition: all 0.2s ease;
    font-family: inherit;
    resize: vertical;
    min-height: 140px;
}

.message-field:focus {
    outline: none;
    border-color: #1a472a;
    background: white;
    box-shadow: 0 0 0 4px rgba(26,71,42,0.1);
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 13px;
    color: #6b7a8a;
    margin-top: 6px;
}

.char-counter .count {
    font-weight: 600;
    color: #1a472a;
}

/* Security Box */
.security-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0 20px;
}

.security-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-weight: 500;
    color: #1e293b;
}

.security-head i {
    color: #1a472a;
    font-size: 18px;
}

.security-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.math-question {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    background: white;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.math-field {
    width: 120px;
    height: 52px; /* MATCHES uniform-field height */
    padding: 0 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    background: white;
}

.math-field:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 4px rgba(26,71,42,0.1);
}

/* Submit Button */
.send-btn {
    background: linear-gradient(135deg, #1a472a, #2d5a27);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 30px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(26,71,42,0.3);
    margin-top: 10px;
    position: relative;
    height: 58px;
}

.send-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(26,71,42,0.4);
}

.send-btn:active {
    transform: translateY(-1px);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: none;
}

.send-btn.loading .btn-text {
    opacity: 0;
}

.send-btn.loading .btn-loader {
    display: block;
    position: absolute;
}

/* Privacy Note */
.privacy-note {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #6b7a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.privacy-note i {
    color: #10b981;
}

/* ===== ERROR & STATUS ===== */
.error-msg {
    color: #dc2626;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 5px;
}

.error-msg.active {
    display: flex;
}

.error-msg:before {
    content: "⚠";
}

.math-error {
    margin-top: 10px;
}

.status-area {
    margin-bottom: 20px;
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ===== HONEYPOT ===== */
.honeypot {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ===== FOOTER ===== */
.baho-footer {
    text-align: center;
    padding: 20px 0 40px;
    font-size: 13px;
    color: #6b7a8a;
    width: 80%;
    margin: 0 auto;
}

.baho-footer a {
    color: #1a472a;
    text-decoration: none;
    font-weight: 600;
}

.baho-footer a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1100px) {
    .baho-container {
        width: 90%;
    }
}

@media (max-width: 900px) {
    .baho-container {
        grid-template-columns: 1fr;
        width: 95%;
        gap: 25px;
    }
    
    .baho-card {
        height: auto;
    }
}

@media (max-width: 600px) {
    .baho-container {
        width: 100%;
        padding: 20px 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-card .card-head,
    .form-card .card-head,
    .contact-list,
    .social-box,
    .card-note,
    .baho-form {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .card-head i {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .card-head h2 {
        font-size: 20px;
    }
    
    .contact-row {
        padding: 12px;
    }
    
    .row-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    
    .row-content p,
    .row-content .email-fix {
        font-size: 15px;
    }
    
    .security-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .math-field {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .social-group {
        justify-content: center;
    }
    
    .card-note {
        flex-direction: column;
        text-align: center;
    }
}


/* ===== COMPLETE FORM FIELDS FIX ===== */

/* Form container */
.baho-form {
    width: 100%;
    padding: 10px 30px 25px;
}

/* Form rows - equal columns */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr !important; /* Force equal columns */
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

/* Each field group - takes full column width */
.field-group {
    width: 100%;
    min-width: 0; /* Prevents flex/grid overflow */
}

/* Labels */
.field-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
}

.field-group label i {
    color: #1a472a;
    width: 18px;
    flex-shrink: 0;
}

/* UNIFORM FIELDS - ALL SAME WIDTH */
.uniform-field {
    width: 100% !important; /* Force full width */
    height: 52px;
    padding: 0 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8fafc;
    transition: all 0.2s ease;
    box-sizing: border-box; /* Include padding in width */
}

/* SELECT specific styling */
select.uniform-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
    cursor: pointer;
}

/* Focus states */
.uniform-field:focus,
select.uniform-field:focus {
    outline: none;
    border-color: #1a472a;
    background: white;
    box-shadow: 0 0 0 4px rgba(26,71,42,0.1);
}

/* Hover states */
.uniform-field:hover,
select.uniform-field:hover {
    border-color: #94a3b8;
    background: white;
}

/* Responsive fix for mobile */
@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr !important; /* Stack on mobile */
        gap: 15px;
    }
    
    .uniform-field {
        height: 48px; /* Slightly smaller on mobile */
    }
}

/* Fix for very small screens */
@media (max-width: 400px) {
    .field-group label {
        white-space: normal; /* Allow label to wrap if needed */
    }
}

/* Alternative flexbox approach */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.form-row .field-group {
    flex: 1; /* Each takes equal space */
    min-width: 0; /* Prevents overflow */
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
}

/* ===== STATUS MESSAGES - FIXED ===== */
.status-area {
    margin-bottom: 25px;
    width: 100%;
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-left: 5px solid #22c55e;
    color: #166534;
}

.alert-success i {
    color: #22c55e;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 5px solid #ef4444;
    color: #991b1b;
}

.alert-error i {
    color: #ef4444;
}

/* Success animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-pulse {
    animation: successPulse 0.5s ease;
}