/*
Theme Name: amoa.com
Author: amoa.com
Theme URI: http://amoa.com
Author URI: http://amoa.com
Tags: Wordpress Themes, WP Themes, Custom Themes, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain: AMOA
Version: 1.0
License: Copyrighted
*/

.amoa-calendar-inline-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  text-align: center;
  margin: 16px auto 0;
  font-size: 14px;
  color: #222;
  max-width: 600px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-box {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: inline-block;
}

.shortcode-section{
  margin-top: 50px !important;;
}

/* Simple fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.video-banner {
  opacity: 0;
  transition: opacity 0.5s ease-in;
}

.video-banner.loaded {
  opacity: 1;
}

/* === Apply Brother 1816 font to all MEC + FullCalendar event titles === */

/* General MEC container */
.mec-wrap,
.mec-wrap * {
  font-family: "brother-1816", "Brother 1816", sans-serif !important;
}

/* FullCalendar event titles and sticky labels */
.fc-event-title-container,
.fc-event-title,
.fc-sticky {
  font-family: "brother-1816", "Brother 1816", sans-serif !important;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Optional – legend below calendar */
.amoa-calendar-inline-legend,
.amoa-calendar-inline-legend * {
  font-family: "brother-1816", "Brother 1816", sans-serif !important;
  font-weight: 400;
}

/* Optional – make event titles a bit cleaner */
.fc-event-title {
  font-size: 14px;
  line-height: 1.4;
  color: #222;
}

/* your working rule */
.mec-wrap,
.mec-wrap * {
  font-family: "brother-1816", "Brother 1816", sans-serif !important;
}

/* === RESTORE ICON FONTS (MEC + FA + Simple Line Icons) === */

/* MEC simple line icons */
.mec-wrap i[class^="mec-sl-"],
.mec-wrap i[class*=" mec-sl-"],
.mec-wrap .mec-sl-folder,
.mec-wrap .mec-sl-location-pin,
.mec-wrap .mec-sl-clock,
.mec-wrap .mec-sl-user {
  font-family: "simple-line-icons" !important;
  font-weight: normal;
  font-style: normal;
  speak: none;
}

/* Font Awesome / MEC FA icons */
.mec-wrap i.fa,
.mec-wrap i.fab,
.mec-wrap i.fas,
.mec-wrap i.far,
.mec-wrap [class^="fa-"],
.mec-wrap [class*=" fa-"],
.mec-wrap .mec-fa,
.mec-wrap [class^="mec-fa-"],
.mec-wrap [class*=" mec-fa-"] {
  font-family: "Font Awesome 5 Free","Font Awesome 5 Brands","FontAwesome","mec-fa" !important;
  font-weight: 900;
}

/* Force legend items to stay on ONE LINE on desktop, wrap on mobile */
.amoa-calendar-inline-legend {
  display: flex;
  flex-wrap: wrap !important;   /* Allow wrapping on smaller screens */
  justify-content: center;        /* Center everything */
  gap: 15px 25px;                 /* Row gap, column gap */
  align-items: center;
  width: 100%;
  margin-top: 20px;
  padding: 0 15px;
}

/* Legend text + square */
.amoa-calendar-inline-legend .legend-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap; /* Prevent text wrap within each item */
  font-size: 15px;
}

/* Colored squares */
.amoa-calendar-inline-legend .legend-item::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  min-width: 14px; /* Prevent shrinking */
  margin-right: 8px;
  border-radius: 2px;
}

/* LEGEND RESPONSIVE */
@media (max-width: 992px) {
  .amoa-calendar-inline-legend {
    gap: 12px 20px;
  }
  
  .amoa-calendar-inline-legend .legend-item {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .amoa-calendar-inline-legend {
    gap: 10px 15px;
  }
  
  .amoa-calendar-inline-legend .legend-item {
    font-size: 13px;
  }
  
  .amoa-calendar-inline-legend .legend-item::before {
    width: 12px;
    height: 12px;
    min-width: 12px;
    margin-right: 6px;
  }
}

@media (max-width: 480px) {
  .amoa-calendar-inline-legend {
    gap: 8px 12px;
    padding: 0 10px;
  }
  
  .amoa-calendar-inline-legend .legend-item {
    font-size: 12px;
  }
}

/* Colors */
.amoa-calendar-inline-legend .legend-item:nth-of-type(1)::before {
  background-color: #d2d654 !important; /* AMOA Events */
}

.amoa-calendar-inline-legend .legend-item:nth-of-type(2)::before {
  background-color: #c5299b !important; /* State Association Events */
}

.amoa-calendar-inline-legend .legend-item:nth-of-type(3)::before {
  background-color: #143157 !important; /* Industry Events */
}

/* Section Title Image - only style the image itself */
.gallery-section-title img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    width: auto;
    max-height: 80px;
}

/* Responsive sizing for larger screens */
@media (min-width: 576px) {
    .gallery-section-title img {
        max-height: 100px;
    }
}

@media (min-width: 768px) {
    .gallery-section-title img {
        max-height: 120px;
    }
}

@media (min-width: 992px) {
    .gallery-section-title img {
        max-height: 140px;
    }
}

/* Hide navigation arrows on DESKTOP when there are 3 or fewer events */
@media (min-width: 992px) {
  .events-slider[data-event-count="1"] .owl-nav,
  .events-slider[data-event-count="2"] .owl-nav,
  .events-slider[data-event-count="3"] .owl-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .events-slider[data-event-count="1"] .owl-dots,
  .events-slider[data-event-count="2"] .owl-dots,
  .events-slider[data-event-count="3"] .owl-dots {
    display: none !important;
  }
}

/* On mobile and tablet, always show arrows regardless of count */
@media (max-width: 991px) {
  .events-slider .owl-nav {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  
  .events-slider .owl-dots {
    display: block !important;
  }
}



/* WordPress Text Editor Gallery - With Wrapper */
.wp-text-gallery-wrapper .gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
  gap: 20px !important;
  margin: 2rem 0 !important;
  padding: 0 !important;
}

.wp-text-gallery-wrapper .gallery-item {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

.wp-text-gallery-wrapper .gallery-icon {
  position: relative !important;
  width: 100% !important;
  padding-top: 100% !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  background: #f0f0f0 !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.wp-text-gallery-wrapper .gallery-icon:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.wp-text-gallery-wrapper .gallery-icon a {
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.wp-text-gallery-wrapper .gallery-icon img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.3s ease !important;
  display: block !important;
  padding: 0 !important;
  border: none !important;
}

.wp-text-gallery-wrapper .gallery-icon:hover img {
  transform: scale(1.08) !important;
}

.wp-text-gallery-wrapper .gallery-caption {
  display: none !important;
}

/* Keep your existing GLightbox fixes below */
.glightbox-container * {
  box-sizing: border-box !important;
}

.glightbox-container {
  background: #000 !important;
  overflow: hidden !important;
}

.glightbox-container .gslide-media,
.glightbox-container .gslide-media *,
.glightbox-container iframe {
  max-width: 90vw !important;
  max-height: 90vh !important;
  width: auto !important;
  height: auto !important;
}

.glightbox-container .ginner-container {
  width: 100% !important;
  height: 100% !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

.glightbox-container .gslide {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.glightbox-container .gslide-inner-content {
  width: auto !important;
  height: auto !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

.glightbox-container .gslide-image {
  width: auto !important;
  height: auto !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.glightbox-container .gslide-image img {
  max-width: 90vw !important;
  max-height: 90vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.glightbox-container iframe.shrinkToFit {
  width: auto !important;
  height: auto !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
  aspect-ratio: auto !important;
}

.glightbox-container img.shrinkToFit {
  width: auto !important;
  height: auto !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
}

/* Responsive */
@media (max-width: 1200px) {
  .wp-text-gallery-wrapper .gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  }
}

@media (max-width: 992px) {
  .wp-text-gallery-wrapper .gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 16px !important;
  }
}

@media (max-width: 768px) {
  .wp-text-gallery-wrapper .gallery {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
  }
}

@media (max-width: 576px) {
  .wp-text-gallery-wrapper .gallery {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
}


/* Join Today Section - Override mega-menu a padding */
.join-today {
  text-align: left;
  padding-left: 0;
}

.join-today .pagetitle {
  text-align: left;
  padding-left: 0;
  margin-left: 0;
}

.join-today ul.list-unstyled {
  list-style: none;
  padding-left: 0 !important;
  margin: 0 0 30px 0 !important;
  text-align: left;
}

.join-today ul.list-unstyled li {
  margin-bottom: 8px;
  padding-left: 0 !important;
  margin-left: 0 !important;
  text-align: left;
  background: none;
}

/* Override the mega-menu a padding for list items */
.join-today ul.list-unstyled li a {
  color: #000 !important;
  font-size: 0.9rem !important;         
  font-weight: 400 !important;
  background: transparent !important;
  padding: 0px !important;
  margin-bottom: 11px !important;
  line-height: 1.6 !important;          
  display: block;
}
.join-today ul.list-unstyled li a:hover {
  color: #C5299B !important;
  text-decoration: underline;
}
.join-today ul.list-unstyled li a:hover {
  text-decoration: underline;
}

/* Button styles - using .slide-links button styles */
.join-today button,
.join-today .btn-join-now {
  display: inline-block;
  margin-left: 0;
  text-align: center;
  background: #f1b434;
  padding: 7px 15px;
  border-radius: 6px;
  text-decoration: none;
  color: #143157;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.join-today button:hover,
.join-today .btn-join-now:hover {
  background: #e09612;
  text-decoration: none;
}

.bg-light {
  background-color: #E5E1E6 !important;
}



@media (min-width: 992px) {
    .right-shape-image {
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        width: 100%;
        z-index: 1;
        background-repeat: no-repeat;
        background-size: auto 100%;
        background-position: right center;
        clip-path: ellipse(28% 100% at 78% 50%);
        transform: translateX(100%);
        transition: transform 1.4s ease-out; /* Balanced speed */
    }
    
    .right-shape-image.slide-in {
        transform: translateX(0);
    }

    .left-shape-image {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        z-index: 1;
        background-repeat: no-repeat;
        background-size: auto 100%;
        background-position: left center;
        clip-path: ellipse(50% 121% at 0% 50%);
        transform: translateX(-100%);
        transition: transform 1.4s ease-out; /* Balanced speed */
    }

    .left-shape-image.slide-in {
        transform: translateX(0);
    }
}
/* ============================================
   FIX FOR SCREENS ABOVE 2560px ONLY
   ============================================ */
@media (min-width: 2561px) {
    .right-shape-image {
        width: 60%;
        max-width: 1400px;
        background-size: cover;
        background-position: center center;
        clip-path: ellipse(35% 100% at 85% 50%); /* More subtle curve */
    }

    .left-shape-image {
        width: 60%;
        max-width: 1400px;
        background-size: cover;
        background-position: center center;
        clip-path: ellipse(55% 121% at 5% 50%); /* More subtle curve */
    }
}

/* Star graphic (section title image) */
.gallery-section-title-image {
  display: flex;
  justify-content: center;
  margin-bottom: 15px; /* space between stars and title */
}

.gallery-section-title-image img.section-title-image {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
}

/* Optional: center the text title */
.gallery-section-title {
  text-align: center;
}


/* ==========================================================
   CALENDAR FIXES - Based on actual HTML structure
   1. Month/Year vertically centered with controls
   2. Buttons form proper rectangle with vertical separators
   3. Hover image maintains 3:2 aspect ratio
   ========================================================== */

/* 1. TOOLBAR - Center the entire toolbar horizontally */
.fc .fc-header-toolbar.fc-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  padding: 15px 0 !important;
  margin-bottom: 1em !important;
  gap: 10px !important;
}

.fc .fc-toolbar-chunk {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  flex: none !important;
}

/* Hide the empty toolbar chunks that push content */
.fc .fc-toolbar-chunk:empty {
  display: none !important;
}

/* The inner div that contains title + buttons */
.fc .fc-toolbar-chunk > div {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important; /* No gap between elements */
}

/* Month/Year Title - PLAIN TEXT, no box */
.fc .fc-toolbar-title {
  margin: 0 !important;
  margin-right: 20px !important; /* Space ONLY after title, before buttons */
  padding: 0 !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #143157 !important;
  line-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  height: 38px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

/* 2. BUTTONS - Create unified rectangular group */
/* All FC buttons share base styles */
.fc .fc-toolbar-chunk .fc-button {
  margin: 0 !important;
  padding: 0 12px !important;
  height: 38px !important;
  min-width: 38px !important;
  border: 1px solid #d1d1d1 !important;
  border-left: none !important; /* Remove left border by default */
  border-radius: 0 !important;
  background: #fff !important;
  color: #444 !important;
  font-size: 14px !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  position: relative !important;
}

/* First button (prevYear) - add left border and rounded left corners */
.fc .fc-toolbar-chunk .fc-prevYear-button {
  border-left: 1px solid #d1d1d1 !important;
  border-radius: 4px 0 0 4px !important;
}

/* Last button (nextYear) - rounded right corners */
.fc .fc-toolbar-chunk .fc-nextYear-button {
  border-radius: 0 4px 4px 0 !important;
}

/* Today button styling */
.fc .fc-toolbar-chunk .fc-today-button {
  font-weight: 600 !important;
  padding: 0 15px !important;
}

/* Hover state */
.fc .fc-toolbar-chunk .fc-button:hover {
  background: #f5f5f5 !important;
  z-index: 1 !important;
}

/* Active/pressed state */
.fc .fc-toolbar-chunk .fc-button:active,
.fc .fc-toolbar-chunk .fc-button:focus {
  background: #e9e9e9 !important;
  z-index: 2 !important;
  outline: none !important;
}

/* Disabled state */
.fc .fc-toolbar-chunk .fc-button:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  background: #fff !important;
}

/* Icon styling inside buttons */
.fc .fc-toolbar-chunk .fc-button .fc-icon {
  font-size: 16px !important;
  line-height: 1 !important;
}

/* Remove any weird pseudo-element borders from icons */
.fc .fc-toolbar-chunk .fc-button .fc-icon::before,
.fc .fc-toolbar-chunk .fc-button .fc-icon::after {
  border: none !important;
}

/* RESPONSIVE - Tablet */
@media (max-width: 768px) {
  .fc .fc-header-toolbar.fc-toolbar {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  /* Keep title and buttons in a row, just stack them as a group */
  .fc .fc-toolbar-chunk > div {
    flex-direction: row !important; /* ALWAYS horizontal */
    flex-wrap: nowrap !important;
    gap: 0 !important;
  }
  
  .fc .fc-toolbar-title {
    font-size: 20px !important;
    margin-right: 15px !important;
  }
}

/* RESPONSIVE - Mobile */
@media (max-width: 480px) {
  .fc .fc-toolbar-title {
    font-size: 18px !important;
    height: 34px !important;
    line-height: 34px !important;
    margin-right: 12px !important;
  }
  
  .fc .fc-toolbar-chunk .fc-button {
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
  }
  
  .fc .fc-toolbar-chunk .fc-today-button {
    padding: 0 10px !important;
  }
}

/* RESPONSIVE - Very small screens */
@media (max-width: 380px) {
  .fc .fc-toolbar-title {
    font-size: 16px !important;
    margin-right: 10px !important;
  }
  
  .fc .fc-toolbar-chunk .fc-button {
    min-width: 30px !important;
    padding: 0 6px !important;
  }
}

/* 3. HOVER IMAGE - Maintain 3:2 aspect ratio (600x400) */
/* MEC gCalendar tooltip - EXACT selectors based on actual HTML */

/* Main tooltip container */
.mec-gCalendar-tooltip {
  max-width: 350px !important;
  width: 350px !important;
}

/* Image container - force 3:2 aspect ratio */
.mec-gCalendar-tooltip-image {
  width: 100% !important;
  height: 0 !important;
  padding-bottom: 66.67% !important; /* 3:2 aspect ratio (2/3 = 0.6667) */
  position: relative !important;
  overflow: hidden !important;
  border-radius: 4px 4px 0 0 !important;
  background: #f0f0f0 !important;
  display: block !important;
}

/* Image itself - fill container and maintain proportion */
.mec-gCalendar-tooltip-image img,
.mec-gCalendar-tooltip-image img.wp-post-image,
.mec-gCalendar-tooltip-image img.attachment-gridsquare {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border-radius: 0 !important;
}

/* 4. Legend Colors (5 items) */
.amoa-calendar-inline-legend .legend-item:nth-of-type(1)::before {
  background-color: #6CC24A !important; /* AMOA Events - Green */
}

.amoa-calendar-inline-legend .legend-item:nth-of-type(2)::before {
  background-color: #26A9E0 !important; /* AMOA State Association Events - Blue */
}

.amoa-calendar-inline-legend .legend-item:nth-of-type(3)::before {
  background-color: #F1B434 !important; /* Industry Events - Gold */
}

.amoa-calendar-inline-legend .legend-item:nth-of-type(4)::before {
  background-color: #C5299B !important; /* Deadlines - Magenta */
}

.amoa-calendar-inline-legend .legend-item:nth-of-type(5)::before {
  background-color: #E5E1E6 !important; /* Office Closures - Light Gray */
  border: 1px solid #ccc;
}

/* Legend adjustment for 5 items */
.amoa-calendar-inline-legend {
  max-width: 900px;
}

/* Make event card images shorter on desktop - match mobile proportions */
.events-slider .event-card img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* Adjust height for larger screens if needed */
@media (min-width: 768px) {
  .events-slider .event-card img {
    height: 250px !important;
  }
}

@media (min-width: 992px) {
  .events-slider .event-card img {
    height: 280px !important;
  }
}

/* Fix navigation gap between 831px - 991px */
@media(max-width: 991px) and (min-width: 831px) {
  .site-header .navbar ul, 
  .main-nav {
    display: block !important;
  }
  
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: block !important;
  }
}

/* Fix mega menu text alignment - all lines align left */
.mega-menu .menu-post p a,
.mega-menu ul li a,
.mega-menu .resourses ul li a {
  display: block !important;
  text-align: left !important;
  padding-left: 0 !important;
  text-indent: 0 !important;
  white-space: normal !important;
  line-height: 1.5 !important;
}

/* Ensure parent containers don't add padding */
.mega-menu .menu-post p,
.mega-menu ul li {
  padding-left: 0 !important;
  margin-left: 0 !important;
  text-indent: 0 !important;
}




/* =====================================================
   FINAL FIX - Works for Both Desktop and Touch
   ===================================================== */

/* CRITICAL: Allow dropdown to show outside nav container */
.main-nav {
    overflow: visible !important;
}

/* Dropdown link styling */
.main-nav .sub-menu li a,
.main-nav .sub-menu a {
    color: #333 !important;
    display: block !important;
    padding: 8px 20px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.main-nav .sub-menu li a:hover,
.main-nav .sub-menu a:hover {
    background: #f5f5f5 !important;
    color: #000 !important;
}

/* Fix skip-to-main */
#skip-to-main {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    white-space: nowrap !important;
}

#skip-to-main:focus {
    left: 0 !important;
    top: 0 !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    overflow: visible !important;
    background: #f4b942 !important;
    color: #2c4a6b !important;
    padding: 8px 16px !important;
    z-index: 10000 !important;
}