/* KOSCA — Contact Page Styles */

/* Contact hero uses the shared .page-hero .page-hero--indigo system (global.css),
   matching the About page — no page-specific hero styles needed here. */

/* ============================================================
   EYEBROWS — all gold (deep on light sections, light on dark)
============================================================ */
#contact-form .section-label,
#locations .section-label {
  color: var(--color-gold-deep);
}

/* Find Us now sits on the indigo jewel surface — gold-light eyebrow. */
#find-us .section-label {
  color: var(--color-gold-light);
}

/* ============================================================
   CONTACT FORM — TABS
============================================================ */

.contact-form-section {
  background: var(--color-surface-alt);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

/* Tabs */
/* Indigo jewel pill track — active tab is a gold pill, inactive tabs light. */
.contact-tabs {
  display: flex;
  gap: var(--space-1);
  border: 1px solid rgba(201, 162, 75, 0.22);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,0.08) 0%, transparent 55%),
    linear-gradient(160deg, var(--color-brand-primary) 0%, var(--color-brand-primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: var(--space-8);
  width: fit-content;
  box-shadow: 0 8px 24px rgba(43, 38, 96, 0.22);
}

.contact-tab-btn {
  padding: var(--space-3) var(--space-6);
  border-radius: calc(var(--radius-lg) - 2px);
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.contact-tab-btn:hover {
  color: var(--color-gold-light);
}

.contact-tab-btn.is-active {
  background: var(--color-gold);
  color: var(--color-brand-primary-dark);
  font-weight: var(--weight-semibold);
  box-shadow: 0 2px 8px rgba(43, 38, 96, 0.25);
}

.contact-tab-panel {
  display: none;
}

.contact-tab-panel.is-active {
  display: block;
}

/* Form Card */
/* Indigo jewel form card — gold hairline on top, light fields on the dark
   ground (matches the Academy training form). */
.contact-form-card {
  position: relative;
  border: 1px solid rgba(201, 162, 75, 0.22);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  background: var(--gradient-jewel-plum);
  box-shadow: 0 16px 40px rgba(43, 38, 96, 0.30);
  overflow: hidden;
}

.contact-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.contact-form-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.contact-form-card__header {
  margin-bottom: var(--space-8);
}

.contact-form-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: #fff;
  margin-bottom: var(--space-2);
}

.contact-form-card__desc {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.78);
  line-height: var(--leading-relaxed);
}

/* Field labels read gold on the jewel ground. */
.contact-form-card .form-label {
  color: var(--color-gold-light);
}

/* Inputs stay white with dark text; gold focus ring. */
.contact-form-card .form-input:focus,
.contact-form-card .form-select:focus,
.contact-form-card .form-textarea:focus {
  border-color: var(--color-gold-light);
}

/* Gold fill with indigo text on the jewel card. */
.contact-form-card .btn--primary {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-brand-primary-dark);
}

.contact-form-card .btn--primary:hover {
  background: var(--color-gold-deep);
  border-color: var(--color-gold-deep);
  color: #fff;
}

/* ============================================================
   OFFICE DETAILS CARD
============================================================ */

/* Indigo jewel office card — gold hairline on top, light text on the dark
   ground (matches the Academy jewel cards). */
.office-card {
  position: relative;
  border: 1px solid rgba(201, 162, 75, 0.22);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  background: var(--gradient-jewel-plum);
  box-shadow: 0 16px 40px rgba(43, 38, 96, 0.30);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
}

.office-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.office-card__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gold-light);
  margin-bottom: var(--space-3);
}

.office-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: #fff;
  margin-bottom: var(--space-6);
}

.office-detail-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.office-detail-row:last-of-type {
  border-bottom: none;
}

/* Gold gradient icon tile with an indigo glyph. */
.office-detail-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff8ee 0%, #e8c97a 50%, #b8820f 100%);
  border: 1px solid rgba(201, 162, 75, 0.35);
  color: var(--color-brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.office-detail-text {
  flex: 1;
}

.office-detail-text strong {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-gold-light);
  margin-bottom: var(--space-1);
}

.office-detail-text span,
.office-detail-text a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.82);
  line-height: var(--leading-relaxed);
}

.office-detail-text a:hover {
  color: var(--color-gold-light);
}

/* ============================================================
   MAP SECTION
============================================================ */

/* .map-section sits on the shared .section--indigo jewel surface — no
   background override needed. */

.map-wrapper {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  line-height: 0;
}

.map-wrapper iframe {
  width: 100%;
  height: 420px;
  border: none;
  display: block;
}

/* ============================================================
   LOCATION CARDS — indigo jewel (gold hairline, light text)
============================================================ */

/* Centered grid (Tech Centres) — cards keep a fixed-ish width so 3 items sit
   centred rather than stretching across the row. */
.locations-grid--center .location-card {
  flex: 0 1 300px;
  max-width: 340px;
}

.location-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(201, 162, 75, 0.22);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  background: var(--gradient-jewel-plum);
  box-shadow: 0 12px 32px rgba(43, 38, 96, 0.28);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.location-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.location-card:hover {
  box-shadow: 0 16px 40px rgba(43, 38, 96, 0.34);
  transform: translateY(-3px);
}

.location-card__city {
  display: block;
  color: var(--color-gold-light);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.location-card__addr {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  flex: 1;
}

.location-card__meta {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--text-sm);
}

.location-card__meta > div {
  color: rgba(255, 255, 255, 0.78);
}

.location-card__meta > div:first-child {
  margin-bottom: var(--space-1);
}

.location-card__meta-label {
  color: rgba(255, 255, 255, 0.55);
}

.location-card__meta-value {
  color: #fff;
  font-weight: var(--weight-semibold);
}

.location-card__phone {
  color: var(--color-gold-light);
  font-weight: var(--weight-semibold);
}

.location-card__phone:hover {
  color: #fff;
}

.location-card__maps {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-gold-light);
  transition: color var(--transition-fast);
}

.location-card__maps:hover {
  color: #fff;
}

/* ============================================================
   DEPARTMENT CONTACTS
============================================================ */

.dept-contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.dept-contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.dept-contact-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.dept-contact-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--color-brand-primary-faint);
  color: var(--color-brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.dept-contact-card__dept {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-2);
}

.dept-contact-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.dept-contact-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.dept-contact-card__email {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-brand-primary);
  transition: gap var(--transition-fast);
}

.dept-contact-card__email:hover {
  gap: var(--space-3);
}

/* ============================================================
   SOCIAL LINKS
============================================================ */

/* Social section inherits the About "Ready to partner with us?" CTA look
   (cta-strip--light): transparent warm wash + bloom + glass, dark text. */
.social-inner {
  text-align: center;
}

.social-section .section-label {
  color: var(--color-gold-deep);
}

.social-section__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.social-section__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-10);
  max-width: 420px;
  margin-inline: auto;
  line-height: var(--leading-relaxed);
}

.social-links-row {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.social-link-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.social-link-pill:hover {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: var(--color-gold-light);
}

.social-link-pill svg {
  flex-shrink: 0;
}

/* ============================================================
   FEEDBACK / RESPONSE
============================================================ */

#contactFeedback {
  display: none;
  margin-bottom: var(--space-5);
}

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .office-card {
    position: static;
  }
  .contact-tabs {
    width: 100%;
    justify-content: stretch;
  }
  .contact-tab-btn {
    flex: 1;
    text-align: center;
    padding-inline: var(--space-3);
  }
}

@media (max-width: 768px) {
  .dept-contacts-grid {
    grid-template-columns: 1fr;
  }
  .contact-form-card {
    padding: var(--space-6);
  }
  .contact-form-card .form-row {
    grid-template-columns: 1fr;
  }
  .map-wrapper iframe {
    height: 300px;
  }
  .social-links-row {
    flex-direction: column;
    align-items: center;
  }
  .contact-tabs {
    flex-wrap: wrap;
    width: auto;
  }
}

@media (max-width: 480px) {
  .contact-hero {
    padding: var(--space-16) 0 var(--space-12);
  }
}
