/* ==========================================================================
   1. GLOBAL STYLES (Directly from your Index CSS)
   ========================================================================== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   2. HEADER & NAVIGATION STYLES (Directly from your Index CSS)
   ========================================================================== */
header {
  background: #234b6d;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 16px;
  transition: opacity 0.2s ease;
}

nav a:hover {
  opacity: 0.85;
}

/* ==========================================================================
   3. STRUCTURAL CONTENT WRAPPER
   ========================================================================== */
.wrap {
  max-width: 1100px;
  margin: auto;
  padding: 40px 20px;
  flex: 1; /* Pushes footer dynamically to the bottom of the viewport */
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ==========================================================================
   4. ESTIMATE CARD & COMPONENT STYLES
   ========================================================================== */
.estimate-card {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* Matches your .card shadow */
  width: 100%;
  max-width: 500px;
}

.estimate-card h1 {
  margin-top: 0;
  margin-bottom: 6px;
  color: #234b6d; /* Unifies header branding color with title text */
  font-size: 24px;
}

.form-note {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
}

/* Unified input structure following your exact format variables */
form input, form select, form textarea {
  width: 100%;
  padding: 11px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

form textarea {
  min-height: 110px;
  resize: vertical;
}

/* Cleaner custom arrow override for your form dropdown menus */
form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://w3.org' viewBox='0 0 24 24' fill='none' stroke='%23333333' 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 12px center;
  background-size: 14px;
  padding-right: 35px;
}

/* Subtle accent focus states when active */
form input:focus, form select:focus, form textarea:focus {
  border-color: #234b6d;
  box-shadow: 0 0 0 3px rgba(35, 75, 109, 0.15);
}

/* Submit Button inheriting your exact brand green (.btn) styles */
button[type="submit"] {
  background: #2e7d32;
  color: #fff;
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  width: 100%;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.2s ease;
}

button[type="submit"]:hover {
  background: #1b5e20; /* Slightly darker green variant for high contrast hover */
}

button[type="submit"]:disabled {
  background: #cccccc;
  color: #777777;
  cursor: not-allowed;
}

/* ==========================================================================
   5. RESPONSE NOTIFICATION SYSTEM (Success vs Error)
   ========================================================================== */
#status {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
  display: none; /* Controlled via JS */
  font-weight: bold;
}

#status.success-alert {
  display: block;
  color: #1b5e20;
  background: #e8f5e9;
  border: 1px solid rgba(46, 125, 50, 0.2);
}

#status.error-alert {
  display: block;
  color: #c62828;
  background: #ffebee;
  border: 1px solid rgba(198, 40, 40, 0.2);
}

/* ==========================================================================
   6. FOOTER STYLES (Directly from your Index CSS)
   ========================================================================== */
footer {
  background: #234b6d;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: auto; /* Keeps footer pinned down when data lengths shrink */
}

/* ==========================================================================
   7. MOBILE RESPONSIVENESS OVERRIDES
   ========================================================================== */
@media (max-width: 480px) {
  nav {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 14px 10px;
  }

  nav a {
    margin: 0 8px;
    font-size: 14px;
  }

  .wrap {
    padding: 20px 12px;
  }

  .estimate-card, .card {
    padding: 20px 15px;
    border-radius: 6px;
  }

  .estimate-card h1 {
    font-size: 20px;
  }

  form input, form select, form textarea {
    padding: 9px;
    font-size: 14px;
  }

  button[type="submit"] {
    padding: 10px 16px;
    font-size: 15px;
  }
}

/* ==========================================================================
   CONTACT PAGE MULTI-COLUMN DESIGN LAYOUT
   ========================================================================== */
.contact-layout {
  display: flex;
  gap: 40px;
  width: 100%;
  max-width: 1000px;
  align-items: flex-start;
}

.contact-info-panel {
  flex: 1;
  padding: 10px;
}

.contact-info-panel h2 {
  color: #234b6d;
  font-size: 28px;
  margin-bottom: 12px;
}

.panel-intro {
  color: #555;
  margin-bottom: 24px;
  font-size: 15px;
}

.info-group {
  margin-bottom: 20px;
}

.info-group h3 {
  font-size: 16px;
  color: #234b6d;
  margin-bottom: 4px;
}

.info-group p {
  margin: 0;
  font-size: 15px;
  color: #444;
}

/* Clear touch-friendly phone and email links */
.contact-link {
  color: #2e7d32; /* Inherits your brand green color parameter */
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: #1b5e20;
  text-decoration: underline;
}

/* ==========================================================================
   MOBILE SCREEN RESPONSIVE FLEX REVERSAL
   ========================================================================== */
@media (max-width: 768px) {
  .contact-layout {
    flex-direction: column; /* Stack columns vertically on tablets/mobiles */
    gap: 30px;
  }

  .contact-info-panel {
    order: 2; /* Form moves to top position on mobile screens for better UX */
    text-align: center;
  }
}

/* ==========================================================================
   ACTIVE NAVIGATION LINK HIGHLIGHTS
   ========================================================================== */
nav a.active {
  color: #fff;               /* Overrides text base default colors */
  background: #2f5f87;       /* Uses your brand mid-blue hero accent color block */
  padding: 6px 12px;         /* Adds smooth spatial breathing room surrounding label text */
  border-radius: 4px;        /* Matches your smooth corner layout configurations */
  font-weight: bold;         /* Adds high visual contrast indicators */
  pointer-events: none;      /* Prevents user click reloads since they are already on the page */
}

/* Ensure mobile screens preserve spacing balance */
@media (max-width: 480px) {
  nav a.active {
    padding: 4px 8px;
    font-size: 14px;
  }
}
