/* Contact Us page — scoped via page-specific classes only */

.tg-contact-page,
.tg-contact-cards,
.tg-contact-card,
.tg-contact-form-panel,
.tg-contact-form {
  --tg-contact-navy: #102d59;
  --tg-contact-green: #008b45;
  --tg-contact-green-dark: #006b35;
  --tg-contact-text: #273044;
  --tg-contact-muted: #475569;
  --tg-contact-border: #d7deea;
  --tg-contact-bg: #f7f9fc;
  --tg-contact-surface: #ffffff;
  --tg-contact-error: #c62828;
  --tg-contact-radius: 14px;
}

.tg-contact-cards {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin: 8px 0;
}

.tg-contact-cards.e-con,
.tg-contact-cards.e-con > .e-con-inner {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.tg-contact-card {
  height: 100%;
  background: var(--tg-contact-surface);
  border: 1px solid var(--tg-contact-border);
  border-radius: var(--tg-contact-radius);
  box-shadow: 0 4px 16px rgba(16, 45, 89, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tg-contact-card:hover {
  border-color: rgba(0, 139, 69, 0.35);
  box-shadow: 0 10px 24px rgba(16, 45, 89, 0.1);
  transform: translateY(-2px);
}

.tg-contact-card .elementor-widget-container,
.tg-contact-card .elementor-icon-box-wrapper {
  height: 100%;
}

.tg-contact-card .elementor-icon-box-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 26px 18px 24px;
}

.tg-contact-card .elementor-icon-box-icon {
  margin: 0 0 2px;
}

.tg-contact-card .elementor-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #eef8f2;
  color: var(--tg-contact-green);
  font-size: 1.35rem;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.tg-contact-card:hover .elementor-icon {
  background: var(--tg-contact-green);
  color: #ffffff;
}

.tg-contact-card .elementor-icon-box-title {
  margin: 0;
  color: var(--tg-contact-navy);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.tg-contact-card .elementor-icon-box-description {
  margin: 0;
  color: var(--tg-contact-text);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
}

.tg-contact-card .elementor-icon-box-description a {
  color: var(--tg-contact-green);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tg-contact-card .elementor-icon-box-description a:hover,
.tg-contact-card .elementor-icon-box-description a:focus {
  color: var(--tg-contact-green-dark);
  border-bottom-color: rgba(0, 107, 53, 0.45);
  outline: none;
}

/* Admission Helpline emphasis */
.tg-contact-card--helpline {
  border-color: rgba(0, 139, 69, 0.45);
  background: linear-gradient(180deg, #f3fbf6 0%, #ffffff 55%);
  box-shadow: 0 8px 22px rgba(0, 139, 69, 0.14);
}

.tg-contact-card--helpline .elementor-icon {
  background: var(--tg-contact-green);
  color: #ffffff;
  width: 60px;
  height: 60px;
  font-size: 1.45rem;
}

.tg-contact-card--helpline .elementor-icon-box-title {
  color: var(--tg-contact-green-dark);
}

.tg-contact-card--helpline .elementor-icon-box-description a {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tg-contact-form-panel {
  margin-top: 10px;
  padding: 28px 28px 20px;
  background: var(--tg-contact-surface);
  border: 1px solid var(--tg-contact-border);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(16, 45, 89, 0.06);
}

/* Contact Form 7 — scoped */
.tg-contact-form {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  color: var(--tg-contact-text);
}

.tg-contact-form .tg-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
}

.tg-contact-form .tg-contact-field {
  margin: 0 0 16px;
  width: 100%;
}

.tg-contact-form .tg-contact-field--full {
  grid-column: 1 / -1;
}

.tg-contact-form .tg-contact-field > label {
  display: block;
  margin: 0;
  color: var(--tg-contact-navy);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.tg-contact-form .tg-contact-field > label > br {
  display: none;
}

.tg-contact-form .tg-contact-field > label .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  margin-top: 7px;
}

.tg-contact-form .tg-contact-required {
  display: inline;
  color: var(--tg-contact-green);
  font-weight: 700;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.tg-contact-form .tg-contact-control,
.tg-contact-form input.wpcf7-form-control,
.tg-contact-form textarea.wpcf7-form-control {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--tg-contact-border);
  border-radius: 10px;
  background: var(--tg-contact-bg);
  color: var(--tg-contact-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tg-contact-form textarea.tg-contact-control,
.tg-contact-form textarea.wpcf7-form-control {
  min-height: 140px;
  resize: vertical;
}

.tg-contact-form .tg-contact-control:hover,
.tg-contact-form input.wpcf7-form-control:hover,
.tg-contact-form textarea.wpcf7-form-control:hover {
  border-color: #b7c4d8;
}

.tg-contact-form .tg-contact-control:focus,
.tg-contact-form input.wpcf7-form-control:focus,
.tg-contact-form textarea.wpcf7-form-control:focus {
  outline: none;
  border-color: var(--tg-contact-green);
  background: var(--tg-contact-surface);
  box-shadow: 0 0 0 3px rgba(0, 139, 69, 0.16);
}

.tg-contact-form .tg-contact-submit {
  margin: 8px 0 0;
  text-align: center;
}

.tg-contact-form .tg-contact-submit-btn,
.tg-contact-form input.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 50px;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #00a353 0%, var(--tg-contact-green) 100%);
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 139, 69, 0.28);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tg-contact-form .tg-contact-submit-btn:hover,
.tg-contact-form input.wpcf7-submit:hover {
  background: linear-gradient(180deg, var(--tg-contact-green) 0%, var(--tg-contact-green-dark) 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 107, 53, 0.32);
}

.tg-contact-form .tg-contact-submit-btn:focus,
.tg-contact-form input.wpcf7-submit:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 139, 69, 0.22), 0 8px 18px rgba(0, 139, 69, 0.28);
}

.tg-contact-form .tg-contact-submit-btn:disabled,
.tg-contact-form input.wpcf7-submit:disabled,
.wpcf7 .tg-contact-form .wpcf7-submit.disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.wpcf7 form .tg-contact-form .wpcf7-not-valid {
  border-color: var(--tg-contact-error) !important;
  background: #fff7f7;
}

.wpcf7 form .tg-contact-form .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  color: var(--tg-contact-error);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}

.wpcf7 form:has(.tg-contact-form) .wpcf7-response-output {
  margin: 18px auto 0;
  max-width: 760px;
  padding: 14px 18px;
  border-radius: 12px;
  border-width: 1px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.wpcf7 form.sent:has(.tg-contact-form) .wpcf7-response-output {
  border-color: rgba(0, 139, 69, 0.35);
  background: #eef8f2;
  color: var(--tg-contact-green-dark);
}

.wpcf7 form.invalid:has(.tg-contact-form) .wpcf7-response-output,
.wpcf7 form.failed:has(.tg-contact-form) .wpcf7-response-output,
.wpcf7 form.aborted:has(.tg-contact-form) .wpcf7-response-output {
  border-color: rgba(198, 40, 40, 0.35);
  background: #fff5f5;
  color: var(--tg-contact-error);
}

.wpcf7 form.submitting:has(.tg-contact-form) .wpcf7-spinner {
  visibility: visible;
}

@media (max-width: 1024px) {
  .tg-contact-cards,
  .tg-contact-cards.e-con,
  .tg-contact-cards.e-con > .e-con-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .tg-contact-cards,
  .tg-contact-cards.e-con,
  .tg-contact-cards.e-con > .e-con-inner {
    grid-template-columns: 1fr;
  }

  .tg-contact-form-panel {
    padding: 20px 16px 14px;
    border-radius: 14px;
  }

  .tg-contact-form .tg-contact-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tg-contact-form .tg-contact-submit-btn,
  .tg-contact-form input.wpcf7-submit {
    width: 100%;
    min-width: 0;
  }

  .tg-contact-card .elementor-icon-box-description a {
    display: inline-block;
    padding: 2px 0;
  }
}
