/* GCTLC Event Content Page Redesign */

.node--type-event {
  --gctlc-green: #0b5d35;
  --gctlc-green-dark: #084828;
  --gctlc-green-light: #e8f3ed;
  --event-border: #dfe7e2;
  --event-text: #25312b;
  --event-muted: #5f6f67;
  --event-card: #ffffff;

  color: var(--event-text);
}

/* Hide default Drupal title */
#block-skvare-custom-barrio-page-title {
  display: none !important;
}

/* Page container */
.node--type-event .node__content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

.node--type-event .node__content > .layout {
  width: 100%;
  clear: both;
  margin-bottom: 24px;
}

/* Shared card style */
.node--type-event .node__content > .layout--twocol-section:first-of-type,
.node--type-event .node__content > .layout--twocol-section:not(:first-of-type) .layout__region {
  background: var(--event-card);
  border: 1px solid var(--event-border);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

/* HERO */

.node--type-event .node__content > .layout--twocol-section:first-of-type {
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 32px;
  align-items: stretch;
  padding: 32px;
}

.node--type-event .node__content > .layout--twocol-section:first-of-type .layout__region {
  border: none;
  box-shadow: none;
  padding: 0;
  flex: unset;
}

.node--type-event .node__content > .layout--twocol-section:first-of-type .layout__region--first {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
}

/* Hero full-width items */
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-inline-blockbasic:has(.event-pill),
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventtitle {
  grid-column: 1 / -1;
  padding: 0 !important;
  border: none !important;
}

/* Event pill */
.node--type-event .block-inline-blockbasic:has(.event-pill) {
  margin: 0 0 18px !important;
}

.node--type-event .event-pill,
.node--type-event .event-pill p {
  display: inline-flex;
  align-items: center;
}

.node--type-event .event-pill p {
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--gctlc-green-light);
  color: var(--gctlc-green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  line-height: 1;
}

/* Hero title */
.node--type-event .block-field-blocknodeeventtitle {
  margin-bottom: 24px;
}

.node--type-event .node__content > .layout--twocol-section:first-of-type .field--name-title,
.node--type-event .node__content > .layout--twocol-section:first-of-type h1 {
  color: #2f2f2f;
  font-size: clamp(2.4rem, 3vw, 3.5rem);
  line-height: 1.06;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0;
}

/* HERO METADATA */

/* Reset actual hero metadata fields */
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventfield-event-repeat-date,
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventfield-event-type,
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventfield-type-of-event,
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventfield-other-event-type,
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventfield-event-type-other {
  border-right: none !important;
  padding-top: 0;
  padding-bottom: 0;
}

/* Column 1: Event Date */
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventfield-event-repeat-date {
  grid-column: 1;
  padding-left: 0 !important;
  padding-right: 30px !important;
  border-right: 1px solid var(--event-border) !important;
}

/* Column 2: Event Type */
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventfield-event-type {
  grid-column: 2;
  padding-left: 30px !important;
  padding-right: 30px !important;
  border-right: 1px solid var(--event-border) !important;
}

/* Optional free-text type under Event Type */
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventfield-other-event-type,
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventfield-event-type-other {
  grid-column: 2;
  padding-left: 30px !important;
  padding-right: 30px !important;
  margin-top: 8px;
  border-right: 1px solid var(--event-border) !important;
}

/* Column 3: Event Format */
.node--type-event .node__content > .layout--twocol-section:first-of-type .block-field-blocknodeeventfield-type-of-event {
  grid-column: 3;
  padding-left: 30px !important;
  padding-right: 0 !important;
  border-right: none !important;
}

/* Hero image */
.node--type-event .node__content > .layout--twocol-section:first-of-type .layout__region--second {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding-top: 0;
}

.node--type-event .field--name-field-image img {
  width: 100% !important;
  max-width: 360px !important;
  height: auto !important;
  max-height: 240px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* SHARED FIELD STYLING */

.node--type-event .node__content .field__label {
  color: var(--event-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.node--type-event .node__content a {
  color: var(--gctlc-green);
  font-weight: 600;
}

.node--type-event .node__content a:hover {
  color: var(--gctlc-green-dark);
}

/* ACTION BUTTONS */

.node--type-event .node__content > .layout--onecol:has(.block-field-blocknodeeventfield-event-registration),
.node--type-event .node__content > .layout--onecol:has(.block-field-blocknodeeventfield-more-information-about-eve) {
  margin-top: -4px;
  margin-bottom: 28px;
}

.node--type-event .layout--onecol:has(.block-field-blocknodeeventfield-event-registration) .layout__region--content,
.node--type-event .layout--onecol:has(.block-field-blocknodeeventfield-more-information-about-eve) .layout__region--content {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.node--type-event .block-field-blocknodeeventfield-event-registration,
.node--type-event .block-field-blocknodeeventfield-more-information-about-eve {
  width: 100% !important;
  margin: 0 !important;
}

.node--type-event .field--name-field-event-registration .field__label,
.node--type-event .field--name-field-more-information-about-eve .field__label {
  display: none;
}

.node--type-event .block-field-blocknodeeventfield-event-registration a,
.node--type-event .block-field-blocknodeeventfield-more-information-about-eve a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  width: 100%;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}

.node--type-event .block-field-blocknodeeventfield-event-registration a {
  background: var(--gctlc-green);
  color: #fff !important;
}

.node--type-event .block-field-blocknodeeventfield-more-information-about-eve a {
  background: #fff;
  color: var(--gctlc-green) !important;
  border: 2px solid var(--gctlc-green);
}

.node--type-event .block-field-blocknodeeventfield-event-registration a:hover {
  background: var(--gctlc-green-dark);
}

.node--type-event .block-field-blocknodeeventfield-more-information-about-eve a:hover {
  background: var(--gctlc-green-light);
}

/* MAIN CONTENT */

.node--type-event .node__content > .layout--twocol-section:not(:first-of-type) {
  display: flex !important;
  gap: 28px;
  align-items: flex-start;
}

.node--type-event .node__content > .layout--twocol-section:not(:first-of-type) .layout__region--first {
  flex: 0 0 calc(65% - 14px);
}

.node--type-event .node__content > .layout--twocol-section:not(:first-of-type) .layout__region--second {
  flex: 0 0 calc(35% - 14px);
}

.node--type-event .node__content > .layout--twocol-section:not(:first-of-type) .layout__region {
  padding: 28px;
}

.node--type-event .node__content h2 {
  color: #2f2f2f;
  font-weight: 700;
  margin-bottom: 18px;
}

.node--type-event .field--name-body {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.node--type-event .node__content > .layout--twocol-section:not(:first-of-type) .layout__region--first .block {
  margin-bottom: 28px;
}

.node--type-event .node__content > .layout--twocol-section:not(:first-of-type) .layout__region--first .block:last-child {
  margin-bottom: 0;
}

.node--type-event .node__content > .layout--twocol-section:not(:first-of-type) .layout__region--second .block {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--event-border);
}

.node--type-event .node__content > .layout--twocol-section:not(:first-of-type) .layout__region--second .block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* PILLS */

.node--type-event .field--name-field-intended-audience .field__item,
.node--type-event .field--name-field-event-keyword-tags .field__item {
  display: inline-block;
  margin: 4px 6px 4px 0;
}

.node--type-event .field--name-field-intended-audience a,
.node--type-event .field--name-field-event-keyword-tags a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--gctlc-green-light);
  color: var(--gctlc-green) !important;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}

/* ATTACHMENTS + SOCIAL */

.node--type-event .field--name-field-event-attachments a {
  display: inline-block;
  padding: 14px 16px;
  border: 1px solid var(--event-border);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

.node--type-event .addtoany_list a {
  margin-right: 8px;
}

/* MOBILE */

@media (max-width: 768px) {
  .node--type-event .node__content {
    padding: 0 14px 40px;
  }

  .node--type-event .node__content > .layout--twocol-section:first-of-type {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 22px;
  }

  .node--type-event .node__content > .layout--twocol-section:first-of-type .layout__region--first {
    grid-template-columns: 1fr;
  }

  .node--type-event .node__content > .layout--twocol-section:first-of-type .layout__region--second {
    min-height: 0;
    padding: 18px;
  }

  .node--type-event .node__content > .layout--twocol-section:first-of-type .field--name-title,
  .node--type-event .node__content > .layout--twocol-section:first-of-type h1 {
    font-size: clamp(2.1rem, 10vw, 3rem);
  }

  .node--type-event .field--name-field-image img {
    max-width: 100% !important;
    max-height: 320px !important;
  }

  .node--type-event .node__content > .layout--twocol-section:first-of-type .layout__region--first .block {
    grid-column: 1;
    border-right: none !important;
    border-bottom: 1px solid var(--event-border) !important;
    padding: 0 0 18px !important;
    margin-bottom: 18px;
  }

  .node--type-event .node__content > .layout--twocol-section:first-of-type .layout__region--first .block:last-child {
    border-bottom: none !important;
    margin-bottom: 0;
    padding-bottom: 0 !important;
  }

  .node--type-event .event-pill p {
    white-space: normal;
  }

  .node--type-event .layout--onecol:has(.block-field-blocknodeeventfield-event-registration) .layout__region--content {
    grid-template-columns: 1fr;
  }

  .node--type-event .node__content > .layout--twocol-section:not(:first-of-type) {
    display: block !important;
  }

  .node--type-event .node__content > .layout--twocol-section:not(:first-of-type) .layout__region {
    padding: 22px;
    margin-bottom: 22px;
  }
}