/*
  ============================================================
  THE SNOOGUMS ACADEMY - CONTACT PAGE STYLES
  File: css/contact.css

  Works on top of: style.css, about.css, register.css
  Adds: info cards, map embed styling, FAQ accordion.
  ============================================================
*/

.contact-hero .phs-1 { background: var(--color-purple); }
.contact-hero .phs-2 { background: var(--color-gold); }


/* ============================================================
   CONTACT INFO CARDS
============================================================ */
.contact-info-section {
  padding: var(--space-xl) 0;
  background: var(--color-white);
  margin-top: -3rem;  /* Pulls the cards up to slightly overlap the hero */
  position: relative;
  z-index: 2;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.contact-info-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.contact-info-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-pink);
}

.cic-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-pink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto var(--space-sm);
  box-shadow: var(--shadow-pink);
}

.contact-info-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.3rem;
}

.contact-info-card p {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.cic-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-pink);
  text-decoration: none;
  word-break: break-word;
}

.cic-link:hover {
  text-decoration: underline;
}


/* ============================================================
   MAIN CONTACT SECTION — FORM + MAP
============================================================ */
.contact-main-section {
  padding: var(--space-xxl) 0;
  background: var(--color-light);
}

.contact-main-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-xxl);
  align-items: start;
}

.contact-form-wrap {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* Light-theme form field overrides (same pattern as careers.css) */
.contact-form-wrap .form-input {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  color: var(--color-dark);
}

.contact-form-wrap .form-input::placeholder {
  color: var(--color-text-light);
}

.contact-form-wrap .form-input:focus {
  background: var(--color-white);
  border-color: var(--color-pink);
  box-shadow: 0 0 0 3px rgba(208, 0, 111, 0.1);
}

.contact-form-wrap .form-label {
  color: var(--color-dark);
}

.contact-form-wrap .input-icon {
  color: var(--color-text-light);
}

.contact-form-wrap .input-wrap:focus-within .input-icon {
  color: var(--color-pink);
}

.contact-form-wrap .form-textarea {
  min-height: 140px;
  padding-left: var(--space-md);
  resize: vertical;
}

.contact-form-wrap .success-message h2 { color: var(--color-dark); }
.contact-form-wrap .success-message > p { color: var(--color-text-light); }


/* --- Side column: map + info cards --- */
.contact-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  height: 280px;
}

.contact-map {
  width: 100%;
  height: 100%;
  border: none;   /* Remove the default iframe border */
}

.contact-side-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
}

.contact-side-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-side-card h4 i {
  color: var(--color-pink);
}

.contact-side-card p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* Reuse footer-socials styling but on a light background */
.contact-side-card .footer-socials a {
  background: var(--color-light);
  color: var(--color-text-light);
}

.contact-side-card .footer-socials a:hover {
  background: var(--color-pink);
  color: white;
}


/* ============================================================
   FAQ ACCORDION
============================================================ */
.faq-section {
  padding: var(--space-xxl) 0;
  background: var(--color-white);
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  /*
    overflow: hidden is ESSENTIAL here — it clips the .faq-answer
    content while it's collapsed (max-height: 0). Without this,
    the answer text would still be visible poking out the bottom
    even when "closed".
  */
}

/* The clickable question button */
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-light);
  border: none;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark);
  cursor: pointer;
  transition: var(--transition);
}

.faq-question:hover {
  background: rgba(208, 0, 111, 0.04);
  color: var(--color-pink);
}

.faq-question i {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--color-pink);
}

/*
  When the FAQ item is open (JS adds class "open" to .faq-item),
  rotate the chevron icon 180° so it points up instead of down.
*/
.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

.faq-item.open .faq-question {
  background: rgba(208, 0, 111, 0.06);
  color: var(--color-pink);
}

/* The collapsible answer area */
.faq-answer {
  max-height: 0;     /* Collapsed by default */
  overflow: hidden;
  transition: max-height 0.35s ease;
  /*
    We animate max-height instead of height because CSS transitions
    cannot animate to/from "auto" height directly. By setting a
    generous max-height when open (controlled via JS using the
    actual scrollHeight), we get a smooth expand/collapse animation.
  */
}

.faq-answer p {
  padding: 0 var(--space-lg) var(--space-md);
  color: var(--color-text-light);
  font-size: 0.9rem;
  line-height: 1.8;
}

.faq-answer a {
  color: var(--color-pink);
  font-weight: 700;
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}


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

@media screen and (max-width: 992px) {
  .contact-main-grid {
    grid-template-columns: 1fr;
  }

  .contact-side {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .contact-map-wrap {
    flex: 1 1 100%;
  }

  .contact-side-card {
    flex: 1 1 260px;
  }
}

@media screen and (max-width: 768px) {
  .contact-info-section {
    margin-top: -2rem;
  }

  .contact-form-wrap {
    padding: var(--space-lg);
  }

  .contact-side {
    flex-direction: column;
  }

  .faq-question {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.88rem;
  }

  .faq-answer p {
    padding: 0 var(--space-md) var(--space-sm);
  }
}

@media screen and (max-width: 480px) {
  .contact-info-grid {
    grid-template-columns: 1fr 1fr;
  }
}
