/* ============================================
   BROWSER COMPATIBILITY ADDITIONS
   Add this after main CSS or merge into p4t-styles.css
   ============================================ */

/* Flexbox compatibility */
.p4t-navbar-content,
.p4t-nav-menu,
.p4t-top-bar-content,
.p4t-cards-grid {
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
}

/* Transform compatibility for slides and animations */
.p4t-slide,
.p4t-donate-btn-nav:hover,
.p4t-social-link:hover {
  -webkit-transform: translateX(0);
  -ms-transform: translateX(0);
  transform: translateX(0);
}

/* Transition compatibility */
.p4t-nav-link,
.p4t-donate-btn-top,
.p4t-donate-btn-nav,
.p4t-dropdown-item a,
.p4t-slide {
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

/* Border-radius compatibility - buttons and social links only */
.p4t-donate-btn-top,
.p4t-donate-btn-nav,
.p4t-social-link {
  -webkit-border-radius: 30px;
  -moz-border-radius: 30px;
  border-radius: 30px;
}

/* Box-shadow compatibility — navbar and cards only.
   .p4t-dropdown-menu is intentionally excluded:
   on desktop it has its own shadow; on mobile it must be shadowless. */
.p4t-navbar,
.p4t-card {
  -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Background-size compatibility for hero slider */
.p4t-slide-bg {
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

/* Animation compatibility */
@-webkit-keyframes p4t-slideDownSmooth {
  from {
    -webkit-transform: translateY(-100%);
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }
}

@-moz-keyframes p4t-slideDownSmooth {
  from {
    -moz-transform: translateY(-100%);
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    -moz-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }
}

/* Appearance: none for form elements (cross-browser) */
button,
input,
select,
textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* User-select: none for toggle button */
.p4t-mobile-toggle {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Backdrop filter for sticky navbar on modern browsers */
@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .p4t-navbar.p4t-sticky {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

/* Safari-specific fixes */
@media not all and (min-resolution:.001dpcm) {
  @supports (-webkit-appearance:none) {
    .p4t-slide-bg {
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
    }
  }
}

/* IE11 specific fixes — nav-menu only, NOT dropdown-menu.
   Removing dropdown-menu from here prevents display:-ms-flexbox
   from breaking the max-height:0 collapse used on mobile. */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .p4t-nav-menu {
    display: -ms-flexbox;
  }
}

/* Edge legacy fixes */
@supports (-ms-ime-align:auto) {
  .p4t-nav-menu {
    display: -ms-flexbox;
  }
}

/* Firefox-specific font rendering */
@-moz-document url-prefix() {
  body {
    -moz-osx-font-smoothing: grayscale;
  }
}


/* ============================================
   ACTIVE STATE OVERRIDES
   Forces orange-text-only active states —
   no underline bar, no border, no background
   ============================================ */

/* Active top-level nav link — orange text only */
.p4t-nav-link.p4t-active {
  color: #F37021 !important;
}

.p4t-nav-link.p4t-active::after,
.p4t-nav-link.p4t-active::before {
  display: none !important;
  border: none !important;
  background: none !important;
  transform: none !important;
}

/* Active dropdown item — orange text only, no border or background */
.p4t-dropdown-item a.p4t-active {
  color: #F37021 !important;
  font-weight: 600 !important;
  background-color: transparent !important;
  border: none !important;
  border-left: none !important;
  padding-left: 20px !important;
}


/* ============================================
   MOBILE DROPDOWN MENU — COMPAT SAFEGUARD
   FIXED: Added position: static !important
   ============================================ */
@media (max-width: 768px) {
  .p4t-dropdown-menu {
    position: static !important;
    display: block !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    box-shadow: none !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-left: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}