/* ================================================
   contact.css
   Styles for the Contact section, form fields,
   phone row, field errors, and success popup.
================================================ */


/* ------------------------------------------------
   Section layout
------------------------------------------------ */

.contact {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.contact-wrapper {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 80px;
}

.contact-info,
.contact-form {
    flex: 1;
}


/* ------------------------------------------------
   Left info panel
------------------------------------------------ */

.contact-info h2 {
    font-size: 52px;
    color: #BC5E38;
    margin-bottom: 15px;
}

.line {
    width: 80px;
    height: 5px;
    background: #BC5E38;
    border-radius: 50px;
    margin-bottom: 25px;
}

.contact-description {
    font-size: 20px;
    color: #666;
    line-height: 1.8;
    max-width: 450px;
    text-align: justify;
    margin-bottom: 35px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
}

.info-item .icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #BC5E38;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(188, 94, 56, .25);
}

.info-item h4 {
    font-size: 24px;
    color: #222;
    margin-bottom: 3px;
}

.info-item span {
    color: #666;
    font-size: 17px;
}

.info-item a {
    color: inherit;
    text-decoration: none;
    transition: color .3s;
}

.info-item a:hover {
    color: #BC5E38;
    text-decoration: underline;
}


/* ------------------------------------------------
   Form card
------------------------------------------------ */

.contact-form {
    max-width: 550px;
    background: #fff;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .08);
}

.contact-form h3 {
    color: #BC5E38;
    font-size: 32px;
    margin-bottom: 25px;
}


/* ------------------------------------------------
   Base input / select / textarea
------------------------------------------------ */

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    height: 58px;
    padding: 0 20px;
    margin-bottom: 18px;
    border: 1px solid #ddd;
    border-radius: 14px;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    transition: border-color .3s, box-shadow .3s;
    appearance: none;
    -webkit-appearance: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: #BC5E38;
    box-shadow: 0 0 0 3px rgba(188, 94, 56, .12);
}

.contact-form textarea {
    height: 160px;
    padding: 16px 20px;
    resize: none;
}

/* Arrow indicator for selects */
.contact-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5L8 12l6.5-6.5' stroke='%23666' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.contact-form .is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .1) !important;
}


/* ------------------------------------------------
   Name row  (first / last side by side)
------------------------------------------------ */

.name-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.name-row input {
    flex: 1;
}


/* ------------------------------------------------
   Phone row  (country code LEFT, number RIGHT)
   — same order on all screen sizes
------------------------------------------------ */

.phone-row {
    display: flex;
    flex-direction: row;   /* country code always on the left */
    gap: .75rem;
    margin-bottom: 18px;
    align-items: stretch;
}

/* Country-code select — override the generic select arrow */
#countryCode {
    width: 155px;
    flex-shrink: 0;
    height: 58px;
    padding: 0 10px 0 14px;
    margin-bottom: 0;
    border: 1px solid #ddd;
    border-radius: 14px;
    outline: none;
    font-size: 15px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5L8 12l6.5-6.5' stroke='%23666' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color .3s, box-shadow .3s;
    appearance: none;
    -webkit-appearance: none;
}

#countryCode:focus {
    border-color: #BC5E38;
    box-shadow: 0 0 0 3px rgba(188, 94, 56, .12);
}

/* Phone number input */
#phoneNumber {
    flex: 1;
    height: 58px;
    margin-bottom: 0;
    box-sizing: border-box;
}


/* ------------------------------------------------
   Field-level validation messages
------------------------------------------------ */

.field-error {
    display: none;
    color: #dc3545;
    font-size: 0.8em;
    margin-top: -14px;
    margin-bottom: 10px;
    padding-left: 4px;
}

.field-error.visible {
    display: block;
}


/* ------------------------------------------------
   Character counter
------------------------------------------------ */

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #888;
    margin-top: -10px;
    margin-bottom: 15px;
}


/* ------------------------------------------------
   Submit button
------------------------------------------------ */

#btn {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #BC5E38, #A14F2E);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: transform .3s, box-shadow .3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 12px 24px rgba(188, 94, 56, .25);
    margin-top: 4px;
}

#btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(188, 94, 56, .35);
}

#btn:disabled {
    opacity: .75;
    cursor: not-allowed;
    transform: none;
}

#btnText {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ------------------------------------------------
   Success popup
------------------------------------------------ */

#successPopup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#successPopup.show {
    display: flex;
}

.success-popup-box {
    background: #fff;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    animation: popIn .35s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes popIn {
    from { transform: scale(.7); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

.success-popup-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #BC5E38, #A14F2E);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(188, 94, 56, .35);
}

.success-popup-box h3 {
    color: #212529;
    font-size: 1.6rem;
    margin-bottom: .5rem;
}

.success-popup-box p {
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.success-popup-close {
    display: inline-block;
    padding: .75rem 2.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #BC5E38, #A14F2E);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    width: auto;
    height: auto;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 8px 20px rgba(188, 94, 56, .3);
}

.success-popup-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(188, 94, 56, .4);
}


/* ------------------------------------------------
   Responsive
------------------------------------------------ */

@media (max-width: 1100px) {
    .contact-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .info-item {
        justify-content: center;
    }

    .contact-form {
        width: 100%;
        max-width: 100%;
    }

    .contact-info h2 {
        font-size: 42px;
    }

    .line {
        margin: 0 auto 25px;
    }
}

@media (max-width: 768px) {
    .contact-info h2 {
        font-size: 34px;
    }

    .contact-form {
        padding: 25px;
    }
}

@media (max-width: 576px) {
    .name-row {
        flex-direction: column;
        gap: 0;
    }

    /* country code stays LEFT, just narrower */
    #countryCode {
        width: 130px;
    }
}
