/* ═══════════════════════════════════════════════════
   Automotive CTF Page Styles
   ═══════════════════════════════════════════════════ */

/* ── Utilities ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Container ── */
.ctf-container {
  max-width: var(--max-w-content, 1200px);
  width: 90%;
  margin: 0 auto;
  padding: 0 var(--space-container, 24px);
}

.ctf-container--wide {
  max-width: var(--max-w-wide, 1500px);
  width: 80%;
}

/* ── Section base ── */
.ctf-section {
  padding-top: var(--space-section, 80px);
  padding-bottom: var(--space-section, 80px);
}

/* ── Section Header ── */
.ctf-section-header {
  text-align: center;
  margin-bottom: 50px;
}

.ctf-section-header h2 {
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: var(--text-3xl, 2rem);
  font-weight: 700;
  color: var(--color-text-primary, #1b212c);
  max-width: 900px;
  width: 90%;
  margin: 0 auto;
  line-height: 1.3;
}

/* ── Divider ── */
.ctf-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.ctf-divider__primary {
  width: 80px;
  height: 3px;
  background: var(--color-primary, #ff0037);
  border-radius: 2px;
}

.ctf-divider__line {
  flex: 1;
  height: 1px;
  background: var(--color-border-light, #e0e0e0);
  margin-left: 8px;
}

/* ── Separator ── */
.ctf-separator {
  max-width: var(--max-w-wide, 1500px);
  margin: 0 auto;
  width: 80%;
  border-top: 1px solid #ccc;
}

/* ── Buttons ── */
.ctf-btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md, 8px);
  transition: all var(--transition-normal, 0.2s) ease;
  cursor: pointer;
  text-align: center;
}

.ctf-btn--outline {
  color: var(--color-primary, #ff0037);
  background: transparent;
  border: 2px solid var(--color-primary, #ff0037);
}

.ctf-btn--outline:hover {
  background: var(--color-primary, #ff0037);
  color: #fff;
}

.ctf-arrow-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.45em;
  font-size: 0;
}

.ctf-arrow-icon::before {
  content: "\2192";
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════
   HERO BANNER
   ═══════════════════════════════════════════════════ */
.ctf-hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #1b212c;
}

.ctf-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ctf-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ctf-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 38, 78, 0.25);
  z-index: 2;
}

.ctf-hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 80px 24px 120px;
}

.ctf-hero__logo {
  max-width: 500px;
  width: 60%;
  height: auto;
}

.ctf-hero__title {
  color: #fff;
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 20px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ctf-hero__pixels {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 3;
}

.ctf-hero__pixels img {
  width: 100%;
  display: block;
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════
   OVERVIEW
   ═══════════════════════════════════════════════════ */
.ctf-overview {
  padding-top: 50px;
}

.ctf-overview__text {
  max-width: 900px;
  margin: 0 auto;
}

.ctf-overview__text p {
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text-primary, #1b212c);
  margin-bottom: 16px;
}

.ctf-overview__text a {
  color: var(--color-primary, #ff0037);
}

.ctf-overview__cta {
  text-align: center;
  margin-top: 40px;
}

/* ═══════════════════════════════════════════════════
   FEATURES (workflow cards)
   ═══════════════════════════════════════════════════ */
.ctf-features {
  padding-top: 0;
}

.ctf-features .ctf-section-header {
  margin-bottom: 80px;
  margin-top: 50px;
}

.ctf-workflow {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  margin-bottom: 0;
  gap: 0;
  background: #fff;
}

.ctf-workflow--reverse {
  flex-direction: row-reverse !important;
}

.ctf-workflow__media {
  flex: 0 0 50%;
  max-width: 50%;
  min-width: 0;
  overflow: hidden;
}

.ctf-workflow__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.ctf-workflow__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: none;
}

.ctf-workflow__text {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 50px 60px;
  box-sizing: border-box;
}

.ctf-workflow__text h3 {
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary, #1b212c);
  margin-bottom: 20px;
  line-height: 1.3;
}

.ctf-workflow__text p {
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary, #555);
}

/* ═══════════════════════════════════════════════════
   MECHANICS
   ═══════════════════════════════════════════════════ */
.ctf-mechanics {
  padding-top: 50px;
}

.ctf-mechanics__title {
  text-align: center;
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary, #1b212c);
  margin-bottom: 30px;
}

.ctf-mechanics__ctas {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0 auto 60px;
  align-items: stretch;
}

.ctf-mechanics__cta-item {
  display: flex;
}

.ctf-mechanics__cta-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border: 2px solid var(--color-accent, #c4151c);
  border-radius: 4px;
  color: var(--color-accent, #c4151c);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  line-height: 1.3;
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none;
}

.ctf-mechanics__cta-item a:hover {
  background: var(--color-accent, #c4151c);
  color: #fff;
}

/* ── Schedule ── */
.ctf-schedule {
  max-width: 500px;
  width: 90%;
  margin: 30px auto 0;
}

.ctf-schedule__group {
  margin-bottom: 2px;
}

.ctf-schedule__label {
  background: #2c323c;
  text-align: center;
  padding: 10px 16px;
}

.ctf-schedule__label p {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.ctf-schedule__row {
  background: #f4f4f4;
  padding: 14px 16px;
  text-align: center;
}

.ctf-schedule__row--multi {
  background: #eaeaea;
}

.ctf-schedule__row p {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  color: var(--color-text-primary, #1b212c);
}

.ctf-schedule__row a {
  color: var(--color-primary, #ff0037);
}

.ctf-mechanics__contact {
  max-width: 500px;
  width: 90%;
  margin: 20px auto 0;
  text-align: center;
  padding: 10px;
}

.ctf-mechanics__contact p {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.ctf-mechanics__contact a {
  color: var(--color-primary, #ff0037);
}

/* ═══════════════════════════════════════════════════
   UPDATES (Blog cards grid)
   ═══════════════════════════════════════════════════ */
.ctf-updates {
  background: #f0f5fa;
  position: relative;
  overflow: hidden;
}

.ctf-pixels-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: scaleY(-1);
}

.ctf-pixels-top img {
  width: 100%;
  opacity: 0.5;
}

.ctf-updates__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.ctf-updates__card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  box-shadow: var(--shadow-card, 0 2px 12px rgba(0, 0, 0, 0.08));
  transition: box-shadow var(--transition-normal, 0.2s) ease, transform var(--transition-normal, 0.2s) ease;
}

.ctf-updates__card:hover {
  box-shadow: var(--shadow-card-hover, 0 8px 24px rgba(0, 0, 0, 0.15));
  transform: translateY(-4px);
}

.ctf-updates__card a {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.ctf-updates__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.ctf-updates__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ctf-updates__title {
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary, #1b212c);
  padding: 16px 20px 8px;
  line-height: 1.4;
  width: 100%;
}

.ctf-updates__date {
  font-size: 13px;
  color: #888;
  padding: 0 20px;
  width: 100%;
}

.ctf-updates__btn {
  color: #fff;
  background: var(--color-primary, #ff0037);
  text-align: center;
  padding: 10px 20px;
  margin: 20px;
  margin-top: auto;
  border-radius: var(--radius-md, 8px);
  font-weight: 600;
  font-size: 14px;
  transition: background var(--transition-normal, 0.2s) ease;
}

.ctf-updates__card a:hover .ctf-updates__btn {
  background: var(--color-primary-hover, #c5001a);
}

/* ═══════════════════════════════════════════════════
   INSIGHTS (Blog list)
   ═══════════════════════════════════════════════════ */
.ctf-insights {
  padding-top: 90px;
}

.ctf-insights__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ctf-insights__item {
  margin-bottom: 30px;
}

.ctf-insights__holder {
  display: block;
}

.ctf-insights__info {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.ctf-insights__thumb-link {
  flex-shrink: 0;
  width: 280px;
}

.ctf-insights__thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md, 8px);
  aspect-ratio: 16 / 10;
}

.ctf-insights__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slide, 0.4s) ease;
}

.ctf-insights__thumb-link:hover .ctf-insights__thumb img {
  transform: scale(1.05);
}

.ctf-insights__category {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-primary, #ff0037);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 3px;
}

.ctf-insights__meta {
  flex: 1;
  min-width: 0;
}

.ctf-insights__meta h3 {
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary, #1b212c);
  margin-bottom: 8px;
  line-height: 1.4;
}

.ctf-insights__meta h3 a {
  color: inherit;
  text-decoration: none;
}

.ctf-insights__meta h3 a:hover {
  color: var(--color-primary, #ff0037);
}

.ctf-insights__date {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
}

.ctf-insights__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary, #555);
}

.ctf-insights__read-more {
  display: inline-block;
  color: var(--color-primary, #ff0037);
  font-weight: 600;
  font-size: 14px;
  margin-top: 12px;
  white-space: nowrap;
  align-self: flex-end;
}

.ctf-insights__visit-btn {
  display: block;
  max-width: 200px;
  margin: 40px auto 0;
}

/* ═══════════════════════════════════════════════════
   CTA FOOTER
   ═══════════════════════════════════════════════════ */
.ctf-cta {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ctf-cta__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ctf-cta__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ctf-cta__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
  z-index: 2;
}

.ctf-cta__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 80px 24px;
}

.ctf-cta__title {
  color: #fff;
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
}

.ctf-cta__buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ctf-cta__btn-item {
  border: 1px solid #fff;
  padding: 12px 24px;
  text-align: center;
  transition: all var(--transition-normal, 0.2s) ease;
}

.ctf-cta__btn-item a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
}

.ctf-cta__btn-item:hover {
  background: var(--color-primary, #ff0037);
  border-color: var(--color-primary, #ff0037);
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media screen and (min-width: 1700px) {
  .ctf-hero {
    min-height: 100vh;
  }
}

@media screen and (max-width: 1200px) {
  .ctf-hero__logo {
    max-width: 400px;
    width: 60%;
  }

  .ctf-container--wide {
    width: 90%;
  }
}

@media screen and (max-width: 950px) {

  .ctf-workflow,
  .ctf-workflow--reverse {
    flex-direction: column;
  }

  .ctf-workflow__media,
  .ctf-workflow__text {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .ctf-workflow__text {
    padding: 30px;
  }

  .ctf-hero__logo {
    max-width: 500px;
    width: 80%;
  }

  .ctf-updates__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ctf-container--wide {
    width: 90%;
  }
}

@media screen and (max-width: 780px) {
  .ctf-section-header h2 {
    font-size: 24px;
  }

  .ctf-hero {
    min-height: 450px;
  }

  .ctf-hero__logo {
    max-width: 500px;
    width: 100%;
  }

  .ctf-hero__content {
    padding: 60px 20px 100px;
  }

  .ctf-mechanics__ctas {
    flex-direction: column;
    align-items: center;
  }

  .ctf-updates__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .ctf-insights__info {
    flex-direction: column;
  }

  .ctf-insights__thumb-link {
    width: 100%;
  }

  .ctf-insights__read-more {
    align-self: flex-start;
  }

  .ctf-cta__title {
    font-size: 24px;
  }

  .ctf-cta__buttons {
    flex-direction: column;
    align-items: center;
  }

  .ctf-cta__btn-item {
    width: 100%;
    max-width: 300px;
  }
}

@media screen and (max-width: 480px) {
  .ctf-section {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .ctf-workflow__text {
    padding: 24px 20px;
  }

  .ctf-overview__text p {
    font-size: 16px;
  }

  .ctf-mechanics__title {
    font-size: 22px;
  }

  .ctf-schedule {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════
   JP-only: Organizers Section
   ═══════════════════════════════════════════════════ */
.ctf-organizers {
  padding-top: 40px;
  padding-bottom: 20px;
}

.ctf-organizers__group {
  text-align: center;
  margin-bottom: 40px;
  padding: 10px;
}

.ctf-organizers__label {
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 25px;
  font-weight: 700;
  color: var(--color-text-primary, #1b212c);
  margin-bottom: 20px;
}

.ctf-organizers__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 950px;
  margin: 0 auto;
}

.ctf-organizers__logo {
  height: 100px;
  max-width: 250px;
  object-fit: contain;
}

.ctf-organizers__footnote {
  text-align: center;
  font-size: 14px;
  color: var(--color-text-secondary, #555);
  margin-top: 0;
}

/* ═══════════════════════════════════════════════════
   JP-only: Event Overview Section
   ═══════════════════════════════════════════════════ */
.ctf-event-overview {
  background: var(--color-surface-alt, #f7f8fa);
}

.ctf-event {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.ctf-event:first-of-type {
  border-top: none;
  border-radius: 8px 8px 0 0;
}

.ctf-event:last-of-type {
  border-radius: 0 0 8px 8px;
}

.ctf-event:only-of-type {
  border-radius: 8px;
}

.ctf-container--wide > .ctf-event:first-of-type ~ .ctf-section-header + .ctf-event,
.ctf-container--wide > .ctf-event {
  box-shadow: none;
}

.ctf-container--wide {
  /* single card wrapper shadow */
}

.ctf-event-overview .ctf-container--wide > .ctf-event:first-of-type {
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

.ctf-event-overview .ctf-container--wide > .ctf-event:last-of-type {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ctf-event__title {
  font-family: var(--font-primary, 'Ubuntu', 'Open Sans', sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary, #1b212c);
  margin-bottom: 10px;
}

.ctf-event__date {
  font-size: 16px;
  color: var(--color-accent, #c4151c);
  margin-bottom: 16px;
}

.ctf-event__details {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-secondary, #4a5568);
  margin-bottom: 20px;
}

.ctf-event__speakers {
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

.ctf-event__speaker {
  margin-bottom: 24px;
}

.ctf-event__talk-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary, #1b212c);
  margin-bottom: 6px;
}

.ctf-event__speaker-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary, #4a5568);
  margin-bottom: 8px;
}

.ctf-event__speaker-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary, #4a5568);
}

.ctf-event__contact {
  max-width: 900px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-secondary, #4a5568);
}

.ctf-event__contact a {
  color: var(--color-accent, #c4151c);
}

/* JP Overview CTAs (multiple buttons) */
.ctf-overview__heading {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.ctf-overview__subheading {
  text-align: center;
  margin-top: 30px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.ctf-overview__ctas {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
  align-items: stretch;
}

.ctf-overview__cta-item {
  display: flex;
}

.ctf-overview__cta-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border: 2px solid var(--color-accent, #c4151c);
  border-radius: 4px;
  color: var(--color-accent, #c4151c);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  line-height: 1.3;
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none;
}

.ctf-overview__cta-item a:hover {
  background: var(--color-accent, #c4151c);
  color: #fff;
}

@media screen and (max-width: 780px) {
  .ctf-organizers__logos {
    gap: 24px;
  }

  .ctf-organizers__logo {
    height: 70px;
    max-width: 180px;
  }

  .ctf-event {
    padding: 20px;
  }

  .ctf-event__title {
    font-size: 18px;
  }

  .ctf-overview__ctas {
    flex-direction: column;
    align-items: center;
  }
}

/* ═══════════════════════════════════════════════════
   Modal (HubSpot Form)
   ═══════════════════════════════════════════════════ */
#ctfModalHolder {
  display: none;
}

#ctfModalHolder.ctf-modal--active {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.ctf-modal__bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 33, 43, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1;
}

.ctf-modal__card {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  min-height: 80vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.ctf-modal__inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.ctf-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: #c4151c;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  line-height: 1;
}

.ctf-modal__close:hover {
  background: #a01018;
}

.ctf-modal__body {
  overflow-y: auto;
  max-height: 90vh;
  padding: 40px 24px;
}

@media screen and (max-width: 705px) {
  #ctfModalHolder.ctf-modal--active {
    align-items: flex-start;
    overflow-y: auto;
  }

  .ctf-modal__card {
    margin: 30px auto;
    min-width: auto;
  }
}