* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
 
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  background: #ffffff;
}
  
/* ================= contact-hero SECTION ================= */
.contact-hero{
  position:relative;
  height:320px;
  border-radius:20px;
  margin:10px;
  overflow:hidden;
  display:flex;
  align-items:flex-end;
  margin-bottom: 25px;
  background:url('../images/factory_machinery.png') center/cover no-repeat;
}

.contact-hero::before{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(
    to right,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.55) 40%,
    rgba(0,0,0,0.2) 100%
  );
}

.contact-hero-content{
  position:relative;
  z-index:2;
  width:100%;
  max-width:none;
  padding:0 40px;
  display:flex;
  align-items:flex-end;
  gap:40px;
}

.contact-hero h1{
  font-size:84px;
  font-weight:800;
  color:#fff;
  font-style: italic;
  margin-bottom: 10px;
  letter-spacing:1px;
  white-space:nowrap;
}

.contact-hero p{
  font-size:18px;
  color:rgba(255,255,255,0.85);
  line-height:1.4;
  max-width:420px;
  margin-bottom:40px;
}

/* ================= CONTACT FORM ================= */
.contact-form-section {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
 
.contact-form-section h2 {
  font-size: 32px;
  margin-bottom: 35px;
  color: #076FD2;
  font-style: italic;
}
 
.form-group {
  margin-bottom: 25px;
}
 
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #076FD2;
  font-style: italic;
}
 
.form-group label .required {
  color: #e53e3e;
  margin-left: 3px;
}
 
.form-group input,
.form-group select,
.form-group textarea{
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s;
  background: white;
  cursor: text; /* FIX cursor */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  border-color:#076FD2;
  font-style: italic;
  box-shadow:0 0 0 3px rgba(7,111,210,0.15);
}
 
.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

/* ===== FORM LAYOUT ===== */
#contactForm{
  display:grid;
  grid-template-columns:1fr 1fr;
  column-gap:20px;
}

#contactForm .form-group:nth-child(1),
#contactForm .form-group:nth-child(2),
#contactForm .form-group:nth-child(3),
#contactForm .form-group:nth-child(4){
  grid-column:1;
}

#contactForm .form-group:nth-child(5){
  grid-column:2;
  grid-row:1;
}

#contactForm .form-group:nth-child(6){
  grid-column:2;
  grid-row:2 / span 3;
}

/* BUTTON BELOW MESSAGE */
.submit-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:7px 9px 7px 20px;
  border-radius:40px;
  background:#076FD2;
  color:white;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  overflow:hidden;
  border:none;
  transition:background 0.3s, gap 0.3s;

  grid-column:2;     /* move to right column */
  grid-row:5;        /* place below message */
  margin-top:15px;
}
/* ===== FIX BUTTON POSITION + WIDTH ===== */

/* keep button in right column beside organization */


.form-actions{
  grid-column:2;
  grid-row:4;
  display:flex;
  align-items:center;
  gap:20px;
}

.submit-btn{
  width:auto;
}

#successMessage{
  width:auto;
  margin:0;
}
/* ensure it aligns properly under message */
#contactForm .form-group:nth-child(6){
  grid-column:2;
  grid-row:2 / span 3;
}

/* keep success message full width */

.submit-btn:hover{
  background:#0658A9;
  gap:16px;
  font-style: italic;
}

.submit-btn .btn-text{
  position:relative;
  overflow:hidden;
  height:1.2em;
  display:flex;
  flex-direction:column;
}

.submit-btn .btn-text span{
  display:block;
  line-height:1.2em;
  transition:transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-btn .btn-text span:last-child{
  position:absolute;
  top:100%;
  left:0;
}

.submit-btn:hover .btn-text span:first-child{
  transform:translateY(-100%);
}

.submit-btn:hover .btn-text span:last-child{
  transform:translateY(-100%);
}

.submit-btn i {
  width:64px;
  height:34px;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  flex-shrink:0;
  transform:rotate(-45deg);
  transition:transform 0.3s ease, background 0.3s;
}

.submit-btn:hover i{
  transform:rotate(0deg);
}

.success-message{
  display:none;
  background:#e6f4ea;
  color:#1e7e34;
  padding:12px 16px;
  border-radius:10px;
  margin-bottom:10px;
  margin-top:20px; 
  font-size:14px;
  align-items:center;
  gap:8px;
}

.success-message.show{
  display:flex;
}

#successMessage{
  grid-column:1 / -1;
}

/* ================= CORPORATE OFFICES ================= */
.corporate-offices {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
 
.corporate-offices h2 {
  font-size: 32px;
  margin-bottom: 35px;
  color: #076fd2;
  font-style: italic;
}
 
.office-card {
  margin-bottom: 0px;
   padding-left:100px;
}
 
.office-card:last-child {
  margin-bottom: 0;
}
 
.office-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #076fd2;
  font-style: italic;
}
 
.office-card p {
  font-size: 14px;
  color: #555;
  margin-bottom: 5px;
  line-height: 1.7;
}
 
.map-container {
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  height: 280px;
  width: 480px;
  position: relative;
  background: #f0f0f0;
}
 
.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.open-maps-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: white;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #0066cc;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 10;
  transition: all 0.3s;
}
 
.open-maps-btn:hover {
  background: #0066cc;
  color: white;
}
.offices-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:30px;
}

/* force maps to next row */
.offices-grid .office-card:nth-child(3),
.offices-grid .office-card:nth-child(4){
  grid-row:2;
}

.office-contact-info{
  margin-top: 20px;
}
/* ================= RESPONSIVE ================= */
@media (max-width:768px){
  #contactForm{
    grid-template-columns:1fr;
  }

  #contactForm .form-group{
    grid-column:1 !important;
    grid-row:auto !important;
  }

  .submit-btn{
    grid-column:1;
  }
}

/* ================= RESPONSIVE — MOBILE ONLY (appended, no existing code changed) ================= */
@media (max-width: 768px) {

  /* Hero */
  .contact-hero {
    height: 220px;
    margin: 8px;
    border-radius: 14px;
  }

  .contact-hero-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 0 20px;
  }

  .contact-hero h1 {
    font-size: 40px;
    white-space: normal;
    margin-bottom: 4px;
  }

  .contact-hero p {
    font-size: 14px;
    max-width: 100%;
    margin-bottom: 20px;
  }

  /* Contact form section */
  .contact-form-section {
    padding: 28px 16px;
  }

  .contact-form-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
  }

  /* Form grid → single column (overrides the 2-col grid) */
  #contactForm {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  #contactForm .form-group:nth-child(1),
  #contactForm .form-group:nth-child(2),
  #contactForm .form-group:nth-child(3),
  #contactForm .form-group:nth-child(4),
  #contactForm .form-group:nth-child(5),
  #contactForm .form-group:nth-child(6) {
    grid-column: 1;
    grid-row: auto;
  }

  .submit-btn {
    grid-column: 1;
    grid-row: auto;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
  }

  .form-actions {
    grid-column: 1;
    grid-row: auto;
    flex-direction: column;
    align-items: flex-start;
  }

  /* Offices grid → single column */
  .offices-grid {
    grid-template-columns: 1fr;
  }

  .offices-grid .office-card:nth-child(3),
  .offices-grid .office-card:nth-child(4) {
    grid-row: auto;
  }

  .office-card {
    padding-left: 0;
  }

  .corporate-offices {
    padding: 20px 16px;
  }

  .corporate-offices h2 {
    font-size: 24px;
    margin-bottom: 20px;
  }

  /* Map */
  .map-container {
    width: 100%;
    height: 220px;
  }
}

@media (max-width: 480px) {

  .contact-hero h1 {
    font-size: 30px;
  }

  .contact-hero {
    height: 190px;
  }
}