/* Card Group Layout - max 3 per row with wrapping 
 * 
 * BACKUP OF ORIGINAL EVENT-SPECIFIC CARD RULES (Before making global):
 * 
 * .node--type-event .field--name-field-sections .paragraph--type--card {
 *   border-top: none;
 *   margin-top: 0;
 *   padding-top: 16px;
 * }
 * 
 * Updated: 2025-02-02 - Made card styles global for consistency across site
 */

/* GLOBAL: Card group styling applied site-wide */
.paragraph--type--card-group{
  margin-bottom: 24px !important;
  margin-top: 24px !important;
}

/* Override SCSS margins that interfere with flex grid */
.paragraph--type--card-group .field--name-field-card .field--item.card-item,
.card-item {
  margin: 0 !important;
}

.paragraph--type--card-group .field--name-field-card {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 30px !important;
}

/* Default: Cards flex to available space */
.paragraph--type--card-group .field--name-field-card .field--item {
  flex: 1 1 250px !important;
  min-width: 250px !important;
}

/* 2 Cards: 50% each on desktop/tablet */
.paragraph--type--card-group .field--name-field-card:has(.field--item:nth-child(2)):not(:has(.field--item:nth-child(3))) .field--item {
  flex: 1 1 calc(50% - 15px) !important;
  max-width: calc(50% - 15px) !important;
}

/* 3 Cards: 33.33% each on desktop, 33.33% on tablet */
.paragraph--type--card-group .field--name-field-card:has(.field--item:nth-child(3)):not(:has(.field--item:nth-child(4))) .field--item {
  flex: 1 1 calc(33.333% - 20px) !important;
  max-width: calc(33.333% - 20px) !important;
}

/* 4+ Cards: 25% each on desktop */
.paragraph--type--card-group .field--name-field-card:has(.field--item:nth-child(4)) .field--item {
  flex: 1 1 calc(25% - 22.5px) !important;
  max-width: calc(25% - 22.5px) !important;
}

/* Tablet breakpoint (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  /* 4+ Cards: 2 per row on tablet */
  .paragraph--type--card-group .field--name-field-card:has(.field--item:nth-child(4)) .field--item {
    flex: 1 1 calc(50% - 15px) !important;
    max-width: calc(50% - 15px) !important;
  }
  
  /* 3 Cards: Keep 3 per row on tablet */
  .paragraph--type--card-group .field--name-field-card:has(.field--item:nth-child(3)):not(:has(.field--item:nth-child(4))) .field--item {
    flex: 1 1 calc(33.333% - 20px) !important;
    max-width: calc(33.333% - 20px) !important;
  }
}

/* Mobile breakpoint (768px and below) */
@media (max-width: 768px) {
  .paragraph--type--card-group .field--name-field-card .field--item {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
  }
}

/* Individual card styling - GLOBAL */
.paragraph--type--card {
  background: #ffffff !important;
  border-radius: 4px !important;
  margin: 0 !important;
  min-height: 300px !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Image display - show actual uploaded images */
.paragraph--type--card .card-item--image {
  display: block;
  width: 100%;
  height: 20vw;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 4px;
  background-color: #f8f8f8;
}

.paragraph--type--card .card-item--image .image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Placeholder when no image */
.paragraph--type--card .placeholder-image {
  background-color: #f8f8f8;
  background-image: url("data:image/svg+xml,%3csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M19 7v10H5V7h14m0-2H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z'/%3e%3cpath d='M14.14 11.86l-3 3.87L9 13.14 6 17h12z'/%3e%3c/svg%3e");
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.4;
}

/* Fallback when no image field exists at all */
.paragraph--type--card:not(:has(.card-item--image)) .card-item--content::before {
  content: '';
  display: block;
  width: 100%;
  height: 180px;
  background-color: #f8f8f8;
  border-radius: 4px;
  margin-bottom: 16px;
  background-image: url("data:image/svg+xml,%3csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M19 7v10H5V7h14m0-2H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z'/%3e%3cpath d='M14.14 11.86l-3 3.87L9 13.14 6 17h12z'/%3e%3c/svg%3e");
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.4;
}

/* Card title - smaller like in design */
.paragraph--type--card h2, .paragraph--type--card h2 * {
  font-size: 2rem;
  font-weight: 800;
  color: #333;
  line-height: 1.4;
  flex-shrink: 0;
}

.paragraph--type--card h2{
  margin-bottom: 20px !important;
}

.paragraph--type--card h2 a {
  color: #333;
  text-decoration: none;
}

.paragraph--type--card h2 a:hover {
  color: #2073A2;
}

/* Card content */
.paragraph--type--card .field--name-field-paragraph {
  flex-grow: 1;
  margin-bottom: 16px;
}

.paragraph--type--card .field--name-field-paragraph p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

/* Button styling - flush left */
.paragraph--type--card .paragraph--type--button {
  text-align: left !important;
  justify-content: flex-start !important;
  display: flex !important;
  align-items: flex-start !important;
}

.paragraph--type--card .paragraph--type--button div {
  text-align: left !important;
}


/* Remove conflicting styles */
.paragraph--type--card.bg-blue,
.paragraph--type--card.bg-grey {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
}

/* GLOBAL: Override existing field card styling - Applied to all card groups site-wide */
.paragraph--type--card {
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 16px !important;
}

/* Additional targeting for different field containers */
.field--name-field-sections .paragraph--type--card,
.field--name-field-card .paragraph--type--card,
.field--name-field-cards .paragraph--type--card {
  border-top: none;
  margin-top: 0;
  padding-top: 16px;
}

/* Ensure card content is properly structured */
.paragraph--type--card .card-item--content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.page-node-event .paragraph--type--button{
  margin: 10px 0px 20px 0px !important;
}

/* Event page image with side text - TRUE 50/50 layout */
.page-node-event .paragraph--type--image-with-side-text {
  margin: 60px 0 !important;
}

.page-node-event .paragraph--type--image-with-side-text .image-with-side-text {
  display: flex !important;
  gap: 60px !important;
  align-items: center !important;
  width: 100% !important;
}

.page-node-event .paragraph--type--image-with-side-text .image-with-side-text.image-placement-right {
  grid-template-columns: 50% 50% !important;
  grid-template-areas: 'content image' !important;
}

.page-node-event .paragraph--type--image-with-side-text .image-with-side-text.image-placement-right .image-with-side-text-image{
  order: 2 !important;
}

.page-node-event .paragraph--type--image-with-side-text .image-with-side-text.image-placement-left {
  grid-template-columns: 50% 50% !important;
  grid-template-areas: 'image content' !important;
}

.page-node-event .paragraph--type--image-with-side-text .image-with-side-text .image-with-side-text-image {
  margin-right: 0 !important;
  margin-left: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.page-node-event .paragraph--type--image-with-side-text .image-with-side-text .image-with-side-text-content {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.page-node-event .paragraph--type--image-with-side-text .image-with-side-text .image-with-side-text-image img {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
}

/* H3 styling for event image with side text headings */
.page-node-event .paragraph--type--image-with-side-text h3 {
  font-size: 1.25em;
  font-weight: 900;
  color: #333;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

/* Also style the div containing the title field */
.page-node-event .paragraph--type--image-with-side-text .image-with-side-text-content > div:first-child {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

/* Image with side text buttons - flush left */
.page-node-event .paragraph--type--image-with-side-text .image-with-side-text-content-link {
  text-align: left !important;
  margin-top: 20px !important;
}

/* NUKED - These rules were overriding the gray text styling */

/* Event Banner Hero Section - Always Show */
.event-banner {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f8f8f8;
  min-height: 400px;
  display: flex;
  align-items: center;
  position: relative;
  color: white;
  margin-bottom: 0;
}

.event-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* When no background image, show light background with dark text */
.event-banner:not([style*="background-image"]) {
  background-color: #f8f8f8;
  color: #333;
}

.event-banner:not([style*="background-image"])::before {
  display: none;
}

.event-banner .inner-container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-left: 5vw;
  padding-right: 5vw;
}

.event-banner-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Remove text shadow when no background image */
.event-banner:not([style*="background-image"]) .event-banner-title {
  text-shadow: none;
}

/* Event Meta Section */
.event-meta-section {
  padding: 30px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 40px;
}

.event-meta-section .inner-container {
  padding-left: 5vw;
  padding-right: 5vw;
}

.event-meta-section .event-type-date {
  font-size: 1.125rem;
  font-weight: 700;
  color: #2073A2;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.event-meta-section .event-type-date .event-type-date-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-meta-section .event-location-address {
  display: inline;
}

.event-meta-section .event-location-address .address-line1,
.event-meta-section .event-location-address .locality,
.event-meta-section .event-location-address .administrative-area,
.event-meta-section .event-location-address .postal-code {
  display: inline;
}

.event-meta-section .event-location-address .address-line1:after,
.event-meta-section .event-location-address .locality:after,
.event-meta-section .event-location-address .administrative-area:after {
  content: ", ";
}

.event-meta-section .event-location-address .postal-code:after {
  content: "";
}

.event-meta-section .event-location-address br {
  display: none;
}

.event-meta-section .event-location-address div > div:first-of-type {
  display: none;
}

.event-meta-section .event-location-address .organization:empty,
.event-meta-section .event-location-address .address-line1:empty,
.event-meta-section .event-location-address .locality:empty,
.event-meta-section .event-location-address .administrative-area:empty,
.event-meta-section .event-location-address .postal-code:empty,
.event-meta-section .event-location-address .country:empty {
  display: none;
}

.event-date-icon {
  display: inline-block;
  vertical-align: text-bottom;
  color: inherit;
}

.event-location-icon {
  display: inline-block;
  vertical-align: text-bottom;
  color: inherit;
}

.event-meta-divider {
  color: #333333;
  margin: 0 8px;
}

.event-meta-section .event-type-date .event-registration-meta {
  align-self: flex-end;
}

/* Event hero social sharing */
.event-hero-social {
  margin-top: 20px;
  position: relative;
  z-index: 3;
}

.event-hero-social .shariff {
  filter: brightness(0) invert(1); /* Make icons white on dark background */
  display: block !important;
  visibility: visible !important;
}

.event-banner[style*="background-image"] .event-hero-social .shariff,
.event-banner[style*="background-image"] .event-hero-social .shariff * {
  background: transparent !important;
}

/* When no background image, use dark icons */
.event-banner:not([style*="background-image"]) .event-hero-social .shariff {
  filter: none; /* Reset to default colors */
}

/* Hide only the original Shariff block in content region for event pages */
.page-node-event .region--content #block-shariffsharebuttons--2 {
  display: none;
}

/* Ensure our hero Shariff block is visible */
.page-node-event .event-hero-social #block-shariffsharebuttons {
  display: block !important;
}

.event-hero-social .shariff-col-4 {
  margin: 0 !important;
}

/* Reorder social icons - put print first */
.event-hero-social .shariff {
  display: flex;
}

.event-hero-social .shariff .shariff-button[data-service="print"] {
  order: -1;
}

.event-meta-section .event-type-date .event-registration-meta a {
  white-space: nowrap;
  border: 3px solid #54AFE3;
  padding: .75rem 1.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: #54AFE3;
  background: transparent;
  border-radius: 0;
  text-decoration: none;
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  position: relative;
}

.event-meta-section .event-type-date .event-registration-meta a:after {
  font-family: "Font Awesome 5 Free";
  content: "\f105";
  padding-left: .5rem;
  opacity: 0;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  right: 28px;
  -webkit-transition: all .2s ease-in-out;
  transition: all .2s ease-in-out;
}

.event-meta-section .event-type-date .event-registration-meta a:hover {
  color: inherit;
  border: 3px solid #0A4464;
  padding-left: 1.1rem;
  padding-right: 1.9rem;
}

.event-meta-section .event-type-date .event-registration-meta a:hover:after {
  opacity: 1;
  right: 16px;
}


/* Responsive design */
@media (max-width: 768px) {
  .event-banner {
    min-height: 300px;
  }
  
  .event-banner-title {
    font-size: 2rem;
  }
  
  .event-meta-section {
    padding: 20px 0;
    margin-bottom: 30px;
  }
}

