/* =============================================================================
   CINESTAR EVENTS — Contact Page
   theme/cinestar-child/assets/css/contact.css
   Depends on: main.css (design tokens, base, buttons)
   Class prefix: ce-ct-*

   Sections:
     A. Hero
     B. Shared Section Typography
     C. Main 2-Column Layout
     D. Contact Form
     E. Contact Info Column
     F. Social Links
     G. Google Map
     H. FAQ Accordion
   ============================================================================= */


/* =============================================================================
   A. HERO
   ============================================================================= */

.ce-ct-hero {
  position: relative;
  min-height: 48vh;
  display: flex;
  align-items: center;
  padding-top: 80px; /* clearance for sticky header */
  overflow: hidden;
}

.ce-ct-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 70% 110%, rgba(255, 20, 147, 0.25) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 20% 80%,  rgba(123, 47, 190, 0.2)  0%, transparent 60%),
    #0A0A0A;
  z-index: 0;
}

.ce-ct-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.4);
  z-index: 1;
}

.ce-ct-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 3.5rem;
  padding-bottom: 4.5rem;
}

.ce-ct-hero__eyebrow {
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ce-magenta);
  margin: 0 0 0.875rem;
}

.ce-ct-hero__headline {
  font-family: var(--ce-font-heading);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  color: var(--ce-text);
  line-height: 1.05;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.ce-ct-hero__sub {
  font-family: var(--ce-font-body);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--ce-text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.65;
}

.ce-ct-hero__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--ce-bg));
  z-index: 2;
  pointer-events: none;
}


/* =============================================================================
   B. SHARED SECTION TYPOGRAPHY
   ============================================================================= */

.ce-ct-section-eyebrow {
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ce-gold);
  margin: 0 0 0.5rem;
}

.ce-ct-section-eyebrow--centre {
  text-align: center;
}

.ce-ct-section-heading {
  font-family: var(--ce-font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--ce-text);
  margin: 0 0 2rem;
  line-height: 1.15;
}

.ce-ct-section-heading--centre {
  text-align: center;
}


/* =============================================================================
   C. MAIN 2-COLUMN LAYOUT
   ============================================================================= */

.ce-ct-main {
  padding: 5rem 0 5.5rem;
  background: var(--ce-bg);
}

.ce-ct-main__inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}

/* Tablet: info column narrows */
@media (max-width: 1023px) {
  .ce-ct-main__inner {
    grid-template-columns: 1fr 320px;
    gap: 3rem;
  }
}

/* Mobile: single column, info below form */
@media (max-width: 767px) {
  .ce-ct-main {
    padding: 3.5rem 0 4rem;
  }
  .ce-ct-main__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}


/* =============================================================================
   D. CONTACT FORM
   ============================================================================= */

/* Global reset for Astra's dotted-border accessibility rule applied to all inputs:
   Astra dynamic inline CSS sets border-style:dotted on input:focus globally.
   Reset it for everything inside our form before the per-field rules fire. */
#ce-contact-form input:focus,
#ce-contact-form select:focus,
#ce-contact-form textarea:focus {
  border-style: solid;
  outline: 0;
}

.ce-ct-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Two-column row inside form */
.ce-ct-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .ce-ct-form__row {
    grid-template-columns: 1fr;
  }
}

/* Field wrapper */
.ce-ct-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Label */
.ce-ct-form__label {
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-sm);
  font-weight: 600;
  color: var(--ce-text-muted);
  display: flex;
  gap: 0.3rem;
  align-items: baseline;
}

.ce-ct-form__required {
  color: var(--ce-magenta);
  font-size: var(--ce-text-xs);
}

.ce-ct-form__optional {
  font-weight: 400;
  color: var(--ce-text-faint);
  font-size: var(--ce-text-xs);
}

/* Input / select / textarea shared base
   ALL five fields must be visually identical — same bg, border, height, padding. */
.ce-ct-form__input {
  width: 100%;
  background: #1A1A1A !important; /* force dark bg — Astra resets inputs to white */
  border: 1px solid #333333;
  border-radius: var(--ce-radius);
  color: #E0E0E0;
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-base);
  line-height: 1.5;
  padding: 0.75rem 1rem;
  height: auto;
  min-height: 48px; /* equal height across all single-line fields */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.ce-ct-form__input::placeholder {
  color: #888888;
}

/* ── Focus: ID selector beats Astra's dynamic inline <style> at equal specificity.
   Must override border-style, border-color, border-width separately because
   Astra sets them individually after our border shorthand.
   Also covers :focus-visible (keyboard nav) and resets Astra's text colour change.  ── */
#ce-contact-form .ce-ct-form__input:focus,
#ce-contact-form .ce-ct-form__input:focus-visible {
  border-style: solid !important;
  border-color: #FFD700 !important;
  border-width: 1px !important;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15) !important;
  outline: 0 !important;
  outline-style: none !important;
  color: #E0E0E0 !important; /* Astra resets to #475569 on focus */
}

/* Select wrapper — for custom chevron */
.ce-ct-form__select-wrap {
  position: relative;
}

.ce-ct-form__select {
  padding-right: 40px; /* explicit px — room for custom chevron, no overlap */
  height: auto;
  line-height: 1.5;
  overflow: visible;
  cursor: pointer;
}

.ce-ct-form__select-arrow {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ce-text-faint);
  pointer-events: none;
  transition: color 0.2s ease;
}

.ce-ct-form__select-wrap:focus-within .ce-ct-form__select-arrow {
  color: var(--ce-gold);
}

/* Select option text (browser-rendered drop-list) */
.ce-ct-form__select option {
  background: #1A1A1A;
  color: #E0E0E0;
}

/* Textarea */
.ce-ct-form__textarea {
  resize: vertical;
  min-height: 160px;
}

/* Error state */
.ce-ct-form__field--error .ce-ct-form__input {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.ce-ct-form__error {
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-xs);
  color: #e74c3c;
  min-height: 1rem;
  display: block;
}

/* Submit button */
.ce-ct-form__submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.ce-ct-form__submit-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-top-color: #0A0A0A;
  border-radius: 50%;
  animation: ce-ct-spin 0.7s linear infinite;
}

.ce-ct-form__submit--loading .ce-ct-form__submit-text {
  opacity: 0.7;
}

.ce-ct-form__submit--loading .ce-ct-form__submit-spinner {
  display: inline-block;
}

.ce-ct-form__submit--loading .ce-ct-form__submit-icon {
  display: none;
}

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

/* Feedback message (success / error) */
.ce-ct-form__feedback {
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-base);
  font-weight: 500;
  padding: 1rem 1.25rem;
  border-radius: var(--ce-radius);
  line-height: 1.5;
}

.ce-ct-form__feedback--success {
  background: rgba(39, 174, 96, 0.12);
  border: 1px solid rgba(39, 174, 96, 0.35);
  color: #2ecc71;
}

.ce-ct-form__feedback--error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: #e74c3c;
}


/* =============================================================================
   E. CONTACT INFO COLUMN
   ============================================================================= */

.ce-ct-info-col {
  /* No sticky — let the column sit naturally within the grid */
}

.ce-ct-info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ce-ct-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.ce-ct-info-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(255, 215, 0, 0.08);
  border-radius: var(--ce-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ce-gold);
  margin-top: 0.1rem;
}

.ce-ct-info-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ce-ct-info-item__label {
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ce-text-faint);
}

.ce-ct-info-item__value {
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-base);
  font-weight: 500;
  color: var(--ce-text);
  text-decoration: none;
  transition: color 0.2s ease;
  word-break: break-all;
}

a.ce-ct-info-item__value:hover,
a.ce-ct-info-item__value:focus-visible {
  color: var(--ce-gold);
}



/* =============================================================================
   F. SOCIAL LINKS
   ============================================================================= */

.ce-ct-social {
  border-top: 1px solid var(--ce-border);
  padding-top: 1.5rem;
}

.ce-ct-social__heading {
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ce-text-faint);
  margin: 0 0 1rem;
}

.ce-ct-social__links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ce-ct-social__link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
  color: var(--ce-text-muted);
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-sm);
  font-weight: 500;
  padding: 0.65rem 0.875rem;
  border-radius: var(--ce-radius);
  border: 1px solid var(--ce-border);
  background: var(--ce-bg-card);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ce-ct-social__link:hover,
.ce-ct-social__link:focus-visible {
  color: var(--ce-gold);
  border-color: var(--ce-border-gold);
  box-shadow: var(--ce-glow-gold);
  outline: none;
}


/* =============================================================================
   G. GOOGLE MAP
   ============================================================================= */

.ce-ct-map-section {
  background: var(--ce-bg-raised);
  border-top: 1px solid var(--ce-border);
}

.ce-ct-map-wrap {
  position: relative;
  overflow: hidden;
  /* Slight gold border top for visual separation */
  border-top: 2px solid rgba(255, 215, 0, 0.15);
}

.ce-ct-map__iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  filter: invert(0.9) hue-rotate(180deg) saturate(0.5) brightness(0.85);
  /* Dark-mode treatment — makes Google Maps match our dark theme */
}

/* Fallback for browsers where filter isn't ideal */
@media (prefers-reduced-motion: reduce) {
  .ce-ct-map__iframe {
    filter: grayscale(0.6) brightness(0.7);
  }
}

.ce-ct-map-caption {
  text-align: center;
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-sm);
  color: var(--ce-text-faint);
  padding: 0.875rem var(--ce-space-sm);
  margin: 0;
  background: var(--ce-bg-raised);
}

@media (max-width: 767px) {
  .ce-ct-map__iframe {
    height: 280px;
  }
}


/* =============================================================================
   H. FAQ ACCORDION
   Matches the same pattern as ce-ev-faq (event-single.css) but prefixed ce-ct-.
   CSS grid-template-rows: 0fr → 1fr technique for smooth height animation.
   ============================================================================= */

.ce-ct-faq-section {
  padding: 5rem 0 5.5rem;
  background: var(--ce-bg);
}

.ce-ct-faq__list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ce-ct-faq__item {
  background: #1A1A1A;
  border: 1px solid var(--ce-border);
  border-radius: var(--ce-radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.ce-ct-faq__item.is-open {
  border-color: var(--ce-gold);
}

/* Question button */
.ce-ct-faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  background: #1A1A1A; /* explicit — prevents Astra gold override via --ast-global-color-0 */
  border: none;
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  font-family: var(--ce-font-heading);
  font-size: var(--ce-text-base);
  font-weight: 600;
  color: #FFFFFF;
  text-align: left;
  min-height: 44px;
  transition: background 0.2s ease, color 0.2s ease;
}

@media (hover: hover) {
  .ce-ct-faq__q:hover {
    background: #222222;
    color: #FFFFFF;
  }
}

/* Focused-but-closed: override Astra's gold --ast-global-color-0 on button:focus.
   :focus-visible shows a keyboard focus ring; :focus (non-visible) stays clean. */
.ce-ct-faq__q:focus {
  background: #1A1A1A;
  color: #FFFFFF;
  outline: none;
}

.ce-ct-faq__q:focus-visible {
  outline: 2px solid var(--ce-gold, #FFD700);
  outline-offset: -2px;
}

/* Active/expanded: gold background, dark text for contrast */
.ce-ct-faq__item.is-open .ce-ct-faq__q {
  background: #FFD700;
  color: #0A0A0A;
}

/* Chevron — white by default, dark when active (on gold bg) */
.ce-ct-faq__chevron {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  color: #FFFFFF;
  transition: transform 0.3s ease, color 0.2s ease;
}

.ce-ct-faq__item.is-open .ce-ct-faq__chevron {
  transform: rotate(180deg);
  color: #0A0A0A;
}

/* Grid height trick — animates from 0 to natural content height */
.ce-ct-faq__a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.ce-ct-faq__item.is-open .ce-ct-faq__a-wrap {
  grid-template-rows: 1fr;
}

.ce-ct-faq__a-inner {
  overflow: hidden;
  background: #151515;
}

.ce-ct-faq__a {
  padding: 0.25rem 1.5rem 1.375rem;
  font-family: var(--ce-font-body);
  font-size: var(--ce-text-base);
  line-height: 1.75;
  color: var(--ce-text-muted);
  margin: 0;
}

.ce-ct-faq__a a {
  color: var(--ce-gold);
  text-decoration: underline;
  text-decoration-color: rgba(255, 215, 0, 0.4);
  text-underline-offset: 3px;
}

.ce-ct-faq__a a:hover {
  color: var(--ce-gold-hover);
  text-decoration-color: var(--ce-gold-hover);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ce-ct-faq__a-wrap {
    transition: none;
  }
  .ce-ct-faq__chevron {
    transition: none;
  }
}
