/* FMSC LOGIN FORM - RED CONTROLS */

/* Keep me signed in checkbox */
.um-login .um-field-checkbox.active .um-field-checkbox-state i,
.um-login .um-field-checkbox-state i {
    color: #c00000 !important;
}

/* Login button */
.um-login #um-submit-btn,
.um-login input[type="submit"].um-button {
    background: #c00000 !important;
    background-color: #c00000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* Login button hover */
.um-login #um-submit-btn:hover,
.um-login #um-submit-btn:focus,
.um-login input[type="submit"].um-button:hover,
.um-login input[type="submit"].um-button:focus {
    background: #8f0000 !important;
    background-color: #8f0000 !important;
    color: #ffffff !important;
}

@media (max-width: 781px) {

    .fmsc-dynamic-block--social-media .wp-block-columns {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 24px !important;
    }

    .fmsc-dynamic-block--social-media .wp-block-columns > .wp-block-column {
        flex: 0 0 calc(50% - 12px) !important;
        width: calc(50% - 12px) !important;
        max-width: calc(50% - 12px) !important;
        min-width: 0 !important;
    }

    .fmsc-dynamic-block--social-media .wp-block-columns > .wp-block-column:last-child {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}
/* FMSC Future event template: sponsor directly below the Back to Events button.
   Add AFTER (or replace) the previous sponsor hero CSS override. */
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back > .fmsc-option1-back {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 18px !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  overflow: visible !important;
}
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back > .fmsc-option1-back > .fmsc-event-calendar-return-wrap,
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back > .fmsc-option1-back > .fmsc-dynamic-block {
  flex: 0 0 auto !important;
  position: relative !important;
  inset: auto !important;
  margin: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
}
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back .fmsc-option1-back .fmsc-single-event__sponsor-logo {
  display: inline-flex !important;
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  float: none !important;
  clear: both !important;
  vertical-align: top !important;
  align-self: flex-start !important;
  flex: 0 0 auto !important;
  width: max-content !important;
  max-width: 230px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back .fmsc-option1-back .fmsc-single-event__sponsor-logo img {
  display:block !important;
  width:auto !important;
  max-width:100% !important;
  max-height:85px !important;
  object-fit:contain !important;
}
@media (max-width:700px) {
 .fmsc-event-hero-option1.fmsc-sponsor-logo-under-back > .fmsc-option1-back {gap:12px !important;}
 .fmsc-event-hero-option1.fmsc-sponsor-logo-under-back .fmsc-option1-back .fmsc-single-event__sponsor-logo {max-width:160px !important;}
 .fmsc-event-hero-option1.fmsc-sponsor-logo-under-back .fmsc-option1-back .fmsc-single-event__sponsor-logo img {max-height:60px !important;}
}
/* FMSC sponsored event hero: keep the return button content-sized.
   Add AFTER the earlier sponsor positioning CSS. */
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back > .fmsc-option1-back {
  align-items: flex-start !important;
}
/* The calendar-return block must not stretch as a flex item. */
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back > .fmsc-option1-back > :first-child:not(.fmsc-single-event__sponsor-logo) {
  align-self: flex-start !important;
  flex: 0 0 auto !important;
  width: fit-content !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
/* Counteract full-width button rules inherited from the event hero. */
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back .fmsc-option1-back > :first-child a,
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back .fmsc-option1-back > :first-child button,
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back .fmsc-option1-back > :first-child .wp-block-button,
.fmsc-event-hero-option1.fmsc-sponsor-logo-under-back .fmsc-option1-back > :first-child .wp-block-button__link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: fit-content !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap;
}

/* Remove empty theme hero on WooCommerce products */
body.single-product .fmsc-single-post__hero {
    display: none !important;
}

/* Remove red background from WooCommerce Description tab */
body.single-product .woocommerce-tabs ul.tabs li,
body.single-product .woocommerce-tabs ul.tabs li.active,
body.single-product .woocommerce-tabs ul.tabs li a,
body.single-product .woocommerce-tabs ul.tabs li.active a {
    background: transparent !important;
    background-color: transparent !important;
    color: #252525 !important;
}

/* Highlight the active tab with a red underline */
body.single-product .woocommerce-tabs ul.tabs li.active {
    border-bottom: 2px solid #c00000 !important;
}

/* FMSC returning members hero */
.fmsc-return-hero {
    position: relative;
    min-height: 580px;
}

/* Left-to-right black gradient */
.fmsc-return-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0,0,0,0.95) 0%,
        rgba(0,0,0,0.82) 30%,
        rgba(0,0,0,0.42) 60%,
        rgba(0,0,0,0.05) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Keep text and buttons above gradient */
.fmsc-return-hero .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .fmsc-return-hero {
        min-height: 520px;
    }

    .fmsc-return-hero::after {
        background: linear-gradient(
            180deg,
            rgba(0,0,0,0.75) 0%,
            rgba(0,0,0,0.82) 60%,
            rgba(0,0,0,0.65) 100%
        );
    }
}


/* FMSC image cards with bottom gradient */
.fmsc-image-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    min-height: 280px;
}

/* Dark at bottom, clear at top */
.fmsc-image-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.75) 22%,
        rgba(0, 0, 0, 0.25) 55%,
        rgba(0, 0, 0, 0) 85%
    );
    z-index: 1;
    pointer-events: none;
}

/* Keep text above gradient */
.fmsc-image-card .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
    padding: 18px;
}

/* White text */
.fmsc-image-card h2,
.fmsc-image-card h3,
.fmsc-image-card p {
    color: #fff;
}

/* Optional hover effect */
.fmsc-image-card .wp-block-cover__image-background {
    transition: transform 0.4s ease;
}

.fmsc-image-card:hover .wp-block-cover__image-background {
    transform: scale(1.05);
}

/* Smaller cards on mobile */
@media (max-width: 768px) {
    .fmsc-image-card {
        min-height: 260px;
    }
}
