/* =============================================
   CONTACT.CSS — contact.html Specific Styles
   Inherits root scale & globals from base.css
   ============================================= */

/* =============================================
   CONTACT HERO
   ============================================= */
.contact-hero {
  background-color: var(--brand-navy);
  background-image:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(201, 166, 70, 0.05) 0%,
      transparent 50%
    ),
    linear-gradient(to right, rgba(15, 34, 64, 0.9), rgba(15, 34, 64, 0.6));
  color: #ffffff;
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: background-color 0.4s ease;
}

[data-theme="dark"] .contact-hero {
  background-color: var(--brand-navy);
}

.contact-hero .section-overline-master {
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  font-family: var(--body-font);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: none;
}

.contact-hero .section-overline-master::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background-color: var(--accent-gold);
}

.contact-hero h1 {
  color: #ffffff;
  font-family: var(--heading-font);
  font-size: 5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.contact-hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.3rem;
  max-width: 40rem;
  line-height: 1.8;
}

.contact-hero .container {
  position: relative;
  z-index: 2;
}

.contact-hero .contact-hero-watermark {
  position: absolute;
  right: -12%;
  top: 50%;
  transform: translateY(-50%);
  width: 50rem; /* 800px at 16px */
  pointer-events: none;
  z-index: 1;
}

.contact-hero .contact-hero-watermark img {
  width: 100%;
  height: auto;
  opacity: 0.05;
  filter: brightness(0) invert(1);
  transition: opacity 0.4s ease;
}

/* =============================================
   FACULTY CONTACT INFO
   ============================================= */
.faculty-contact-section {
  background-color: var(--bg-color); /* Light Parchment #fdfbf7 inherited */
  transition: background-color 0.4s ease;
  position: relative;
  overflow: hidden;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
  max-width: 65rem;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.contact-card {
  background-color: var(--bg-color);
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(201, 166, 70, 0.2);
  position: relative;
  z-index: 5;
  transition:
    transform 0.4s ease,
    border-color 0.4s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: rgba(201, 166, 70, 0.5);
}

.contact-card h3 {
  font-family: var(--heading-font);
  font-size: 2.5rem;
  color: var(--heading-color);
  margin-bottom: 1.5rem;
}

.card-divider {
  width: 100%;
  max-width: 15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  opacity: 0.6;
}

.card-divider-line {
  flex-grow: 1;
  height: 1px;
  background-color: var(--accent-gold);
}

.card-divider-diamond {
  width: 0.4rem;
  height: 0.4rem;
  background-color: var(--accent-gold);
  transform: rotate(45deg);
  margin: 0 0.8rem;
}

.contact-details {
  font-family: var(--body-font);
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-top: 1rem;
}

.contact-details strong {
  display: block;
  font-family: var(--heading-font);
  color: var(--heading-color);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.contact-link {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
  display: block;
  margin-top: 0.5rem;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--heading-color);
  text-decoration: underline;
}

/* Gold Diamond Divider */
.section-divider-wrapper {
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0;
  position: relative;
  z-index: 10;
}

/* =============================================
   INQUIRY FORM - EDITORIAL APPLE THEME
   ============================================= */
.inquiry-form-section {
  background-color: var(--brand-ivory);
  padding: 5rem 0 8rem;
  transition: background-color 0.4s ease;
}

[data-theme="dark"] .inquiry-form-section {
  background-color: var(--brand-navy);
}

.inquiry-form-section h2 {
  font-family: var(--heading-font); /* Playfair Display */
  font-size: 2.5rem;
  color: var(--primary-blue); /* #1d1d1f */
  margin-bottom: 3rem;
  text-align: center;
}

[data-theme="dark"] .inquiry-form-section h2 {
  color: #ffffff;
}

.inquiry-form-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

[data-theme="dark"] .inquiry-form-container {
  background-color: transparent;
  box-shadow: none;
}

.inquiry-form {
  width: 100%;
  text-align: left;
}

.form-group {
  margin-bottom: 40px;
  position: relative;
}

.form-label {
  display: block;
  font-family:
    -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #86868b;
  margin-bottom: 10px;
}

.form-control {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  border-radius: 0;
  padding: 12px 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  color: var(--text-color);
  transition: border-color 0.3s ease;
}

.form-control::placeholder {
  color: #d1d1d6;
}

.form-control:focus {
  outline: none;
  border-bottom: 1px solid var(--accent-gold);
  box-shadow: 0 4px 12px rgba(201, 166, 70, 0.1);
}

[data-theme="dark"] .form-control {
  border-bottom: 1px solid #334155;
  color: #ffffff;
}

[data-theme="dark"] .form-control::placeholder {
  color: #64748b;
}

[data-theme="dark"] .form-control:focus {
  border-bottom: 1px solid var(--accent-gold);
  box-shadow: 0 4px 12px rgba(201, 166, 70, 0.15);
}

textarea.form-control {
  min-height: 80px;
  resize: none;
  overflow: hidden;
  line-height: 1.6;
}

.char-counter {
  position: absolute;
  right: 0;
  bottom: -22px;
  font-size: 10px;
  font-weight: 600;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.char-counter.warning {
  color: var(--accent-gold);
}

/* Phone Input Group */
.phone-input-group {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid #e5e5e5;
  transition: border-color 0.3s ease;
}

.phone-input-group:focus-within {
  border-bottom: 1px solid #1d1d1f;
}

[data-theme="dark"] .phone-input-group {
  border-bottom: 1px solid #334155;
}

[data-theme="dark"] .phone-input-group:focus-within {
  border-bottom: 1px solid #ffffff;
}

.phone-input-group .form-control {
  border-bottom: none;
  padding: 8px 0;
}

.phone-input-group .form-control:focus {
  border-bottom: none;
}

.country-code-input {
  width: 60px;
  text-align: left;
  border-right: 1px solid #e5e5e5;
  margin-right: 15px;
}

[data-theme="dark"] .country-code-input {
  border-right: 1px solid #334155;
}

.phone-number-input {
  flex: 1;
}

textarea.form-control {
  resize: vertical;
  min-height: 24px;
  padding-bottom: 8px;
}

select.form-control {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2386868b%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 16px;
  padding-right: 24px;
}

[data-theme="dark"] select.form-control {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
}

.submit-btn {
  width: 100%;
  background-color: var(--primary-blue);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  margin-top: 1rem;
}

.submit-btn:hover {
  opacity: 0.8;
}

[data-theme="dark"] .submit-btn {
  background-color: #ffffff;
  color: #1d1d1f;
}

.form-error {
  color: #ff3b30;
  font-family:
    -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  margin-top: 8px;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
  bottom: -22px;
  left: 0;
}

.form-error.visible {
  display: block;
  opacity: 1;
  animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
  from {
    transform: translateY(5px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#success-message {
  display: none;
  text-align: center;
  padding: 3rem;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  margin-top: 2rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: #ffffff;
}

#success-message.visible {
  display: block;
  opacity: 1;
  animation: fadeReveal 0.8s ease-out forwards;
}

@keyframes fadeReveal {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

#success-message h3 {
  color: #1d1d1f;
  font-family: var(--heading-font);
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

/* =============================================
   MOBILE OVERRIDES (≤992px)
   ============================================= */
@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* =============================================
   MOBILE OVERRIDES (≤768px)
   ============================================= */
@media (max-width: 768px) {
  .contact-hero {
    min-height: 65vh;
    padding: 4.211rem 5%;
  }

  .contact-hero h1 {
    font-size: 2.5rem;
  }

  .contact-hero-watermark {
    right: -25%;
    width: 80%;
  }

  .inquiry-form-section {
    padding: 3rem 1rem 5rem;
    overflow-x: hidden;
  }

  .inquiry-form-container {
    width: 100%;
    padding: 0;
  }

  .inquiry-form-section h2 {
    font-size: 2rem;
    word-wrap: break-word;
  }

  .form-control {
    font-size: 16px; /* Prevents iOS zoom and fits better */
    max-width: 100%;
  }

  .country-code-input {
    width: 50px;
    margin-right: 10px;
  }
}
/* intl-tel-input overrides */
.iti {
  width: 100%;
  display: block;
}

.iti__country-list {
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
  border: 1px solid rgba(201, 166, 70, 0.2) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  font-family: var(--body-font) !important;
  z-index: 100 !important;
}

.iti__country-name,
.iti__dial-code {
  color: var(--text-color) !important;
}

.iti__country:hover,
.iti__country.iti__highlight {
  background-color: rgba(201, 166, 70, 0.1) !important;
}

.iti--separate-dial-code .iti__selected-dial-code {
  color: var(--text-color);
  font-family: var(--body-font);
  font-size: 16px;
}

/* =============================================
   BUTTON SPINNER & LOADING
   ============================================= */
.submit-btn {
  position: relative;
  overflow: hidden;
}

.btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -10px;
  margin-top: -10px;
}

.submit-btn.is-loading .btn-text {
  visibility: hidden;
  opacity: 0;
}

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

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.form-group.shake {
  animation: shake 0.4s ease-in-out;
}

/* =============================================
   FORM TRUST NOTE
   ============================================= */
.form-trust-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 11px;
  color: #86868b;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.form-trust-note svg {
  opacity: 0.6;
}

/* =============================================
   SUCCESS OVERLAY
   ============================================= */
.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--brand-navy);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease-in-out,
    visibility 0.3s;
}

.success-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.success-content {
  text-align: center;
  max-width: 500px;
  padding: 40px;
  transform: translateY(20px);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-overlay.is-visible .success-content {
  transform: translateY(0);
}

.success-icon-wrapper {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

.success-checkmark {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scale-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-checkmark::after {
  content: "";
  position: absolute;
  top: 48%;
  left: 50%;
  width: 18px;
  height: 36px;
  border: solid var(--accent-gold);
  border-width: 0 4px 4px 0;
  transform: translate(-50%, -60%) rotate(40deg); /* Refined rotation for perfect symmetry */
  opacity: 0;
  animation: checkmark-draw 0.4s 0.4s ease-out forwards;
}

@keyframes scale-reveal {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes checkmark-draw {
  from {
    width: 0;
    height: 0;
    opacity: 0;
  }
  to {
    width: 18px;
    height: 36px;
    opacity: 1;
  }
}

.success-content h3 {
  font-family: var(--heading-font);
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.success-message-copy {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  padding: 12px 30px;
  font-family: var(--body-font);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--accent-gold);
  color: var(--brand-navy);
}

.is-hidden {
  display: none !important;
}
