/* =========================
   1. Layout & Main Containers
   ========================= */

/* Main contact section background and padding */
.tmd-contact-section {
  padding: 9rem 1rem 4rem 1rem;
  box-sizing: border-box;
  position: relative;
  min-height: 80vh;
}

/* Flex container for form and sidebar */
.tmd-contact-container {
  display: flex;
  justify-content: space-between;
  gap: 3.5rem;
  width: 100%;
  max-width: 1050px;
  margin: 5rem auto 1.5rem auto;
  padding-left: 1.5rem;
  align-items: flex-start;
  position: relative;
}

/* Main form area (left side) */
.tmd-contact-main {
  flex: 2 1 480px;
  background: var(--tmd-primary);
  padding: 1.2rem 1.2rem 1.2rem 1.2rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Sidebar with contact info (right side) */
.tmd-contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--tmd-primary);
  padding: 4.5rem 1.2rem 1.2rem 1.2rem;
  min-width: 330px;
  /* Minimum width to ensure sidebar content remains readable */
  gap: 2.2rem;
}

/* =========================
   2. Typography & Headings
   ========================= */

/* Page title (large heading) */
.tmd-contact-title {
  font-size: var(--font-xl);
  font-weight: 700;
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
}

/* Page description (subtitle) */
.tmd-contact-desc {
  font-size: var(--font-md);
  margin-bottom: 1.5rem;
  max-width: 540px;
}

/* Sidebar block title */
.tmd-contact-info-title {
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--tmd-text);
}

/* Sidebar block description */
.tmd-contact-info-desc {
  font-size: var(--font-base);
  margin-bottom: 0.5rem;
}

/* Contact links (email, phone, etc.) */
.tmd-contact-link {
  color: var(--tmd-accent);
  /* font-weight: 500; */
  text-decoration: none;
  font-size: var(--font-base);
  display: flex;
  align-items: center;
  gap: 0.4em;
}

/* Contact link icon (SVG) */
.tmd-contact-link svg {
  vertical-align: middle;
  margin-inline-end: 0.4em;
  color: var(--tmd-accent);
  fill: var(--tmd-accent);
  stroke: var(--tmd-accent);
  transition: color 0.2s, fill 0.2s, stroke 0.2s;
}

/* Contact link icon hover/focus */
.tmd-contact-link:hover svg,
.tmd-contact-link:focus svg {
  color: #005bb5;
  fill: #005bb5;
  stroke: #005bb5;
}

/* Contact link hover/focus */
.tmd-contact-link:hover,
.tmd-contact-link:focus {
  color: #005bb5;
  text-decoration: underline;
}

/* =========================
   3. Form Structure & Fields
   ========================= */

/* Contact form layout */
.tmd-contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Form group wrapper */
.tmd-form-group {
  flex: 1 1 0;
  margin-bottom: 0.7rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Row for first/last name fields */
.tmd-contact-row {
  display: flex;
  gap: 0.5rem;
  border-radius: var(--tmd-radius);
}

/* Remove right border radius and overlap for first name input */
.tmd-contact-row>.tmd-form-group:first-child .tmd-form-input {
  border-top-right-radius: 0;
  margin-right: -1px;
}

/* Remove left border radius and overlap for last name input */
.tmd-contact-row>.tmd-form-group:last-child .tmd-form-input {
  border-top-left-radius: 0;
  margin-left: -1px;
}

/* Phone field group */
.tmd-form-group--phone {
  margin-bottom: 1rem;
}

/* Shared transition for form elements */
.tmd-form-input,
.tmd-contact-submit,
.tmd-contact-link {
  transition: border-color 0.2s ease, background-color 0.2s ease,
    color 0.2s ease;
}

/* Input fields */
.tmd-form-input {
  width: 100%;
  padding: 0.7rem 0.9rem 0.5rem 0.9rem;
  font-size: var(--font-base);
  border: 1.5px solid #e0e0e0;
  border-radius: var(--tmd-radius);
  background: rgba(245, 245, 247, 0.85);
  color: var(--tmd-text);
  outline: none;
  box-shadow: 0 1.5px 6px rgba(0, 0, 0, 0.02);
  margin-bottom: 0;
  box-sizing: border-box;
}

/* Input focus state */
.tmd-form-input:focus {
  border-color: var(--tmd-accent);
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 113, 227, 0.08);
  z-index: 1;
}

/* Input labels */
.tmd-form-label {
  position: static;
  display: block;
  margin-bottom: 0.35em;
  left: unset;
  top: unset;
  background: none;
  font-size: var(--font-sm);
  font-weight: 500;
  pointer-events: auto;
  padding: 0;
  z-index: auto;
  transition: none;
}

/* Phone input and country code select group */
.tmd-phone-group {
  display: flex;
  width: 100%;
  align-items: stretch;
  gap: 0.5rem;
}

/* Remove right border radius for country code select */
.tmd-phone-group .tmd-phone-select {
  border-top-right-radius: 0;
  margin-right: -1px;
}

/* Remove left border radius for phone input */
.tmd-phone-group .tmd-phone-input {
  border-top-left-radius: 0;
  margin-left: -1px;
}

/* Country code select dropdown */
.tmd-phone-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%230071e3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 20 20'><path d='M6 8l4 4 4-4'/></svg>") no-repeat right 1.5em center/1em 1em;
  padding-right: 2em;
  width: 180px;
  min-width: 100px;
  max-width: 200px;
  margin-right: 0.5rem;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Phone number input field */
.tmd-phone-input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  box-sizing: border-box;
}

/* =========================
   4. Checkboxes
   ========================= */

/* Services fieldset (no border/padding) */
.tmd-form-checkboxes {
  border: none;
  padding: 0;
  margin: 0;
}

/* Services legend (label for checkboxes) */
.tmd-form-label--checkboxes {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  font-size: var(--font-sm);
  font-weight: 600;
}

/* Checkbox list layout (flex, wrap) */
.tmd-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

/* Individual checkbox item */
.tmd-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--font-base);
  font-weight: 500;
  padding: 0.1em 0.3em;
  transition: background 0.18s, box-shadow 0.18s;
  min-width: 200px;
  margin-bottom: 0;
  text-align: start;
}

/* Checkbox input styles */
.tmd-checkbox-item input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 2px solid var(--tmd-accent, #0071e3);
  border-radius: 12px;
  width: 1.25em;
  height: 1.25em;
  margin-inline-end: 0.6em;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  min-width: 1.25em;
  min-height: 1.25em;
}

/* Checkbox checked state */
.tmd-checkbox-item input[type='checkbox']:checked {
  background-color: var(--tmd-accent, #0071e3);
  border-color: var(--tmd-accent, #0071e3);
}

/* Checkbox checkmark (after checked) */
.tmd-checkbox-item input[type='checkbox']:checked::after {
  content: '';
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.32em;
  height: 0.62em;
  border: solid #fff;
  border-width: 0 0.18em 0.18em 0;
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
}

/* Checkbox focus state */
.tmd-checkbox-item input[type='checkbox']:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}

/* =========================
   5. Buttons
   ========================= */

/* Submit button (full width, styled) */
.tmd-contact-submit {
  width: 100%;
  margin-top: 0.3rem;
  font-size: var(--font-base);
  font-weight: 700;
  border-radius: var(--tmd-radius);
  padding: 0.7rem 0;
  text-align: center;
  background-color: var(--tmd-accent);
  color: #fff;
  border: none;
  transition: background-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.tmd-contact-submit:hover,
.tmd-contact-submit:focus {
  background-color: #005bb5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 110, 209, 0.3);
  outline: none;
}

.tmd-contact-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 110, 209, 0.2);
}

/* Rate limiting styles */
.tmd-rate-limit-info {
  font-size: var(--font-sm);
  color: #666;
  text-align: center;
  padding: 0 0.5rem 0.5rem;
}

.tmd-rate-limit-info.show {
  display: block !important;
}

.tmd-rate-limit-warning {
  color: #dc3545;
}

.tmd-rate-limit-remaining {
  color: #28a745;
}

/* Honeypot field styles */
.tmd-honeypot {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.tmd-honeypot-label,
.tmd-honeypot-input {
  display: none !important;
  visibility: hidden !important;
}

/* reCAPTCHA Mobile Optimizations */
.tmd-captcha-widget {
  contain: layout style paint;
  will-change: auto;
}

.g-recaptcha {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Optimize for mobile performance */
@media (max-width: 699px) {
  .tmd-captcha-widget {
    margin: 1rem 0;
  }

  .g-recaptcha {
    transform: scale(0.9);
    transform-origin: left center;
  }
}

/* Button spinner (for loading state) */
.tmd-btn-spinner {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  margin-right: 0.5em;
  border: 2.5px solid #fff;
  border-top: 2.5px solid #006ed1;
  border-radius: 50%;
  animation: tmd-spin 0.7s linear infinite;
}

/* =========================
   6. Sidebar & Social
   ========================= */

/* Sidebar block (each contact info section) */
.tmd-contact-info-block {
  margin-block-end: 1.2rem;
}

/* List of contact links in sidebar */
.tmd-contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Social icons row in sidebar */
.tmd-contact-social-row {
  display: flex;
  gap: 1.1rem;
  margin-block-start: 1.2rem;
  align-items: center;
  justify-content: flex-start;
}

/* Social icon link (no circle background) */
.tmd-contact-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tmd-accent);
  font-size: var(--font-lg);
  transition: color 0.18s, transform 0.18s;
}

/* Social icon link hover/focus */
.tmd-contact-social-link:hover,
.tmd-contact-social-link:focus {
  color: var(--tmd-accent);
  outline: none;
  transform: translateY(-1px);
}

/* WhatsApp icon in contact info section - make it bigger */
.tmd-contact-link--phone .fa-whatsapp {
  font-size: 1.5em !important;
}

/* Social media icons - same color for all */
.tmd-contact-social-link .fa-twitter,
.tmd-contact-social-link .fa-instagram,
.tmd-contact-social-link .fa-linkedin,
.tmd-contact-social-link .fa-whatsapp,
.tmd-contact-social-link .fa-facebook {
  color: #555;
}

/* Social icon SVG size */
.tmd-contact-social-link svg {
  display: block;
  width: 28px;
  height: 28px;
}

/* Social icon color modifiers */
.tmd-contact-social-x {
  color: #111;
}

.tmd-contact-social-instagram {
  color: #e1306c;
}

.tmd-contact-social-linkedin {
  color: #0a66c2;
}

.tmd-contact-social-whatsapp {
  color: #25d366;
}

/* =========================
   10. Map
   ========================= */

/* Map container in sidebar */
.tmd-contact-map {
  width: 100%;
  margin-block: 0;
  border-radius: 12px;
  overflow: hidden;
  border: none;
  min-height: 180px;
  background-color: #f8f9fb;
}

/* Embedded map iframe */
.tmd-contact-map iframe {
  width: 100%;
  height: 330px;
  border: 0;
  border-radius: 12px;
  display: block;
  max-width: 100%;
  box-sizing: border-box;
}

/* Map placeholder (before map loads) */
.tmd-map-placeholder {
  width: 100%;
  height: 330px;
  border-radius: 12px;
  background-color: #f5f5f7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Load map button */
.tmd-load-map-btn {
  padding: 1em 2em;
  border-radius: 8px;
  border: none;
  background-color: #006ed1;
  color: #fff;
  font-size: 1.1em;
  text-align: center;
  transition: background-color 0.3s ease;
}

.tmd-load-map-btn:hover,
.tmd-load-map-btn:focus-visible {
  background-color: #005bb5;
}

/* Loading spinner for map */
.tmd-spinner {
  margin-block-end: 1.5em;
  width: 48px;
  height: 48px;
  border: 3px solid #e0e0e0;
  border-top-color: #006ed1;
  border-radius: 50%;
  animation: tmd-spin 1s linear infinite;
}

@keyframes tmd-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Reduced motion: minimize spinner animation */
@media (prefers-reduced-motion: reduce) {

  .tmd-btn-spinner,
  .tmd-spinner {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================
   7. Captcha
   ========================= */

/* Captcha group (form field wrapper) */
.tmd-form-group--captcha {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-block-end: 1.2rem;
}

/* Captcha widget container */
.tmd-captcha-widget {
  padding-block-start: 0.7rem;
  padding-block-end: 0.5rem;
  padding-inline: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Google reCAPTCHA widget */
.g-recaptcha {
  display: block;
  width: 100% !important;
  min-width: 0;
}

/* =========================
   8. Utility/Helper Classes
   ========================= */

/* Error message below input */
.tmd-field-error {
  color: #e74c3c;
  font-size: var(--font-sm);
  margin-block-start: 0.2em;
  min-height: 1.2em;
}

/* Error input styling */
.tmd-input-error {
  border-color: #e74c3c !important;
  background: #fff6f6 !important;
}

/* Form alert box (general) */
.tmd-form-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.7em;
  border-radius: var(--tmd-radius);
  padding: 1em 1.2em;
  margin-bottom: 1.2em;
  font-size: var(--font-sm);
  font-weight: 500;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 1.5px solid #e0e0e0;
  background: #f8f9fb;
}

/* Success alert */
.tmd-form-alert--success {
  border-color: #27ae60;
  background: #eafaf1;
  color: #218c53;
}

/* Error alert */
.tmd-form-alert--error {
  border-color: #e74c3c;
  background: #fbeaea;
  color: #c0392b;
}

/* Alert icon inside alert box */
.tmd-form-alert svg {
  flex-shrink: 0;
  margin-block-start: 0.1em;
  margin-inline-end: 0.6em;
}



/* Alert icon utility (for inline alerts) */
.tmd-alert-icon {
  vertical-align: middle;
  margin-right: 0.5em;
}

/* =========================
   9. FAQ Section
   ========================= */

/* FAQ section container */
.tmd-faq-section {
  background: #fff;
  padding-block: 3rem;
  padding-inline: 0.5rem;
  min-height: 60vh;
  height: auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 2000px;
  width: 100%;
  box-sizing: border-box;
}

/* FAQ inner wrapper */
.tmd-faq-inner {
  max-width: 1050px;
  margin-inline: auto;
  margin-block: 0;
  padding-block-end: 0.5rem;
  padding-inline: 0;
  width: 100%;
}

/* FAQ title */
.tmd-faq-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--tmd-text);
  margin-block-end: 2.5rem;
  text-align: center;
  letter-spacing: -0.01em;
}

/* FAQ list grid */
.tmd-faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1.2rem;
  align-items: start;
  margin-block-start: 1.2rem;
}

/* Individual FAQ item */
.tmd-faq-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0, 113, 227, 0.03);
  border: 1px solid #f0f0f0;
  padding-block: 0.1rem;
  padding-inline: 0.7rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  min-width: 0;
  font-size: 0.97rem;
  transform: translateZ(0);
}

/* FAQ item hover state */
.tmd-faq-item:hover {
  box-shadow: 0 2px 12px rgba(0, 113, 227, 0.05);
  border-color: #e0e0e0;
}

/* FAQ item open state */
.tmd-faq-item[open] {
  box-shadow: 0 4px 18px rgba(0, 113, 227, 0.07);
  border-color: var(--tmd-accent);
  background: #f8fafd;
}

/* FAQ question (summary) */
.tmd-faq-question {
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  padding-block: 0.9rem 0.7rem;
  padding-inline: 0;
  outline: none;
  transition: color 0.18s;
  position: relative;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
}

/* H3 styling within FAQ questions - ensures consistency */
.tmd-faq-question h3 {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  line-height: inherit;
  letter-spacing: inherit;
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  text-decoration: none;
  display: inline;
  flex: 1;
}

/* Hide default marker for summary */
.tmd-faq-question::-webkit-details-marker {
  display: none;
}

/* Add custom arrow to summary */
.tmd-faq-question::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-inline-start: auto;
  background: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.5 7.5L9 12L13.5 7.5" stroke="%23007ae3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center/contain;
  vertical-align: middle;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: rotate(0deg);
}

/* Arrow rotates when open */
.tmd-faq-item[open] .tmd-faq-question::after {
  transform: rotate(180deg);
}

/* FAQ answer (content) */
.tmd-faq-answer {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  will-change: max-height, opacity, transform;
}

/* FAQ answer visible when open */
.tmd-faq-item.open .tmd-faq-answer {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================
   11. No-JS reCAPTCHA Fallback & Noscript Styles
   ========================= */

/* Alert for users with JavaScript disabled */
.tmd-form-alert-noscript {
  margin-bottom: 1em;
}

/* Fallback reCAPTCHA container for no-JS */
.tmd-recaptcha-noscript {
  width: 302px;
  height: 422px;
}

/* Fallback reCAPTCHA iframe wrapper */
.tmd-recaptcha-noscript-frame {
  width: 302px;
  height: 422px;
  position: relative;
}

/* Fallback reCAPTCHA iframe */
.tmd-recaptcha-noscript-iframe {
  width: 302px;
  height: 422px;
  border-style: none;
}

/* Fallback textarea for reCAPTCHA response */
.tmd-recaptcha-noscript-textarea {
  width: 300px;
  height: 60px;
  border-style: none;
  background: #f9f9f9;
  border: 1px solid #c1c1c1;
  border-radius: 3px;
  margin: 0;
  padding: 0;
  position: relative;
  bottom: 12px;
  left: 25px;
  right: 25px;
}

/* Fallback textarea input for reCAPTCHA */
.tmd-recaptcha-noscript-textarea .g-recaptcha-response {
  width: 250px;
  height: 40px;
  border: 1px solid #c1c1c1;
  margin: 10px 25px;
  padding: 0;
  resize: none;
}

/* =========================
   12. Responsive Design - Tablet (700px to 999px)
   ========================= */

/* Layout & Main Containers - Tablet */
@media (min-width: 700px) and (max-width: 999px) {
  /* ===== OPTIMIZED TABLET LAYOUT ===== */

  /* Main contact section - optimized centering */
  .tmd-contact-section {
    padding: 4rem 1rem 3rem 1rem;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
  }

  /* Main container - properly centered with consistent width */
  .tmd-contact-container {
    width: 100%;
    max-width: 700px;
    margin: 4rem 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-self: center;
    box-sizing: border-box;
    padding: 0;
  }

  /* Form area - full width within container */
  .tmd-contact-main {
    width: 100%;
    padding: 1.5rem 1rem 1rem 1rem;
    background: var(--tmd-primary);
    border-radius: 12px;
    box-sizing: border-box;
    min-width: 0;
  }

  /* Contact info sidebar - full width with proper structure */
  .tmd-contact-info {
    width: 100%;
    padding: 2rem 1rem 1rem 1rem;
    background: var(--tmd-primary);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-sizing: border-box;
    min-width: 0;
  }

  /* Typography & Headings - Tablet */
  /* Page title (large heading) */
  .tmd-contact-title {
    font-size: calc(var(--font-xxl) * 0.9);
    margin-bottom: 0.15rem;
  }

  /* Page description (subtitle) */
  .tmd-contact-desc {
    font-size: calc(var(--font-md) * 0.95);
    margin-bottom: 1.2rem;
    max-width: 100%;
  }

  /* Sidebar block title */
  .tmd-contact-info-title {
    font-size: calc(var(--font-base) * 0.95);
    margin-bottom: 1.5rem;
  }

  /* Sidebar block description */
  .tmd-contact-info-desc {
    font-size: calc(var(--font-sm) * 0.95);
    line-height: 1.5;
  }

  /* Form Elements - Tablet */
  /* Contact form container */
  .tmd-contact-form {
    gap: 1.2rem;
  }

  /* Form groups */
  .tmd-form-group {
    margin-bottom: 1rem;
  }

  /* Contact row (name/email) */
  .tmd-contact-row {
    flex-direction: row;
    gap: 1rem;
  }

  /* Border radius adjustments for row items */
  .tmd-contact-row>.tmd-form-group:first-child .tmd-form-input {
    border-top-right-radius: 0;
    margin-right: -1px;
  }

  .tmd-contact-row>.tmd-form-group:last-child .tmd-form-input {
    border-top-left-radius: 0;
    margin-left: -1px;
  }

  /* Phone group */
  .tmd-form-group--phone {
    margin-bottom: 1rem;
  }

  /* Form inputs */
  .tmd-form-input,
  .tmd-form-textarea {
    padding: 0.9rem 1rem;
    font-size: calc(var(--font-base) * 0.95);
  }

  /* Form labels */
  .tmd-form-label {
    font-size: calc(var(--font-sm) * 0.95);
    margin-bottom: 0.4rem;
  }

  /* Phone group layout */
  .tmd-phone-group {
    gap: 0.8rem;
  }

  /* Phone select dropdown */
  .tmd-phone-select {
    min-width: 120px;
    font-size: calc(var(--font-sm) * 0.95);
  }

  /* Phone input field */
  .tmd-phone-input {
    font-size: calc(var(--font-base) * 0.95);
  }

  /* Checkboxes section */
  .tmd-form-checkboxes {
    margin-top: 1rem;
  }

  /* Checkbox label */
  .tmd-form-label--checkboxes {
    font-size: calc(var(--font-sm) * 0.95);
    margin-bottom: 0.8rem;
  }

  /* Checkbox list */
  .tmd-checkbox-list {
    gap: 0.6rem;
  }

  /* Checkbox items */
  .tmd-checkbox-item {
    padding: 0.6rem 0.8rem;
    font-size: calc(var(--font-sm) * 0.95);
  }

  /* Submit button */
  .tmd-contact-submit {
    padding: 0.9rem 2rem;
    font-size: calc(var(--font-base) * 0.95);
    margin-top: 1.2rem;
  }

  /* Contact Info & Social Links - Tablet */
  /* Contact info blocks */
  .tmd-contact-info-block {
    margin-bottom: 1rem;
  }

  /* Make social links and map span full width */
  .tmd-contact-social-row,
  .tmd-contact-map {
    grid-column: 1 / -1;
  }

  /* Contact links */
  .tmd-contact-links {
    gap: 1rem;
  }

  /* Contact link items */
  .tmd-contact-link {
    font-size: calc(var(--font-sm) * 0.95);
    gap: 0.4em;
    align-items: center;
  }

  /* Contact link icons */
  .tmd-contact-link svg {
    width: 18px;
    height: 18px;
  }

  /* Social links row */
  .tmd-contact-social-row {
    gap: 0.8rem;
    margin-top: 1rem;
    justify-content: center;
    align-items: center;
  }

  /* Social link buttons */
  .tmd-contact-social-link {
    width: 44px;
    height: 44px;
    padding: 0.8rem;
  }

  /* Social link icons */
  .tmd-contact-social-link svg {
    width: 20px;
    height: 20px;
  }

  /* Map container */
  .tmd-contact-map {
    height: 320px;
    margin: 0;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  /* Map outer container - full width on tablet */
  .tmd-map-outer {
    width: 100vw;
    margin-left: calc(-1rem);
    margin-right: calc(-1rem);
    border-radius: 0;
    padding: 0.5rem 1rem;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tmd-primary);
  }

  /* Map iframe */
  .tmd-contact-map iframe {
    height: 320px;
    width: 100%;
    border: 0;
    border: none;
    border-radius: 12px;
    display: block;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Map placeholder */
  .tmd-map-placeholder {
    height: 320px;
    border: none;
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
  }

  /* Load map button */
  .tmd-load-map-btn {
    padding: 0.8rem 1.5rem;
    font-size: calc(var(--font-sm) * 0.95);
  }

  /* FAQ Section - Tablet */
  /* FAQ container */
  .tmd-faq-section {
    padding: 3rem 1rem 2rem 1rem;
  }

  /* FAQ inner container */
  .tmd-faq-inner {
    max-width: 700px;
    margin: 0 auto;
  }

  /* FAQ title */
  .tmd-faq-title {
    font-size: calc(var(--font-xl) * 0.9);
    margin-bottom: 2.5rem;
  }

  /* FAQ list grid */
  .tmd-faq-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  /* FAQ items - ensure consistent height */
  .tmd-faq-item {
    min-height: 80px;
    display: flex;
    flex-direction: column;
  }

  /* FAQ questions - prevent text wrapping */
  .tmd-faq-question {
    font-size: calc(var(--font-base) * 0.9);
    line-height: 1.4;
    padding: 1rem 1.2rem;
    white-space: normal;
    word-wrap: break-word;
    hyphens: auto;
    flex: 1;
    display: flex;
    align-items: center;
  }

  /* FAQ answers - proper alignment */
  .tmd-faq-answer {
    padding: 0 1.2rem 1rem 1.2rem;
    font-size: calc(var(--font-sm) * 0.95);
    line-height: 1.5;
    margin-top: 0.5rem;
  }

  /* Form Alerts & Validation - Tablet */
  /* Field error styling */
  .tmd-field-error {
    font-size: calc(var(--font-sm) * 0.9);
    margin-top: 0.3rem;
  }

  /* Input error styling */
  .tmd-input-error {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
  }

  /* Form alerts */
  .tmd-form-alert {
    padding: 1rem 1.2rem;
    font-size: calc(var(--font-sm) * 0.95);
    margin-bottom: 1.2rem;
    border-radius: 8px;
  }

  /* Success alert */
  .tmd-form-alert--success {
    background-color: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.2);
    color: #198754;
  }

  /* Error alert */
  .tmd-form-alert--error {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
  }

  /* Alert icon */
  .tmd-alert-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.6rem;
  }



  /* reCAPTCHA & No-JS Fallbacks - Tablet */
  /* reCAPTCHA widget */
  .tmd-form-group--captcha {
    margin-top: 1.2rem;
  }

  /* reCAPTCHA container */
  .tmd-captcha-widget {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 78px;
    /* background-color: #f8f9fa;
    border: 1px solid #e9ecef; */
    border-radius: 8px;
    padding: 1rem;
  }

  /* Google reCAPTCHA */
  /* .g-recaptcha {
    /* transform: scale(0.9); */
  /* transform-origin: center;
  } */

  /* No-JS reCAPTCHA fallback */
  .tmd-recaptcha-noscript {
    width: 280px;
    height: 400px;
    margin: 0 auto;
  }

  /* No-JS reCAPTCHA iframe wrapper */
  .tmd-recaptcha-noscript-frame {
    width: 280px;
    height: 400px;
  }

  /* No-JS reCAPTCHA iframe */
  .tmd-recaptcha-noscript-iframe {
    width: 280px;
    height: 400px;
  }

  /* No-JS reCAPTCHA textarea */
  .tmd-recaptcha-noscript-textarea {
    width: 280px;
    height: 60px;
    bottom: 10px;
    left: 20px;
    right: 20px;
  }

  /* No-JS reCAPTCHA textarea input */
  .tmd-recaptcha-noscript-textarea .g-recaptcha-response {
    width: 240px;
    height: 40px;
    margin: 10px 20px;
  }

  /* Form alert for no-JS */
  .tmd-form-alert-noscript {
    margin-bottom: 0.8rem;
    font-size: calc(var(--font-sm) * 0.9);
  }
}

/* =========================
   13. Mobile Responsive Design
   ========================= */

@media (max-width: 699px) {

  /* MAIN LAYOUT */
  .tmd-contact-section {
    background-color: var(--tmd-primary);
    background-image: linear-gradient(90deg,
        rgba(52, 152, 219, 0.08) 1px,
        transparent 1px),
      linear-gradient(135deg,
        rgba(52, 152, 219, 0.07) 0.5px,
        transparent 0.5px 20px,
        rgba(52, 152, 219, 0.07) 20.5px,
        transparent 20.5px),
      linear-gradient(225deg,
        rgba(231, 76, 60, 0.05) 0.5px,
        transparent 0.5px 20px,
        rgba(231, 76, 60, 0.05) 20.5px,
        transparent 20.5px);
    background-size: 80px 80px, 160px 160px, 160px 160px;
    background-position: 0 0, 0 0, 0 0;
    padding: 6rem 1rem 1.5rem 1rem;
    min-height: 100vh;
  }

  .tmd-contact-container {
    flex-direction: column;
    gap: 1.5rem;
    max-width: 100%;
    margin: 1rem auto 0.5rem auto;
    padding-left: 0;
  }

  .tmd-contact-main {
    flex: none;
    width: 100%;
    padding: 0;
  }

  .tmd-contact-info {
    width: 100%;
    padding: 0;
    gap: 1.2rem;
    display: flex;
    flex-direction: column;
  }

  /* TYPOGRAPHY */
  .tmd-contact-title {
    font-size: calc(var(--font-xxl) * 0.8);
    margin-bottom: 0.5rem;
  }

  .tmd-contact-desc {
    font-size: calc(var(--font-md) * 0.9);
    margin-bottom: 1.2rem;
  }

  .tmd-contact-info-title {
    font-size: calc(var(--font-base) * 0.9);
    margin-bottom: 1rem;
  }

  .tmd-contact-info-desc {
    font-size: calc(var(--font-sm) * 0.9);
    line-height: 1.4;
  }

  /* FORM ELEMENTS */
  .tmd-contact-form {
    gap: 1rem;
  }

  .tmd-form-group {
    margin-bottom: 0.8rem;
  }

  /* Reduce spacing before reCAPTCHA */
  .tmd-form-group--captcha {
    margin-top: 0.2rem;
    margin-bottom: 1rem;
  }

  .tmd-contact-row {
    flex-direction: column;
    gap: 0.8rem;
  }

  .tmd-contact-row>.tmd-form-group:first-child .tmd-form-input,
  .tmd-contact-row>.tmd-form-group:last-child .tmd-form-input {
    border-radius: var(--tmd-radius);
  }

  .tmd-form-input,
  .tmd-form-textarea {
    padding: 0.8rem 0.9rem;
    font-size: calc(var(--font-base) * 0.9);
  }

  .tmd-form-label {
    font-size: calc(var(--font-sm) * 0.9);
    margin-bottom: 0.3rem;
  }

  /* PHONE GROUP */
  .tmd-phone-group {
    gap: 0.5rem;
  }

  .tmd-phone-select {
    width: 45%;
    min-width: 110px;
    max-width: 160px;
    font-size: calc(var(--font-sm) * 0.95);
    flex-shrink: 0;
  }

  .tmd-phone-input {
    font-size: calc(var(--font-base) * 0.9);
    flex: 1;
    min-width: 0;
  }

  /* CHECKBOXES */
  .tmd-form-checkboxes {
    margin-top: 0.8rem;
  }

  .tmd-form-label--checkboxes {
    font-size: calc(var(--font-sm) * 0.9);
    margin-bottom: 0.6rem;
  }

  .tmd-checkbox-list {
    gap: 0.5rem;
  }

  .tmd-checkbox-item {
    padding: 0.5rem 0.7rem;
    font-size: calc(var(--font-sm) * 0.9);
    min-width: 140px;
    flex: 1 1 140px;
  }

  /* SUBMIT BUTTON */
  .tmd-contact-submit {
    padding: 0.8rem 1.5rem;
    font-size: calc(var(--font-base) * 0.9);
    margin-top: 1rem;
    width: 100%;
  }

  /* CONTACT INFO */
  .tmd-contact-info-block {
    margin-bottom: 1.2rem;
  }

  .tmd-contact-links {
    gap: 0.8rem;
  }

  .tmd-contact-link {
    font-size: calc(var(--font-sm) * 0.9);
    gap: 0.5em;
    align-items: center;
  }

  .tmd-contact-link svg {
    width: 16px;
    height: 16px;
  }

  /* SOCIAL LINKS */
  .tmd-contact-social-row {
    gap: 0.8rem;
    margin-top: 1rem;
    justify-content: center;
  }

  .tmd-contact-social-link svg {
    width: 18px;
    height: 18px;
  }

  /* MAP */
  .tmd-contact-map {
    height: 250px;
    margin: 0;
    border-radius: 12px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    border: none;
    /* border: 1.5px solid var(--tmd-border); */
  }

  .tmd-contact-map iframe {
    height: 250px;
    width: 100%;
    border: 0;
    display: block;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tmd-map-placeholder {
    height: 250px;
    width: 100%;
    border: none;
    border-radius: 12px;
  }

  .tmd-load-map-btn {
    padding: 0.7rem 1.2rem;
    font-size: calc(var(--font-sm) * 0.9);
  }

  /* FAQ */
  .tmd-faq-section {
    padding: 2rem 0.5 1.5rem 0.5;
  }

  .tmd-faq-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0.5rem;
  }

  .tmd-faq-title {
    font-size: calc(var(--font-xl) * 0.8);
    margin-bottom: 2.5rem;
    text-align: left;
    padding-left: 1.6rem;
  }

  .tmd-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }

  .tmd-faq-item {
    min-height: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tmd-faq-question {
    font-size: calc(var(--font-base) * 0.85);
    line-height: 1.3;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tmd-faq-answer {
    padding: 0 1rem 0.8rem 1rem;
    font-size: calc(var(--font-sm) * 0.9);
    line-height: 1.4;
    margin-top: 0.3rem;
  }

  /* RECAPTCHA */
  .tmd-form-group--captcha {
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .tmd-captcha-widget {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 70px;
    padding: 0.5rem 0;
  }

  .g-recaptcha {
    transform: scale(0.85);
    transform-origin: left;
  }

  /* FORM VALIDATION */
  .tmd-field-error {
    font-size: calc(var(--font-sm) * 0.85);
    margin-top: 0.2rem;
  }

  .tmd-input-error {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
  }

  .tmd-form-alert {
    padding: 0.8rem 1rem;
    font-size: calc(var(--font-sm) * 0.9);
    margin-bottom: 1rem;
    border-radius: 8px;
  }

  .tmd-form-alert--success {
    background-color: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.2);
    color: #198754;
  }

  .tmd-form-alert--error {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
  }

  .tmd-alert-icon {
    width: 14px;
    height: 14px;
    margin-right: 0.3rem;
  }



  /* NO-JS RECAPTCHA */
  .tmd-recaptcha-noscript {
    width: 260px;
    height: 380px;
    margin: 0 auto;
  }

  .tmd-recaptcha-noscript-frame {
    width: 260px;
    height: 380px;
  }

  .tmd-recaptcha-noscript-iframe {
    width: 260px;
    height: 380px;
  }

  .tmd-recaptcha-noscript-textarea {
    width: 260px;
    height: 60px;
    bottom: 8px;
    left: 18px;
    right: 18px;
  }

  .tmd-recaptcha-noscript-textarea .g-recaptcha-response {
    width: 220px;
    height: 40px;
    margin: 8px 18px;
  }

  .tmd-form-alert-noscript {
    margin-bottom: 0.6rem;
    font-size: calc(var(--font-sm) * 0.85);
  }
}

.tmd-map-outer {
  width: 100%;
  padding: 0.5rem;
  box-sizing: border-box;
  border: 1.5px solid var(--tmd-border);
  border-radius: 12px;
}