/* Reduce navbar height — always */
.et_header_style_left #et-top-navigation,
#et-top-navigation {
  padding-top: 8px !important;
}

#et-top-navigation nav > ul > li > a {
  padding-bottom: 8px !important;
}

/* Shrink fixed navbar on scroll — even more compact */
.et-fixed-header #top-header {
  display: none !important;
}

.et-fixed-header#main-header {
  top: 0 !important;
}

.et-fixed-header #et-top-navigation,
.et-fixed-header.et_header_style_left #et-top-navigation {
  padding-top: 6px !important;
}

.et-fixed-header #et-top-navigation nav > ul > li > a {
  padding-bottom: 6px !important;
}

/* Contact Us button - header */
.ivytech-contact-btn {
  background: #e09900;
  color: #fff;
  border: none;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}

.ivytech-contact-btn:hover {
  background: #c98800;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(224, 153, 0, 0.35);
}

.ivytech-contact-btn:active {
  transform: scale(0.97);
}

/* Contact Us button - inline (within page content) */
.ivytech-contact-btn-inline {
  background: #0c71c3;
  padding: 8px 22px;
  border-radius: 6px;
  font-size: 15px;
}

.ivytech-contact-btn-inline:hover {
  background: #0a5fa6;
  box-shadow: 0 3px 10px rgba(12, 113, 195, 0.35);
}

/* Overlay */
.ivytech-contact-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ivytech-contact-overlay.active {
  display: flex;
  opacity: 1;
}

/* Popup */
.ivytech-contact-popup {
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px;
  width: 90%;
  max-width: 460px;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

.ivytech-contact-overlay.active .ivytech-contact-popup {
  transform: translateY(0) scale(1);
}

/* Close button */
.ivytech-contact-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.ivytech-contact-close:hover {
  background: #f0f0f0;
  color: #000;
}

/* Title */
.ivytech-contact-title {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 700;
  color: #0c71c3;
}

.ivytech-contact-subtitle {
  margin: 0 0 24px;
  color: #666;
  font-size: 14px;
}

/* Form */
.ivytech-form-group {
  margin-bottom: 18px;
}

.ivytech-form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.ivytech-required {
  color: #e09900;
}

.ivytech-form-group input,
.ivytech-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  background: #fafafa;
}

.ivytech-form-group input:focus,
.ivytech-form-group textarea:focus {
  outline: none;
  border-color: #0c71c3;
  box-shadow: 0 0 0 3px rgba(12, 113, 195, 0.15);
  background: #fff;
}

.ivytech-form-group input.ivytech-invalid,
.ivytech-form-group textarea.ivytech-invalid {
  border-color: #e74c3c;
  animation: ivyShake 0.4s ease;
}

@keyframes ivyShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
}

.ivytech-error {
  display: block;
  color: #e74c3c;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

/* Submit button */
.ivytech-submit-btn {
  width: 100%;
  padding: 12px;
  background: #0c71c3;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ivytech-submit-btn:hover {
  background: #0a5fa6;
}

.ivytech-submit-btn:active {
  transform: scale(0.98);
}

.ivytech-submit-btn:disabled {
  background: #93c5e8;
  cursor: not-allowed;
}

/* Spinner */
.ivytech-btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ivytech-spin 0.6s linear infinite;
}

.ivytech-submit-btn.loading .ivytech-btn-text {
  opacity: 0.7;
}

.ivytech-submit-btn.loading .ivytech-btn-spinner {
  display: block;
}

@keyframes ivytech-spin {
  to { transform: rotate(360deg); }
}

/* Success state */
.ivytech-success {
  display: none;
  text-align: center;
  padding: 20px 0;
}

.ivytech-success.show {
  display: block;
  animation: ivytech-fadeIn 0.4s ease;
}

@keyframes ivytech-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ivytech-success-text {
  font-size: 18px;
  font-weight: 600;
  color: #126600;
  margin-top: 16px;
}

/* Animated checkmark */
.ivytech-checkmark {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  display: block;
}

.ivytech-checkmark-circle {
  stroke: #126600;
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: ivytech-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.ivytech-checkmark-check {
  stroke: #126600;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: ivytech-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes ivytech-stroke {
  to { stroke-dashoffset: 0; }
}

/* Mobile */
@media (max-width: 480px) {
  .ivytech-contact-popup {
    padding: 28px 20px;
    width: 95%;
    border-radius: 10px;
  }

  .ivytech-contact-title {
    font-size: 20px;
  }
}
