@import 'hero_contact.css';

/* ================================
   Contact Section
   ================================ */
.contact{
  background-color:var(--white);
}


/* ---- Icon Container ---- */
.contact .icon-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
  gap: 2rem;
  padding: 1rem;
  width: 100%;
}

.contact .icon-container .icons {
  display: flex;               /* make <i> a flex container */
  flex-direction: column;
  justify-content: flex-start;    /* center icon horizontally */
  align-items: center;         /* center icon vertically */
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--border-on-primary-light);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-on-primary-light-focus);
  background-color: var(--white);
  transition: transform 0.3s ease;
}
.contact .icon-container .icons:hover {
  transform: translateY(-5px);
}

.contact .icon-container .icons i {
  width: clamp(4rem, 5vw, 8rem);   /* bigger min, preferred, max */
  font-size: clamp(1.5rem, 1.7vw, 2.5rem); /* scale icon with circle */
  aspect-ratio: 1 / 1;              /* keeps it square */
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-500);
  background: var(--primary-100);
  border-radius: 50%;
}

.contact .icon-container .icons h5 {
  margin-top: 1rem;
  color: var(--primary-600);
}

.contact .icon-container .icons .numbers a {
 display: block;
 text-decoration: none;
 color: var(--text-on-secondary);
 margin: 0.2rem 0;
 border-left: 4px solid var(--border-on-primary-light);
 padding-left: 1rem;       /* spacing after border */
}

.contact .icon-container .icons .email {
  border-left: 4px solid var(--border-on-primary-light);
  padding-left: 1rem;
}

.contact .icon-container .icons .email a {
  color: var(--text-on-secondary);   /* your custom color */
  font-weight: 400;
}


.contact .icon-container .icons .address {
  align-self: flex-start;      /* keep it left-aligned */
  text-align: left;
  margin-top: 0.5rem;
  font-style: normal;          /* override italic from <address> */
  color: var(--text-on-secondary);
  font-weight: 400;
  line-height: 1.6;            /* better readability */
  border-left: 4px solid var(--border-on-primary-light);
  padding-left: 0.75rem;       /* spacing after border */
}

/* ---- Map + Form Row ---- */
.contact .map-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
  gap: 2rem;
  padding: 1rem;
  margin-top: 2rem;
  width: 100%;
  align-items: stretch; /* <-- ensures grid items stretch to same height */
}

/* ---- Map Container ---- */
.contact .map-row .map-container {
  display: flex;
  flex-direction: column;       /* Stack image + map vertically */
  justify-content: center; /* Stretch items vertically with space in between */
  align-items: center;          /* Center horizontally */
  row-gap: 2rem;                /* Gap between image and map */
  padding: 2rem;
  overflow: hidden;
  border: 1px solid var(--border-on-primary-light);
  box-shadow: var(--shadow-on-primary-light-focus);
  border-radius: 0.5rem;
  background: var(--bg-primary-vlight);
  transition: all 0.3s ease-in-out;
  height: 100%;                 /* Fill full height of grid item */
}

/* ---- Form ---- */
.contact .map-row .form-div {
  display: flex;
  flex-direction: column;      /* Stack form fields */
  justify-content: flex-start;
  align-items: stretch;
  padding: 2rem;
  border: 1px solid var(--border-on-primary-light);
  box-shadow: var(--shadow-on-primary-light-focus);
  border-radius: 0.5rem;
  background: var(--bg-primary-vlight);
  transition: all 0.3s ease-in-out;
}

/* ---- Map Image ---- */
.contact .map-row .map-container img {
  width: 100%;
  height: auto;               /* Maintain aspect ratio naturally */
  object-fit: contain;        /* Keep proportions */
  display: block;
}

/* ---- Embedded Map ---- */
.contact .map-row .map-container .map {
  width: 100%;
  aspect-ratio: 1 / 1;        /* Keeps iframe square */
  border: none;
  overflow: hidden;
  border-radius: 0.5rem;
}

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



.contact .map-row .form-div h4 {
  text-decoration: underline;
  text-underline-offset: 6px;
  color: var(--primary-600);
  text-align: center;
  margin-bottom: 2rem;
}

/* Form fields */
.contact .map-row .form-div form {
  width: 100%;
}
.contact .map-row .form-div form .field {
  margin: 1rem 0; /* only vertical margin, remove horizontal */
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 0.5rem;
  /* background-color: var(--bg-primary-light); */
  padding: 0.5rem 1rem;
  box-sizing: border-box;
}
.contact .map-row .form-div form .field .field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: clamp(1rem, 1.5rem + 0.2vw, 2rem);
  color: var(--text-on-secondary);
}

.contact .map-row .form-div form .field input,
.contact .map-row .form-div form .field textarea{
  width: 100%;
  box-sizing: border-box; /* includes padding in 100% width */
  background-color: var(--white);
  border: 1px solid rgba(255,100,20,0.2);
  border-radius: 0.5rem;
  padding: 1rem 1rem;
  color: var(--text-on-primary-light);
  display: block; /* make sure it behaves like a block element */
  font-size: clamp(1rem, 1.4rem + 0.1vw, 2rem);
}

/* Remove gray/yellow autofill background */
/* Autofill styling for modern browsers */
.contact .map-row .form-div form .field input:-webkit-autofill,
.contact .map-row .form-div form .field textarea:-webkit-autofill {
  box-shadow: 0 0 0 1000px var(--white) inset !important; /* background */
  -webkit-text-fill-color: var(--text-on-primary-light) !important; /* text color */
  caret-color: var(--text-on-primary-light); /* cursor color */
  font-size: clamp(1rem, 1.4rem + 0.1vw, 2rem);
  transition: background-color 5000s ease-in-out 0s; /* prevents browser yellow flash */
}

.contact .map-row .form-div form .field textarea {
  height: 8rem;        /* adjust to taste */
  resize: vertical;    /* user can drag to resize vertically */
}
  .contact .map-row .form-div form .field input:focus,
  .contact .map-row .form-div form .field textarea:focus {
    background-color: var(--bg-primary-vlight); /* same as normal */
    outline: none; /* removes browser default glow */
    box-shadow:var(--shadow-on-primary-light-focus); /* optional custom glow */
  }

.contact .map-row .form-div form .field .field-box .custom-select {
    border: none;            /* remove border */
    outline: none;           /* remove focus outline */
    box-shadow: none;        /* remove glow on focus */
    appearance: none;        /* remove default arrow in some browsers */
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255,100,20,0.2);
    border-radius: 0.5rem;
    color: var(--text-on-primary-light);
    background-color: var(--white);
    cursor: pointer;
    font-size: clamp(1rem, 1.4rem + 0.1vw, 2rem);
  }


.contact .map-row .form-div form .field .field-box .custom-select:focus {
    border-color: var(--border-on-primary-light);
    color: var(--text-on-primary-vlight);
    outline: none;
  }


.contact .map-row .form-div form .field .input-box-mgs {
  height: 10rem;
  resize: vertical;
}
.contact .map-row .form-div form .field .errorlist {
  margin-top: 0.3rem;
  color: var(--color-error);
}

/* Focus styles */
.contact .map-row .form-div form input:focus,
.contact .map-row .form-div form textarea:focus {
  border-color: var(--primary-400);
  outline: none;
  background: var(--primary-100);
}


/* ---- Professional Success Message (Orange Theme) ---- */
.contact .map-row .form-div .success {
  position: absolute;
  top: 14rem; left: 0;right: 0;
  margin: auto;
  max-width: 50rem;
  min-height: 20rem;
  padding: 2.5rem 2.5rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, var(--primary-50), var(--white));
  box-shadow: 0 10px 25px rgba(255, 100, 20, 0.25), 0 4px 12px rgba(0,0,0,0.1);
  backdrop-filter: blur(1.5rem);
  border: 1px solid var(--primary-500);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 1; /* visible by default */
  transform: translateY(0); /* no initial offset */
  z-index: 900;
  color: var(--primary-700);
}

/* Typography */
.contact .map-row .form-div .success h4 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-800);
  text-decoration: none !important;
}


/* Modern Circular Close Button */
.contact .map-row .form-div .success .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--primary-500);
  color: var(--white);
  width: 4rem;
  height: 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: 600;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(250, 85, 0, 0.4);
  transition: all 0.3s ease;
}

.contact .map-row .form-div .success .close-btn:hover {
  background-color: var(--white);
  color: var(--text-on-primary-light);
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 8px 24px rgba(250, 100, 20, 0.4);
}



/* ------------------------------
   Responsive Media Queries
   ------------------------------ */
   /* Laptop: <= 1440px */
   @media (max-width: 1440px) {

   }
   /* Tablet: <= 1024px */
   @media (max-width: 1024px) {
     .contact .map-row {
       grid-template-columns: 1fr; /* Single column */
       justify-items: center;       /* Center grid items horizontally */
     }

     .contact .map-row .map-container,
     .contact .map-row .form-div {
       width: 100%;                  /* Slight horizontal padding from edges */
       padding: 1.5rem;             /* Reduce padding slightly */
     }



     .contact .map-row .map-container .map {
       width: 100%;
       aspect-ratio: 1 / 1;          /* Let iframe adjust naturally */
     }

     .contact .map-row .map-container img {
       width: 100%;                 /* Ensure it scales with container */
       height: auto;                /* Maintain aspect ratio */
     }

     .contact .map-row .form-div .success {
       max-width: 85%;
      }
 }


   /* Mobile: <= 768px */
   @media (max-width: 768px) {

   }

   /* Small / Extra Small: <= 500px */
   @media (max-width: 500px) {

   }
