/* =====================================================
   Maher Accounting – user.css (Final Enhanced Version)
   ===================================================== */
/* Improved header */
header.container-header {
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    background: linear-gradient(180deg, #2a5c81 0%, #204a68 100%);
}
/* =====================================================
   FONT FAMILY OVERRIDES
   ===================================================== */
body {
  font-family: "Source Sans 3", "Noto Sans", sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: #2e2e2e;
  background-color: #fdfdfd;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Lora", "Roboto Slab", serif;
  font-weight: 600;
  color: #1f405a;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

/* Refined Logo Section */
.container-topbar h5 {
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    color: #fff;
}
.container-topbar a { color: #f4f8ff; text-decoration: none; }


/* -----------------------------------------------------
   0. Debug / Load Indicator (removed by SL 11-5-25 live)
   ----------------------------------------------------- */
/* body::before {
  content: 'user.css loaded';
  display: block;
  background: #004080;
  color: #fff;
  padding: 4px;
  text-align: center;
}
*/
/* -----------------------------------------------------
   1. Menu Text & Arrows – White on Blue
   ----------------------------------------------------- */
.container-header .mod-menu a,
.container-header .mod-menu button,
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span {
  color: #ffffff !important;
}

/* -----------------------------------------------------
   2. Submenu Styling – lighter header tone
   ----------------------------------------------------- */
.container-header .mod-menu__sub {
  background-color: color-mix(in srgb, var(--headerbg), white 20%);
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  padding: 0;
  margin-top: 0;
}

.container-header .mod-menu__sub a {
  color: #ffffff;
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.container-header .mod-menu__sub a:hover {
  background-color: color-mix(in srgb, var(--headerbg), black 15%);
  color: #cce0ff;
}

/* -----------------------------------------------------
   3. Hover-to-Show Dropdowns (stacked, no fly-out)
   ----------------------------------------------------- */
.container-header .mod-menu > li:hover > .mod-menu__sub,
.container-header .mod-menu li:hover > .mod-menu__sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* -----------------------------------------------------
   4. Second-Level Styling (lighter + indented)
   ----------------------------------------------------- */
.container-header .mod-menu__sub .mod-menu__sub {
  position: static !important;
  background-color: color-mix(in srgb, var(--headerbg), white 30%); /* lighter by +10% */
  box-shadow: none;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  padding-left: 12px !important;
  border-left: 2px solid rgba(255,255,255,0.2);
}

.container-header .mod-menu__sub .mod-menu__sub a {
  padding: 6px 16px;
  font-size: 0.95em;
}

/* -----------------------------------------------------
   5. Active / Open Parent Highlight
   ----------------------------------------------------- */
.container-header .mod-menu li.parent:has(> .mod-menu__toggle-sub[aria-expanded="true"]),
.container-header .mod-menu li.parent.active > a,
.container-header .mod-menu li.parent:hover > a {
  background-color: color-mix(in srgb, var(--headerbg), white 15%);
  color: #ffffff;
}

/* underline indicator */
.container-header .mod-menu li.parent:has(> .mod-menu__toggle-sub[aria-expanded="true"]) > a::after {
  content: "";
  display: block;
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 3px;
  background-color: #cce0ff;
  border-radius: 2px;
}

/* -----------------------------------------------------
   6. Link Transitions & Underline Glide
   ----------------------------------------------------- */
.container-header .mod-menu a {
  transition: color 0.25s ease, background-color 0.25s ease;
}

.container-header .mod-menu > li > a {
  position: relative;
  text-decoration: none;
}

.container-header .mod-menu > li > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  background-color: #cce0ff;
  transition: all 0.25s ease;
  transform: translateX(-50%);
}

.container-header .mod-menu > li:hover > a::after,
.container-header .mod-menu > li.active > a::after {
  width: 60%;
}

/* -----------------------------------------------------
   7. Active-Page Indicator
   ----------------------------------------------------- */
.container-header .mod-menu li.current.active > a,
.container-header .mod-menu li.current.active > span {
  background-color: color-mix(in srgb, var(--headerbg), white 18%);
  color: #ffffff;
}

/* -----------------------------------------------------
   8. Mobile Menu Consistency
   ----------------------------------------------------- */
@media (max-width: 992px) {
  .container-header .mod-menu {
    background-color: var(--headerbg);
  }

  .container-header .mod-menu__sub {
    background-color: color-mix(in srgb, var(--headerbg), white 25%);
  }

  .container-header .mod-menu__sub .mod-menu__sub {
    background-color: color-mix(in srgb, var(--headerbg), white 35%);
  }

  .container-header .mod-menu a {
    color: #ffffff;
  }

  .container-header .mod-menu a:hover {
    background-color: color-mix(in srgb, var(--headerbg), black 10%);
  }
}

/* -----------------------------------------------------
   9. Animated Arrow Cue (Works on Hover & Active)
   ----------------------------------------------------- */
.container-header .mod-menu .icon-angle-down {
  transition: transform 0.3s ease, color 0.3s ease;
  margin-left: 4px;
  font-size: 0.9em;
}

.container-header .mod-menu > li:hover > a .icon-angle-down,
.container-header .mod-menu > li:hover > button .icon-angle-down {
  transform: rotate(180deg);
  color: #cce0ff;
}

.container-header .mod-menu li.parent:has(> .mod-menu__toggle-sub[aria-expanded="true"]) .icon-angle-down {
  transform: rotate(180deg);
  color: #cce0ff;
}
/* -----------------------------------------------------
   10. Force dropdown to open when hovering the main item
   ----------------------------------------------------- */

/* Ensure JS aria-expanded logic doesn't override hover */
.container-header .mod-menu > li:hover > .mod-menu__sub,
.container-header .mod-menu li:hover > .mod-menu__sub {
  display: block !important;        /* force visibility */
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Parent highlight on hover */
.container-header .mod-menu > li:hover > a,
.container-header .mod-menu > li:hover > button {
  background-color: color-mix(in srgb, var(--headerbg), white 15%);
  color: #ffffff;
}

/* Prevent flicker when mouse leaves briefly */
.container-header .mod-menu li {
  position: relative;
}

.container-header .mod-menu li .mod-menu__sub {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 1000;
}

/* Minor hover delay for smoother feel */
@media (hover: hover) and (pointer: fine) {
  .container-header .mod-menu > li:hover > .mod-menu__sub {
    transition-delay: 0.05s;
  }
}
/* -----------------------------------------------------
   11. Show 2nd-level submenu items when hovering parent
   ----------------------------------------------------- */
.container-header .mod-menu__sub li:hover > .mod-menu__sub {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Keep second-level styling consistent */
.container-header .mod-menu__sub .mod-menu__sub {
  position: static !important;
  background-color: color-mix(in srgb, var(--headerbg), white 30%);
  box-shadow: none;
  padding-left: 12px;
  border-left: 2px solid rgba(255,255,255,0.2);
}
/* -----------------------------------------------------
   12. Second-level submenu override for hover display (fixed)
   ----------------------------------------------------- */

/* Force show if parent is hovered OR aria-expanded is true */
.container-header .mod-menu__sub li:hover > ul[aria-expanded],
.container-header .mod-menu__sub li > ul[aria-expanded="true"],
.container-header .mod-menu__sub li:hover > ul[style*="display:none"],
.container-header .mod-menu__sub li:hover > ul.mod-menu__sub {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  height: auto !important;
}

/* Layout & style */
.container-header .mod-menu__sub ul.mod-menu__sub {
  position: static !important;
  margin-top: 4px;
  background-color: color-mix(in srgb, var(--headerbg), white 25%);
  box-shadow: none;
  border-left: 2px solid rgba(255,255,255,0.25);
  padding-left: 14px;
  z-index: 1001;
}

/* ensure the parent stays active when child submenu is visible */
.container-header .mod-menu__sub li:hover > a {
  background-color: color-mix(in srgb, var(--headerbg), white 12%);
  color: #ffffff;
}
/* -----------------------------------------------------
   13. Final Fix — Ensure second-level submenu shows on hover
   ----------------------------------------------------- */

/* Reveal nested submenus even if Joomla JS hides them */
.container-header .mod-menu__sub li:hover > ul.mod-menu__sub {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
  height: auto !important;
}

/* Force layout stacking for nested submenus */
.container-header .mod-menu__sub ul.mod-menu__sub {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  margin-top: 4px !important;
  background-color: color-mix(in srgb, var(--headerbg), white 22%);
  border-left: 2px solid rgba(255,255,255,0.2);
  padding-left: 14px;
  box-shadow: none !important;
  z-index: 2000;
}

/* Ensure all li parents allow hover to trigger child visibility */
.container-header .mod-menu__sub li {
  position: relative !important;
}

/* Keep colors consistent */
.container-header .mod-menu__sub ul.mod-menu__sub a {
  color: #ffffff !important;
}
/* -----------------------------------------------------
   14. Fix visibility for aria-hidden nested submenus
   ----------------------------------------------------- */

/* Make second-level submenus visible on hover, overriding aria-hidden */
.container-header .mod-menu__sub li:hover > ul[aria-hidden="true"] {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
  height: auto !important;
  z-index: 9999;
}

/* Keep proper stacking and indentation */
.container-header .mod-menu__sub ul.mod-menu__sub {
  position: relative !important;
  left: 0 !important;
  margin-top: 4px !important;
  padding-left: 14px !important;
  border-left: 2px solid rgba(255,255,255,0.25);
  background-color: color-mix(in srgb, var(--headerbg), white 25%);
  box-shadow: none !important;
}

/* Parent stays highlighted while submenu visible */
.container-header .mod-menu__sub li:hover > a {
  background-color: color-mix(in srgb, var(--headerbg), white 12%) !important;
  color: #ffffff !important;
}
/* =====================================================
   FINAL FIX – Show second-level dropdowns on hover
   ===================================================== */

/* Reveal nested submenus even if Joomla hides them */
.container-header .mod-menu__sub li:hover > ul.mod-menu__sub.list-unstyled.small {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  height: auto !important;
  z-index: 9999 !important;
}

/* Override Joomla inline 'display:none' and aria-hidden lock */
.container-header .mod-menu__sub li:hover > ul.mod-menu__sub[aria-hidden="true"],
.container-header .mod-menu__sub li:hover > ul.mod-menu__sub[style*="display:none"] {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Keep stacked vertical layout with indentation */
.container-header .mod-menu__sub ul.mod-menu__sub {
  position: relative !important;
  left: 0 !important;
  top: 0 !important;
  margin: 4px 0 0 14px !important;
  padding: 0 !important;
  background-color: color-mix(in srgb, var(--headerbg), white 25%);
  border-left: 2px solid rgba(255,255,255,0.25);
  box-shadow: none !important;
}

/* Nested links style */
.container-header .mod-menu__sub ul.mod-menu__sub a {
  color: #ffffff !important;
  padding: 6px 16px !important;
  font-size: 0.95em;
}

/* Keep parent highlighted while nested submenu visible */
.container-header .mod-menu__sub li:hover > a {
  background-color: color-mix(in srgb, var(--headerbg), white 15%) !important;
  color: #ffffff !important;
}
/* =====================================================
   Fix 2nd-Level Submenu Visibility (Stacked Layout)
   ===================================================== */
.container-header .mod-menu__sub .mod-menu__sub {
  position: static !important;         /* keep it inside the column stack */
  display: block !important;           /* ensure it's visible */
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;

  background-color: color-mix(in srgb, var(--headerbg), white 30%);
  box-shadow: none;
  padding-left: 14px;
  border-left: 2px solid rgba(255,255,255,0.25);
  margin-top: 4px;
}

/* ensure parent list item expands to fit child submenu */
.container-header .mod-menu__sub li.deeper {
  overflow: visible !important;
}
/* =====================================================
   13. Polished Visual & Motion Enhancements (Safe Add-on)
   ===================================================== */

/* 1. Subtle fade-in / fade-out transitions */
.container-header .mod-menu__sub {
  transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out, visibility 0.25s ease-in-out !important;
}

/* 2. Slight rounding + softer shadow for dropdown panels */
.container-header .mod-menu__sub {
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* 3. Add a smooth delay fade-out so dropdowns don’t vanish instantly */
@media (hover: hover) and (pointer: fine) {
  .container-header .mod-menu li:hover > .mod-menu__sub {
    transition-delay: 0s !important; /* instant on hover */
  }

  .container-header .mod-menu li:not(:hover) > .mod-menu__sub {
    transition-delay: 0.15s !important; /* graceful fade-out */
  }
}

/* 4. Slight arrow animation when submenu is active or hovered */
.container-header .mod-menu .icon-angle-down {
  transition: transform 0.3s ease, color 0.3s ease;
}

.container-header .mod-menu li:hover > a .icon-angle-down,
.container-header .mod-menu li:hover > button .icon-angle-down,
.container-header .mod-menu li.parent:has(> .mod-menu__toggle-sub[aria-expanded="true"]) .icon-angle-down {
  transform: rotate(180deg);
  color: #cce0ff;
}
/* =====================================================
   14. Gentle Motion Enhancement (Safe Add-on)
   ===================================================== */

/* Soften the dropdown motion with longer transitions */
.container-header .mod-menu__sub {
  transition:
    opacity 0.4s ease-in-out,
    transform 0.4s ease-in-out,
    visibility 0.4s ease-in-out !important;
}

/* Gentle fade delay: appears quickly, fades out softly */
@media (hover: hover) and (pointer: fine) {
  .container-header .mod-menu li:hover > .mod-menu__sub {
    transition-delay: 0.05s !important; /* slight anticipation */
  }

  .container-header .mod-menu li:not(:hover) > .mod-menu__sub {
    transition-delay: 0.25s !important; /* slower fade-out */
  }
}

/* Smooth arrow rotation synced with the new timing */
.container-header .mod-menu .icon-angle-down {
  transition: transform 0.4s ease-in-out, color 0.4s ease-in-out;
}
/* =====================================================
   15. Subtle Glow & Gradient Edge Enhancement
   ===================================================== */

/* Gentle gradient and faint outer glow for dropdown panels */
.container-header .mod-menu__sub {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--headerbg), white 18%) 0%,
    color-mix(in srgb, var(--headerbg), white 8%) 100%
  );
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.25),
    0 0 6px rgba(204, 224, 255, 0.25); /* soft bluish glow */

    border-radius: 8px;
  backdrop-filter: blur(2px);
}

/* =====================================================
   16. Card and Page Visual Enhancements
   ===================================================== */

/* Give all cards a soft lift and consistent spacing */
.card {
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin-bottom: 1.5rem;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.card-header {
  background-color: #f4f8fb;
  font-weight: 600;
}
.card img {
  border-radius: 8px;
  margin-bottom: 10px;
}

/* =====================================================
   17. Typography & Link Refinement
   ===================================================== */
body {
  font-family: "Noto Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  background-color: #fdfdfd;
}

h1, h2, h3 {
  font-family: "Roboto Slab", "Noto Sans", sans-serif;
  color: #204a68;
  font-weight: 700;
}

a, .link {
  color: #1d7989;
  text-decoration: none;
  transition: color 0.25s ease;
}
a:hover {
  color: #124f59;
  text-decoration: underline;
}

/* =====================================================
   18. Footer Polish
   ===================================================== */
footer.container-footer {
  background: linear-gradient(180deg, #204a68 0%, #183a55 100%);
  color: #fff;
  padding: 40px 0 25px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
}
footer a {
  color: #f4b860;
  text-decoration: none;
}
footer a:hover {
  color: #fff;
  text-decoration: underline;
}
footer img {
  opacity: 0.9;
  transition: opacity 0.3s;
}
footer img:hover {
  opacity: 1;
}

/* =====================================================
   19. Subtle Fade-In Animation for Cards
   ===================================================== */
.card {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeIn 0.6s ease-out forwards;
}
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   20. Final Tidy-Up
   ===================================================== */
.container-topbar h5,
footer h5 {
  margin: 0;
  line-height: 1.6;
}
footer.container-footer {
  background: linear-gradient(180deg, #255a80 0%, #1c4768 100%);
}

footer img {
  filter: brightness(1.25) contrast(1.1);
  opacity: 0.95;
  transition: filter 0.3s;
}

footer img:hover {
  filter: brightness(1.35) contrast(1.15);
}

/* =====================================================
   FIX FOOTER TEXT COLOR VISIBILITY
   ===================================================== */
footer.container-footer,
footer.container-footer * {
  color: #ffffff !important;
}

footer a {
  color: #f4b860 !important;
  text-decoration: none;
}
footer a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}
/* =====================================================
   FOOTER TYPOGRAPHY ENHANCEMENT
   ===================================================== */
footer.container-footer {
  font-size: 1rem;
  line-height: 1.8;
  letter-spacing: 0.01em;
  padding: 48px 0 36px;
}

footer.container-footer h5 {
  font-weight: 500;
  margin-bottom: 0.5em;
}

footer.container-footer a {
  font-weight: 500;
}
/* Card header refinement */
.card-header {
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0;
  color: #204a68;
  background: #f4f8fb;
  border-bottom: 1px solid #e3e6ea;
  padding: 0.75rem 1rem;
}
/* =====================================================
   21. Organizer Layout & Hover Effects (Final)
   ===================================================== */
.organizer-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

/* Clickable thumbnail using background images */
.organizer-thumb {
  width: 200px;
  height: 187px;
  margin-right: 20px;
  flex: 0 0 auto;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 6px;
  transition:
    background-image 0.25s ease-in-out,
    transform 0.25s ease,
    opacity 0.25s ease;
}

/* Fade + scale on hover */
.organizer-thumb:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* Default + Hover Background Images (root-relative paths) */
.organizer-thumb.tax        { background-image: url('/images/Organizers/Tax.png'); }
.organizer-thumb.tax:hover  { background-image: url('/images/Organizers/Tax-hover.png'); }

.organizer-thumb.tax-excel       { background-image: url('/images/Organizers/Tax-Excel.png'); }
.organizer-thumb.tax-excel:hover { background-image: url('/images/Organizers/Tax-Excel-hover.png'); }

.organizer-thumb.c       { background-image: url('/images/Organizers/C.png'); }
.organizer-thumb.c:hover { background-image: url('/images/Organizers/C-hover.png'); }

.organizer-thumb.e       { background-image: url('/images/Organizers/E.png'); }
.organizer-thumb.e:hover { background-image: url('/images/Organizers/E-hover.png'); }

/* Responsive stacking on narrow screens */
@media (max-width: 768px) {
  .organizer-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .organizer-thumb {
    margin-right: 0;
    margin-bottom: 15px;
  }
}
