/*
Theme Name:   Ollie Child
Theme URI:    https://trials.lexeo.com
Description:  A modified child theme for Ollie.
Author:       GCI Health
Author URI:   https://trials.lexeo.com
Template:     ollie
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Tags:         Tags: clinical trials, pharmaceutical, healthcare, medical, health, wellness, research, patient engagement, patient recruitment, clinical research, medical research, health technology, digital health, telemedicine, health data, patient-centric, clinical trial management
Text Domain:  ollie
*/

/* Utility Styles */

.hidden {
   display: none!important;
}

.wp-block-columns.is-layout-flex {
  flex-wrap: wrap;
}

.wp-block-column {
  min-width: 300px;
  flex: 1 1 0;
}

/* Hide the entire signup footer block */
body.page-id-546 #signup {
  display: none !important;
}

/* Reset margins and padding on the section around it */
body.page-id-546 .wp-block-group.alignfull {
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 768px) {
  nav.wp-block-navigation .wp-block-navigation__container {
    display: none !important;
  }
}


.trial-cta {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
}


/* Default desktop behavior - normal order */
.wp-block-columns.reverse-responsive {
  display: flex;
  flex-direction: row;
}

/*Ollie Mobile Tools*/

/* Ollie Swap Order */
@media (max-width: 1024px) {
  .ollie-swap-order {
      flex-direction: column-reverse !important;
  }

  /* Ollie Swap Order Reverse */
  .ollie-row-reverse {
      flex-direction: row-reverse !important;
  }
}

/*Ollie hide column borders on mobile only */
@media only screen and (max-width: 767px) {
  /* replace .your‑custom‑class with whatever you saw (or your own extra class) */
  .ollie-no-border {
    border-left: none !important;
    border-right: none !important;
  }
}

/* Ollie Hide On Mobile */
@media only screen and (max-width: 767px) {
  /* replace .your‑custom‑class with whatever you saw (or your own extra class) */
  .ollie-hide-mobile {
    display: none !important;
  }
}
/* Ollie Hide On Desktop */
@media only screen and (min-width: 768px) {
  /* replace .your‑custom‑class with whatever you saw (or your own extra class) */
  .ollie-hide-desktop {
    display: none !important;
  }
}


/* Add your custom CSS below */

.full-width-bg {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.section-bg {
  background-image: url('/wp-content/uploads/2025/04/bkg-gradient-01.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.section-bg-alt {
  background-image: url('/wp-content/uploads/2025/04/bkg-blur-01-1.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* Naviation styles */

/* Top level navigation links */

.wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
  font-size: 1.2rem; /* match all top nav links */
  font-weight: 700;
  text-decoration: none;
}

/* Top-level navigation item hover and active underline */
.wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
  position: relative;
  padding-bottom: 0.75rem;
}

.wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

/* On hover */
.wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover::after {
  background-color: var(--wp--preset--color--secondary, #0066cc);
}

/* On current page */
.wp-block-navigation__container > .wp-block-navigation-item.is-current-page > .wp-block-navigation-item__content::after,
.wp-block-navigation__container > .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after {
  background-color: var(--wp--preset--color--secondary, #0066cc);
}


/*    Navigation for the Clinical Trials Submenu Styling  */

/* Set relative position on parent */

/* Make the list item relative */

/* Submenu outer container */
#clinical-trials-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  padding: 1.25rem 1.5rem;
  min-width: 280px;
  z-index: 999;
  font-family: var(--wp--preset--font-family--system-font, sans-serif);
}

/* Each program group */
.submenu-group {
  margin-bottom: 1.5rem;
}

.submenu-group:last-child {
  margin-bottom: 0;
}

/* Submenu Trial Links - Make High Contrast */
#clinical-trials-submenu ul li a {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #000000; /* Pure black for maximum legibility */
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all 0.2s ease-in-out;
}

/* Submenu Trial Hover Effect */
#clinical-trials-submenu ul li a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--wp--preset--color--secondary, #0066cc);
  text-underline-offset: 4px;
}

/* Program title */
.submenu-group-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--wp--preset--color--primary, #0055aa);
}

/* Trials list under each program */
.submenu-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.submenu-group ul li {
  margin-bottom: 0.5rem;
}

.submenu-group ul li a {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all 0.2s ease-in-out;
}

/* Hover effect */
.submenu-group ul li a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--wp--preset--color--secondary, #0066cc);
  text-underline-offset: 4px;
}

/* Mobile Main Menu */

/* Hide default overlay menu */
.wp-block-navigation__responsive-container {
  display: none !important;
}

/* Custom mobile menu wrapper */
#mobile-main-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #f7fbff;
  padding: 2rem;
  z-index: 9999;
  overflow-y: auto;
  display: block;
}

/* Hide it by default, show only when toggled via JS */
#mobile-main-menu[hidden] {
  display: none;
}

/* Mobile close button */
.mobile-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #c42f2f;
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
}

/* Main nav items */
.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0 0;
}

.mobile-nav-list > li {
  margin-bottom: 1.5rem;
  font-weight: bold;
  font-size: 1.2rem;
  color: #c42f2f;
}

.mobile-nav-list a {
  text-decoration: none;
  color: #c42f2f;
}

/* Submenu toggle */
.submenu-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  color: #c42f2f;
  cursor: pointer;
}

/* Submenu styling */
.mobile-nav-list .submenu {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  list-style: none;
}

.submenu li {
  margin-bottom: 0.5rem;
}

.submenu li a {
  font-size: 1rem;
  font-weight: normal;
  color: #111;
}

.submenu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.submenu-link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--wp--preset--color--primary, #c42f2f);
  text-decoration: none;
  padding: 0.5rem 0;
}


.submenu-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--wp--preset--color--primary, #c42f2f);
  cursor: pointer;
}

.arrow-icon {
  transition: transform 0.3s ease;
}

.submenu-toggle[aria-expanded="true"] .arrow-icon {
  transform: rotate(180deg);
}



/* Menu CTA Button */



/* Hamburger menu styles */


/* Flex wrapper to push hamburger to the right */
.hamburger-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Hamburger button styles */
.hamburger {
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--wp--preset--color--primary, #c42f2f);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-left: auto;
}

/* Only show on mobile */
@media (min-width: 769px) {
  .hamburger-wrapper {
    display: none;
  }
}




/* Style Gravity Forms Submit button like Ollie's Outline button */
body .gform_wrapper .gform_footer input[type="submit"].is-style-outline,
body .gform_wrapper .gform_page_footer input[type="submit"].is-style-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  background: #ffffff;
  color: #D34431;
  border: 1px solid #D34431;
  border-radius: 20px 0 20px 0;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Hover style for Outline submit button */
body .gform_wrapper .gform_footer input[type="submit"].is-style-outline:hover,
body .gform_wrapper .gform_page_footer input[type="submit"].is-style-outline:hover {
  background: linear-gradient(90deg, #D34431 0%, #FF9384 100%);
  color: #ffffff;
}

/* Optional: Add Arrow after text for Submit */
body .gform_wrapper .gform_footer input[type="submit"].is-style-outline::after,
body .gform_wrapper .gform_page_footer input[type="submit"].is-style-outline::after {
  content: '>';
  font-size: 1.5rem;
  margin-left: 0.75rem;
}


.constrained-group {
  max-width: var(--wp--style--global--content-size, 720px); /* fallback width */
  margin-inline: auto;
  padding-inline: 1rem;
}

.core-values-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1100px; /* match Ollie sections */
  margin: 0 auto;
  padding-inline: 1rem;
}

.core-card {
  background: #fff;
  border-radius: 3rem;
  padding: 2.5rem 2rem;
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  min-height: 100%;
  justify-content: flex-start; /* 💡 Ensures top alignment */
}

.core-card h3 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.core-card p {
  margin-top: 0;
}

.core-card figure {
  margin-bottom: 1rem;
}

.core-card img {
  width: 120px;
  height: auto;
}

.swap-secondary-color {
  color: #1E4C9B;
  font-weight: 600;
}

/* Custom CSS for the Clinical Trial template and card loop */

.trial-title {
    /* text-transform: uppercase; */
    text-align: center;
}

.trial-detail-title {
  font-size: 1.6rem;
  font-weight: bold;
  color: #D34432;
  margin-bottom: 1rem;
}

.trial-description-col {
  flex-basis: 50%;
  max-width: 580px;
  padding-right: 2rem;
}

.entry-content .trial-detail-grid,
.acf-block .trial-detail-grid,
.trial-detail-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 3rem 4rem !important;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

.trial-detail-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.trial-detail-item img {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
}

body .trial-detail-item p {
  margin: 0;
}

@media (max-width: 768px) {
  .trial-detail-grid {
    grid-template-columns: 1fr;
  }

  .trial-detail-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.wp-block-columns.equal-height-eligibility > .wp-block-column {
  display: flex;
  flex-direction: column;
}

.trial-logo-card {
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
}

.equal-height-eligibility {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.wp-block-columns.equal-height-eligibility {
  align-items: stretch;
}

.wp-block-column.equal-height-eligibility {
  flex: 1;
}

.eligibility-card {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

.eligibility-card {
  background-color: #ffffff;
  border-radius: 3rem;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.icon-wrapper {
  margin-bottom: 1rem;
}

.eligibility-icon-img {
  width: 96px;
  height: auto;
  display: inline-block;
}

.eligibility-title {
  font-weight: 600;
  color: #D34432;
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

.trial-card-loop-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .trial-card {
    flex: 1 1 300px;
    max-width: 325px;
    min-width: 280px;
    background-image: url('./assets/images/bkgs/bkg-ct-card-loop-01.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center center;
    padding: 2rem 1.25rem 2.75rem; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
  }

.trial-card-logo img {
    max-width: 160px;
    height: auto;
    margin-bottom: 0.75rem;
  }
  
  .trial-card h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 1rem 0 0.5rem;
  }
  
  .trial-card p {
    line-height: 1.4;
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .trial-card-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  
  .trial-card-title {
    font-weight: bold;
    font-size: 1.25rem;
    margin: 0.5rem 0;
  }
  
.trial-card-summary {
    flex-grow: 1;
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 0.75rem;
    max-width: 90%;
  }
  
.trial-cta {
    text-align: center;
    padding: 2rem 1rem;
  }

.trial-cta-title {
    font-size: 2rem;
    color: #ffffff;
    font-weight: bold;
    align-items: center;
    margin-bottom: 2rem;
  }

.trial-cta-text {
    color: #ffffff;
    align-items: center;
    margin-bottom: 1.25rem;
  }
  
.trial-cta-button {
  display: inline-block!important;
  width: auto!important;
  max-width: none!important;
  margin-top: 1.25rem;
  }

.study-locations-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
  }
  
.study-locations-list li {
    margin-bottom: 0.75rem;
  }

.logistics-title {
    font-weight: bold;
    color: #1E4C9B;
    margin-bottom: 0.5rem;
  }
    
/* Ollie-style button integration */

  .trial-card-button {
    margin-top: auto;
  }

/* === Base Button Styling === */
.wp-block-button__link {
  position: relative;
  overflow: hidden;
  padding: 0.75em 3em 0.75em 1.5em;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid #D34431;
  border-radius: 1.5em 0 1.5em 0;
  background-clip: padding-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* === Chevron Icon === */
.wp-block-button__link::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1em;
  transform: translateY(-50%);
  width: 1.25em;
  height: 1.25em;
  background-image: url('/wp-content/themes/ollie-child/assets/images/chevron-red.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: background-image 0.3s ease, transform 0.3s ease;
}

/* === Fill Button (transparent by default) === */
.wp-block-button__link.is-style-fill {
  background: transparent;
  color: #D34431;
  border-color: #D34431;
}

/* === Fill Hover: full gradient background, white text === */
.wp-block-button__link.is-style-fill:hover {
  background: linear-gradient(90deg, #D34431 0%, #FF9384 100%);
  color: #ffffff;
  border-color: #D34431;
}

/* === Brand Button (gradient by default) === */
.wp-block-button__link.is-style-brand
.wp-block-button__link.is-style-button-brand {
  background: linear-gradient(90deg, #D34431 0%, #FF9384 100%);
  color: #ffffff;
  border-color: #D34431;
}

/* === Brand Hover: white background, red text === */
.wp-block-button__link.is-style-brand:hover
.wp-block-button__link.is-style-button-brand:hover {
  background: #ffffff !important;
  color: #D34431;
  border-color: #D34431;
}

/* === Chevron Swaps for Fill Buttons === */
.wp-block-button__link.is-style-fill:hover::after
.wp-block-button__link.is-style-button-brand:hover::after {
  background-image: url('/wp-content/themes/ollie-child/assets/images/chevron-white.svg');
  transform: translate(4px, -50%);
}

/* === Brand Button Chevron (default = white) === */
.wp-block-button__link.is-style-brand::after
.wp-block-button__link.is-style-button-brand::after {
  background-image: url('/wp-content/themes/ollie-child/assets/images/chevron-white.svg');
}

/* === Brand Button Chevron on Hover (switch to red) === */
.wp-block-button__link.is-style-brand:hover::after
.wp-block-button__link.is-style-button-brand {
  background-image: url('/wp-content/themes/ollie-child/assets/images/chevron-red.svg');
  transform: translate(4px, -50%);
}



/* === Optional: subtle hover shadow === */
.wp-block-button__link:hover {
  box-shadow: 0px 4px 10px rgba(211, 68, 49, 0.25);
}





/* Back-to-top button */
.ollie-button .back-to-top {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  display: none;
  z-index: 999;
  background: #ffffff;
  color: #D34431;
  border: 2px solid #D34431;
  border-radius: 20px 0 20px 0;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Back-to-top button hover */
.ollie-button .back-to-top:hover {
  background: linear-gradient(90deg, #D34431 0%, #FF9384 100%);
  color: #ffffff;
}

/* Show back-to-top button after scroll */
.back-to-top.visible {
  display: inline-flex;
  animation: fadeIn 0.5s ease forwards;
}

/* Mobile adjustment for back-to-top */
@media (max-width: 767px) {
  .back-to-top {
    bottom: 4rem;
    right: 1.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}



/* Animations Styles */

/* Fade In  */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
  }
  
  @keyframes fadeIn {
    to {
      opacity: 1;
    }
  }
  
  /* Lift on Load */
  .animate-lift-in {
    opacity: 0;
    transform: translateY(20px);
    animation: liftIn 0.6s ease-out forwards;
  }
  
  @keyframes liftIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Fade on Scroll (requires JS) */
  .animate-fade-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transform: translateY(30px);
  }
  
  .animate-fade-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
  }
  
/* Accordion Styles */

/* Fix text wrapping issues */
.accordion-title {
  display: block;               /* Ensures it's treated as a block element */
  white-space: normal;           /* Allows text to wrap naturally */
  margin: 0;
  font-size: 1.25rem;
  color: #D34432;
  line-height: 1.2;
}

/* Ensure the arrow stays in place */
.accordion-arrow {
  margin-left: 10px;
  margin-top: 2px;               /* Keeps arrow aligned to the top */
  transition: transform 0.3s;
  flex-shrink: 0;                /* Prevents arrow from resizing */
}

/* Hover Styling */
.accordion-toggle:hover {
  background-color: #f0f0f0;
}

/* Accordion Content */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, visibility 0.4s;
  padding: 0 15px;
  background: #fff;
  visibility: hidden;
}

/* Accordion Content When Open */
.accordion-content.open {
  max-height: 1000px;
  visibility: visible;
}

/* Style for Expand All / Collapse All */
.acf-accordion-controls a {
  cursor: pointer;
  color: #006747;
  text-decoration: none;
  margin-right: 10px;
}

.acf-accordion-controls a:hover {
  text-decoration: underline;
}


/* Final horizontal rule at bottom */
.accordion-bottom-border {
  border-top: 1px solid #D34432;
}

.accordion-arrow {
  transition: transform 0.3s ease;
}

/* Important Style Overides */

/* Completely hide WordPress native mobile menu overlay */
.wp-block-navigation__responsive-container,
.wp-block-navigation__responsive-container-content,
.wp-block-navigation__responsive-dialog,
.wp-block-navigation__responsive-container-open {
  display: none !important;
}
