/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== BASIC STYLE RESET ===== */
.contact * {
    box-sizing: border-box;
}

.contact {
    padding: 80px 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.contact h2 {
    text-align: left;
    margin-bottom: 30px;
    font-size: 1.8em;
    color: #07a59d;
    font-weight: 500;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.3;
    max-width: 1200px; 
    margin-left: auto; 
    margin-right: auto; 
    padding: 0 20px; 
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box; 
}

.contact-info {
    flex: 1;
    min-width: 300px;
    max-width: calc(50% - 25px);
}

.contact-info h3 {
    color: black;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.4em;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
    line-height: 1.4;
}

.contact-info p {
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.6;
    color: grey;
    font-size: 1em;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
}

/* Adjust the spacing between phone, fax, and email */
.contact-info p:nth-child(4), /* Phone */
.contact-info p:nth-child(5), /* Fax */
.contact-info p:nth-child(6) { /* Email */
    margin-bottom: -5px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background: transparent;
    padding: 0;
    margin-top: 10px;
    max-width: calc(50% - 25px); 
}

.contact-form h3 {
    color: black;
    margin-bottom: 15px;
    font-size: 1.4em;
    margin-top: 10px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 1em;
    color: black;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.4;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid grey;
    background: transparent;
    border-radius: 0;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s ease;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.4;
    font-weight: 400;
    color: black;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: #0c8cc4;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: black;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 400;
    opacity: 0.7;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
    line-height: 1.4;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
}

button[type="submit"] {
    background: white;
    color: black;
    padding: 12px 25px;
    border: 2px solid #0c8cc4; 
    border-radius: 30px;
    font-size: 0.9em;
    cursor: pointer;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: block;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
    min-height: 44px;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    background: #0c8cc4;
    color: white;  
}

.g-recaptcha {
    margin: 20px 0;
    display: flex;
    justify-content: left;
}

/* ===== PHONE NUMBER INPUT STYLING ===== */
.iti {
    width: 100%;
    position: relative;
    display: block !important;
}

.iti input {
    width: 100% !important;
    padding: 12px 50px 12px 0 !important;
    border: none !important;
    border-bottom: 1px solid grey !important;
    background: transparent !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 16px !important;
    color: black !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    border-radius: 0 !important;
}

.iti input:focus {
    outline: none !important;
    border-bottom-color: #0c8cc4 !important;
}

.iti input::placeholder {
    color: black !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    opacity: 0.7 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

/* Flag container style */
.iti__flag-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    padding: 0;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

.iti__selected-dial-code {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: black;
}

.iti__arrow {
    margin-left: 6px;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid #555;
}

/* Dropdown list style */
.iti__country-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
}

.iti__country {
    padding: 8px 10px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.iti__country-name, .iti__dial-code {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
}

.iti__country:hover, .iti__country.highlight {
    background-color: #f5f5f5;
}

.iti--separate-dial-code .iti__tel-input {
    padding-left: 80px;
}

.iti input {
    padding-left: 100px !important;
}

.iti__flag-container, 
.iti__selected-flag, 
.iti input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.iti input {
    border-bottom: 1px solid grey !important;
}

.iti input:focus {
    border-bottom: 1px solid #0c8cc4 !important;
}

/* ===== FORM MESSAGE STYLING ===== */
.form-messages-top {
    width: 100%;
    margin-bottom: 20px;
}

.form-message {
    margin: 0;
    text-align: left;
    width: 100%;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.4;
    padding: 10px 0;
}

/* Note: The success and error message colors are defined inline in PHP */

/* ===== RESPONSIVE DESIGN: LAPTOP & TABLET (1024px and below) ===== */
@media screen and (max-width: 1024px) {
    .contact {
        padding: 60px 0;
    }
    
    .container {
        padding: 0 30px;
    }
    
    .contact-content {
        gap: 40px;
    }
    
    .contact h2 {
        font-size: 1.7em;
    }
}

/* ===== RESPONSIVE DESIGN: TABLET LANDSCAPE (900px and below) ===== */
@media screen and (max-width: 900px) {
    .contact {
        padding: 50px 0;
    }
    
    .contact-content {
        gap: 35px;
    }
    
    .contact h2 {
        font-size: 1.6em;
        margin-bottom: 25px;
    }
    
    .contact-info h3,
    .contact-form h3 {
        font-size: 1.3em;
    }
}

/* ===== RESPONSIVE DESIGN: TABLET PORTRAIT (768px and below) ===== */
@media screen and (max-width: 768px) {
    .contact {
        padding: 40px 0;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .contact h2 {
        text-align: center;
        font-size: 1.5em;
        margin-bottom: 30px;
    }
    
    .contact-content {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }
    
    .contact-info,
    .contact-form {
        flex: none;
        width: 100%;
        max-width: 500px;
        min-width: unset;
        text-align: center;
    }
    
    .contact-info h3 {
        text-align: center;
        font-size: 1.2em;
        margin-bottom: 0px;
    }
    
    .contact-form h3 {
        text-align: center;
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .contact-info p {
        text-align: center;
        font-size: 0.95em;
        line-height: 1.5;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group label {
        font-size: 0.95em;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 15px;
        padding: 11px 0;
    }
    
    .form-group input::placeholder,
    .form-group textarea::placeholder {
        font-size: 15px;
    }
    
    .iti input {
        font-size: 15px !important;
        padding: 11px 45px 11px 0 !important;
    }
    
    .iti input::placeholder {
        font-size: 15px !important;
    }
    
    .iti--separate-dial-code .iti__tel-input {
        padding-left: 75px;
    }
    
    .iti input {
        padding-left: 90px !important;
    }
    
    .iti__selected-dial-code {
        font-size: 15px;
    }
    
    button[type="submit"] {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .g-recaptcha {
        justify-content: center;
        margin: 20px auto;
    }
}

/* ===== RESPONSIVE DESIGN: MOBILE LANDSCAPE (640px and below) ===== */
@media screen and (max-width: 640px) {
    .contact {
        padding: 35px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .contact h2 {
        font-size: 1.4em;
    }
    
    .contact-info h3,
    .contact-form h3 {
        font-size: 1.15em;
    }
    
    .contact-info p {
        font-size: 0.9em;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 14px;
        padding: 10px 0;
    }
    
    .form-group input::placeholder,
    .form-group textarea::placeholder {
        font-size: 14px;
    }
    
    .iti input {
        font-size: 14px !important;
        padding: 10px 40px 10px 0 !important;
    }
    
    .iti input::placeholder {
        font-size: 14px !important;
    }
    
    .iti--separate-dial-code .iti__tel-input {
        padding-left: 70px;
    }
    
    .iti input {
        padding-left: 85px !important;
    }
    
    .iti__selected-dial-code {
        font-size: 14px;
    }
    
    button[type="submit"] {
        padding: 10px 20px;
        font-size: 0.85em;
    }
    
    .g-recaptcha {
        transform: scale(0.9);
        transform-origin: center;
    }
}

/* ===== RESPONSIVE DESIGN: MOBILE PORTRAIT (480px and below) ===== */
@media screen and (max-width: 480px) {
    .contact {
        padding: 30px 0 20px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .contact h2 {
        font-size: 1.3em;
        margin-bottom: 25px;
    }
    
    .contact-content {
        gap: 25px;
    }
    
    .contact-info h3 {
        font-size: 1.1em;
        margin-bottom: 0;
    }
    
    .contact-form h3 {
        font-size: 1.1em;
        margin-bottom: 12px;
    }
    
    .contact-info p {
        font-size: 0.85em;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 0.85em;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 13px;
        padding: 9px 0;
        min-height: 45px;
    }
    
    .form-group input::placeholder,
    .form-group textarea::placeholder {
        font-size: 13px;
    }
    
    .form-group textarea {
        min-height: 70px;
        max-height: 100px;
    }
    
    .iti input {
        font-size: 13px !important;
        padding: 9px 35px 9px 0 !important;
    }
    
    .iti input::placeholder {
        font-size: 13px !important;
    }
    
    .iti--separate-dial-code .iti__tel-input {
        padding-left: 65px;
    }
    
    .iti input {
        padding-left: 80px !important;
    }
    
    .iti__selected-dial-code {
        font-size: 13px;
    }
    
    button[type="submit"] {
        padding: 9px 18px;
        font-size: 0.8em;
        min-height: 42px;
    }
    
    .g-recaptcha {
        transform: scale(0.85);
    }
}

/* ===== RESPONSIVE DESIGN: SMALL MOBILE (360px and below) ===== */
@media screen and (max-width: 360px) {
    .contact {
        padding: 25px 0 15px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .contact h2 {
        font-size: 1.2em;
        margin-bottom: 20px;
    }
    
    .contact-info,
    .contact-form {
        padding: 0 5px;
    }
    
    .contact-info h3,
    .contact-form h3 {
        font-size: 1em;
    }
    
    .contact-info p {
        font-size: 0.8em;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 12px;
        padding: 8px 0;
        min-height: 40px;
    }
    
    .form-group input::placeholder,
    .form-group textarea::placeholder {
        font-size: 12px;
    }
    
    .iti input {
        font-size: 12px !important;
        padding: 8px 30px 8px 0 !important;
    }
    
    .iti input::placeholder {
        font-size: 12px !important;
    }
    
    .iti--separate-dial-code .iti__tel-input {
        padding-left: 60px;
    }
    
    .iti input {
        padding-left: 75px !important;
    }
    
    .iti__selected-dial-code {
        font-size: 12px;
    }
    
    button[type="submit"] {
        padding: 8px 15px;
        font-size: 0.75em;
        min-height: 40px;
    }
    
    .g-recaptcha {
        transform: scale(0.8);
    }
}

/* ===== RESPONSIVE DESIGN: EXTRA SMALL MOBILE (320px and below) ===== */
@media screen and (max-width: 320px) {
    .contact {
        padding: 20px 0 10px;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .g-recaptcha {
        transform: scale(0.75);
    }
}

/* ===== HIGH-DPI SCREEN OPTIMIZATION ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .contact {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .contact {
        padding: 20px 0;
    }
    
    button[type="submit"],
    .g-recaptcha {
        display: none;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    .form-group input,
    .form-group textarea,
    button[type="submit"] {
        transition: none;
    }
}